org.datanucleus.metadata
Class DefaultMetaDataFactory

java.lang.Object
  extended by org.datanucleus.metadata.DefaultMetaDataFactory
All Implemented Interfaces:
MetaDataFactory

public class DefaultMetaDataFactory
extends java.lang.Object
implements MetaDataFactory

Default implementation of MetaDataFactory.

Version:
$Revision: 1.4 $

Constructor Summary
DefaultMetaDataFactory()
           
 
Method Summary
 ClassMetaData newClassObject(PackageMetaData pmd, java.lang.String name, java.lang.String identityType, java.lang.String objectidClass, java.lang.String requiresExtent, java.lang.String detachable, java.lang.String embeddedOnly, java.lang.String modifier, java.lang.String persistenceCapableSuperclass, java.lang.String catalog, java.lang.String schema, java.lang.String table, java.lang.String entityName)
          Constructor for a ClassMetaData.
 FieldMetaData newFieldObject(MetaData md, AbstractMemberMetaData referenceFmd)
          Method to create a new field object copying from the supplied field
 FieldMetaData newFieldObject(MetaData md, java.lang.String name, java.lang.String pk, java.lang.String modifier, java.lang.String defaultFetchGroup, java.lang.String nullValue, java.lang.String embedded, java.lang.String serialized, java.lang.String dependent, java.lang.String mappedBy, java.lang.String column, java.lang.String table, java.lang.String catalog, java.lang.String schema, java.lang.String deleteAction, java.lang.String indexed, java.lang.String unique, java.lang.String recursionDepth, java.lang.String loadFetchGroup, java.lang.String valueStrategy, java.lang.String sequence, java.lang.String fieldType)
          Constructor for a FieldMetaData.
 InterfaceMetaData newInterfaceObject(PackageMetaData pmd, java.lang.String name, java.lang.String identityType, java.lang.String objectidClass, java.lang.String requiresExtent, java.lang.String detachable, java.lang.String embeddedOnly, java.lang.String catalog, java.lang.String schema, java.lang.String table, java.lang.String entityName)
          Constructor for an InterfaceMetaData.
 PropertyMetaData newPropertyObject(MetaData md, PropertyMetaData referencePmd)
          Method to create a new property object copying from the supplied object.
 PropertyMetaData newPropertyObject(MetaData md, java.lang.String name, java.lang.String pk, java.lang.String modifier, java.lang.String defaultFetchGroup, java.lang.String nullValue, java.lang.String embedded, java.lang.String serialized, java.lang.String dependent, java.lang.String mappedBy, java.lang.String column, java.lang.String table, java.lang.String catalog, java.lang.String schema, java.lang.String deleteAction, java.lang.String indexed, java.lang.String unique, java.lang.String recursionDepth, java.lang.String loadFetchGroup, java.lang.String valueStrategy, java.lang.String sequence, java.lang.String fieldType, java.lang.String fieldName)
          Constructor for a PropertyMetaData.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMetaDataFactory

public DefaultMetaDataFactory()
Method Detail

newClassObject

public ClassMetaData newClassObject(PackageMetaData pmd,
                                    java.lang.String name,
                                    java.lang.String identityType,
                                    java.lang.String objectidClass,
                                    java.lang.String requiresExtent,
                                    java.lang.String detachable,
                                    java.lang.String embeddedOnly,
                                    java.lang.String modifier,
                                    java.lang.String persistenceCapableSuperclass,
                                    java.lang.String catalog,
                                    java.lang.String schema,
                                    java.lang.String table,
                                    java.lang.String entityName)
Constructor for a ClassMetaData. Takes the basic string information found in the XML/annotations.

Specified by:
newClassObject in interface MetaDataFactory
Parameters:
pmd - MetaData for the package that this class belongs to
name - Name of class
identityType - Type of identity
objectidClass - Class of the object id
requiresExtent - Whether the class requires an extent
detachable - Whether this is detachable
embeddedOnly - embedded-only tag
modifier - persistence modifier for the class
persistenceCapableSuperclass - PC superclass (optional)
catalog - Name for catalog
schema - Name for schema
table - Name of the table where to persist objects of this type
entityName - the entity name required by JPA 4.3.1

newFieldObject

public FieldMetaData newFieldObject(MetaData md,
                                    java.lang.String name,
                                    java.lang.String pk,
                                    java.lang.String modifier,
                                    java.lang.String defaultFetchGroup,
                                    java.lang.String nullValue,
                                    java.lang.String embedded,
                                    java.lang.String serialized,
                                    java.lang.String dependent,
                                    java.lang.String mappedBy,
                                    java.lang.String column,
                                    java.lang.String table,
                                    java.lang.String catalog,
                                    java.lang.String schema,
                                    java.lang.String deleteAction,
                                    java.lang.String indexed,
                                    java.lang.String unique,
                                    java.lang.String recursionDepth,
                                    java.lang.String loadFetchGroup,
                                    java.lang.String valueStrategy,
                                    java.lang.String sequence,
                                    java.lang.String fieldType)
