Class JdbcQueryParameter
java.lang.Object
com.northconcepts.datapipeline.foundations.core.Bean
com.northconcepts.datapipeline.foundations.jdbc.JdbcQueryParameter
- All Implemented Interfaces:
DataExceptionContributor,JsonSerializable,RecordSerializable,XmlSerializable,Serializable
A
? parameter of a JdbcQuery: its name, Java and SQL types, and an expression giving the example value
bound when JdbcConnection.loadQueries() runs the query.- See Also:
-
Field Summary
FieldsFields inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
SERIALIZED_CLASS_NAME, TYPEFields inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
XML_SERIALIZED_CLASS_NAME -
Constructor Summary
ConstructorsConstructorDescriptionJdbcQueryParameter(String name, Class<?> javaType, Integer sqlType, String exampleValueExpression) -
Method Summary
Modifier and TypeMethodDescriptionfromRecord(Record source) Loads this instance's state from a record and returnsthis(for fluid API call chaining).Evaluates the example value expression and converts the result to the Java type; returns null if there is no expression.Returns the DataPipeline expression whose result, converted to the Java type, is the example value; null means a null value.Class<?> getName()Returns the name as a camel-case Java identifier, e.g.Returns thejava.sql.Typescode used to bind the example value, or null to let the driver infer it.setExampleValueExpression(String exampleValueExpression) Sets the DataPipeline expression whose result, converted to the Java type, is the example value; null means a null value.setJavaType(Class<?> javaType) voidsetSqlType(Integer sqlType) Sets thejava.sql.Typescode used to bind the example value, or null to let the driver infer it.toRecord()Converts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.Methods inherited from class com.northconcepts.datapipeline.foundations.core.Bean
addExceptionProperties, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.northconcepts.datapipeline.core.DataExceptionContributor
addExceptionProperties, exception, exception, exceptionMethods inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
fromJson, fromJson, toJson, toJson, toJsonMethods inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
fromXml, fromXml, fromXmlElement, toXml, toXml, toXml, toXml, toXml, toXmlElement
-
Field Details
-
NAME_COMPARATOR
-
-
Constructor Details
-
JdbcQueryParameter
public JdbcQueryParameter() -
JdbcQueryParameter
-
-
Method Details
-
getName
-
getNameAsJavaIdentifier
Returns the name as a camel-case Java identifier, e.g.firstNameforFIRST_NAME. -
setName
-
getJavaType
-
setJavaType
-
getSqlType
Returns thejava.sql.Typescode used to bind the example value, or null to let the driver infer it. -
setSqlType
Sets thejava.sql.Typescode used to bind the example value, or null to let the driver infer it. -
getExampleValueExpression
Returns the DataPipeline expression whose result, converted to the Java type, is the example value; null means a null value. -
setExampleValueExpression
Sets the DataPipeline expression whose result, converted to the Java type, is the example value; null means a null value. -
getExampleValue
Evaluates the example value expression and converts the result to the Java type; returns null if there is no expression.- Throws:
Throwable
-
toRecord
Description copied from interface:RecordSerializableConverts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.- Specified by:
toRecordin interfaceRecordSerializable- Overrides:
toRecordin classBean
-
fromRecord
Description copied from interface:RecordSerializableLoads this instance's state from a record and returnsthis(for fluid API call chaining). For fluid API call chaining, the overridden method should change the declared return type to its class.- Specified by:
fromRecordin interfaceRecordSerializable- Overrides:
fromRecordin classBean- Parameters:
source-- Returns:
- this instance.
-