org.datanucleus.store.mapped.mapping
Class MultiMapping

java.lang.Object
  extended by org.datanucleus.store.mapped.mapping.JavaTypeMapping
      extended by org.datanucleus.store.mapped.mapping.MultiMapping
Direct Known Subclasses:
MultiPersistableMapping, PersistableMapping

public abstract class MultiMapping
extends JavaTypeMapping

Mapping to represent multiple mappings within the single overall java type mapping. This mapping can be used to represent, for example,


Field Summary
protected  JavaTypeMapping[] javaTypeMappings
          The Java mappings represented by this mapping.
protected  int numberOfDatastoreMappings
          Number of datastore mappings - for convenience to improve performance
 
Fields inherited from class org.datanucleus.store.mapped.mapping.JavaTypeMapping
absFieldNumber, datastoreContainer, datastoreMappings, LOCALISER, mmd, referenceMapping, roleForMember, storeMgr, type
 
Constructor Summary
MultiMapping()
           
 
Method Summary
 void addJavaTypeMapping(JavaTypeMapping mapping)
          Method to add a Java type mapping for a field
 DatastoreMapping getDatastoreMapping(int index)
          Accessor for a datastore mapping.
 DatastoreMapping[] getDatastoreMappings()
          Accessor for the datastore mappings for this java type
 JavaTypeMapping[] getJavaTypeMapping()
          Accessor for the Java type mappings
 int getNumberOfDatastoreMappings()
          Accessor for the number of datastore mappings.
 
Methods inherited from class org.datanucleus.store.mapped.mapping.JavaTypeMapping
addDatastoreMapping, equals, failureMessage, getAbsoluteFieldNumber, getBoolean, getByte, getChar, getColumnMetaDataForMember, getDatastoreContainer, getDouble, getFloat, getInt, getJavaType, getJavaTypeForDatastoreMapping, getLong, getMemberMetaData, getObject, getObject, getReferenceMapping, getRoleForMember, getShort, getStoreManager, getString, getType, getValueForDatastoreMapping, hashCode, hasSimpleDatastoreRepresentation, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, initialize, isNullable, isSerialised, representableAsStringLiteralInStatement, setAbsFieldNumber, setBoolean, setByte, setChar, setDatastoreContainer, setDouble, setFloat, setInt, setLong, setMemberMetaData, setObject, setObject, setReferenceMapping, setRoleForMember, setShort, setString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

javaTypeMappings

protected JavaTypeMapping[] javaTypeMappings
The Java mappings represented by this mapping.


numberOfDatastoreMappings

protected int numberOfDatastoreMappings
Number of datastore mappings - for convenience to improve performance

Constructor Detail

MultiMapping

public MultiMapping()
Method Detail

addJavaTypeMapping

public void addJavaTypeMapping(JavaTypeMapping mapping)
Method to add a Java type mapping for a field

Parameters:
mapping - The mapping to add

getJavaTypeMapping

public JavaTypeMapping[] getJavaTypeMapping()
Accessor for the Java type mappings

Returns:
The Java type mappings

getNumberOfDatastoreMappings

public int getNumberOfDatastoreMappings()
Accessor for the number of datastore mappings.

Overrides:
getNumberOfDatastoreMappings in class JavaTypeMapping
Returns:
The number of datastore mappings.

getDatastoreMappings

public DatastoreMapping[] getDatastoreMappings()
Description copied from class: JavaTypeMapping
Accessor for the datastore mappings for this java type

Overrides:
getDatastoreMappings in class JavaTypeMapping
Returns:
The datastore mapping(s)

getDatastoreMapping

public DatastoreMapping getDatastoreMapping(int index)
Accessor for a datastore mapping.

Overrides:
getDatastoreMapping in class JavaTypeMapping
Parameters:
index - The position of the mapping to return
Returns:
The datastore mapping


Copyright © 2012. All Rights Reserved.