SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

kodo.meta
Class DelegatingClassMetaData

java.lang.Object
  |
  +--kodo.meta.DelegatingExtensions
        |
        +--kodo.meta.DelegatingClassMetaData
All Implemented Interfaces:
ClassMetaData, Commentable, Comparable, Extensions, SourceTracker
Direct Known Subclasses:
AbstractClassMapping

public class DelegatingClassMetaData
extends DelegatingExtensions
implements ClassMetaData

Wrapper around an existing class metadata. Subclasses can override the methods they mean to change. The equals and hashCode methods pass through to the base underlying class metadata.


Fields inherited from interface kodo.meta.ClassMetaData
DATA_CACHE, DATA_CACHE_TIMEOUT, DETACH_FALSE, DETACH_OID_FIELD, DETACH_SERIALIZE, DETACH_STATE_FIELD, DETACH_TRUE, DETACHABLE, EXTENSION_KEYS, ID_APPLICATION, ID_DATASTORE, ID_NONDURABLE, LOCK_GROUPS, SUBCLASS_FETCH_MODE, VALIDATE_ALL, VALIDATE_NONE, VALIDATE_NORESOLVE, VALIDATE_RUNTIME, VALIDATE_UNENHANCED
 
Constructor Summary
DelegatingClassMetaData(ClassMetaData meta)
           
 
Method Summary
 void addDeclaredField(FieldMetaData field)
          Add a persistent or transactional field to this class.
 int compareTo(Object other)
           
 boolean equals(Object other)
           
 Collection getComments()
          Return a collection of all the comments associated with this instance.
 DataCache getDataCache()
          Return the data cache for this class, or null if it is not cachable.
 String getDataCacheName()
          Return the value of the ClassMetaData.DATA_CACHE extension.
 int getDataCacheTimeout()
          Return the value of the ClassMetaData.DATA_CACHE_TIMEOUT extension, or the system default if no extension is present.
 FieldMetaData getDeclaredField(int index)
          Return the metadata for the persistent or transactional field with the given relative index.
 FieldMetaData getDeclaredField(String name)
          Return the metadata for the persistent or transactional field with the given name, without including superclass fields.
 FieldMetaData[] getDeclaredFields()
          Return only the fields for this class, without superclass fields.
 FieldMetaData[] getDeclaredUnmanagedFields()
          Return any fields that were added as non-managed.
 FieldMetaData[] getDefaultFetchGroupFields()
          Return the list of fields in the default fetch group, including superclass fields, or an empty array if none.
 ClassMetaData getDelegate()
          Return the wrapped metadata.
 Class getDescribedType()
          Return the persistence capable class described by this metadata.
 int getDetachable()
          The detach constant for this class.
 String getDetachObjectId()
          The name of the detach object id field, or null if none.
 Field getDetachObjectIdField()
          Return the detach object id field, or null if none.
 String getDetachState()
          The name of the detach state field, or null if none.
 Field getDetachStateField()
          Return the detach state field, or null if none.
 FieldMetaData getField(int index)
          Return the metadata for the persistent or transactional field with the given absolute index.
 FieldMetaData getField(String name)
          Return the metadata for the persistent or transactional field with the given name.
 FieldMetaData[] getFields()
          Return all field metadatas, including superclass fields.
 FieldMetaData[] getFieldsInListingOrder()
          Return all field metadatas, including superclass fields, in the order that they are encountered during parsing.
 int getIdentityType()
          Return the type of JDO identity being used.
 ClassMetaData getInnermostDelegate()
          Return the base underlying class metadata.
 ClassMetaData getLeastDerivedMetaData()
          Return the metadata representing the least-derived persistence-capable type in this class hierarchy.
 Class getObjectIdClass()
          Return the metadata-specified class to use for the object ID, or null if not specified.
 Class[] getPCSubclasses()
          Return the known persistence capable subclasses of the described type, or empty array if none.
 ClassMetaData[] getPCSubclassMetaDatas()
          Return the metadata for the known persistence capable subclasses of the described type, or empty array if none.
 Class getPCSuperclass()
          Return the persistence capable superclass of the described type, or null if the metadata did not specify one.
 ClassMetaData getPCSuperclassMetaData()
          Return the metadata for the persistence capable superclass of the described type, or null if the metadata did not specify one.
 ClassLoader getPMClassLoader()
          The class persistence manager loader used when parsing this metadata.
 FieldMetaData[] getPrimaryKeyFields()
          Return primary key fields, or empty array if none.
 JDOMetaDataRepository getRepository()
          Return the owning repository.
 boolean getRequiresExtent()
          Return true if the type requires management via extent.
 File getSourceFile()
          Return the source file the metadata was parsed from, if any.
 int getSubclassFetchMode()
          The subclass fetch mode, as one of the eager constants in FetchConfiguration.
 String getTrackedResourceName()
           
 int getValidate()
          Return the validation level.
 int hashCode()
           
 void invalidateResolve()
          For implementation use.
 boolean isEnhanced()
          Returns true if the class has been enhanced.
 boolean isInstanceCallbacks()
          Return true if the class implements InstanceCallbacks.
 boolean isMemberField(String field)
          Return whether the given name represents a member field of this class, including superclass fields.
 boolean isResolved()
          For implementation use.
 boolean isSingleFieldIdentity()
          Return true if using single field identity.
 boolean removeDeclaredField(FieldMetaData field)
          Remove the given field from management.
 void resolve()
          For implementation use.
 void setDataCacheName(String name)
          Set the value of the ClassMetaData.DATA_CACHE extension.
 void setDataCacheTimeout(int timeout)
          Set the value of the ClassMetaData.DATA_CACHE_TIMEOUT standard extension.
 void setDescribedType(Class type)
          Return the persistence capable class described by this metadata.
 void setDetachable(int detachable)
          The detach constant for this class.
 void setDetachObjectId(String field)
          The name of the detach object id field, or null if none.
 void setDetachState(String field)
          The name of the detach state field, or null if none.
 void setIdentityType(int type)
          Set the type of JDO identity used by this class.
 void setObjectIdClass(Class cls)
          Set the metadata-specified class to use for the object ID.
 void setPCSuperclass(Class pc)
          Set the persistence capable superclass of the described type.
 void setPCSuperclassMetaData(ClassMetaData meta)
          Set the metadata for this class' superclass.
 void setPMClassLoader(ClassLoader loader)
          The class persistence manager loader used when parsing this metadata.
 void setRepository(JDOMetaDataRepository repos)
          Set the owning repository.
 void setRequiresExtent(boolean req)
          Set whether the type requires extent management.
 void setSingleFieldIdentity(boolean single)
          Set whether this class should use single field identity.
 void setSourceFile(File file)
          Set the source file the metadata was parsed from.
 void setSubclassFetchMode(int mode)
          The subclass fetch mode, as one of the eager constants in FetchConfiguration.
 void setValidate(int validate)
          Set the validation level.
 String toString()
           
 
