org.datanucleus.metadata
Class AbstractClassMetaData

java.lang.Object
  extended by org.datanucleus.metadata.MetaData
      extended by org.datanucleus.metadata.AbstractClassMetaData
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ClassMetaData, InterfaceMetaData

public abstract class AbstractClassMetaData
extends MetaData

Abstract representation of the MetaData of a class/interface. Has a parent PackageMetaData that can contain the metadata for several classes/interfaces. Is extended by ClassMetaData and InterfaceMetaData. Of the things that it contains the main one are the "members" which are the MetaData for all fields and properties that are persistable.

See Also:
Serialized Form

Field Summary
protected  int[] allMemberPositions
          Positions of all fields/properties (inc superclasses).
protected  boolean cacheable
          cacheable tag value.
protected  java.lang.String catalog
          Catalog name (O/R mapping).
protected  boolean detachable
          detachable tag value.
protected  boolean[] dfgMemberFlags
          Flags of the default-fetch-group state for all fields/properties.
protected  int[] dfgMemberPositions
          Positions of the default-fetch-group fields/properties (inc superclasses).
protected  boolean embeddedOnly
          embedded-only tag value.
protected  java.lang.String entityName
          Entity name.
protected  java.lang.Boolean excludeDefaultListeners
          Flag to exclude default listeners.
protected  java.lang.Boolean excludeSuperClassListeners
          Flag to exclude superclass listeners.
protected  FetchGroupMetaData[] fetchGroupMetaData
          Fetch Groups for this class.
protected  java.util.Map fetchGroupMetaDataByName
          Convenience lookup map of fetch group by the name.
protected  java.util.List fetchGroups
          List of fetch-group
protected  ForeignKeyMetaData[] foreignKeyMetaData
          ForeignKeyMetaData
protected  java.util.List foreignKeys
          List of foreign-key
protected  java.lang.String fullName
          Full name (e.g org.datanucleus.MyClass)
protected  IdentityMetaData identityMetaData
          Identity MetaData
protected  boolean identitySpecified
          Flag whether the identity was specified by the user.
protected  IdentityType identityType
          Identity-type tag value.
protected  boolean implementationOfPersistentDefinition
           
protected  java.util.List indexes
          List of indexes
protected  IndexMetaData[] indexMetaData
          IndexMetaData
protected  InheritanceMetaData inheritanceMetaData
          Inheritance MetaData
protected  JoinMetaData[] joinMetaData
          JoinMetaData
protected  java.util.List joins
          List of joins
protected  java.util.List listeners
          EventListeners.
protected static Localiser LOCALISER_API
           
protected  AbstractMemberMetaData[] managedMembers
          Managed fields/properties of this class.
protected  int memberCount
          number of managed fields/properties from this class plus inherited classes.
protected  java.util.Map memberPositionsByName
          Position numbers of members mapped by the name of the field/property.
protected  java.util.List members
          List of members (fields/properties).
protected  boolean metaDataComplete
          Flag for whether the MetaData here is complete without annotations.
protected  java.lang.String name
          Class name
protected  boolean[] nonPkMemberFlags
          Flags of the non-primary key fields/properties (inc superclasses).
protected  int[] nonPkMemberPositions
          Positions of the non-primary-key fields/properties (inc superclasses).
protected  int noOfInheritedManagedMembers
          No of managed fields/properties in superclasses, that are inherited by this class.
protected  java.lang.String objectidClass
          objectid-class tag value.
protected  AbstractMemberMetaData[] overriddenMembers
          Fields/properties for superclasses that are overridden in this class.
protected  AbstractClassMetaData pcSuperclassMetaData
          Class MetaData for the Persistence-Capable superclass (if any)
protected  java.lang.String persistenceCapableSuperclass
          persistence-capable-superclass tag value (deprecated).
protected  ClassPersistenceModifier persistenceModifier
          persistence-modifier tag value.
protected  boolean persistentInterfaceImplNeedingTableFromSubclass
          Implementation of "persistent-interface" needing table setting from subclass.
protected  boolean persistentInterfaceImplNeedingTableFromSuperclass
          Implementation of "persistent-interface" needing table setting from superclass.
protected  int[] pkMemberPositions
          Positions of the primary-key fields/properties (inc superclasses).
protected  PrimaryKeyMetaData primaryKeyMetaData
          PrimaryKey MetaData
protected  java.util.Collection queries
          Named queries
protected  java.util.Collection queryResultMetaData
          List of query result MetaData defined for this file.
protected  int[] relationPositions
          Absolute positions of the fields/properties that have relations.
protected  boolean requiresExtent
          requires-extent tag value.
protected  java.lang.String schema
          Schema name (O/R mapping).
protected  boolean[] scoMutableMemberFlags
          Flags of the SCO mutable state for all fields/properties.
protected  int[] scoMutableMemberPositions
          Positions of the SCO mutable fields/properties (inc superclasses).
protected  int[] scoNonContainerMemberPositions
          Absolute positions of all SCO fields/properties that aren't containers.
protected  int[] secondClassContainerMemberPositions
          Positions of all SCO fields/properties that are containers.
protected  java.lang.String table
          Table name (O/R mapping).
protected  java.util.List uniqueConstraints
          List of uniqueConstraints
protected  UniqueMetaData[] uniqueMetaData
          UniqueMetaData
protected  java.util.List unmappedColumns
          The columns that are present in the datastore yet not mapped to fields in this class.
protected  boolean usesSingleFieldIdentityClass
          if this PersistenceCapable class uses SingleFieldIdentity
protected  VersionMetaData versionMetaData
          Version MetaData
 
Fields inherited from class org.datanucleus.metadata.MetaData
extensions, LOCALISER, METADATA_CREATED_STATE, METADATA_INITIALISED_STATE, METADATA_POPULATED_STATE, METADATA_USED_STATE, metaDataState, parent, VENDOR_NAME, VENDOR_NAME_OLD
 
Constructor Summary
  AbstractClassMetaData(ClassMetaData cmd, java.lang.String implClassName)
          Constructor for creating the ClassMetaData for an implementation of a "persistent-abstract-class".
  AbstractClassMetaData(InterfaceMetaData imd, java.lang.String implClassName, boolean copyMembers)
          Constructor for creating the ClassMetaData for an implementation of a "persistent-interface".
protected AbstractClassMetaData(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 modifier, java.lang.String persistenceCapableSuperclass, java.lang.String catalog, java.lang.String schema, java.lang.String table, java.lang.String entityName)
          Constructor.
 
