public class JDOClassImplDynamic extends JDOMemberImpl implements JDOClass
TBD:
| Modifier and Type | Field and Description |
|---|---|
protected int |
identityType
Property identityType.
|
protected JavaType |
javaType
Property javaType.
|
protected static I18NHelper |
msg
I18N support
|
protected JavaType |
objectIdClass
Property objectIdClass.
|
protected JDOClass |
pcSuperclass
Relationship JDOClass<->JDOClass.
|
| Constructor and Description |
|---|
JDOClassImplDynamic() |
| Modifier and Type | Method and Description |
|---|---|
JDOClass |
createJDOClass(java.lang.String name)
This method returns a JDOClass instance representing an inner class of
this JDOClass If this JDOClass already declares such an inner class,
the existing JDOClass instance is returned.
|
JDOField |
createJDOField(java.lang.String name)
This method returns a JDOField instance for the field with the specified
name.
|
JDOClass[] |
getDeclaredClasses()
Returns the collection of JDOClass instances declared by this JDOClass.
|
JDOField |
getDeclaredField(java.lang.String fieldName)
Returns JDOField metadata for a particular declared field specified by
field name.
|
JDOField[] |
getDeclaredFields()
Returns the collection of JDOField instances declared by this JDOClass
in the form of an array.
|
int |
getDeclaredManagedFieldCount()
Returns the number of managed fields declared in the class represented
by this JDOClass.
|
JDOField[] |
getDeclaredManagedFields()
Returns the collection of managed JDOField instances declared by this
JDOClass in the form of an array.
|
JDOMember[] |
getDeclaredMembers()
Returns the collection of JDOMember instances declared by this
JDOClass in form of an array.
|
java.lang.String |
getDeclaredObjectIdClassName()
Get the fully qualified name of the object identity class
(primary key class) for this JDOClass.
|
JDOModel |
getDeclaringModel()
Returns the declaring JDOModel of this JDOClass.
|
JDOField[] |
getDefaultFetchGroupFields()
Returns the collection of default fetch group fields of this JDOClass
in the form of an array.
|
JDOField |
getField(int fieldNumber)
Provides metadata for a particular field specified by the absolute field
number.
|
JDOField |
getField(java.lang.String fieldName)
Returns JDOField metadata for a particular field specified by field name.
|
protected JDOField |
getFieldInternal(java.lang.String fieldName)
Returns the JDOField definition for the specified field.
|
int |
getIdentityType()
Get the JDO identity type of this JDOClass.
|
int |
getInheritedManagedFieldCount()
Returns the number of inherited managed fields for the class
represented by this JDOClass.
|
JavaType |
getJavaType()
Provides the JavaType representaion corresponding to this JDOClass.
|
JDOPackage |
getJDOPackage()
Returns the JDOPackage instance corresponding to the package name
of this JDOClass.
|
JDOField |
getManagedField(java.lang.String fieldName)
Returns JDOField metadata for a particular managed field specified by
field name.
|
int |
getManagedFieldCount()
Returns the number of managed fields for the class represented by this
JDOClass.
|
int[] |
getManagedFieldNumbers()
Returns an array of absolute field numbers of the managed fields of this
JDOClass.
|
JDOField[] |
getManagedFields()
Returns the collection of managed JDOField instances of this JDOClass
in the form of an array.
|
JavaType |
getObjectIdClass()
Get the JavaType representation of the object identity class
(primary key class) for this JDOClass.
|
java.lang.String |
getPackagePrefix()
Returns the package name including a terminating dot if this class has a
package.
|
JDOClass |
getPersistenceCapableRootClass()
Returns the least-derived (topmost) persistence-capable class in the
hierarchy of this JDOClass.
|
JDOClass |
getPersistenceCapableSuperclass()
Returns the JDOClass instance for the persistence-capable superclass
of this JDOClass.
|
java.lang.String |
getPersistenceCapableSuperclassName()
Get the fully qualified class name of the persistence-capable superclass
of the persistence-capable class described by this JDOClass.
|
int[] |
getPersistentFieldNumbers()
Returns an array of absolute field numbers of the persistent fields of
this JDOClass.
|
JDOField[] |
getPersistentFields()
Returns the collection of persistent JDOField instances of this JDOClass
in the form of an array.
|
int[] |
getPersistentNonPrimaryKeyFieldNumbers()
Returns an array of absolute field numbers of the non identifying,
persistent fields of this JDOClass.
|
int[] |
getPersistentRelationshipFieldNumbers()
Returns an array of absolute field numbers of persistent relationship
fields of this JDOClass.
|
JDOField[] |
getPersistentRelationshipFields()
Returns the collection of persistent relationship fields of this JDOClass
in the form of an array.
|
int[] |
getPersistentSerializableFieldNumbers()
Returns an array of absolute field numbers of persistent, serializable
fields of this JDOClass.
|
int[] |
getPrimaryKeyFieldNumbers()
Returns an array of absolute field numbers of the identifying fields
of this JDOClass.
|
JDOField[] |
getPrimaryKeyFields()
Returns the collection of identifying fields of this JDOClass in the form
of an array.
|
boolean |
isXMLMetadataLoaded()
Determines whether the XML metadata for the class represented by this
JDOClass has been loaded.
|
protected JDOClass |
newJDOClassInstance()
Returns a new instance of the JDOClass implementation class.
|
protected JDOField |
newJDOFieldInstance()
Returns a new instance of the JDOField implementation class.
|
void |
removeDeclaredMember(JDOMember member)
Remove the supplied member from the collection of members maintained by
this JDOClass.
|
boolean |
requiresExtent()
Determines whether an extent must be managed for the
persistence-capable class described by this JDOClass.
|
void |
setDeclaredObjectIdClassName(java.lang.String declaredObjectIdClassName)
Set the fully qualified name of the object identity class
(primary key class) for this JDOClass.
|
void |
setDeclaringModel(JDOModel model)
Set the declaring JDOModel for this JDOClass.
|
void |
setIdentityType(int identityType)
Set the object identity type of this JDOClass.
|
void |
setJavaType(JavaType javaType)
Set the JavaType representation corresponding to this JDOClass.
|
void |
setJDOPackage(JDOPackage jdoPackage)
Sets the JDOPackage instance corresponding to the package name
of this JDOClass.
|
void |
setObjectIdClass(JavaType objectIdClass)
Set the JavaType representation of the object identity class
(primary key class) for this JDOClass.
|
void |
setPersistenceCapableSuperclass(JDOClass pcSuperclass)
Set the JDOClass for the persistence-capable superclass
of this JDOClass.
|
void |
setPersistenceCapableSuperclassName(java.lang.String pcSuperclassName)
Set the fully qualified class name of the persistence-capable superclass
of the persistence-capable class described by this JDOClass.
|
void |
setRequiresExtent(boolean requiresExtent)
Set whether an extent must be managed for the
persistence-capable class described by this JDOClass.
|
void |
setXMLMetadataLoaded()
Sets the flag indicating that the class XML metadata for this
JDOClass is loaded to
true. |
compareTo, equals, getDeclaringClass, getName, hashCode, setDeclaringClass, setName, toStringaddPropertyChangeListener, addVetoableChangeListener, createJDOExtension, firePropertyChange, fireVetoableChange, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListenerclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDeclaringClass, getName, setDeclaringClass, setNameaddPropertyChangeListener, addVetoableChangeListener, createJDOExtension, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListenerprotected int identityType
getIdentityType().protected transient JavaType objectIdClass
protected JDOClass pcSuperclass
protected transient JavaType javaType
protected static final I18NHelper msg
public int getIdentityType()
JDOIdentityType.APPLICATION if objectid-class is
specified, and JDOIdentityType.DATASTORE, if not.getIdentityType in interface JDOClassJDOIdentityType.APPLICATION,
JDOIdentityType.DATASTORE, or
JDOIdentityType.NONDURABLEpublic void setIdentityType(int identityType)
setIdentityType in interface JDOClassidentityType - an integer indicating the JDO identity type, one of:
JDOIdentityType.APPLICATION,
JDOIdentityType.DATASTORE, or
JDOIdentityType.NONDURABLEpublic JavaType getObjectIdClass()
getObjectIdClass in interface JDOClasspublic void setObjectIdClass(JavaType objectIdClass)
setObjectIdClass in interface JDOClassobjectIdClass - the JavaType representation of the
object identity classpublic java.lang.String getDeclaredObjectIdClassName()
getDeclaredObjectIdClassName in interface JDOClasspublic void setDeclaredObjectIdClassName(java.lang.String declaredObjectIdClassName)
setDeclaredObjectIdClassName in interface JDOClassdeclaredObjectIdClassName - the name of the object identity classpublic boolean requiresExtent()
requiresExtent in interface JDOClasstrue if this class must manage an extent;
false otherwisepublic void setRequiresExtent(boolean requiresExtent)
setRequiresExtent in interface JDOClassrequiresExtent - true if this class must manage
an extent; false otherwisepublic java.lang.String getPersistenceCapableSuperclassName()
null is returned.getPersistenceCapableSuperclassName in interface JDOClassnull if there is no persistence-capable superclasspublic void setPersistenceCapableSuperclassName(java.lang.String pcSuperclassName)
setPersistenceCapableSuperclassName in interface JDOClasspcSuperclassName - the fully qualified name of the
persistence-capable superclasspublic JavaType getJavaType()
Note the difference between Object.getClass() and this method. The former returns the class of the object in hand, this returns the class of the object represented by this meta data.
getJavaType in interface JDOClasspublic void setJavaType(JavaType javaType)
setJavaType in interface JDOClassjavaType - the JavaType representation for this JDOClasspublic boolean isXMLMetadataLoaded()
isXMLMetadataLoaded in interface JDOClasstrue if XML metadata is loaded;
false otherwisepublic void setXMLMetadataLoaded()
true.setXMLMetadataLoaded in interface JDOClasspublic void removeDeclaredMember(JDOMember member) throws ModelException
removeDeclaredMember in interface JDOClassmember - the member to be removedModelException - if impossiblepublic JDOMember[] getDeclaredMembers()
getDeclaredMembers in interface JDOClasspublic JDOModel getDeclaringModel()
getDeclaringModel in interface JDOClasspublic void setDeclaringModel(JDOModel model)
setDeclaringModel in interface JDOClassmodel - the declaring JDOModel of this JDOClasspublic JDOClass getPersistenceCapableSuperclass()
null is returned.getPersistenceCapableSuperclass in interface JDOClassnull if there is no persistence-capable superclasspublic void setPersistenceCapableSuperclass(JDOClass pcSuperclass)
setPersistenceCapableSuperclass in interface JDOClasspcSuperclass - the JDClass instance of the persistence-capable
superclasspublic JDOPackage getJDOPackage()
getJDOPackage in interface JDOClasspublic void setJDOPackage(JDOPackage jdoPackage)
setJDOPackage in interface JDOClassjdoPackage - the JDOPackage of this JDOClass.public JDOField createJDOField(java.lang.String name) throws ModelException
Note, if the field numbers for the managed fields of this JDOClass are calculated, this methid will fail to create a new JDOField. Any new field would possibly invalidate existing field number
createJDOField in interface JDOClassname - the name of the fieldModelException - if impossiblepublic JDOClass createJDOClass(java.lang.String name) throws ModelException
createJDOClass in interface JDOClassname - the name of the inner classModelException - if impossiblepublic JDOClass[] getDeclaredClasses()
getDeclaredClasses in interface JDOClasspublic JDOField[] getDeclaredFields()
getDeclaredFields in interface JDOClasspublic JDOField[] getDeclaredManagedFields()
PersistenceModifier.PERSISTENT or
PersistenceModifier.TRANSACTIONAL.
The position of the fields in the returned array equals their
relative field number as returned by
JDOField.getRelativeFieldNumber(). The following holds
true for any field in the returned array:
getDeclaredManagedFields()[i].getRelativeFieldNumber()
== i
getDeclaredManagedFields()[field.getRelativeFieldNumber()]
== field
getDeclaredManagedFields in interface JDOClasspublic JDOField[] getManagedFields()
PersistenceModifier.PERSISTENT or
PersistenceModifier.TRANSACTIONAL.
The position of the fields in the returned array equals their
absolute field number as returned by
JDOField.getFieldNumber(). The following holds true for
any field in the returned array:
getManagedFields()[i].getFieldNumber() == i
getManagedFields()[field.getFieldNumber()] == field
getManagedFields in interface JDOClasspublic JDOField[] getPersistentFields()
PersistenceModifier.PERSISTENT.
Please note, the position of the fields in the returned array might not
equal their absolute field number as returned by
JDOField.getFieldNumber().getPersistentFields in interface JDOClasspublic JDOField[] getPrimaryKeyFields()
JDOField.isPrimaryKey()).getPrimaryKeyFields in interface JDOClasspublic JDOField[] getPersistentRelationshipFields()
JDOField.getRelationship() returns
a non null value) and having the persistence-modifier
PersistenceModifier.PERSISTENT.getPersistentRelationshipFields in interface JDOClasspublic JDOField[] getDefaultFetchGroupFields()
JDOField.isDefaultFetchGroup() returns true.getDefaultFetchGroupFields in interface JDOClasspublic int[] getManagedFieldNumbers()
PersistenceModifier.PERSISTENT or
PersistenceModifier.TRANSACTIONAL.
Only managed fields have a valid field number, thus the field number in
the returned array equals its index:
getManagedFields()[i] == igetManagedFieldNumbers in interface JDOClasspublic int[] getPersistentFieldNumbers()
PersistenceModifier.PERSISTENT.getPersistentFieldNumbers in interface JDOClasspublic int[] getPrimaryKeyFieldNumbers()
JDOField.isPrimaryKey()).getPrimaryKeyFieldNumbers in interface JDOClasspublic int[] getPersistentNonPrimaryKeyFieldNumbers()
JDOField.isPrimaryKey()).
A field is a persistent field, if it has the persistence-modifier
PersistenceModifier.PERSISTENT or
(see JDOField.getPersistenceModifier()).getPersistentNonPrimaryKeyFieldNumbers in interface JDOClasspublic int[] getPersistentRelationshipFieldNumbers()
JDOField.getRelationship() returns a non null value) and has the
persistence-modifier
PersistenceModifier.PERSISTENT.getPersistentRelationshipFieldNumbers in interface JDOClasspublic int[] getPersistentSerializableFieldNumbers()
JDOField.isSerializable() returns true) and has the
persistence-modifier
PersistenceModifier.PERSISTENT.getPersistentSerializableFieldNumbers in interface JDOClasspublic JDOField getManagedField(java.lang.String fieldName)
null if the specified name does not
denote a managed field of this JDOClass. The field name may be
unqualified and or qualified (see getField(String fieldName)).getManagedField in interface JDOClassfieldName - the name of the managed field for which field metadata
is needed.null
if there is no such field.public JDOField getField(java.lang.String fieldName)
null if the specified name does not denote a
field of this JDOClass.
The method supports lookup by unqualified and by qualified field name.
null if the
qualifier class does not denote a valid class or if the qualifier class
is not a persistence-capable superclass of this class.
public JDOField getField(int fieldNumber)
0 <= fieldNumber < this.getManagedFields().length
If the field number is valid the returned JDoField instance denotes a
managed field, meaning the field has the persistence-modifier
PersistenceModifier.PERSISTENT or
PersistenceModifier.TRANSACTIONAL.
If the field number is not valid then the method returns
null.public JDOField getDeclaredField(java.lang.String fieldName)
null if the field name does not denote a field declared by
JDOClass.getDeclaredField in interface JDOClassfieldName - the unqualified name of field for which field metadata
is needed.null
if there is no such field declared by this JDOClass.public int getDeclaredManagedFieldCount()
getDeclaredManagedFieldCount in interface JDOClasspublic int getInheritedManagedFieldCount()
getInheritedManagedFieldCount in interface JDOClasspublic int getManagedFieldCount()
getDeclaredManagedFieldCount() +
getInheritedManagedFieldCount().getManagedFieldCount in interface JDOClasspublic java.lang.String getPackagePrefix()
getPackagePrefix in interface JDOClasspublic JDOClass getPersistenceCapableRootClass()
getPersistenceCapableRootClass in interface JDOClassprotected JDOField getFieldInternal(java.lang.String fieldName)
fieldName - the unqualified field namenull otherwise.protected JDOClass newJDOClassInstance()
protected JDOField newJDOFieldInstance()
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.