Interface JDOMetaData
-
- All Known Subinterfaces:
ExtendedJDOMetaData
- All Known Implementing Classes:
EJBMetaDataModelImpl
,JDOMetaDataModelImpl
,JDOMetaDataPropertyImpl
,JDOMetaDataTimer
public interface JDOMetaData
Provides the JDO meta information neccessary for byte-code enhancement.Please note: This interface deals with fully qualified names in the JVM notation, that is, with '/' as package separator character (instead of '.').
The following convention is used to specify the format of a given name: Something called ...
-
name represents a non-qualified name (e.g.
JDOPersistenceCapableName
= "PersistenceCapable
") -
type represents a Java-qualified class name (e.g.
JDOPersistenceCapablePath
= 'com.sun.jdo.spi.persistence.support.sqlstore.PersistenceCapable
") -
path represents a JVM-qualified name (e.g.
JDOPersistenceCapablePath
= 'com/sun/jdo/spi/persistence/support/sqlstore/PersistenceCapable
") -
sig (for signature) represents a JVM-qualified type-signature
name (e.g.
JDOPersistenceCapableSig
= "Lcom/sun/jdo/spi/persistence/support/sqlstore/PersistenceCapable;
")
-
-
Field Summary
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getFieldNo(String classPath, String fieldName)
Returns the unique field index of a declared, persistent field of a class.String[]
getManagedFields(String classPath)
Returns an array of field names of all declared persistent and transactional fields of a class.String
getPersistenceCapableRootClass(String classPath)
Returns the name of the persistence-capable root class of a class.String
getSuperClass(String classPath)
Returns the name of the superclass of a class.boolean
isDefaultFetchGroupField(String classPath, String fieldName)
Tests whether a field of a class is known to be part of the Default Fetch Group.boolean
isMutableSecondClassObjectType(String classPath)
Tests whether a class is known as type for Mutable Second Class Objects.boolean
isPersistenceCapableClass(String classPath)
Tests whether a class is known to be persistence-capable.boolean
isPersistenceCapableRootClass(String classPath)
Tests whether a class is known as a persistence-capable root class.boolean
isPersistentField(String classPath, String fieldName)
Tests whether a field of a class is known to be persistent.boolean
isPrimaryKeyField(String classPath, String fieldName)
Tests whether a field of a class is known to be Primary Key.boolean
isSecondClassObjectType(String classPath)
Tests whether a class is known as type for Second Class Objects.boolean
isTransactionalField(String classPath, String fieldName)
Tests whether a field of a class is known to be transactional.boolean
isTransientClass(String classPath)
Tests whether a class is known to be transient.
-
-
-
Field Detail
-
JDOExternalPath
static final String JDOExternalPath
- See Also:
- Constant Field Values
-
JDOPath
static final String JDOPath
- See Also:
- Constant Field Values
-
JDOPersistenceCapableName
static final String JDOPersistenceCapableName
- See Also:
- Constant Field Values
-
JDOPersistenceCapablePath
static final String JDOPersistenceCapablePath
- See Also:
- Constant Field Values
-
JDOPersistenceCapableSig
static final String JDOPersistenceCapableSig
- See Also:
- Constant Field Values
-
JDOPersistenceCapableType
static final String JDOPersistenceCapableType
-
javaLangCloneablePath
static final String javaLangCloneablePath
- See Also:
- Constant Field Values
-
JDOInstanceCallbacksName
static final String JDOInstanceCallbacksName
- See Also:
- Constant Field Values
-
JDOInstanceCallbacksPath
static final String JDOInstanceCallbacksPath
- See Also:
- Constant Field Values
-
JDOInstanceCallbacksSig
static final String JDOInstanceCallbacksSig
- See Also:
- Constant Field Values
-
JDOInstanceCallbacksType
static final String JDOInstanceCallbacksType
-
JDOSecondClassObjectBaseName
static final String JDOSecondClassObjectBaseName
- See Also:
- Constant Field Values
-
JDOSecondClassObjectBasePath
static final String JDOSecondClassObjectBasePath
- See Also:
- Constant Field Values
-
JDOSecondClassObjectBaseSig
static final String JDOSecondClassObjectBaseSig
- See Also:
- Constant Field Values
-
JDOSecondClassObjectBaseType
static final String JDOSecondClassObjectBaseType
-
JDOPersistenceManagerName
static final String JDOPersistenceManagerName
- See Also:
- Constant Field Values
-
JDOPersistenceManagerPath
static final String JDOPersistenceManagerPath
- See Also:
- Constant Field Values
-
JDOPersistenceManagerSig
static final String JDOPersistenceManagerSig
- See Also:
- Constant Field Values
-
JDOPersistenceManagerType
static final String JDOPersistenceManagerType
-
JDOStateManagerName
static final String JDOStateManagerName
- See Also:
- Constant Field Values
-
JDOStateManagerPath
static final String JDOStateManagerPath
- See Also:
- Constant Field Values
-
JDOStateManagerSig
static final String JDOStateManagerSig
- See Also:
- Constant Field Values
-
JDOStateManagerType
static final String JDOStateManagerType
-
JDOStateManagerFieldName
static final String JDOStateManagerFieldName
- See Also:
- Constant Field Values
-
JDOStateManagerFieldType
static final String JDOStateManagerFieldType
-
JDOStateManagerFieldSig
static final String JDOStateManagerFieldSig
- See Also:
- Constant Field Values
-
JDOFlagsFieldName
static final String JDOFlagsFieldName
- See Also:
- Constant Field Values
-
JDOFlagsFieldType
static final String JDOFlagsFieldType
- See Also:
- Constant Field Values
-
JDOFlagsFieldSig
static final String JDOFlagsFieldSig
- See Also:
- Constant Field Values
-
-
Method Detail
-
isTransientClass
boolean isTransientClass(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
Tests whether a class is known to be transient.The following invariant holds: isTransientClass(classPath) => !isPersistenceCapableClass(classPath)
- Parameters:
classPath
- the JVM-qualified name of the class- Returns:
- true if this class is known to be transient; otherwise false
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
isPersistenceCapableClass
boolean isPersistenceCapableClass(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
Tests whether a class is known to be persistence-capable.The following invariant holds: isPersistenceCapableClass(classPath) => !isTransientClass(classPath) && !isSecondClassObjectType(classPath)
- Parameters:
classPath
- the JVM-qualified name of the class- Returns:
- true if this class is persistence-capable; otherwise false
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
isPersistenceCapableRootClass
boolean isPersistenceCapableRootClass(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
Tests whether a class is known as a persistence-capable root class.- Parameters:
classPath
- the JVM-qualified name of the class- Returns:
- true if this class is persistence-capable and does not derive from another persistence-capable class; otherwise false
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
getPersistenceCapableRootClass
String getPersistenceCapableRootClass(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
Returns the name of the persistence-capable root class of a class.- Parameters:
classPath
- the JVM-qualified name of the class- Returns:
- the name of the least-derived persistence-capable class that is equal to or a super class of the argument class; if the argument class is not persistence-capable, null is returned.
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
getSuperClass
String getSuperClass(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
Returns the name of the superclass of a class.- Parameters:
classPath
- the JVM-qualified name of the class- Returns:
- the name of the superclass.
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
isSecondClassObjectType
boolean isSecondClassObjectType(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
Tests whether a class is known as type for Second Class Objects.The following invariant holds: isSecondClassObjectType(classPath) => !isPersistenceCapableClass(classPath)
- Parameters:
classPath
- the JVM-qualified name of the type- Returns:
- true if this type is known for second class objects; otherwise false
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
isMutableSecondClassObjectType
boolean isMutableSecondClassObjectType(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
Tests whether a class is known as type for Mutable Second Class Objects.- Parameters:
classPath
- the JVM-qualified name of the type- Returns:
- true if this type is known for mutable second class objects; otherwise false
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
isPersistentField
boolean isPersistentField(String classPath, String fieldName) throws JDOMetaDataUserException, JDOMetaDataFatalError
Tests whether a field of a class is known to be persistent.- Parameters:
classPath
- the JVM-qualified name of the classfieldName
- the name of the field- Returns:
- true if this field is known to be persistent; otherwise false
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
isTransactionalField
boolean isTransactionalField(String classPath, String fieldName) throws JDOMetaDataUserException, JDOMetaDataFatalError
Tests whether a field of a class is known to be transactional.- Parameters:
classPath
- the JVM-qualified name of the classfieldName
- the name of the field- Returns:
- true if this field is known to be transactional; otherwise false
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
isPrimaryKeyField
boolean isPrimaryKeyField(String classPath, String fieldName) throws JDOMetaDataUserException, JDOMetaDataFatalError
Tests whether a field of a class is known to be Primary Key.- Parameters:
classPath
- the JVM-qualified name of the classfieldName
- the name of the field- Returns:
- true if this field is known to be primary key; otherwise false
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
isDefaultFetchGroupField
boolean isDefaultFetchGroupField(String classPath, String fieldName) throws JDOMetaDataUserException, JDOMetaDataFatalError
Tests whether a field of a class is known to be part of the Default Fetch Group.- Parameters:
classPath
- the JVM-qualified name of the classfieldName
- the name of the field- Returns:
- true if this field is known to be part of the default fetch group; otherwise false
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
getFieldNo
int getFieldNo(String classPath, String fieldName) throws JDOMetaDataUserException, JDOMetaDataFatalError
Returns the unique field index of a declared, persistent field of a class.- Parameters:
classPath
- the JVM-qualified name of the classfieldName
- the name of the field- Returns:
- the non-negative, unique field index
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
getManagedFields
String[] getManagedFields(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
Returns an array of field names of all declared persistent and transactional fields of a class.The position of the field names in the result array corresponds to their unique field index as returned by getFieldNo such that these equations holds:
getFieldNo(getManagedFields(classPath)[i]) == i
getManagedFields(classPath)[getFieldNo(fieldName)] == fieldName
- Parameters:
classPath
- the JVM-qualified name of the class- Returns:
- an array of all declared persistent and transactional fields of a class
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
-