Methods inherited from class kodo.meta.DelegatingExtensions
addExtension, addExtension, addExtensionKeys, getBooleanExtension, getBooleanExtension, getDoubleExtension, getDoubleExtension, getEmbeddedExtensions, getEmbeddedExtensions, getExtensionComments, getExtensionKeys, getExtensionKeys, getExtensionVendors, getIntExtension, getIntExtension, getObjectExtension, getObjectExtension, getStringExtension, getStringExtension, hasExtension, hasExtension, isEmpty, removeEmbeddedExtensions, removeEmbeddedExtensions, removeExtension, removeExtension
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface kodo.meta.Extensions
addExtension, addExtension, addExtensionKeys, getBooleanExtension, getBooleanExtension, getDoubleExtension, getDoubleExtension, getEmbeddedExtensions, getEmbeddedExtensions, getExtensionComments, getExtensionKeys, getExtensionKeys, getExtensionVendors, getIntExtension, getIntExtension, getObjectExtension, getObjectExtension, getStringExtension, getStringExtension, hasExtension, hasExtension, isEmpty, removeEmbeddedExtensions, removeEmbeddedExtensions, removeExtension, removeExtension
 

Constructor Detail

DelegatingClassMetaData

public DelegatingClassMetaData(ClassMetaData meta)
Method Detail

getDelegate

public ClassMetaData getDelegate()
Return the wrapped metadata.

getInnermostDelegate

public ClassMetaData getInnermostDelegate()
Return the base underlying class metadata.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

compareTo

public int compareTo(Object other)
Specified by:
compareTo in interface Comparable

toString

public String toString()
Overrides:
toString in class Object

getSourceFile

public File getSourceFile()
Description copied from interface: ClassMetaData
Return the source file the metadata was parsed from, if any.
Specified by:
getSourceFile in interface ClassMetaData

getTrackedResourceName

public String getTrackedResourceName()
Specified by:
getTrackedResourceName in interface SourceTracker

setSourceFile

public void setSourceFile(File file)
Description copied from interface: ClassMetaData
Set the source file the metadata was parsed from.
Specified by:
setSourceFile in interface ClassMetaData

