org.datanucleus.enhancer.bcel.metadata
Class BCELMetaDataFactory

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

public class BCELMetaDataFactory
extends org.datanucleus.metadata.DefaultMetaDataFactory
implements org.datanucleus.metadata.MetaDataFactory

Factory for MetaData when enhancing using BCEL. BCEL requires Class/Field MetaData objects furnishing with additional information to aid its enhancement process.

Version:
$Revision: 1.5 $

Constructor Summary
BCELMetaDataFactory(org.datanucleus.metadata.MetaDataManager mgr)
          Constructor.
 
Method Summary
 org.datanucleus.metadata.ClassMetaData newClassObject(org.datanucleus.metadata.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)
          Utility to create a new class component.
 org.datanucleus.metadata.FieldMetaData newFieldObject(org.datanucleus.metadata.MetaData md, org.datanucleus.metadata.AbstractMemberMetaData referenceFmd)
          Utility to create a new field component copying from the passed object.
 org.datanucleus.metadata.FieldMetaData newFieldObject(org.datanucleus.metadata.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)
          Utility to create a new field component.
 org.datanucleus.metadata.InterfaceMetaData newInterfaceObject(org.datanucleus.metadata.PackageMetaData parent, 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.
 org.datanucleus.metadata.PropertyMetaData newPropertyObject(org.datanucleus.metadata.MetaData md, org.datanucleus.metadata.PropertyMetaData referencePmd)
          Utility to create a new property component copying from the passed object.
 org.datanucleus.metadata.PropertyMetaData newPropertyObject(org.datanucleus.metadata.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)
          Utility to create a new property component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BCELMetaDataFactory

public BCELMetaDataFactory(org.datanucleus.metadata.MetaDataManager mgr)
Constructor.

Method Detail

newClassObject

public org.datanucleus.metadata.ClassMetaData newClassObject(org.datanucleus.metadata.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)
Utility to create a new class component. This method exists so that the Enhancer can create its own ClassMetaData objects using its class.

Specified by:
newClassObject in interface org.datanucleus.metadata.MetaDataFactory
Overrides:
newClassObject in class org.datanucleus.metadata.DefaultMetaDataFactory
Parameters:
pmd - MetaData for package
name - Name of class
identityType - identity type
objectidClass - name of objectid class
requiresExtent - Whether an extent is required
detachable - Whether it is detachable
embeddedOnly - Whether it is embedded only
modifier - persistence modifier
persistenceCapableSuperclass - PC superclass (deprecated)
catalog - catalog to use
schema - schema to use
table - table to use
entityName - the entity name required by JPA 4.3.1
Returns:
The MetaData for the class

newFieldObject

public org.datanucleus.metadata.FieldMetaData newFieldObject(org.datanucleus.metadata.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)
Utility to create a new field component. This method exists so that the Enhancer can create its own FieldMetaData objects using its class.

Specified by:
newFieldObject in interface org.datanucleus.metadata.MetaDataFactory
Overrides:
newFieldObject in class org.datanucleus.metadata.DefaultMetaDataFactory
Parameters:
md - Parent metadata
name - Name of field
pk - Whether it is PK
modifier - persistence modifier
defaultFetchGroup - Whether it is in DFG
nullValue - Behaviour on null value
embedded - Whether it is embedded
serialized - Whether it is serialised
dependent - Whether it is dependent
mappedBy - Field that it is mapped into
column - column to use
table - table to use
catalog - catalog to use
schema - schema to use
deleteAction - Action on FK delete
indexed - whether the column is indexed
unique - Whether the column is unique
recursionDepth - Recursion depth
loadFetchGroup - Whether to load the fetch group
valueStrategy - Value strategy for generating field values
sequence - Sequence name if required
fieldType - Type of the field
Returns:
FieldMetaData

newFieldObject

public org.datanucleus.metadata.FieldMetaData newFieldObject(org.datanucleus.metadata.MetaData md,
                                                             org.datanucleus.metadata.AbstractMemberMetaData referenceFmd)
Utility to create a new field component copying from the passed object. This method exists so that the Enhancer can create its own FieldMetaData objects using its class.

Specified by:
newFieldObject in interface org.datanucleus.metadata.MetaDataFactory
Overrides:
newFieldObject in class org.datanucleus.metadata.DefaultMetaDataFactory
Parameters:
md - Parent metadata
referenceFmd - MetaData to copy from
Returns:
FieldMetaData

newPropertyObject

public org.datanucleus.metadata.PropertyMetaData newPropertyObject(org.datanucleus.metadata.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)
Utility to create a new property component. This method exists so that the Enhancer can create its own PropertyMetaData objects using its class.

Specified by:
newPropertyObject in interface org.datanucleus.metadata.MetaDataFactory
Overrides:
newPropertyObject in class org.datanucleus.metadata.DefaultMetaDataFactory
Parameters:
md - Parent metadata
name - Name of field
pk - Whether it is PK
modifier - persistence modifier
defaultFetchGroup - Whether it is in DFG
nullValue - Behaviour on null value
embedded - Whether it is embedded
serialized - Whether it is serialised
dependent - Whether it is dependent
mappedBy - Field that it is mapped into
column - column to use
table - table to use
catalog - catalog to use
schema - schema to use
deleteAction - Action on FK delete
indexed - whether the column is indexed
unique - Whether the column is unique
recursionDepth - Recursion depth
loadFetchGroup - Whether to load the fetch group
valueStrategy - Value strategy for generating field values
sequence - Sequence name if required
fieldType - Type of the field
fieldName - Name of the field
Returns:
PropertyMetaData

newPropertyObject

public org.datanucleus.metadata.PropertyMetaData newPropertyObject(org.datanucleus.metadata.MetaData md,
                                                                   org.datanucleus.metadata.PropertyMetaData referencePmd)
Utility to create a new property component copying from the passed object. This method exists so that the Enhancer can create its own PropertyMetaData objects using its class.

Specified by:
newPropertyObject in interface org.datanucleus.metadata.MetaDataFactory
Overrides:
newPropertyObject in class org.datanucleus.metadata.DefaultMetaDataFactory
Parameters:
md - Parent metadata
referencePmd - MetaData to copy from
Returns:
PropertyMetaData

newInterfaceObject

public org.datanucleus.metadata.InterfaceMetaData newInterfaceObject(org.datanucleus.metadata.PackageMetaData parent,
                                                                     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 org.datanucleus.metadata.MetaDataFactory
Overrides:
newInterfaceObject in class org.datanucleus.metadata.DefaultMetaDataFactory
Parameters:
parent - 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.