Class SingleFieldMultiMapping
java.lang.Object
org.datanucleus.store.rdbms.mapping.java.JavaTypeMapping
org.datanucleus.store.rdbms.mapping.java.SingleFieldMultiMapping
- Direct Known Subclasses:
GregorianCalendarMapping
,TypeConverterMultiMapping
Mapping to represent a field that is mapped to multiple datastore columns.
-
Field Summary
Fields inherited from class org.datanucleus.store.rdbms.mapping.java.JavaTypeMapping
absFieldNumber, columnMappings, mmd, referenceMapping, roleForMember, storeMgr, table, type
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addColumns
(String typeName) Convenience method to add a column for this mapping.getJavaTypeForColumnMapping
(int index) Accessor for the name of the java-type actually used when mapping the particular datastore field.boolean
Whether the mapping has a simple (single column) datastore representation.Methods inherited from class org.datanucleus.store.rdbms.mapping.java.JavaTypeMapping
addColumnMapping, equals, failureMessage, getAbsoluteFieldNumber, getBoolean, getByte, getChar, getColumnMapping, getColumnMappings, getColumnMetaDataForMember, getDouble, getFloat, getInt, getJavaType, getLong, getMemberMetaData, getNumberOfColumnMappings, getObject, getObject, getReferenceMapping, getRoleForMember, getShort, getStoreManager, getString, getTable, getType, getValueForColumnMapping, hashCode, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, initialize, isNullable, isSerialised, performSetPostProcessing, representableAsStringLiteralInStatement, requiresSetPostProcessing, setAbsFieldNumber, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setMemberMetaData, setObject, setObject, setReferenceMapping, setRoleForMember, setShort, setString, setTable
-
Constructor Details
-
SingleFieldMultiMapping
public SingleFieldMultiMapping()
-
-
Method Details
-
addColumns
Convenience method to add a column for this mapping. If this mapping is a "full" mapping (for a field in a table) then a Column will be added, otherwise (mapping representing a parameter in a query) will just add a datastore mapping. The column mapping is added to the end of the columnMappings.- Parameters:
typeName
- Java type of the field to add the column for.
-
getJavaTypeForColumnMapping
Accessor for the name of the java-type actually used when mapping the particular datastore field. This java-type must have an entry in the datastore mappings.- Overrides:
getJavaTypeForColumnMapping
in classJavaTypeMapping
- Parameters:
index
- requested column index.- Returns:
- the name of java-type for the requested column.
-
hasSimpleDatastoreRepresentation
public boolean hasSimpleDatastoreRepresentation()Whether the mapping has a simple (single column) datastore representation.- Overrides:
hasSimpleDatastoreRepresentation
in classJavaTypeMapping
- Returns:
- Whether it has a simple datastore representation (single column)
-