Constructor for a FieldMetaData.

Specified by:
newFieldObject in interface MetaDataFactory
Parameters:
md - MetaData for the class that this field belongs to
name - Name of the field
pk - Whether it is a part of the PK
modifier - persistence-modifier
defaultFetchGroup - Whether it is in the DFG
nullValue - Action on null value inserts
embedded - Whether it is embedded
serialized - Whether it is serialised
dependent - Whether it is dependent for deletes
mappedBy - Field in other class that it is mapped using
column - Column name to store it
table - Table where it is stored
catalog - Catalog that the table is in
schema - Schema that the table is in
deleteAction - Any FK delete action
indexed - Whether it is indexed
unique - Whether it is unique
recursionDepth - Recursion depth to apply on fetch-plan operations
loadFetchGroup - Whether to load the fetch group
valueStrategy - Strategy for generating values for this field
sequence - Sequence name if the strategy is "sequence"
fieldType - Type of the field
Returns:
MetaData for the field

newFieldObject

public FieldMetaData newFieldObject(MetaData md,
                                    AbstractMemberMetaData referenceFmd)
Method to create a new field object copying from the supplied field

Specified by:
newFieldObject in interface MetaDataFactory
Parameters:
md - Parent metadata
referenceFmd - The reference field
Returns:
FieldMetaData object

newPropertyObject

public PropertyMetaData newPropertyObject(MetaData md,
                                          java.lang.String name,
                                          java.lang.String pk,
                                          java.lang.String modifier,
                                          java.lang.String defaultFetchGroup,
                                          java.lang.String nullValue,
                                          java.lang.String embedded,
                                          java.lang.String serialized,
                                          java.lang.String dependent,
                                          java.lang.String mappedBy,
                                          java.lang.String column,
                                          java.lang.String table,
                                          java.lang.String catalog,
                                          java.lang.String schema,
                                          java.lang.String deleteAction,
                                          java.lang.String indexed,
                                          java.lang.String unique,
                                          java.lang.String recursionDepth,
                                          java.lang.String loadFetchGroup,
                                          java.lang.String valueStrategy,
                                          java.lang.String sequence,
                                          java.lang.String fieldType,
                                          java.lang.String fieldName)
Constructor for a PropertyMetaData.

Specified by:
newPropertyObject in interface MetaDataFactory
Parameters:
md - MetaData for the interface that this property belongs to
name - Name of the field
pk - Whether it is a part of the PK
modifier - persistence-modifier
defaultFetchGroup - Whether it is in the DFG
nullValue - Action on null value inserts
embedded - Whether it is embedded
serialized - Whether it is serialised
dependent - Whether it is dependent for deletes
mappedBy - Field in other class that it is mapped using
column - Column name to store it
table - Table where it is stored
catalog - Catalog that the table is in
schema - Schema that the table is in
deleteAction - Any FK delete action
indexed - Whether it is indexed
unique - Whether it is unique
recursionDepth - Recursion depth to apply on fetch-plan operations
loadFetchGroup - Whether to load the fetch group
valueStrategy - Strategy for generating values for this field
sequence - Sequence name if the strategy is "sequence"
fieldType - Type of the field
fieldName - Name of the field (relates to the implementation of this)
Returns:
MetaData for the field

newPropertyObject

public PropertyMetaData newPropertyObject(MetaData md,
                                          PropertyMetaData referencePmd)
Method to create a new property object copying from the supplied object.

Specified by:
newPropertyObject in interface MetaDataFactory
Parameters:
md - Parent metadata
referencePmd - Property to copy from
Returns:
PropertyMetaData object

newInterfaceObject

public InterfaceMetaData newInterfaceObject(PackageMetaData pmd,
                                            java.lang.String name,
                                            java.lang.String identityType,
                                            java.lang.String objectidClass,
                                            java.lang.String requiresExtent,
                                            java.lang.String detachable,
                                            java.lang.String embeddedOnly,
                                            java.lang.String catalog,
                                            java.lang.String schema,
                                            java.lang.String table,
                                            java.lang.String entityName)
Constructor for an InterfaceMetaData. Takes the basic string information found in the XML/annotations.

Specified by:
newInterfaceObject in interface MetaDataFactory
Parameters:
pmd - MetaData for the package that this class belongs to
name - Name of class
identityType - Type of identity
objectidClass - Class of the object id
requiresExtent - Whether the class requires an extent
detachable - Whether this is detachable
embeddedOnly - embedded-only tag
catalog - Name for catalog
schema - Name for schema
table - Name of the table where to persist objects of this type
entityName - the entity name required by JPA 4.3.1


Copyright © 2009. All Rights Reserved.