Class BaseJdbcOutputStore.StructMappingToColumnMapping
java.lang.Object
nz.org.riskscape.engine.defaults.data.jdbc.BaseJdbcOutputStore.StructMappingToColumnMapping
- Enclosing class:
- BaseJdbcOutputStore
Data to allow the mapping of a StructFlattener.StructMapping to a DB column.
-
Constructor Summary
ConstructorsConstructorDescriptionStructMappingToColumnMapping(nz.org.riskscape.engine.output.StructFlattener.StructMapping structMapping, String dbColumnType, Function<Object, Object> mapper) StructMappingToColumnMapping(nz.org.riskscape.engine.output.StructFlattener.StructMapping structMapping, String dbColumnType, Function<Object, Object> mapper, Optional<Integer> sqlType) Creates a newStructMappingToColumnMappinginstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe SQL type that will be required for storing the mapped values.AFunctionto translate the RiskScape value into one that is a type compatible withgetDbColumnType().An optional integer that when supplied will be passed toPreparedStatement.setObject(int, java.lang.Object, int)in argument three.nz.org.riskscape.engine.output.StructFlattener.StructMappingTheStructFlattener.StructMappingthat is the source of the data.inthashCode()toString()
-
Constructor Details
-
StructMappingToColumnMapping
-
StructMappingToColumnMapping
public StructMappingToColumnMapping(nz.org.riskscape.engine.output.StructFlattener.StructMapping structMapping, String dbColumnType, Function<Object, Object> mapper, Optional<Integer> sqlType) Creates a new
StructMappingToColumnMappinginstance.- Parameters:
structMapping- TheStructFlattener.StructMappingthat is the source of the data.dbColumnType- The SQL type that will be required for storing the mapped values.mapper- AFunctionto translate the RiskScape value into one that is a type compatible withgetDbColumnType().sqlType- An optional integer that when supplied will be passed toPreparedStatement.setObject(int, java.lang.Object, int)in argument three.If not given the
PreparedStatement.setObject(int, java.lang.Object)is used instead.
-
-
Method Details
-
getStructMapping
public nz.org.riskscape.engine.output.StructFlattener.StructMapping getStructMapping()The
StructFlattener.StructMappingthat is the source of the data. -
getDbColumnType
The SQL type that will be required for storing the mapped values.
-
getMapper
A
Functionto translate the RiskScape value into one that is a type compatible withgetDbColumnType(). -
getSqlType
An optional integer that when supplied will be passed to
PreparedStatement.setObject(int, java.lang.Object, int)in argument three.If not given the
PreparedStatement.setObject(int, java.lang.Object)is used instead. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-