Method Summary
 void addFetchGroup(FetchGroupMetaData fgmd)
          Method to add a fetch-group to this class.
 void addForeignKey(ForeignKeyMetaData fkmd)
          Method to add an foreign-key to this class.
 void addIndex(IndexMetaData idxmd)
          Method to add an index to this class.
 void addJoin(JoinMetaData jnmd)
          Method to add a join to this class.
 void addListener(EventListenerMetaData listener)
          Add a listener class name
 void addMember(AbstractMemberMetaData mmd)
          Method to add a field/property to this interface.
 void addQuery(QueryMetaData qmd)
          Method to add a named query to this class.
 void addQueryResultMetaData(QueryResultMetaData resultMetaData)
          Method to register a query-result MetaData.
 void addUniqueConstraint(UniqueMetaData unimd)
          Method to add a unique constraint to this class.
 void addUnmappedColumn(ColumnMetaData colmd)
          Method to add an unmapped column.
protected  void checkInitialised()
          Method to check whether the Meta-Data has been initialised.
protected  void checkPopulated()
          Method to check whether the Meta-Data has been populated.
protected  void copyMembersFromInterface(InterfaceMetaData imd)
          Convenience method to copy the properties from an existing interface.
protected  void determineIdentity()
          Determines the identity based on MetaData defaults or user defined MetaData
protected  void determineInheritanceMetaData()
          Impose a default inheritance strategy when one is not already specified.
protected  void determineObjectIdClass()
          Determine the object id class.
protected  void determineSuperClassName(ClassLoaderResolver clr, java.lang.Class cls)
          Determine the super PersistenceCapable class.
 void excludeDefaultListeners()
          Method to exclude default listeners.
 void excludeSuperClassListeners()
          Toogle exclude super class listeners
 int getAbsoluteMemberPositionForRelativePosition(int relativePosition)
          Accessor for the absolute position for a relative position.
 int getAbsolutePositionOfMember(java.lang.String memberName)
          Accessor for the absolute position of the field/property with the specified name.
 int getAbsolutePositionOfMember(java.lang.String className, java.lang.String memberName)
          Accessor for the absolute position of the field/property with the specified name.
 int[] getAllMemberPositions()
          Accessor for all field/property positions.
 AbstractClassMetaData getBaseAbstractClassMetaData()
          Convenience accessor for the AbstractClassMetaData of the base object in this hierarchy.
 IdentityMetaData getBaseIdentityMetaData()
          Convenience method to return the root identity metadata for this inheritance tree.
 int[] getBasicMemberPositions(ClassLoaderResolver clr)
          Accessor for the absolute positions of fields/properties that are considered basic.
 int[] getBidirectionalRelationMemberPositions(ClassLoaderResolver clr)
          Convenience method to return the absolute positions of fields/properties that have bidirectional relations.
 java.lang.String getCatalog()
          Accessor for the catalog name.
 boolean[] getDFGMemberFlags()
          Accessor for the flags of the DFG fields/properties (inc superclass).
 int[] getDFGMemberPositions()
          Accessor for the absolute positions of the default fetch group fields/properties (inc superclasses).
 DiscriminatorMetaData getDiscriminatorMetaDataForTable()
          Convenience method to find the discriminator MetaData defining the discrim for the same table as this class is using.
 DiscriminatorStrategy getDiscriminatorStrategy()
          Convenience accessor for the discriminator strategy applying to this class.
 java.lang.String getEntityName()
          Accessor for the class name.
 FetchGroupMetaData[] getFetchGroupMetaData()
          Accessor for all MetaData defined for fetch groups for this class.
 FetchGroupMetaData[] getFetchGroupMetaData(java.util.Collection groupNames)
          Accessor for fetch group metadata for the specified groups (if present).
 FetchGroupMetaData getFetchGroupMetaData(java.lang.String groupname)
          Accessor for the fetch group metadata for the group specified.
 ForeignKeyMetaData[] getForeignKeyMetaData()
          Accessor for foreignKeyMetaData
 java.lang.String getFullClassName()
          Accessor for the full class name.
 IdentityMetaData getIdentityMetaData()
          Accessor for identityMetaData
 IdentityType getIdentityType()
          Accessor for the identity-type.
 IndexMetaData[] getIndexMetaData()
          Accessor for indexMetaData
 InheritanceMetaData getInheritanceMetaData()
          Accessor for inheritanceMetaData
 JoinMetaData[] getJoinMetaData()
          Accessor for joinMetaData
 EventListenerMetaData getListenerForClass(java.lang.String className)
          Accessor for the EventListener info for an EventListener class name
 java.util.List getListeners()
          Get the event listeners
 AbstractMemberMetaData[] getManagedMembers()
          Accessor for the managed fields/properties in this class (not including superclass, but including overridden).
protected  AbstractMemberMetaData getMemberBeingOverridden(java.lang.String name)
          Convenience method that navigates up a MetaData inheritance tree until it finds the base field/property definition.
 int getMemberCount()
          Accessor for the number of managed fields/properties from this class plus inherited classes.
 AbstractMemberMetaData getMetaDataForManagedMemberAtAbsolutePosition(int abs_position)
          Accessor for a managed field/property including superclass fields.
