org.apache.jdo.impl.model.jdo
Class JDOClassImplDynamic

java.lang.Object
  extended by org.apache.jdo.impl.model.jdo.JDOElementImpl
      extended by org.apache.jdo.impl.model.jdo.JDOMemberImpl
          extended by org.apache.jdo.impl.model.jdo.JDOClassImplDynamic
All Implemented Interfaces:
java.lang.Comparable, JDOClass, JDOElement, JDOMember
Direct Known Subclasses:
JDOClassImplCaching

public class JDOClassImplDynamic
extends JDOMemberImpl
implements JDOClass

An instance of this class represents the JDO metadata of a persistence capable class. This dynamic implementation only stores property values explicitly set by setter method. It does not store any calculated values such as list of managed or persistent fields, list of field numbers etc.

TBD:

Since:
1.1
Version:
1.1
Author:
Michael Bouschen

Field Summary
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 Summary
JDOClassImplDynamic()
           
 
Method Summary
 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.
 
Methods inherited from class org.apache.jdo.impl.model.jdo.JDOMemberImpl
compareTo, equals, getDeclaringClass, getName, hashCode, setDeclaringClass, setName, toString
 
Methods inherited from class org.apache.jdo.impl.model.jdo.JDOElementImpl
addPropertyChangeListener, addVetoableChangeListener, createJDOExtension, firePropertyChange, fireVetoableChange, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.jdo.model.jdo.JDOMember
getDeclaringClass, getName, setDeclaringClass, setName
 
Methods inherited from interface org.apache.jdo.model.jdo.JDOElement
addPropertyChangeListener, addVetoableChangeListener, createJDOExtension, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListener
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

identityType

protected int identityType
Property identityType. Default see getIdentityType().


objectIdClass

protected transient JavaType objectIdClass
Property objectIdClass. No default.


pcSuperclass

protected JDOClass pcSuperclass
Relationship JDOClass<->JDOClass.


javaType

protected transient JavaType javaType
Property javaType. No default.


msg

protected static final I18NHelper msg
I18N support

Constructor Detail

JDOClassImplDynamic

public JDOClassImplDynamic()
Method Detail

getIdentityType

public int getIdentityType()
Get the JDO identity type of this JDOClass. The identity type of the least-derived persistence-capable class defines the identity type for all persistence-capable classes that extend it. The identity type of the least-derived persistence-capable class is defaulted to JDOIdentityType.APPLICATION if objectid-class is specified, and JDOIdentityType.DATASTORE, if not.

Specified by:
getIdentityType in interface JDOClass
Returns:
the JDO identity type, one of JDOIdentityType.APPLICATION, JDOIdentityType.DATASTORE, or JDOIdentityType.NONDURABLE

setIdentityType

public void setIdentityType(int identityType)
Set the object identity type of this JDOClass.

Specified by:
setIdentityType in interface JDOClass
Parameters:
identityType - an integer indicating the JDO identity type, one of: JDOIdentityType.APPLICATION, JDOIdentityType.DATASTORE, or JDOIdentityType.NONDURABLE

getObjectIdClass

public JavaType getObjectIdClass()
Get the JavaType representation of the object identity class (primary key class) for this JDOClass.

Specified by:
getObjectIdClass in interface JDOClass
Returns:
the JavaType representation of the object identity class.

setObjectIdClass

public void setObjectIdClass(JavaType objectIdClass)
Set the JavaType representation of the object identity class (primary key class) for this JDOClass.

Specified by:
setObjectIdClass in interface JDOClass
Parameters:
objectIdClass - the JavaType representation of the object identity class

getDeclaredObjectIdClassName

public java.lang.String getDeclaredObjectIdClassName()
Get the fully qualified name of the object identity class (primary key class) for this JDOClass.

Specified by:
getDeclaredObjectIdClassName in interface JDOClass
Returns:
the name of the object identity class.

setDeclaredObjectIdClassName

public void setDeclaredObjectIdClassName(java.lang.String declaredObjectIdClassName)
Set the fully qualified name of the object identity class (primary key class) for this JDOClass.

Specified by:
setDeclaredObjectIdClassName in interface JDOClass
Parameters:
declaredObjectIdClassName - the name of the object identity class

requiresExtent

public boolean requiresExtent()
Determines whether an extent must be managed for the persistence-capable class described by this JDOClass.

Specified by:
requiresExtent in interface JDOClass
Returns:
true if this class must manage an extent; false otherwise

setRequiresExtent

public void setRequiresExtent(boolean requiresExtent)
Set whether an extent must be managed for the persistence-capable class described by this JDOClass.

