org.datanucleus.store.mapped.mapping
Class MappingFactory

java.lang.Object
  extended by org.datanucleus.store.mapped.mapping.MappingFactory

public final class MappingFactory
extends java.lang.Object

Factory class for creating Mapping instances. This is called to generate field mappings for the classes to be persisted.


Method Summary
static JavaTypeMapping createMapping(java.lang.Class mappingClass, DatastoreAdapter dba, AbstractMemberMetaData mmd, int roleForField, DatastoreContainerObject datastoreContainer, ClassLoaderResolver clr)
          Get a new instance of the Mapping providing full field/property details and the role of this mapping within that field.
protected static JavaTypeMapping createMapping(java.lang.Class mappingClass, MappedStoreManager storeMgr, java.lang.String type)
          Get a new instance of the Mapping using the StoreManager and type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createMapping

protected static JavaTypeMapping createMapping(java.lang.Class mappingClass,
                                               MappedStoreManager storeMgr,
                                               java.lang.String type)
Get a new instance of the Mapping using the StoreManager and type. This creates a mapping that doesn't have its field/table set and typically used to represent a parameter in a query.

Parameters:
mappingClass - the Mapping class to be created
storeMgr - The StoreManager
type - The type
Returns:
The Mapping

createMapping

public static JavaTypeMapping createMapping(java.lang.Class mappingClass,
                                            DatastoreAdapter dba,
                                            AbstractMemberMetaData mmd,
                                            int roleForField,
                                            DatastoreContainerObject datastoreContainer,
                                            ClassLoaderResolver clr)
Get a new instance of the Mapping providing full field/property details and the role of this mapping within that field.

Parameters:
mappingClass - the Mapping class to be created
dba - Datastore Adapter
mmd - MetaData for the field/property to be mapped
datastoreContainer - The Table
clr - The ClassLoaderResolver
Returns:
The Mapping


Copyright © 2010. All Rights Reserved.