protected  AbstractMemberMetaData getMetaDataForManagedMemberAtAbsolutePositionInternal(int abs_position)
          Internal method to get the field/property for an absolute field number.
 AbstractMemberMetaData getMetaDataForManagedMemberAtPosition(int position)
          Accessor for MetaData for a managed field/property in this class.
 AbstractMemberMetaData getMetaDataForMember(java.lang.String name)
          Accessor for the Meta-Data for a field/property.
 AbstractMemberMetaData getMetaDataForMemberAtRelativePosition(int index)
          Accessor for the metadata of a field/property.
 MetaDataManager getMetaDataManager()
          Convenience accessor for the MetaData Manager in use.
 int[] getMultivaluedMemberPositions()
          Accessor for the absolute positions of fields/properties that are considered multi-valued This category includes members of all multi-valued types, including Collection, array, and Map types of basic and relationship types.
 java.lang.String getName()
          Accessor for the class name.
 boolean[] getNonPKMemberFlags()
          Accessor for the flags of the non primary key fields/properties (inc superclass members).
 int[] getNonPKMemberPositions()
          Accessor for the positions of the non primary key fields/properties (inc superclass fields).
 int getNoOfInheritedManagedMembers()
          Accessor for the number of inherited managed fields/properties in superclasses.
 int getNoOfManagedMembers()
          Accessor for the number of managed fields/properties (this class only).
 int getNoOfMembers()
          Accessor for the number of fields/properties.
 int getNoOfOverriddenMembers()
          Accessor for the number of overridden fields/properties (this class only).
 int getNoOfPrimaryKeyMembers()
          Accessor for the number of primary key fields/properties.
 int getNoOfQueries()
          Accessor for the number of named queries.
 java.lang.String getObjectidClass()
          Accessor for the objectid-class tag value.
 AbstractMemberMetaData getOverriddenMember(int position)
          Accessor for MetaData for an overridden field/property in this class.
 AbstractMemberMetaData getOverriddenMember(java.lang.String name)
          Accessor for an overridden field/property with the specified name.
 AbstractMemberMetaData[] getOverriddenMembers()
          Accessor for the overridden fields/properties in this class.
 PackageMetaData getPackageMetaData()
          Convenience accessor for the parent Package MetaData.
 java.lang.String getPackageName()
          Convenience accessor for the package name.
 java.lang.String getPersistenceCapableSuperclass()
          Accessor for the persistence-capable-superclass tag value.
 ClassPersistenceModifier getPersistenceModifier()
          Accessor for the persistence-modifier of the class.
 int[] getPKMemberPositions()
          Accessor for the field numbers of the primary key fields/properties.
 java.lang.String[] getPrimaryKeyMemberNames()
          Accessor for the names of the primary key fields/properties.
 PrimaryKeyMetaData getPrimaryKeyMetaData()
          Accessor for primaryKeyMetaData
 QueryMetaData[] getQueries()
          Accessor for the metadata of the named queries.
 QueryResultMetaData[] getQueryResultMetaData()
          Get the query result MetaData registered for this class.
 int[] getRelationMemberPositions(ClassLoaderResolver clr)
          Convenience method to return the absolute positions of all fields/properties that have relations.
 int getRelativePositionOfMember(java.lang.String memberName)
          Accessor for the position of the field/property with the specified name.
 java.lang.String getSchema()
          Accessor for the schema name.
 int[] getSCOContainerMemberPositions()
          Accessor for the absolute positions of all SCO fields/properties that are containers.
 boolean[] getSCOMutableMemberFlags()
          Accessor for the flags of the SCO mutable fields (inc superclass fields).
 int[] getSCOMutableMemberPositions()
          Accessor for the absolute positions of the second class mutable fields/properties.
 int[] getSCONonContainerMemberPositions()
          Accessor for the absolute positions of all SCO fields/properties that are NOT containers (e.g Dates, Points, etc)
 AbstractClassMetaData getSuperAbstractClassMetaData()
          Accessor for the Meta-Data for the superclass of this class.
 java.lang.String getTable()
          Accessor for the table name.
 UniqueMetaData[] getUniqueMetaData()
          Accessor for UniqueMetaData
 java.util.List getUnmappedColumns()
          Accessor for the unmapped columns require for the datastore table.
 VersionMetaData getVersionMetaData()
          Accessor for Version MetaData for objects stored in this table
 VersionMetaData getVersionMetaDataForTable()
          Convenience method to find the version MetaData defining versioning for the same table as this class is using.
 boolean hasDiscriminatorStrategy()
           
 boolean hasMember(java.lang.String memberName)
          Method to check if a field/property exists in this classes definition.
 boolean hasRelations(ClassLoaderResolver clr)
          Convenience method to return if the class has relations to other objects.
 boolean hasVersionStrategy()
           
protected  void inheritDetachableSettings()
          Inherit detach settings from super classes.
protected  void inheritIdentity()
          Inherit the identity definition from super classes.
abstract  void initialise()
          Method to initialise the sub-objects of this class metadata.
protected  void initialiseMemberPositionInformation()
          Method to initialise all convenience information about member positions and what role each position performs.
 boolean isCacheable()
          Accessor for the cacheable tag value.
 boolean isDetachable()
          Accessor for the detachable tag value.
 boolean isEmbeddedOnly()
          Accessor for the embedded-only tag value.
 boolean isExcludeDefaultListeners()
          Whether default listeners are not going to be invoked
 boolean isExcludeSuperClassListeners()
          Whether super classes listeners are not going to be invoked
 boolean isImplementationOfPersistentDefinition()
          Return whether this MetaData is for an implementation of a persistent definition.
 boolean isMetaDataComplete()
          Accessor for whether this class is fully specified by this metadata and that any annotations should be ignored.
 boolean isRequiresExtent()
          Accessor for the requires-extent tag value.
 boolean isSameOrAncestorOf(AbstractClassMetaData cmd)
          Check if the argument cmd is the same as this or a descedent.
protected  java.lang.Class loadClass(ClassLoaderResolver clr, java.lang.ClassLoader primary)
          Load the persistent interface/class
protected  AbstractMemberMetaData newDefaultedProperty(java.lang.String name)
          Utility to add a defaulted PropertyMetaData to the class.
abstract  void populate(ClassLoaderResolver clr, java.lang.ClassLoader primary)
          Method to provide the details of the class being represented by this MetaData.
 void setCacheable(boolean cache)
          Convenience method to set the cacheability of this class.
 void setCatalog(java.lang.String catalog)
          Mutator for the catalog name.
 void setEmbeddedOnly()
          Convenience method to make this class available for storing only when embedded in another object.
 void setIdentityMetaData(IdentityMetaData identityMetaData)
          Mutator for the identity MetaData.
 void setIdentityType(IdentityType type)
          Cinvenience method for updating the identity type when not set correctly during construction.
 void setInheritanceMetaData(InheritanceMetaData inheritanceMetaData)
          Mutator for the inheritance MetaData.
 void setMetaDataComplete()
          Method to set that this class is "metadata complete" (see JPA spec).
 void setObjectIdClass(java.lang.String objectidClass)
          Mutator for the object id class name.
 void setPrimaryKeyMetaData(PrimaryKeyMetaData primaryKeyMetaData)
          Mutator for the PrimaryKey MetaData.
 void setSchema(java.lang.String schema)
          Mutator for the schema name.
 void setTable(java.lang.String table)
          Mutator for the table name.
 void setVersionMetaData(VersionMetaData versionMetaData)
          Mutator for the Version MetaData.
 boolean usesSingleFieldIdentityClass()
          Whether this PersistenceCapable class uses SingleFieldIdentity
protected  void validateDeprecatedMetaData()
          Check usage of deprecated MetaData
protected  void validateObjectIdClass(ClassLoaderResolver clr)
          Validate the objectid-class of this class.
protected  void validateUnmappedColumns()
          Convenience method to validate the specified "unmapped" columns.
protected  void validateUserInputForIdentity()
          Check for conflicts on super class and this class MetaData identity
protected  void validateUserInputForInheritanceMetaData()
          Check if the inheritance MetaData is credible.
 
Methods inherited from class org.datanucleus.metadata.MetaData
addExtension, addExtension, getExtensions, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, isInitialised, isPopulated, isUsed, removeExtension, setInitialised, setParent, setPopulated, setUsed, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOCALISER_API

protected static Localiser LOCALISER_API

name

protected final java.lang.String name
Class name


entityName

protected java.lang.String entityName
Entity name. Required by JPA1 4.3.1 for accessing this class in queries.


identityType

protected IdentityType identityType
Identity-type tag value.


persistenceModifier

protected ClassPersistenceModifier persistenceModifier
persistence-modifier tag value.