Specified by:
setRequiresExtent in interface JDOClass
Parameters:
requiresExtent - true if this class must manage an extent; false otherwise

getPersistenceCapableSuperclassName

public java.lang.String getPersistenceCapableSuperclassName()
Get the fully qualified class name of the persistence-capable superclass of the persistence-capable class described by this JDOClass. If this class does not have a persistence-capable superclass then null is returned.

Specified by:
getPersistenceCapableSuperclassName in interface JDOClass
Returns:
the fully qualified name of the persistence-capable superclass or null if there is no persistence-capable superclass

setPersistenceCapableSuperclassName

public 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.

Specified by:
setPersistenceCapableSuperclassName in interface JDOClass
Parameters:
pcSuperclassName - the fully qualified name of the persistence-capable superclass

getJavaType

public JavaType getJavaType()
Provides the JavaType representaion corresponding to this JDOClass.

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.

Specified by:
getJavaType in interface JDOClass
Returns:
the JavaType object corresponding to this JDOClass.

setJavaType

public void setJavaType(JavaType javaType)
Set the JavaType representation corresponding to this JDOClass.

Specified by:
setJavaType in interface JDOClass
Parameters:
javaType - the JavaType representation for this JDOClass

isXMLMetadataLoaded

public boolean isXMLMetadataLoaded()
Determines whether the XML metadata for the class represented by this JDOClass has been loaded.

Specified by:
isXMLMetadataLoaded in interface JDOClass
Returns:
true if XML metadata is loaded; false otherwise

setXMLMetadataLoaded

public void setXMLMetadataLoaded()
Sets the flag indicating that the class XML metadata for this JDOClass is loaded to true.

Specified by:
setXMLMetadataLoaded in interface JDOClass

removeDeclaredMember

public void removeDeclaredMember(JDOMember member)
                          throws ModelException
Remove the supplied member from the collection of members maintained by this JDOClass.

Specified by:
removeDeclaredMember in interface JDOClass
Parameters:
member - the member to be removed
Throws:
ModelException - if impossible

getDeclaredMembers

public JDOMember[] getDeclaredMembers()
Returns the collection of JDOMember instances declared by this JDOClass in form of an array.

Specified by:
getDeclaredMembers in interface JDOClass
Returns:
the members declared by this JDOClass

getDeclaringModel

public JDOModel getDeclaringModel()
Returns the declaring JDOModel of this JDOClass.

Specified by:
getDeclaringModel in interface JDOClass
Returns:
the JDOModel that owns this JDOClass

setDeclaringModel

public void setDeclaringModel(JDOModel model)
Set the declaring JDOModel for this JDOClass.

Specified by:
setDeclaringModel in interface JDOClass
Parameters:
model - the declaring JDOModel of this JDOClass

getPersistenceCapableSuperclass

public JDOClass getPersistenceCapableSuperclass()
Returns the JDOClass instance for the persistence-capable superclass of this JDOClass. If this class does not have a persistence-capable superclass then null is returned.

Specified by:
getPersistenceCapableSuperclass in interface JDOClass
Returns:
the JDClass instance of the persistence-capable superclass or null if there is no persistence-capable superclass

setPersistenceCapableSuperclass

public void setPersistenceCapableSuperclass(JDOClass pcSuperclass)
Set the JDOClass for the persistence-capable superclass of this JDOClass.

Specified by:
setPersistenceCapableSuperclass in interface JDOClass
Parameters:
pcSuperclass - the JDClass instance of the persistence-capable superclass

getJDOPackage

public JDOPackage getJDOPackage()
Returns the JDOPackage instance corresponding to the package name of this JDOClass.

Specified by:
getJDOPackage in interface JDOClass
Returns:
the JDOPackage instance of this JDOClass.

setJDOPackage

public void setJDOPackage(JDOPackage jdoPackage)
Sets the JDOPackage instance corresponding to the package name of this JDOClass.

Specified by:
setJDOPackage in interface JDOClass
Parameters:
jdoPackage - the JDOPackage of this JDOClass.

createJDOField

public JDOField createJDOField(java.lang.String name)
                        throws ModelException
This method returns a JDOField instance for the field with the specified name. If this JDOClass already declares such a field, the existing JDOField instance is returned. Otherwise, it creates a new JDOField instance, sets its declaringClass and returns the new instance.

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

Specified by:
createJDOField in interface JDOClass
Parameters:
name - the name of the field
Throws:
ModelException - if impossible

createJDOClass

public JDOClass createJDOClass(java.lang.String name)
                        throws ModelException
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. Otherwise, it creates a new JDOClass instance, sets its declaringClass and returns the new instance.

Specified by:
createJDOClass in interface JDOClass
Parameters:
name - the name of the inner class
Throws:
ModelException - if impossible