getPMClassLoader

public ClassLoader getPMClassLoader()
Description copied from interface: ClassMetaData
The class persistence manager loader used when parsing this metadata. The class metadata should use this loader when loading metadata for its superclass and field types.
Specified by:
getPMClassLoader in interface ClassMetaData

setPMClassLoader

public void setPMClassLoader(ClassLoader loader)
Description copied from interface: ClassMetaData
The class persistence manager loader used when parsing this metadata. The class metadata should use this loader when loading metadata for its superclass and field types.
Specified by:
setPMClassLoader in interface ClassMetaData

getValidate

public int getValidate()
Description copied from interface: ClassMetaData
Return the validation level.
Specified by:
getValidate in interface ClassMetaData

setValidate

public void setValidate(int validate)
Description copied from interface: ClassMetaData
Set the validation level.
Specified by:
setValidate in interface ClassMetaData

getRepository

public JDOMetaDataRepository getRepository()
Description copied from interface: ClassMetaData
Return the owning repository.
Specified by:
getRepository in interface ClassMetaData

setRepository

public void setRepository(JDOMetaDataRepository repos)
Description copied from interface: ClassMetaData
Set the owning repository.
Specified by:
setRepository in interface ClassMetaData

getDescribedType

public Class getDescribedType()
Description copied from interface: ClassMetaData
Return the persistence capable class described by this metadata.
Specified by:
getDescribedType in interface ClassMetaData

setDescribedType

public void setDescribedType(Class type)
Description copied from interface: ClassMetaData
Return the persistence capable class described by this metadata.
Specified by:
setDescribedType in interface ClassMetaData

getPCSuperclass

public Class getPCSuperclass()
Description copied from interface: ClassMetaData
Return the persistence capable superclass of the described type, or null if the metadata did not specify one.
Specified by:
getPCSuperclass in interface ClassMetaData

setPCSuperclass

public void setPCSuperclass(Class pc)
Description copied from interface: ClassMetaData
Set the persistence capable superclass of the described type.
Specified by:
setPCSuperclass in interface ClassMetaData

getPCSuperclassMetaData

public ClassMetaData getPCSuperclassMetaData()
Description copied from interface: ClassMetaData
Return the metadata for the persistence capable superclass of the described type, or null if the metadata did not specify one.
Specified by:
getPCSuperclassMetaData in interface ClassMetaData

setPCSuperclassMetaData

public void setPCSuperclassMetaData(ClassMetaData meta)
Description copied from interface: ClassMetaData
Set the metadata for this class' superclass.
Specified by:
setPCSuperclassMetaData in interface ClassMetaData

getLeastDerivedMetaData

public ClassMetaData getLeastDerivedMetaData()
Description copied from interface: ClassMetaData
Return the metadata representing the least-derived persistence-capable type in this class hierarchy. If this type has no persistence-capable superclasses, returns this.
Specified by:
getLeastDerivedMetaData in interface ClassMetaData

getPCSubclasses

public Class[] getPCSubclasses()
Description copied from interface: ClassMetaData
Return the known persistence capable subclasses of the described type, or empty array if none.
Specified by:
getPCSubclasses in interface ClassMetaData

getPCSubclassMetaDatas

public ClassMetaData[] getPCSubclassMetaDatas()
Description copied from interface: ClassMetaData
Return the metadata for the known persistence capable subclasses of the described type, or empty array if none.
Specified by:
getPCSubclassMetaDatas in interface ClassMetaData

getIdentityType

public int getIdentityType()
Description copied from interface: ClassMetaData
Return the type of JDO identity being used. This will be one of: If unspecified, defaults to ClassMetaData.ID_DATASTORE.
Specified by:
getIdentityType in interface ClassMetaData

setIdentityType

public void setIdentityType(int type)
Description copied from interface: ClassMetaData
Set the type of JDO identity used by this class.
Specified by:
setIdentityType in interface ClassMetaData
Following copied from interface: kodo.meta.ClassMetaData
See Also:
ClassMetaData.getIdentityType()

getObjectIdClass

public Class getObjectIdClass()
Description copied from interface: ClassMetaData
Return the metadata-specified class to use for the object ID, or null if not specified.
Specified by:
getObjectIdClass in interface ClassMetaData

setObjectIdClass

public void setObjectIdClass(Class cls)
Description copied from interface: ClassMetaData
Set the metadata-specified class to use for the object ID.
Specified by:
setObjectIdClass in interface ClassMetaData

isSingleFieldIdentity