persistenceCapableSuperclass

protected java.lang.String persistenceCapableSuperclass
persistence-capable-superclass tag value (deprecated).


objectidClass

protected java.lang.String objectidClass
objectid-class tag value.


requiresExtent

protected boolean requiresExtent
requires-extent tag value.


detachable

protected boolean detachable
detachable tag value.


embeddedOnly

protected boolean embeddedOnly
embedded-only tag value.


catalog

protected java.lang.String catalog
Catalog name (O/R mapping).


schema

protected java.lang.String schema
Schema name (O/R mapping).


table

protected java.lang.String table
Table name (O/R mapping). This may be of the form "[database].[catalog].[schema].table"


cacheable

protected boolean cacheable
cacheable tag value.


fullName

protected final java.lang.String fullName
Full name (e.g org.datanucleus.MyClass)


versionMetaData

protected VersionMetaData versionMetaData
Version MetaData


identityMetaData

protected IdentityMetaData identityMetaData
Identity MetaData


identitySpecified

protected boolean identitySpecified
Flag whether the identity was specified by the user.


inheritanceMetaData

protected InheritanceMetaData inheritanceMetaData
Inheritance MetaData


primaryKeyMetaData

protected PrimaryKeyMetaData primaryKeyMetaData
PrimaryKey MetaData


listeners

protected java.util.List listeners
EventListeners. Use a list to preserve ordering.


excludeSuperClassListeners

protected java.lang.Boolean excludeSuperClassListeners
Flag to exclude superclass listeners.


excludeDefaultListeners

protected java.lang.Boolean excludeDefaultListeners
Flag to exclude default listeners.


fetchGroupMetaData

protected FetchGroupMetaData[] fetchGroupMetaData
Fetch Groups for this class. Available to be used in queries and when detaching.


fetchGroupMetaDataByName

protected java.util.Map fetchGroupMetaDataByName
Convenience lookup map of fetch group by the name.


pcSuperclassMetaData

protected AbstractClassMetaData pcSuperclassMetaData
Class MetaData for the Persistence-Capable superclass (if any)


metaDataComplete

protected boolean metaDataComplete
Flag for whether the MetaData here is complete without annotations. Used by JPA.


queries

protected java.util.Collection queries
Named queries


queryResultMetaData

protected java.util.Collection queryResultMetaData
List of query result MetaData defined for this file.


joinMetaData

protected JoinMetaData[] joinMetaData
JoinMetaData


indexMetaData

protected IndexMetaData[] indexMetaData
IndexMetaData


foreignKeyMetaData

protected ForeignKeyMetaData[] foreignKeyMetaData
ForeignKeyMetaData


uniqueMetaData

protected UniqueMetaData[] uniqueMetaData
UniqueMetaData


members

protected java.util.List members
List of members (fields/properties).


unmappedColumns

protected java.util.List unmappedColumns
The columns that are present in the datastore yet not mapped to fields in this class.


joins

protected java.util.List joins
List of joins


foreignKeys

protected java.util.List foreignKeys
List of foreign-key


indexes

protected java.util.List indexes
List of indexes


uniqueConstraints

protected java.util.List uniqueConstraints
List of uniqueConstraints


fetchGroups

protected java.util.List fetchGroups
List of fetch-group


managedMembers

protected AbstractMemberMetaData[] managedMembers
Managed fields/properties of this class. Contains the same AbstractMemberMetaData objects as are in "members". Doesnt include any overridden members which are stored separately. All fields will return true to "fmd.isJdoField()".


overriddenMembers

protected AbstractMemberMetaData[] overriddenMembers
Fields/properties for superclasses that are overridden in this class.


memberPositionsByName

protected java.util.Map memberPositionsByName
Position numbers of members mapped by the name of the field/property.


allMemberPositions

protected int[] allMemberPositions
Positions of all fields/properties (inc superclasses).


pkMemberPositions

protected int[] pkMemberPositions
Positions of the primary-key fields/properties (inc superclasses).


nonPkMemberPositions

protected int[] nonPkMemberPositions
Positions of the non-primary-key fields/properties (inc superclasses).


nonPkMemberFlags

protected boolean[] nonPkMemberFlags
Flags of the non-primary key fields/properties (inc superclasses).


dfgMemberPositions

protected int[] dfgMemberPositions
Positions of the default-fetch-group fields/properties (inc superclasses).


dfgMemberFlags

protected boolean[] dfgMemberFlags
Flags of the default-fetch-group state for all fields/properties.


scoMutableMemberPositions

protected int[] scoMutableMemberPositions
Positions of the SCO mutable fields/properties (inc superclasses).


scoMutableMemberFlags

protected boolean[] scoMutableMemberFlags
Flags of the SCO mutable state for all fields/properties.


scoNonContainerMemberPositions

protected int[] scoNonContainerMemberPositions
Absolute positions of all SCO fields/properties that aren't containers.


relationPositions

protected int[] relationPositions
Absolute positions of the fields/properties that have relations.


noOfInheritedManagedMembers

protected int noOfInheritedManagedMembers
No of managed fields/properties in superclasses, that are inherited by this class.


usesSingleFieldIdentityClass

protected boolean usesSingleFieldIdentityClass
if this PersistenceCapable class uses SingleFieldIdentity


memberCount

protected int memberCount
number of managed fields/properties from this class plus inherited classes.


implementationOfPersistentDefinition

protected boolean implementationOfPersistentDefinition

persistentInterfaceImplNeedingTableFromSuperclass

protected transient boolean persistentInterfaceImplNeedingTableFromSuperclass
Implementation of "persistent-interface" needing table setting from superclass.


persistentInterfaceImplNeedingTableFromSubclass

protected transient boolean persistentInterfaceImplNeedingTableFromSubclass
Implementation of "persistent-interface" needing table setting from subclass.


secondClassContainerMemberPositions

protected int[] secondClassContainerMemberPositions
Positions of all SCO fields/properties that are containers.

Constructor Detail

AbstractClassMetaData

protected AbstractClassMetaData(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 modifier,
                                java.lang.String persistenceCapableSuperclass,
                                java.lang.String catalog,
                                java.lang.String schema,
                                java.lang.String table,
                                java.lang.String entityName)
Constructor. Takes the basic string information found in an XML MetaData file.

Parameters:
parent - The package to which this class/interface belongs
name - Name of class
identityType - identity-type flag
objectidClass - Primary key class name
requiresExtent - Whether the class requires an extent
detachable - Whether the class can be detached
embeddedOnly - embedded-only tag
modifier - persistence-modifier tag
catalog - The catalog name default for this class
schema - The schema name default for this class
table - table to store the class in
entityName - the entity name required by JPA 4.3.1

AbstractClassMetaData

public AbstractClassMetaData(InterfaceMetaData imd,
                             java.lang.String implClassName,
                             boolean copyMembers)