getDeclaredClasses

public JDOClass[] getDeclaredClasses()
Returns the collection of JDOClass instances declared by this JDOClass.

Specified by:
getDeclaredClasses in interface JDOClass
Returns:
the classes declared by this JDOClass

getDeclaredFields

public JDOField[] getDeclaredFields()
Returns the collection of JDOField instances declared by this JDOClass in the form of an array. This does not include inherited fields.

Specified by:
getDeclaredFields in interface JDOClass
Returns:
the fields declared by this JDOClass

getDeclaredManagedFields

public JDOField[] getDeclaredManagedFields()
Returns the collection of managed JDOField instances declared by this JDOClass in the form of an array. The returned array does not include inherited fields. A field is a managed field, if it has the persistence-modifier 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:

Specified by:
getDeclaredManagedFields in interface JDOClass
Returns:
the managed fields declared by this JDOClass

getManagedFields

public JDOField[] getManagedFields()
Returns the collection of managed JDOField instances of this JDOClass in the form of an array. The returned array includes inherited fields. A field is a managed field, if it has the persistence-modifier 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:

Specified by:
getManagedFields in interface JDOClass
Returns:
the managed fields of this JDOClass

getPersistentFields

public JDOField[] getPersistentFields()
Returns the collection of persistent JDOField instances of this JDOClass in the form of an array. The returned array includes inherited fields. A field is a persistent field, if it has the persistence-modifier 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().

Specified by:
getPersistentFields in interface JDOClass
Returns:
the persistent fields of this JDOClass

getPrimaryKeyFields

public JDOField[] getPrimaryKeyFields()
Returns the collection of identifying fields of this JDOClass in the form of an array. The method returns the JDOField instances defined as primary key fields (see JDOField.isPrimaryKey()).

Specified by:
getPrimaryKeyFields in interface JDOClass
Returns:
the identifying fields of this JDOClass

getPersistentRelationshipFields

public JDOField[] getPersistentRelationshipFields()
Returns the collection of persistent relationship fields of this JDOClass in the form of an array. The method returns the JDOField instances defined as relationship (method JDOField.getRelationship() returns a non null value) and having the persistence-modifier PersistenceModifier.PERSISTENT.

Specified by:
getPersistentRelationshipFields in interface JDOClass
Returns:
the persistent relationship fields of this JDOClass

getDefaultFetchGroupFields

public JDOField[] getDefaultFetchGroupFields()
Returns the collection of default fetch group fields of this JDOClass in the form of an array. The method returns the JDOField instances defined as part of the default fetch group (method JDOField.isDefaultFetchGroup() returns true.

Specified by:
getDefaultFetchGroupFields in interface JDOClass
Returns:
the default fetch group fields of this JDOClass
Since:
1.1

getManagedFieldNumbers

public int[] getManagedFieldNumbers()
Returns an array of absolute field numbers of the managed fields of this JDOClass. The returned array includes field numbers of inherited fields. A field is a managed field, if it has the persistence-modifier 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] == i

Specified by:
getManagedFieldNumbers in interface JDOClass

getPersistentFieldNumbers

public int[] getPersistentFieldNumbers()
Returns an array of absolute field numbers of the persistent fields of this JDOClass. The returned array includes field numbers of inherited fields. A persistent field has the persistence-modifier PersistenceModifier.PERSISTENT.

Specified by:
getPersistentFieldNumbers in interface JDOClass

getPrimaryKeyFieldNumbers

public int[] getPrimaryKeyFieldNumbers()
Returns an array of absolute field numbers of the identifying fields of this JDOClass. A field number is included in the returned array, iff the corresponding JDOField instance is defined as primary key field (see JDOField.isPrimaryKey()).

Specified by:
getPrimaryKeyFieldNumbers in interface JDOClass
Returns:
array of numbers of the identifying fields

getPersistentNonPrimaryKeyFieldNumbers

public int[] getPersistentNonPrimaryKeyFieldNumbers()
Returns an array of absolute field numbers of the non identifying, persistent fields of this JDOClass. A field number is included in the returned array, iff the corresponding JDOField instance is persistent and not a not a primary key field (see JDOField.isPrimaryKey()). A field is a persistent field, if it has the persistence-modifier PersistenceModifier.PERSISTENT or (see JDOField.getPersistenceModifier()).

Specified by:
getPersistentNonPrimaryKeyFieldNumbers in interface JDOClass
Returns:
array of numbers of the non identifying, persistent fields

getPersistentRelationshipFieldNumbers

