public abstract class SingleFieldMapping extends JavaTypeMapping
| Modifier and Type | Field and Description |
|---|---|
static String |
EXTENSION_CHECK_CONSTRAINT_VALUES
Metadata extension key that the column needs a CHECK constraint in the datastore on specific values.
|
absFieldNumber, columnMappings, mmd, referenceMapping, roleForMember, storeMgr, table, type| Constructor and Description |
|---|
SingleFieldMapping() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getBoolean(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
Obtains a value from
datastoreResults at position specified by exprIndex. |
byte |
getByte(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
Obtains a value from
datastoreResults at position specified by exprIndex. |
char |
getChar(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
Obtains a value from
datastoreResults at position specified by exprIndex. |
int |
getDefaultLength(int index)
Accessor for the default length for this type in the datastore (if applicable).
|
double |
getDouble(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
Obtains a value from
datastoreResults at position specified by exprIndex. |
float |
getFloat(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
Obtains a value from
datastoreResults at position specified by exprIndex. |
int |
getInt(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
Obtains a value from
datastoreResults at position specified by exprIndex. |
String |
getJavaTypeForColumnMapping(int index)
Accessor for the name of the java-type actually used when mapping the particular datastore
field.
|
long |
getLong(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
Obtains a value from
datastoreResults at position specified by exprIndex. |
Object |
getObject(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
Obtains a value from
datastoreResults at position specified by exprIndex. |
short |
getShort(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
Obtains a value from
datastoreResults at position specified by exprIndex. |
String |
getString(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
Obtains a value from
datastoreResults at position specified by exprIndex. |
Object[] |
getValidValues(int index)
Accessor for an array of valid values that this type can take.
|
void |
initialize(org.datanucleus.metadata.AbstractMemberMetaData fmd,
Table table,
org.datanucleus.ClassLoaderResolver clr)
Initialize this JavaTypeMapping with the given DatastoreAdapter for the given FieldMetaData.
|
protected void |
prepareColumnMapping()
Method to prepare a column mapping for use in the datastore.
|
void |
setBoolean(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
boolean value)
Sets a
value into datastoreStatement at position specified by exprIndex. |
void |
setByte(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
byte value)
Sets a
value into datastoreStatement at position specified by exprIndex. |
void |
setChar(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
char value)
Sets a
value into datastoreStatement at position specified by exprIndex. |
void |
setDouble(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
double value)
Sets a
value into datastoreStatement at position specified by exprIndex. |
void |
setFloat(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
float value)
Sets a
value into datastoreStatement at position specified by exprIndex. |
void |
setInt(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
int value)
Sets a
value into datastoreStatement at position specified by exprIndex. |
void |
setLong(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
long value)
Sets a
value into datastoreStatement at position specified by exprIndex. |
void |
setObject(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
Object value)
Sets a
value into datastoreStatement at position specified by exprIndex. |
void |
setShort(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
short value)
Sets a
value into datastoreStatement at position specified by exprIndex. |
void |
setString(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
String value)
Sets a
value into datastoreStatement at position specified by exprIndex. |
addColumnMapping, equals, failureMessage, getAbsoluteFieldNumber, getColumnMapping, getColumnMappings, getColumnMetaDataForMember, getJavaType, getMemberMetaData, getNumberOfColumnMappings, getObject, getReferenceMapping, getRoleForMember, getStoreManager, getTable, getType, getValueForColumnMapping, hashCode, hasSimpleDatastoreRepresentation, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, representableAsStringLiteralInStatement, setAbsFieldNumber, setMemberMetaData, setObject, setReferenceMapping, setRoleForMember, setTablepublic static final String EXTENSION_CHECK_CONSTRAINT_VALUES
public void initialize(org.datanucleus.metadata.AbstractMemberMetaData fmd,
Table table,
org.datanucleus.ClassLoaderResolver clr)
initialize in class JavaTypeMappingtable - The datastore container storing this mapping (if any)clr - the ClassLoaderResolverfmd - FieldMetaData for the field to be mapped (if any)protected void prepareColumnMapping()
public int getDefaultLength(int index)
index - requested column index.public Object[] getValidValues(int index)
index - requested column index.public String getJavaTypeForColumnMapping(int index)
getJavaTypeForColumnMapping in class JavaTypeMappingindex - requested column index.public void setBoolean(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
boolean value)
JavaTypeMappingvalue into datastoreStatement at position specified by exprIndex.setBoolean in class JavaTypeMappingec - ExecutionContextps - PreparedStatementexprIndex - the position of the value in the statementvalue - the valuepublic boolean getBoolean(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults at position specified by exprIndex.getBoolean in class JavaTypeMappingec - ExecutionContextresultSet - ResultSetexprIndex - the position of the value in the resultpublic void setChar(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
char value)
JavaTypeMappingvalue into datastoreStatement at position specified by exprIndex.setChar in class JavaTypeMappingec - ExecutionContextps - PreparedStatementexprIndex - the position of the value in the statementvalue - the valuepublic char getChar(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults at position specified by exprIndex.getChar in class JavaTypeMappingec - ExecutionContextresultSet - ResultSetexprIndex - the position of the value in the resultpublic void setByte(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
byte value)
JavaTypeMappingvalue into datastoreStatement at position specified by exprIndex.setByte in class JavaTypeMappingec - ExecutionContextps - PreparedStatementexprIndex - the position of the value in the statementvalue - the valuepublic byte getByte(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults at position specified by exprIndex.getByte in class JavaTypeMappingec - ExecutionContextresultSet - ResultSetexprIndex - the position of the value in the resultpublic void setShort(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
short value)
JavaTypeMappingvalue into datastoreStatement at position specified by exprIndex.setShort in class JavaTypeMappingec - execution contextps - PreparedStatementexprIndex - the position of the value in the statementvalue - the valuepublic short getShort(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults at position specified by exprIndex.getShort in class JavaTypeMappingec - ExecutionContextresultSet - ResultSetexprIndex - the position of the value in the resultpublic void setInt(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
int value)
JavaTypeMappingvalue into datastoreStatement at position specified by exprIndex.setInt in class JavaTypeMappingec - ExecutionContextps - PreparedStatementexprIndex - the position of the value in the statementvalue - the valuepublic int getInt(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults at position specified by exprIndex.getInt in class JavaTypeMappingec - ExecutionContextresultSet - ResultSetexprIndex - the position of the value in the resultpublic void setLong(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
long value)
JavaTypeMappingvalue into datastoreStatement at position specified by exprIndex.setLong in class JavaTypeMappingec - ExecutionContextps - PreparedStatementexprIndex - the position of the value in the statementvalue - the valuepublic long getLong(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults at position specified by exprIndex.getLong in class JavaTypeMappingec - ExecutionContextresultSet - ResultSetexprIndex - the position of the value in the resultpublic void setFloat(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
float value)
JavaTypeMappingvalue into datastoreStatement at position specified by exprIndex.setFloat in class JavaTypeMappingec - ExecutionContextps - PreparedStatementexprIndex - the position of the value in the statementvalue - the valuepublic float getFloat(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults at position specified by exprIndex.getFloat in class JavaTypeMappingec - ExecutionContextresultSet - ResultSetexprIndex - the position of the value in the resultpublic void setDouble(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
double value)
JavaTypeMappingvalue into datastoreStatement at position specified by exprIndex.setDouble in class JavaTypeMappingec - ExecutionContextps - PreparedStatementexprIndex - the position of the value in the statementvalue - the valuepublic double getDouble(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults at position specified by exprIndex.getDouble in class JavaTypeMappingec - ExecutionContextresultSet - ResultSetexprIndex - the position of the value in the resultpublic void setString(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
String value)
JavaTypeMappingvalue into datastoreStatement at position specified by exprIndex.setString in class JavaTypeMappingec - ExecutionContextps - PreparedStatementexprIndex - the position of the value in the statementvalue - the valuepublic String getString(org.datanucleus.ExecutionContext ec, ResultSet resultSet, int[] exprIndex)
JavaTypeMappingdatastoreResults at position specified by exprIndex.getString in class JavaTypeMappingec - ExecutionContextresultSet - ResultSetexprIndex - the position of the value in the resultpublic void setObject(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
Object value)
JavaTypeMappingvalue into datastoreStatement at position specified by exprIndex.setObject in class JavaTypeMappingec - ExecutionContextps - PreparedStatementexprIndex - the position of the value in the statementvalue - the valuepublic Object getObject(org.datanucleus.ExecutionContext ec, ResultSet resultSet, int[] exprIndex)
JavaTypeMappingdatastoreResults at position specified by exprIndex.getObject in class JavaTypeMappingec - ExecutionContextresultSet - ResultSetexprIndex - the position of the value in the resultCopyright © 2020. All rights reserved.