Constructor for creating the ClassMetaData for an implementation of a "persistent-interface".

Parameters:
imd - MetaData for the "persistent-interface"
implClassName - Name of the implementation class
copyMembers - Whether to copy the fields/properties of the interface too

AbstractClassMetaData

public AbstractClassMetaData(ClassMetaData cmd,
                             java.lang.String implClassName)
Constructor for creating the ClassMetaData for an implementation of a "persistent-abstract-class".

Parameters:
cmd - MetaData for the implementation of the "persistent-abstract-class"
implClassName - Name of the implementation class
Method Detail

isImplementationOfPersistentDefinition

public boolean isImplementationOfPersistentDefinition()
Return whether this MetaData is for an implementation of a persistent definition. This could be an implementation of a persistent interface or a persistent abstract-class.

Returns:
Whether this is an implementation

copyMembersFromInterface

protected void copyMembersFromInterface(InterfaceMetaData imd)
Convenience method to copy the properties from an existing interface. Adds FieldMetaData for each PropertyMetaData on the persistent-interface.

Parameters:
imd - The interface that we copy from

checkInitialised

protected void checkInitialised()
Method to check whether the Meta-Data has been initialised.

Throws:
JDOFatalInternalException - Thrown if the Meta-Data hasn't been initialised.

checkPopulated

protected void checkPopulated()
Method to check whether the Meta-Data has been populated.

Throws:
NucleusException - Thrown if the Meta-Data hasn't been populated.

loadClass

protected java.lang.Class loadClass(ClassLoaderResolver clr,
                                    java.lang.ClassLoader primary)
Load the persistent interface/class

Parameters:
clr - the ClassLoader
primary - the primary ClassLoader to use (or null)
Returns:
the loaded class

determineIdentity

protected void determineIdentity()
Determines the identity based on MetaData defaults or user defined MetaData


determineSuperClassName

protected void determineSuperClassName(ClassLoaderResolver clr,
                                       java.lang.Class cls)
Determine the super PersistenceCapable class. The persistence-capable-superclass attribute is deprecated for JDO2.0. The attribute will be ignored so metadata files from previous releases can be used. The persistenceCapableSuperclass we use will be retrieved from the class itself.

Parameters:
clr - The ClassLoaderResolver
cls - This class
Throws:
InvalidMetaDataException - if the declared persistence-capable-superclass super class cannot be loaded by the clr.
InvalidMetaDataException - if the declared persistence-capable-superclass has no reachable MetaData

validateUserInputForIdentity

protected void validateUserInputForIdentity()
Check for conflicts on super class and this class MetaData identity

Throws:
InvalidMetaDataException - if the user tries to overwrite a super class identity / strategy

getBaseAbstractClassMetaData

public AbstractClassMetaData getBaseAbstractClassMetaData()
Convenience accessor for the AbstractClassMetaData of the base object in this hierarchy.

Returns:
The AbstractClassMetaData for the base object.

inheritDetachableSettings

protected void inheritDetachableSettings()
Inherit detach settings from super classes. This class is forced to be detachable if the super classes is.


inheritIdentity

protected void inheritIdentity()
Inherit the identity definition from super classes.

Throws:
InvalidMetaDataException - if the MetaData of this class conflicts with super classes definition

newDefaultedProperty

protected AbstractMemberMetaData newDefaultedProperty(java.lang.String name)
Utility to add a defaulted PropertyMetaData to the class. Provided as a method since then any derived classes can override it.

Parameters:
name - name of property
Returns:
the new PropertyMetaData

validateUserInputForInheritanceMetaData

protected void validateUserInputForInheritanceMetaData()
Check if the inheritance MetaData is credible.

Throws:
InvalidMetaDataException - if the strategy is superclass-table, yet there are no super class
InvalidMetaDataException - if the strategy is superclass-table, yet the super class has not specified a discriminator
InvalidMetaDataException - if the strategy is superclass-table and discriminator is "value-map", yet no value for the discriminator has been specified

validateUnmappedColumns

protected void validateUnmappedColumns()
Convenience method to validate the specified "unmapped" columns.

Throws:
InvalidMetaDataException - if a column is specified without its name.

getSuperAbstractClassMetaData

public AbstractClassMetaData getSuperAbstractClassMetaData()
Accessor for the Meta-Data for the superclass of this class.

Returns:
MetaData of the superclass

hasDiscriminatorStrategy

public final boolean hasDiscriminatorStrategy()
Returns:
true if discriminatorStrategy is neither null nor NONE

getDiscriminatorStrategy

public final DiscriminatorStrategy getDiscriminatorStrategy()
Convenience accessor for the discriminator strategy applying to this class. This is specified on the class managing the table if at all.

Returns:
The discriminator strategy

determineObjectIdClass

protected void determineObjectIdClass()
Determine the object id class.

Throws:
InvalidMetaDataException - if the class 0 or more that one primary key field and no objectid-class has been declared in the MetaData
InvalidMetaDataException - if the objectid-class has not been set and the primary key field does not match a supported SingleFieldIdentity
InvalidMetaDataException - if the identity type is APPLICATION but not primary key fields have been set
InvalidMetaDataException - if the objectid-class cannot be loaded by the clr

validateObjectIdClass

protected void validateObjectIdClass(ClassLoaderResolver clr)
Validate the objectid-class of this class.

Parameters:
clr - ClassLoader resolver

populate

public abstract void populate(ClassLoaderResolver clr,
                              java.lang.ClassLoader primary)
Method to provide the details of the class being represented by this MetaData. This can be used to firstly provide defaults for attributes that aren't specified in the MetaData, and secondly to report any errors with attributes that have been specifed that are inconsistent with the class being represented.

This method must be invoked by subclasses during populate operations

Parameters:
clr - ClassLoaderResolver to use in loading any classes
primary - the primary ClassLoader to use (or null)

initialise

public abstract void initialise()
Method to initialise the sub-objects of this class metadata. If populate() is going to be used it should be used BEFORE calling this method. Subclasses must overwrite this method and invoke this

Overrides:
initialise in class MetaData

initialiseMemberPositionInformation

protected void initialiseMemberPositionInformation()
Method to initialise all convenience information about member positions and what role each position performs.


determineInheritanceMetaData

protected void determineInheritanceMetaData()
Impose a default inheritance strategy when one is not already specified. Uses the PMF property for defaultInheritanceStrategy and works to the JDO2 spec etc.


validateDeprecatedMetaData

protected void validateDeprecatedMetaData()
Check usage of deprecated MetaData

Throws:
InvalidMetaDataException - if deprecated MetaData is used

getNoOfQueries

public int getNoOfQueries()
Accessor for the number of named queries.

Returns:
no of named queries

getQueries

public QueryMetaData[] getQueries()
Accessor for the metadata of the named queries.