public int[] getPersistentRelationshipFieldNumbers()
Returns an array of absolute field numbers of persistent relationship fields of this JDOClass. A field number is included in the returned array, iff the corresponding JDOField instance is a relationship (method JDOField.getRelationship() returns a non null value) and has the persistence-modifier PersistenceModifier.PERSISTENT.

Specified by:
getPersistentRelationshipFieldNumbers in interface JDOClass
Returns:
the field numbers of the persistent relationship fields

getPersistentSerializableFieldNumbers

public int[] getPersistentSerializableFieldNumbers()
Returns an array of absolute field numbers of persistent, serializable fields of this JDOClass. A field number is included in the returned array, iff the corresponding JDOField instance is serializable (method JDOField.isSerializable() returns true) and has the persistence-modifier PersistenceModifier.PERSISTENT.

Specified by:
getPersistentSerializableFieldNumbers in interface JDOClass
Returns:
the field numbers of serializable fields

getManagedField

public JDOField getManagedField(java.lang.String fieldName)
Returns JDOField metadata for a particular managed field specified by field name. It returns 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)).

Specified by:
getManagedField in interface JDOClass
Parameters:
fieldName - the name of the managed field for which field metadata is needed.
Returns:
JDOField metadata for the managed field or null if there is no such field.

getField

public JDOField getField(java.lang.String fieldName)
Returns JDOField metadata for a particular field specified by field name. It returns null if the specified name does not denote a field of this JDOClass.

The method supports lookup by unqualified and by qualified field name.

Specified by:
getField in interface JDOClass
Parameters:
fieldName - the unqualified or qualified name of field for which field metadata is needed.
Returns:
JDOField metadata for the field or null if there is no such field.

getField

public JDOField getField(int fieldNumber)
Provides metadata for a particular field specified by the absolute field number. The field number must be a valid absolute field number for this JDOClass: 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.

Specified by:
getField in interface JDOClass
Parameters:
fieldNumber - the number for which field metadata is needed.
Returns:
JDOField metadata for the field or null if there is no such field.

getDeclaredField

public JDOField getDeclaredField(java.lang.String fieldName)
Returns JDOField metadata for a particular declared field specified by field name. Please note, the method does not return inherited fields. The field name must not be qualified by a class name. The method returns null if the field name does not denote a field declared by JDOClass.

Specified by:
getDeclaredField in interface JDOClass
Parameters:
fieldName - the unqualified name of field for which field metadata is needed.
Returns:
JDOField metadata for the field or null if there is no such field declared by this JDOClass.

getDeclaredManagedFieldCount

public int getDeclaredManagedFieldCount()
Returns the number of managed fields declared in the class represented by this JDOClass. This does not include inherited fields.

Specified by:
getDeclaredManagedFieldCount in interface JDOClass
Returns:
number of declared managed fields

getInheritedManagedFieldCount

public int getInheritedManagedFieldCount()
Returns the number of inherited managed fields for the class represented by this JDOClass.

Specified by:
getInheritedManagedFieldCount in interface JDOClass
Returns:
number of inherited managed fields

getManagedFieldCount

public int getManagedFieldCount()
Returns the number of managed fields for the class represented by this JDOClass. The value returned by this method is equal to getDeclaredManagedFieldCount() + getInheritedManagedFieldCount().

Specified by:
getManagedFieldCount in interface JDOClass
Returns:
number of managed fields

getPackagePrefix

public java.lang.String getPackagePrefix()
Returns the package name including a terminating dot if this class has a package. The method returns the empty string if this class is in the default package.

Specified by:
getPackagePrefix in interface JDOClass
Returns:
package prefix for this class.

getPersistenceCapableRootClass

public JDOClass getPersistenceCapableRootClass()
Returns the least-derived (topmost) persistence-capable class in the hierarchy of this JDOClass. It returns this JDOClass if it has no persistence-capable superclass.

Specified by:
getPersistenceCapableRootClass in interface JDOClass
Returns:
the topmost persistence-capable class in the hierarchy.

getFieldInternal

protected JDOField getFieldInternal(java.lang.String fieldName)
Returns the JDOField definition for the specified field. The method expects unqualified field names. The method performs a bottom up lookup in the case of multiple fields with the same name in an inheritance hierarchy. So it starts checking this class, then it checks its superclas, etc.

Parameters:
fieldName - the unqualified field name
Returns:
the corresponding JDOField instance if exists; null otherwise.

newJDOClassInstance

protected JDOClass newJDOClassInstance()
Returns a new instance of the JDOClass implementation class.


newJDOFieldInstance

protected JDOField newJDOFieldInstance()
Returns a new instance of the JDOField implementation class.



Copyright © 2005-2009 Apache Software Foundation. All Rights Reserved.