|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.metadata.MetaData
org.datanucleus.metadata.AbstractClassMetaData
public abstract class AbstractClassMetaData
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.
| 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 |
|---|
protected static Localiser LOCALISER_API
protected final java.lang.String name
protected java.lang.String entityName
protected IdentityType identityType
protected ClassPersistenceModifier persistenceModifier
protected java.lang.String persistenceCapableSuperclass
protected java.lang.String objectidClass
protected boolean requiresExtent
protected boolean detachable
protected boolean embeddedOnly
protected java.lang.String catalog
protected java.lang.String schema
protected java.lang.String table
protected boolean cacheable
protected final java.lang.String fullName
protected VersionMetaData versionMetaData
protected IdentityMetaData identityMetaData
protected boolean identitySpecified
protected InheritanceMetaData inheritanceMetaData
protected PrimaryKeyMetaData primaryKeyMetaData
protected java.util.List listeners
protected java.lang.Boolean excludeSuperClassListeners
protected java.lang.Boolean excludeDefaultListeners
protected FetchGroupMetaData[] fetchGroupMetaData
protected java.util.Map fetchGroupMetaDataByName
protected AbstractClassMetaData pcSuperclassMetaData
protected boolean metaDataComplete
protected java.util.Collection queries
protected java.util.Collection queryResultMetaData
protected JoinMetaData[] joinMetaData
protected IndexMetaData[] indexMetaData
protected ForeignKeyMetaData[] foreignKeyMetaData
protected UniqueMetaData[] uniqueMetaData
protected java.util.List members
protected java.util.List unmappedColumns
protected java.util.List joins
protected java.util.List foreignKeys
protected java.util.List indexes
protected java.util.List uniqueConstraints
protected java.util.List fetchGroups
protected AbstractMemberMetaData[] managedMembers
protected AbstractMemberMetaData[] overriddenMembers
protected java.util.Map memberPositionsByName
protected int[] allMemberPositions
protected int[] pkMemberPositions
protected int[] nonPkMemberPositions
protected boolean[] nonPkMemberFlags
protected int[] dfgMemberPositions
protected boolean[] dfgMemberFlags
protected int[] scoMutableMemberPositions
protected boolean[] scoMutableMemberFlags
protected int[] scoNonContainerMemberPositions
protected int[] relationPositions
protected int noOfInheritedManagedMembers
protected boolean usesSingleFieldIdentityClass
protected int memberCount
protected boolean implementationOfPersistentDefinition
protected transient boolean persistentInterfaceImplNeedingTableFromSuperclass
protected transient boolean persistentInterfaceImplNeedingTableFromSubclass
protected int[] secondClassContainerMemberPositions
| Constructor Detail |
|---|
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)
parent - The package to which this class/interface belongsname - Name of classidentityType - identity-type flagobjectidClass - Primary key class namerequiresExtent - Whether the class requires an extentdetachable - Whether the class can be detachedembeddedOnly - embedded-only tagmodifier - persistence-modifier tagcatalog - The catalog name default for this classschema - The schema name default for this classtable - table to store the class inentityName - the entity name required by JPA §4.3.1
public AbstractClassMetaData(InterfaceMetaData imd,
java.lang.String implClassName,
boolean copyMembers)
imd - MetaData for the "persistent-interface"implClassName - Name of the implementation classcopyMembers - Whether to copy the fields/properties of the interface too
public AbstractClassMetaData(ClassMetaData cmd,
java.lang.String implClassName)
cmd - MetaData for the implementation of the "persistent-abstract-class"implClassName - Name of the implementation class| Method Detail |
|---|
public boolean isImplementationOfPersistentDefinition()
protected void copyMembersFromInterface(InterfaceMetaData imd)
imd - The interface that we copy fromprotected void checkInitialised()
JDOFatalInternalException - Thrown if the Meta-Data hasn't been initialised.protected void checkPopulated()
NucleusException - Thrown if the Meta-Data hasn't been populated.
protected java.lang.Class loadClass(ClassLoaderResolver clr,
java.lang.ClassLoader primary)
clr - the ClassLoaderprimary - the primary ClassLoader to use (or null)
protected void determineIdentity()
protected void determineSuperClassName(ClassLoaderResolver clr,
java.lang.Class cls)
clr - The ClassLoaderResolvercls - This class
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 MetaDataprotected void validateUserInputForIdentity()
InvalidMetaDataException - if the user tries to overwrite a super class identity / strategypublic AbstractClassMetaData getBaseAbstractClassMetaData()
protected void inheritDetachableSettings()
protected void inheritIdentity()
InvalidMetaDataException - if the MetaData of this class conflicts with super classes definitionprotected AbstractMemberMetaData newDefaultedProperty(java.lang.String name)
name - name of property
protected void validateUserInputForInheritanceMetaData()
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 specifiedprotected void validateUnmappedColumns()
InvalidMetaDataException - if a column is specified without its name.public AbstractClassMetaData getSuperAbstractClassMetaData()
public final boolean hasDiscriminatorStrategy()
public final DiscriminatorStrategy getDiscriminatorStrategy()
protected void determineObjectIdClass()
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 clrprotected void validateObjectIdClass(ClassLoaderResolver clr)
clr - ClassLoader resolver
public abstract void populate(ClassLoaderResolver clr,
java.lang.ClassLoader primary)
This method must be invoked by subclasses during populate operations
clr - ClassLoaderResolver to use in loading any classesprimary - the primary ClassLoader to use (or null)public abstract void initialise()
initialise in class MetaDataprotected void initialiseMemberPositionInformation()
protected void determineInheritanceMetaData()
protected void validateDeprecatedMetaData()
InvalidMetaDataException - if deprecated MetaData is usedpublic int getNoOfQueries()
public QueryMetaData[] getQueries()
public QueryResultMetaData[] getQueryResultMetaData()
public final VersionMetaData getVersionMetaData()
public final boolean hasVersionStrategy()
public final VersionMetaData getVersionMetaDataForTable()
public final DiscriminatorMetaData getDiscriminatorMetaDataForTable()
public final JoinMetaData[] getJoinMetaData()
public final FetchGroupMetaData[] getFetchGroupMetaData()
public FetchGroupMetaData[] getFetchGroupMetaData(java.util.Collection groupNames)
groupNames - Names of the fetch groups
public FetchGroupMetaData getFetchGroupMetaData(java.lang.String groupname)
groupname - Name of the fetch group
public IdentityType getIdentityType()
public final IndexMetaData[] getIndexMetaData()
public final ForeignKeyMetaData[] getForeignKeyMetaData()
public final UniqueMetaData[] getUniqueMetaData()
public final java.util.List getUnmappedColumns()
public java.lang.String getName()
public java.lang.String getFullClassName()
public java.lang.String getEntityName()
public java.lang.String getObjectidClass()
public java.lang.String getCatalog()
public java.lang.String getSchema()
public java.lang.String getTable()
public boolean isRequiresExtent()
public boolean isDetachable()
public boolean isCacheable()
public void setCacheable(boolean cache)
public boolean isEmbeddedOnly()
public void setEmbeddedOnly()
public final IdentityMetaData getIdentityMetaData()
public final IdentityMetaData getBaseIdentityMetaData()
public final InheritanceMetaData getInheritanceMetaData()
public final PrimaryKeyMetaData getPrimaryKeyMetaData()
public MetaDataManager getMetaDataManager()
public PackageMetaData getPackageMetaData()
public java.lang.String getPackageName()
public int getNoOfMembers()
public AbstractMemberMetaData getMetaDataForMemberAtRelativePosition(int index)
index - field index relative to this class only starting from 0
public ClassPersistenceModifier getPersistenceModifier()
public java.lang.String getPersistenceCapableSuperclass()
public boolean usesSingleFieldIdentityClass()
public boolean isMetaDataComplete()
public boolean isSameOrAncestorOf(AbstractClassMetaData cmd)
cmd - the AbstractClassMetaData to be verify if this is an ancestor
public java.lang.String[] getPrimaryKeyMemberNames()
public boolean hasMember(java.lang.String memberName)
memberName - Name of field/property
public AbstractMemberMetaData getMetaDataForMember(java.lang.String name)
name - the name of the field/property
public int getNoOfManagedMembers()
public AbstractMemberMetaData[] getManagedMembers()
public AbstractMemberMetaData getMetaDataForManagedMemberAtPosition(int position)
position - The position of the managed field. 0 = first in the class
public int getNoOfOverriddenMembers()
public AbstractMemberMetaData[] getOverriddenMembers()
public AbstractMemberMetaData getOverriddenMember(int position)
position - The position of the overridden field/property.
public AbstractMemberMetaData getOverriddenMember(java.lang.String name)
name - Name of the field/property
protected AbstractMemberMetaData getMemberBeingOverridden(java.lang.String name)
name - Name of the field/property we require
public int getNoOfInheritedManagedMembers()
public int getMemberCount()
public AbstractMemberMetaData getMetaDataForManagedMemberAtAbsolutePosition(int abs_position)
abs_position - The position of the managed member including the
superclass. Fields are numbered from 0 in the root superclass.
protected AbstractMemberMetaData getMetaDataForManagedMemberAtAbsolutePositionInternal(int abs_position)
abs_position - The position of the managed field including the
superclass. Fields are numbered from 0 in the root superclass.
public int getAbsoluteMemberPositionForRelativePosition(int relativePosition)
relativePosition - The relative field number
public int getRelativePositionOfMember(java.lang.String memberName)
memberName - Name of the field/property
public int getAbsolutePositionOfMember(java.lang.String memberName)
memberName - Name of the field/property
public int getAbsolutePositionOfMember(java.lang.String className,
java.lang.String memberName)
field_name
is of type given by class_name.
className - Name of the classmemberName - Name of the field/property
public int getNoOfPrimaryKeyMembers()
public int[] getAllMemberPositions()
public int[] getPKMemberPositions()
public int[] getNonPKMemberPositions()
public boolean[] getNonPKMemberFlags()
public int[] getDFGMemberPositions()
public boolean[] getDFGMemberFlags()
public int[] getBasicMemberPositions(ClassLoaderResolver clr)
public int[] getMultivaluedMemberPositions()
public int[] getSCOMutableMemberPositions()
public int[] getSCONonContainerMemberPositions()
public int[] getSCOContainerMemberPositions()
public boolean[] getSCOMutableMemberFlags()
public boolean hasRelations(ClassLoaderResolver clr)
public int[] getRelationMemberPositions(ClassLoaderResolver clr)
clr - ClassLoader resolver
public int[] getBidirectionalRelationMemberPositions(ClassLoaderResolver clr)
clr - ClassLoader resolver
public void setIdentityType(IdentityType type)
type - The Identity type to usepublic void setMetaDataComplete()
public void addQuery(QueryMetaData qmd)
qmd - Meta-Data for the query.public void addQueryResultMetaData(QueryResultMetaData resultMetaData)
resultMetaData - Query-Result MetaData to registerpublic void addIndex(IndexMetaData idxmd)
idxmd - Meta-Data for the index.public void addForeignKey(ForeignKeyMetaData fkmd)
fkmd - Meta-Data for the foreign-key.public void addUniqueConstraint(UniqueMetaData unimd)
unimd - Meta-Data for the unique constraint.public final void addUnmappedColumn(ColumnMetaData colmd)
colmd - The metadata for the unmapped columnpublic void addMember(AbstractMemberMetaData mmd)
mmd - Field/Property MetaDatapublic void addFetchGroup(FetchGroupMetaData fgmd)
fgmd - Meta-Data for the fetch-group.public void addJoin(JoinMetaData jnmd)
jnmd - Meta-Data for the join.public void addListener(EventListenerMetaData listener)
listener - the listener metadata. Duplicated classes are ignoredpublic EventListenerMetaData getListenerForClass(java.lang.String className)
className - Name of the event listener class
public java.util.List getListeners()
public void excludeSuperClassListeners()
public boolean isExcludeSuperClassListeners()
public void excludeDefaultListeners()
public boolean isExcludeDefaultListeners()
public final void setVersionMetaData(VersionMetaData versionMetaData)
versionMetaData - The versionMetaData to set.public final void setIdentityMetaData(IdentityMetaData identityMetaData)
identityMetaData - The identityMetaData to set.public final void setInheritanceMetaData(InheritanceMetaData inheritanceMetaData)
inheritanceMetaData - The inheritanceMetaData to set.public final void setPrimaryKeyMetaData(PrimaryKeyMetaData primaryKeyMetaData)
primaryKeyMetaData - The PrimaryKey MetaData to set.public final void setTable(java.lang.String table)
table - Name of the tablepublic final void setCatalog(java.lang.String catalog)
catalog - Name of the catalogpublic final void setSchema(java.lang.String schema)
schema - Name of the schemapublic final void setObjectIdClass(java.lang.String objectidClass)
objectidClass - Name of the id class
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||