Returns:
Meta-Data for the named queries.

getQueryResultMetaData

public QueryResultMetaData[] getQueryResultMetaData()
Get the query result MetaData registered for this class.

Returns:
Query Result MetaData defined for this class

getVersionMetaData

public final VersionMetaData getVersionMetaData()
Accessor for Version MetaData for objects stored in this table

Returns:
Returns the versionMetaData.

hasVersionStrategy

public final boolean hasVersionStrategy()
Returns:
true if version.strategy is neither null nor NONE

getVersionMetaDataForTable

public final VersionMetaData getVersionMetaDataForTable()
Convenience method to find the version MetaData defining versioning for the same table as this class is using. Traverses up the inheritance tree to find the highest class that uses "subclass-table" that has version metadata defined, and returns the MetaData.

Returns:
Version MetaData for the highest class in this tree using subclass-table

getDiscriminatorMetaDataForTable

public final DiscriminatorMetaData getDiscriminatorMetaDataForTable()
Convenience method to find the discriminator MetaData defining the discrim for the same table as this class is using. Traverses up the inheritance tree to find the highest class that uses "subclass-table" that has discriminator metadata defined, and returns the MetaData.

Returns:
DiscriminatorMetaData for the highest class in this tree using subclass-table

getJoinMetaData

public final JoinMetaData[] getJoinMetaData()
Accessor for joinMetaData

Returns:
Returns the joinMetaData.

getFetchGroupMetaData

public final FetchGroupMetaData[] getFetchGroupMetaData()
Accessor for all MetaData defined for fetch groups for this class. This doesn't include superclasses.

Returns:
Returns the fetchGroupMetaData.

getFetchGroupMetaData

public FetchGroupMetaData[] getFetchGroupMetaData(java.util.Collection groupNames)
Accessor for fetch group metadata for the specified groups (if present). The returned metadata is what is defined for this class that matches any of the names in the input set.

Parameters:
groupNames - Names of the fetch groups
Returns:
MetaData for the groups

getFetchGroupMetaData

public FetchGroupMetaData getFetchGroupMetaData(java.lang.String groupname)
Accessor for the fetch group metadata for the group specified.

Parameters:
groupname - Name of the fetch group
Returns:
MetaData for this group

getIdentityType

public IdentityType getIdentityType()
Accessor for the identity-type.

Returns:
identity-type tag value

getIndexMetaData

public final IndexMetaData[] getIndexMetaData()
Accessor for indexMetaData

Returns:
Returns the indexMetaData.

getForeignKeyMetaData

public final ForeignKeyMetaData[] getForeignKeyMetaData()
Accessor for foreignKeyMetaData

Returns:
Returns the foreignKeyMetaData.

getUniqueMetaData

public final UniqueMetaData[] getUniqueMetaData()
Accessor for UniqueMetaData

Returns:
Returns the UniqueMetaData.

getUnmappedColumns

public final java.util.List getUnmappedColumns()
Accessor for the unmapped columns require for the datastore table.

Returns:
The list of unmapped columns

getName

public java.lang.String getName()
Accessor for the class name.

Returns:
class name

getFullClassName

public java.lang.String getFullClassName()
Accessor for the full class name.

Returns:
full class name.

getEntityName

public java.lang.String getEntityName()
Accessor for the class name.

Returns:
class name

getObjectidClass

public java.lang.String getObjectidClass()
Accessor for the objectid-class tag value.

Returns:
the fully qualified objectid class name

getCatalog

public java.lang.String getCatalog()
Accessor for the catalog name.

Returns:
catalog name

getSchema

public java.lang.String getSchema()
Accessor for the schema name.

Returns:
schema name

getTable

public java.lang.String getTable()
Accessor for the table name.

Returns:
table name

isRequiresExtent

public boolean isRequiresExtent()
Accessor for the requires-extent tag value.

Returns:
requires-extent tag value

isDetachable

public boolean isDetachable()
Accessor for the detachable tag value.

Returns:
detachable tag value

isCacheable

public boolean isCacheable()
Accessor for the cacheable tag value.

Returns:
cacheable tag value

setCacheable

public void setCacheable(boolean cache)
Convenience method to set the cacheability of this class.


isEmbeddedOnly

public boolean isEmbeddedOnly()
Accessor for the embedded-only tag value.

Returns:
embedded-only tag value

setEmbeddedOnly

public void setEmbeddedOnly()
Convenience method to make this class available for storing only when embedded in another object.


getIdentityMetaData

public final IdentityMetaData getIdentityMetaData()
Accessor for identityMetaData

Returns:
Returns the identityMetaData.

getBaseIdentityMetaData

public final IdentityMetaData getBaseIdentityMetaData()
Convenience method to return the root identity metadata for this inheritance tree.

Returns:
IdentityMetaData at the base

getInheritanceMetaData

public final InheritanceMetaData getInheritanceMetaData()
Accessor for inheritanceMetaData

Returns:
Returns the inheritanceMetaData.

getPrimaryKeyMetaData

public final PrimaryKeyMetaData getPrimaryKeyMetaData()
Accessor for primaryKeyMetaData

Returns:
Returns the primaryKey MetaData.

getMetaDataManager

public MetaDataManager getMetaDataManager()
Convenience accessor for the MetaData Manager in use.

Returns:
MetaDataManager.

getPackageMetaData

public PackageMetaData getPackageMetaData()
Convenience accessor for the parent Package MetaData.

Returns:
MetaData for parent package.

getPackageName

public java.lang.String getPackageName()
Convenience accessor for the package name.

Returns:
package name.

getNoOfMembers

public int getNoOfMembers()
Accessor for the number of fields/properties. This is the total number of fields/properties (inc static, final etc) in this class

Returns:
no of fields/properties.

getMetaDataForMemberAtRelativePosition

public AbstractMemberMetaData getMetaDataForMemberAtRelativePosition(int index)
Accessor for the metadata of a field/property. Does not include superclasses

Parameters:
index - field index relative to this class only starting from 0
Returns:
Meta-Data for the field/property

getPersistenceModifier

public ClassPersistenceModifier getPersistenceModifier()
Accessor for the persistence-modifier of the class.

Returns:
persistence-modifier tag value

getPersistenceCapableSuperclass

public java.lang.String getPersistenceCapableSuperclass()
Accessor for the persistence-capable-superclass tag value.

Returns:
persistence-capable-superclass tag value

usesSingleFieldIdentityClass

public boolean usesSingleFieldIdentityClass()
Whether this PersistenceCapable class uses SingleFieldIdentity

Returns:
true if using SingleFieldIdentity as objectid class

isMetaDataComplete

public boolean isMetaDataComplete()
Accessor for whether this class is fully specified by this metadata and that any annotations should be ignored.

Returns:
Whether we should ignore any annotations