public boolean isSingleFieldIdentity()
Description copied from interface: ClassMetaData
Return true if using single field identity.
Specified by:
isSingleFieldIdentity in interface ClassMetaData

setSingleFieldIdentity

public void setSingleFieldIdentity(boolean single)
Description copied from interface: ClassMetaData
Set whether this class should use single field identity.
Specified by:
setSingleFieldIdentity in interface ClassMetaData

getRequiresExtent

public boolean getRequiresExtent()
Description copied from interface: ClassMetaData
Return true if the type requires management via extent. If false, the PersistenceManager.getExtent(java.lang.Class, boolean) method cannot be used for this class. Defaults to true.
Specified by:
getRequiresExtent in interface ClassMetaData

setRequiresExtent

public void setRequiresExtent(boolean req)
Description copied from interface: ClassMetaData
Set whether the type requires extent management.
Specified by:
setRequiresExtent in interface ClassMetaData

getFields

public FieldMetaData[] getFields()
Description copied from interface: ClassMetaData
Return all field metadatas, including superclass fields.
Specified by:
getFields in interface ClassMetaData

getFieldsInListingOrder

public FieldMetaData[] getFieldsInListingOrder()
Description copied from interface: ClassMetaData
Return all field metadatas, including superclass fields, in the order that they are encountered during parsing. The position of the field meta data in this array is not the same as the value returned by FieldMetaData.getIndex(), but rather is related to FieldMetaData.getListingIndex().
Specified by:
getFieldsInListingOrder in interface ClassMetaData

getDeclaredFields

public FieldMetaData[] getDeclaredFields()
Description copied from interface: ClassMetaData
Return only the fields for this class, without superclass fields.
Specified by:
getDeclaredFields in interface ClassMetaData

getPrimaryKeyFields

public FieldMetaData[] getPrimaryKeyFields()
Description copied from interface: ClassMetaData
Return primary key fields, or empty array if none.
Specified by:
getPrimaryKeyFields in interface ClassMetaData

getDefaultFetchGroupFields

public FieldMetaData[] getDefaultFetchGroupFields()
Description copied from interface: ClassMetaData
Return the list of fields in the default fetch group, including superclass fields, or an empty array if none.
Specified by:
getDefaultFetchGroupFields in interface ClassMetaData

getField

public FieldMetaData getField(int index)
Description copied from interface: ClassMetaData
Return the metadata for the persistent or transactional field with the given absolute index.
Specified by:
getField in interface ClassMetaData
Following copied from interface: kodo.meta.ClassMetaData
Returns:
the field's metadata, or null if not found

getDeclaredField

public FieldMetaData getDeclaredField(int index)
Description copied from interface: ClassMetaData
Return the metadata for the persistent or transactional field with the given relative index.
Specified by:
getDeclaredField in interface ClassMetaData
Following copied from interface: kodo.meta.ClassMetaData
Returns:
the field's metadata, or null if not found

getField

public FieldMetaData getField(String name)
Description copied from interface: ClassMetaData
Return the metadata for the persistent or transactional field with the given name. This method can only be used at runtime.
Specified by:
getField in interface ClassMetaData
Following copied from interface: kodo.meta.ClassMetaData
Returns:
the field's metadata, or null if not found

getDeclaredField

public FieldMetaData getDeclaredField(String name)
Description copied from interface: ClassMetaData
Return the metadata for the persistent or transactional field with the given name, without including superclass fields.
Specified by:
getDeclaredField in interface ClassMetaData
Following copied from interface: kodo.meta.ClassMetaData
Returns:
the field's metadata, or null if not found

getDeclaredUnmanagedFields

public FieldMetaData[] getDeclaredUnmanagedFields()
Description copied from interface: ClassMetaData
Return any fields that were added as non-managed. All other methods to get fields return only those that are managed.
Specified by:
getDeclaredUnmanagedFields in interface ClassMetaData

isMemberField

public boolean isMemberField(String field)
Description copied from interface: ClassMetaData
Return whether the given name represents a member field of this class, including superclass fields. The field can be managed or unmanaged, instance or static.
Specified by:
isMemberField in interface ClassMetaData

addDeclaredField

public void addDeclaredField(FieldMetaData field)
Description copied from interface: ClassMetaData
Add a persistent or transactional field to this class.
Specified by:
addDeclaredField in interface ClassMetaData

removeDeclaredField

public boolean removeDeclaredField(FieldMetaData field)
Description copied from interface: ClassMetaData
Remove the given field from management.
Specified by:
removeDeclaredField in interface ClassMetaData
Following copied from interface: kodo.meta.ClassMetaData
Returns:
true if the field was removed, false otherwise

