org.datanucleus.store.mapped.mapping
Class SingleFieldMultiMapping
java.lang.Object
org.datanucleus.store.mapped.mapping.JavaTypeMapping
org.datanucleus.store.mapped.mapping.SingleFieldMultiMapping
- Direct Known Subclasses:
- ColorMapping, GregorianCalendarMapping
public abstract class SingleFieldMultiMapping
- extends JavaTypeMapping
Mapping to represent a field that is mapped to multiple datastore columns.
| Methods inherited from class org.datanucleus.store.mapped.mapping.JavaTypeMapping |
addDatastoreMapping, equals, failureMessage, getAbsoluteFieldNumber, getBoolean, getByte, getChar, getColumnMetaDataForMember, getDatastoreContainer, getDatastoreMapping, getDatastoreMappings, getDouble, getFloat, getInt, getJavaType, getLong, getMemberMetaData, getNumberOfDatastoreMappings, getObject, getObject, getReferenceMapping, getRoleForMember, getShort, getStoreManager, getString, getType, getValueForDatastoreMapping, hashCode, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, initialize, isNullable, isSerialised, representableAsStringLiteralInStatement, setAbsFieldNumber, setBoolean, setByte, setChar, setDatastoreContainer, setDouble, setFloat, setInt, setLong, setMemberMetaData, setObject, setObject, setReferenceMapping, setRoleForMember, setShort, setString |
SingleFieldMultiMapping
public SingleFieldMultiMapping()
addDatastoreField
protected void addDatastoreField(String typeName)
- Convenience method to add a datastore field 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 datastore mapping is added to the end of the datastoreMappings.
- Parameters:
typeName - Java type of the field to add the column for.
getJavaTypeForDatastoreMapping
public String getJavaTypeForDatastoreMapping(int index)
- 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:
getJavaTypeForDatastoreMapping in class JavaTypeMapping
- Parameters:
index - requested datastore field index.
- Returns:
- the name of java-type for the requested datastore field.
hasSimpleDatastoreRepresentation
public boolean hasSimpleDatastoreRepresentation()
- Whether the mapping has a simple (single column) datastore representation.
- Overrides:
hasSimpleDatastoreRepresentation in class JavaTypeMapping
- Returns:
- Whether it has a simple datastore representation (single column)
Copyright © 2012. All Rights Reserved.