isSameOrAncestorOf

public boolean isSameOrAncestorOf(AbstractClassMetaData cmd)
Check if the argument cmd is the same as this or a descedent.

Parameters:
cmd - the AbstractClassMetaData to be verify if this is an ancestor
Returns:
true if the argument is a child or same as this

getPrimaryKeyMemberNames

public java.lang.String[] getPrimaryKeyMemberNames()
Accessor for the names of the primary key fields/properties. Only valid after being populated. Provided as a convenience where we need to get the names of the PK members but cant wait til initialisation.

Returns:
names of the PK fields/properties

hasMember

public boolean hasMember(java.lang.String memberName)
Method to check if a field/property exists in this classes definition. Will include any superclasses in the check.

Parameters:
memberName - Name of field/property
Returns:
return true if exists.

getMetaDataForMember

public AbstractMemberMetaData getMetaDataForMember(java.lang.String name)
Accessor for the Meta-Data for a field/property. Include superclasses.

Parameters:
name - the name of the field/property
Returns:
Meta-Data for the field.

getNoOfManagedMembers

public int getNoOfManagedMembers()
Accessor for the number of managed fields/properties (this class only).

Returns:
no of managed fields/properties in this class

getManagedMembers

public AbstractMemberMetaData[] getManagedMembers()
Accessor for the managed fields/properties in this class (not including superclass, but including overridden).

Returns:
MetaData for the managed fields/properties in this class

getMetaDataForManagedMemberAtPosition

public AbstractMemberMetaData getMetaDataForManagedMemberAtPosition(int position)
Accessor for MetaData for a managed field/property in this class. The position is relative to the first field in this class (ignores superclasses).

Parameters:
position - The position of the managed field. 0 = first in the class
Returns:
The JDO managed field at that position

getNoOfOverriddenMembers

public int getNoOfOverriddenMembers()
Accessor for the number of overridden fields/properties (this class only).

Returns:
no of overridden fields/properties in this class

getOverriddenMembers

public AbstractMemberMetaData[] getOverriddenMembers()
Accessor for the overridden fields/properties in this class.

Returns:
The overridden fields/properties in this class

getOverriddenMember

public AbstractMemberMetaData getOverriddenMember(int position)
Accessor for MetaData for an overridden field/property in this class.

Parameters:
position - The position of the overridden field/property.
Returns:
MetaData for the field/property at that position

getOverriddenMember

public AbstractMemberMetaData getOverriddenMember(java.lang.String name)
Accessor for an overridden field/property with the specified name.

Parameters:
name - Name of the field/property
Returns:
The MetaData for the field/property

getMemberBeingOverridden

protected AbstractMemberMetaData getMemberBeingOverridden(java.lang.String name)
Convenience method that navigates up a MetaData inheritance tree until it finds the base field/property definition.

Parameters:
name - Name of the field/property we require
Returns:
The AbstractMemberMetaData

getNoOfInheritedManagedMembers

public int getNoOfInheritedManagedMembers()
Accessor for the number of inherited managed fields/properties in superclasses.

Returns:
No of inherited managed fields/properties in superclasses.

getMemberCount

public int getMemberCount()
Accessor for the number of managed fields/properties from this class plus inherited classes.

Returns:
The number of managed fields/properties from this class plus inherited classes.

getMetaDataForManagedMemberAtAbsolutePosition

public AbstractMemberMetaData getMetaDataForManagedMemberAtAbsolutePosition(int abs_position)
Accessor for a managed field/property including superclass fields.

Parameters:
abs_position - The position of the managed member including the superclass. Fields are numbered from 0 in the root superclass.
Returns:
The managed field/property at this "absolute" position.

getMetaDataForManagedMemberAtAbsolutePositionInternal

protected AbstractMemberMetaData getMetaDataForManagedMemberAtAbsolutePositionInternal(int abs_position)
Internal method to get the field/property for an absolute field number. If the field for that absolute field position is overridden by a field in this class then this field/property will be returned.

Parameters:
abs_position - The position of the managed field including the superclass. Fields are numbered from 0 in the root superclass.
Returns:
The managed field at this "absolute" position.

getAbsoluteMemberPositionForRelativePosition

public int getAbsoluteMemberPositionForRelativePosition(int relativePosition)
Accessor for the absolute position for a relative position.

Parameters:
relativePosition - The relative field number
Returns:
The absolute position

getRelativePositionOfMember

public int getRelativePositionOfMember(java.lang.String memberName)
Accessor for the position of the field/property with the specified name. The returned position is relative to this class only.

Parameters:
memberName - Name of the field/property
Returns:
Position of the field/property in this class.

getAbsolutePositionOfMember

public int getAbsolutePositionOfMember(java.lang.String memberName)
Accessor for the absolute position of the field/property with the specified name. The absolute position has origin of the root superclass, starting at 0.

Parameters:
memberName - Name of the field/property
Returns:
Absolute position of the field/property.

getAbsolutePositionOfMember

public int getAbsolutePositionOfMember(java.lang.String className,
                                       java.lang.String memberName)
Accessor for the absolute position of the field/property with the specified name. The absolute position has origin of the root superclass, starting at 0. Will only retrieve the absolute field number if the field_name is of type given by class_name.

Parameters:
className - Name of the class
memberName - Name of the field/property
Returns:
Absolute position of the field/property.

getNoOfPrimaryKeyMembers

public int getNoOfPrimaryKeyMembers()
Accessor for the number of primary key fields/properties.

Returns:
no of primary key fields/properties

getAllMemberPositions

public int[] getAllMemberPositions()
Accessor for all field/property positions. These are absolute numbers and include superclasses and are really just 0, 1, 2, ... n.

Returns:
The positions of all (managed) fields/properties.

getPKMemberPositions

public int[] getPKMemberPositions()
Accessor for the field numbers of the primary key fields/properties. These are absolute numbers (including superclasses).

Returns:
The positions of the primary key fields/properties.

getNonPKMemberPositions

public int[] getNonPKMemberPositions()
Accessor for the positions of the non primary key fields/properties (inc superclass fields).

Returns:
The member positions

getNonPKMemberFlags

public boolean[] getNonPKMemberFlags()
Accessor for the flags of the non primary key fields/properties (inc superclass members).

Returns:
The flags whether the field/property is non primary key

getDFGMemberPositions

public int[] getDFGMemberPositions()
Accessor for the absolute positions of the default fetch group fields/properties (inc superclasses).

Returns:
The positions of the DFG fields/properties (inc superclasses).

getDFGMemberFlags

public boolean[] getDFGMemberFlags()
Accessor for the flags of the DFG fields/properties (inc superclass).

Returns:
The flags whether the field/property is in the DFG

getBasicMemberPositions