getDataCacheName

public String getDataCacheName()
Description copied from interface: ClassMetaData
Return the value of the ClassMetaData.DATA_CACHE extension.
Specified by:
getDataCacheName in interface ClassMetaData

setDataCacheName

public void setDataCacheName(String name)
Description copied from interface: ClassMetaData
Set the value of the ClassMetaData.DATA_CACHE extension. Use null to remove the extension.
Specified by:
setDataCacheName in interface ClassMetaData

getDataCacheTimeout

public int getDataCacheTimeout()
Description copied from interface: ClassMetaData
Return the value of the ClassMetaData.DATA_CACHE_TIMEOUT extension, or the system default if no extension is present.
Specified by:
getDataCacheTimeout in interface ClassMetaData

setDataCacheTimeout

public void setDataCacheTimeout(int timeout)
Description copied from interface: ClassMetaData
Set the value of the ClassMetaData.DATA_CACHE_TIMEOUT standard extension. Use Integer.MAX_VALUE to remove the extension.
Specified by:
setDataCacheTimeout in interface ClassMetaData

getDataCache

public DataCache getDataCache()
Description copied from interface: ClassMetaData
Return the data cache for this class, or null if it is not cachable.
Specified by:
getDataCache in interface ClassMetaData

getDetachable

public int getDetachable()
Description copied from interface: ClassMetaData
The detach constant for this class.
Specified by:
getDetachable in interface ClassMetaData

setDetachable

public void setDetachable(int detachable)
Description copied from interface: ClassMetaData
The detach constant for this class.
Specified by:
setDetachable in interface ClassMetaData

getDetachObjectId

public String getDetachObjectId()
Description copied from interface: ClassMetaData
The name of the detach object id field, or null if none.
Specified by:
getDetachObjectId in interface ClassMetaData

setDetachObjectId

public void setDetachObjectId(String field)
Description copied from interface: ClassMetaData
The name of the detach object id field, or null if none.
Specified by:
setDetachObjectId in interface ClassMetaData

getDetachObjectIdField

public Field getDetachObjectIdField()
Description copied from interface: ClassMetaData
Return the detach object id field, or null if none.
Specified by:
getDetachObjectIdField in interface ClassMetaData

getDetachState

public String getDetachState()
Description copied from interface: ClassMetaData
The name of the detach state field, or null if none.
Specified by:
getDetachState in interface ClassMetaData

setDetachState

public void setDetachState(String field)
Description copied from interface: ClassMetaData
The name of the detach state field, or null if none.
Specified by:
setDetachState in interface ClassMetaData

getDetachStateField

public Field getDetachStateField()
Description copied from interface: ClassMetaData
Return the detach state field, or null if none.
Specified by:
getDetachStateField in interface ClassMetaData

getSubclassFetchMode

public int getSubclassFetchMode()
Description copied from interface: ClassMetaData
The subclass fetch mode, as one of the eager constants in FetchConfiguration.
Specified by:
getSubclassFetchMode in interface ClassMetaData

setSubclassFetchMode

public void setSubclassFetchMode(int mode)
Description copied from interface: ClassMetaData
The subclass fetch mode, as one of the eager constants in FetchConfiguration.
Specified by:
setSubclassFetchMode in interface ClassMetaData

isEnhanced

public boolean isEnhanced()
Description copied from interface: ClassMetaData
Returns true if the class has been enhanced.
Specified by:
isEnhanced in interface ClassMetaData

isInstanceCallbacks

public boolean isInstanceCallbacks()
Description copied from interface: ClassMetaData
Return true if the class implements InstanceCallbacks.
Specified by:
isInstanceCallbacks in interface ClassMetaData

isResolved

public boolean isResolved()
Description copied from interface: ClassMetaData
For implementation use. Return whether this metadata has been resolved.
Specified by:
isResolved in interface ClassMetaData

invalidateResolve

public void invalidateResolve()
Description copied from interface: ClassMetaData
For implementation use. Invalidate resolved data.
Specified by:
invalidateResolve in interface ClassMetaData

resolve

public void resolve()
Description copied from interface: ClassMetaData
For implementation use. This method resolves superclass information, caches fields, and resolves fields that might be other first class objects. It requires access to a respository. It can access other class metadata through the repository, but cannot access field metadata for those classes. It can, however, access superclass field metadata.
Specified by:
resolve in interface ClassMetaData

getComments

public Collection getComments()
Description copied from interface: Commentable
Return a collection of all the comments associated with this instance. This collection is directly modifiable.
Specified by:
getComments in interface Commentable

SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.