public int[] getBasicMemberPositions(ClassLoaderResolver clr)
Accessor for the absolute positions of fields/properties that are considered basic. This category includes members of all basic (primitive and immutable object class) types as defined in section 6.4 of the specification, including String, Date and its jdbc subtypes, Locale, Currency, and Enum types. Includes all inherited multivalued positions.

Returns:
The absolute positions

getMultivaluedMemberPositions

public int[] getMultivaluedMemberPositions()
Accessor for the absolute positions of fields/properties that are considered multi-valued This category includes members of all multi-valued types, including Collection, array, and Map types of basic and relationship types. Includes all inherited multivalued positions.

Returns:
The absolute positions

getSCOMutableMemberPositions

public int[] getSCOMutableMemberPositions()
Accessor for the absolute positions of the second class mutable fields/properties.

Returns:
The field numbers of the second class mutable fields (inc superclasses).

getSCONonContainerMemberPositions

public int[] getSCONonContainerMemberPositions()
Accessor for the absolute positions of all SCO fields/properties that are NOT containers (e.g Dates, Points, etc)

Returns:
Field numbers of all SCO non-container fields/properties

getSCOContainerMemberPositions

public int[] getSCOContainerMemberPositions()
Accessor for the absolute positions of all SCO fields/properties that are containers.

Returns:
Positions of all SCO container fields/properties.

getSCOMutableMemberFlags

public boolean[] getSCOMutableMemberFlags()
Accessor for the flags of the SCO mutable fields (inc superclass fields).

Returns:
The flags whether the field is second class mutable

hasRelations

public boolean hasRelations(ClassLoaderResolver clr)
Convenience method to return if the class has relations to other objects. Includes superclasses.

Returns:
Whether the class has any relations (that it knows about)

getRelationMemberPositions

public int[] getRelationMemberPositions(ClassLoaderResolver clr)
Convenience method to return the absolute positions of all fields/properties that have relations.

Parameters:
clr - ClassLoader resolver
Returns:
The absolute positions of all fields/properties that have relations

getBidirectionalRelationMemberPositions

public int[] getBidirectionalRelationMemberPositions(ClassLoaderResolver clr)
Convenience method to return the absolute positions of fields/properties that have bidirectional relations.

Parameters:
clr - ClassLoader resolver
Returns:
Absolute positions of bidirectional relation fields/properties

setIdentityType

public void setIdentityType(IdentityType type)
Cinvenience method for updating the identity type when not set correctly during construction. This is needed where we have annotations and the user hasnt defined "APPLICATION", and we find a field defined as @PrimaryKey so we set it to APPLICATION at that point.

Parameters:
type - The Identity type to use

setMetaDataComplete

public void setMetaDataComplete()
Method to set that this class is "metadata complete" (see JPA spec). Means that any annotations will be ignored.


addQuery

public void addQuery(QueryMetaData qmd)
Method to add a named query to this class. Rejects the addition of duplicate named queries.

Parameters:
qmd - Meta-Data for the query.

addQueryResultMetaData

public void addQueryResultMetaData(QueryResultMetaData resultMetaData)
Method to register a query-result MetaData.

Parameters:
resultMetaData - Query-Result MetaData to register

addIndex

public void addIndex(IndexMetaData idxmd)
Method to add an index to this class.

Parameters:
idxmd - Meta-Data for the index.

addForeignKey

public void addForeignKey(ForeignKeyMetaData fkmd)
Method to add an foreign-key to this class.

Parameters:
fkmd - Meta-Data for the foreign-key.

addUniqueConstraint

public void addUniqueConstraint(UniqueMetaData unimd)
Method to add a unique constraint to this class.

Parameters:
unimd - Meta-Data for the unique constraint.

addUnmappedColumn

public final void addUnmappedColumn(ColumnMetaData colmd)
Method to add an unmapped column.

Parameters:
colmd - The metadata for the unmapped column

addMember

public void addMember(AbstractMemberMetaData mmd)
Method to add a field/property to this interface. Rejects the addition of duplicate named fields/properties.

Parameters:
mmd - Field/Property MetaData

addFetchGroup

public void addFetchGroup(FetchGroupMetaData fgmd)
Method to add a fetch-group to this class.

Parameters:
fgmd - Meta-Data for the fetch-group.

addJoin

public void addJoin(JoinMetaData jnmd)
Method to add a join to this class. Rejects the addition of duplicate named fields.

Parameters:
jnmd - Meta-Data for the join.

addListener

public void addListener(EventListenerMetaData listener)
Add a listener class name

Parameters:
listener - the listener metadata. Duplicated classes are ignored

getListenerForClass

public EventListenerMetaData getListenerForClass(java.lang.String className)
Accessor for the EventListener info for an EventListener class name

Parameters:
className - Name of the event listener class
Returns:
EventListener info for this class (or null if the class isnt an EventListener)

getListeners

public java.util.List getListeners()
Get the event listeners

Returns:
the event listeners

excludeSuperClassListeners

public void excludeSuperClassListeners()
Toogle exclude super class listeners


isExcludeSuperClassListeners

public boolean isExcludeSuperClassListeners()
Whether super classes listeners are not going to be invoked

Returns:
true if super class listeners are not invoked

excludeDefaultListeners

public void excludeDefaultListeners()
Method to exclude default listeners.


isExcludeDefaultListeners

public boolean isExcludeDefaultListeners()
Whether default listeners are not going to be invoked

Returns:
true if default listeners are not invoked

setVersionMetaData

public final void setVersionMetaData(VersionMetaData versionMetaData)
Mutator for the Version MetaData.

Parameters:
versionMetaData - The versionMetaData to set.

setIdentityMetaData

public final void setIdentityMetaData(IdentityMetaData identityMetaData)
Mutator for the identity MetaData.

Parameters:
identityMetaData - The identityMetaData to set.

setInheritanceMetaData

public final void setInheritanceMetaData(InheritanceMetaData inheritanceMetaData)
Mutator for the inheritance MetaData.

Parameters:
inheritanceMetaData - The inheritanceMetaData to set.

setPrimaryKeyMetaData

public final void setPrimaryKeyMetaData(PrimaryKeyMetaData primaryKeyMetaData)
Mutator for the PrimaryKey MetaData.

Parameters:
primaryKeyMetaData - The PrimaryKey MetaData to set.

setTable

public final void setTable(java.lang.String table)
Mutator for the table name.

Parameters:
table - Name of the table

setCatalog

public final void setCatalog(java.lang.String catalog)
Mutator for the catalog name.

Parameters:
catalog - Name of the catalog

setSchema

public final void setSchema(java.lang.String schema)
Mutator for the schema name.

Parameters:
schema - Name of the schema

setObjectIdClass

public final void setObjectIdClass(java.lang.String objectidClass)
Mutator for the object id class name.

Parameters:
objectidClass - Name of the id class


Copyright © 2009. All Rights Reserved.