Interface ExtendedJDOMetaData
-
- All Superinterfaces:
JDOMetaData
- All Known Implementing Classes:
EJBMetaDataModelImpl
,JDOMetaDataPropertyImpl
public interface ExtendedJDOMetaData extends JDOMetaData
Provides extended JDO meta information for byte-code enhancement.
-
-
Field Summary
Fields Modifier and Type Field Description static int
CHECK_READ
The JDO field flags.static int
CHECK_WRITE
static int
MEDIATE_READ
static int
MEDIATE_WRITE
static int
SERIALIZABLE
-
Fields inherited from interface com.sun.jdo.api.persistence.enhancer.meta.JDOMetaData
javaLangCloneablePath, JDOExternalPath, JDOFlagsFieldName, JDOFlagsFieldSig, JDOFlagsFieldType, JDOInstanceCallbacksName, JDOInstanceCallbacksPath, JDOInstanceCallbacksSig, JDOInstanceCallbacksType, JDOPath, JDOPersistenceCapableName, JDOPersistenceCapablePath, JDOPersistenceCapableSig, JDOPersistenceCapableType, JDOPersistenceManagerName, JDOPersistenceManagerPath, JDOPersistenceManagerSig, JDOPersistenceManagerType, JDOSecondClassObjectBaseName, JDOSecondClassObjectBasePath, JDOSecondClassObjectBaseSig, JDOSecondClassObjectBaseType, JDOStateManagerFieldName, JDOStateManagerFieldSig, JDOStateManagerFieldType, JDOStateManagerName, JDOStateManagerPath, JDOStateManagerSig, JDOStateManagerType
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getClassModifiers(String classname)
Gets the modifiers of a class.int
getFieldFlags(String classPath, String fieldName)
Returns the field flags for a declared field of a class.int[]
getFieldFlags(String classPath, String[] fieldNames)
Returns the field flags for some declared, managed fields of a class.int
getFieldModifiers(String classname, String fieldname)
Gets the modifiers of a field.int[]
getFieldNo(String classPath, String[] fieldNames)
Returns the unique field index of some declared, managed fields of a class.String
getFieldType(String classname, String fieldname)
Gets the type of a field.String[]
getFieldType(String classname, String[] fieldnames)
Gets the type of some fields.String
getKeyClass(String classPath)
Returns the name of the key class of a class.String[]
getKeyFields(String classPath)
Returns an array of field names of all key fields of a class.String[]
getKnownClasses()
Gets all known classnames.String[]
getKnownFields(String classname)
Gets all known fieldnames of a class.String
getPersistenceCapableSuperClass(String classPath)
Returns the name of the persistence-capable superclass of a class.String
getSuperKeyClass(String classPath)
Returns the name of the key class of the next persistence-capable superclass that defines one.boolean
isKeyField(String classPath, String fieldName)
Returns whether a field of a class is key.boolean
isKnownNonManagedField(String classPath, String fieldName, String fieldSig)
Returns whether a field of a class is known to be non-managed.boolean
isManagedField(String classPath, String fieldName)
Returns whether a field of a class is transient transactional or persistent.-
Methods inherited from interface com.sun.jdo.api.persistence.enhancer.meta.JDOMetaData
getFieldNo, getManagedFields, getPersistenceCapableRootClass, getSuperClass, isDefaultFetchGroupField, isMutableSecondClassObjectType, isPersistenceCapableClass, isPersistenceCapableRootClass, isPersistentField, isPrimaryKeyField, isSecondClassObjectType, isTransactionalField, isTransientClass
-
-
-
-
Field Detail
-
CHECK_READ
static final int CHECK_READ
The JDO field flags.- See Also:
- Constant Field Values
-
MEDIATE_READ
static final int MEDIATE_READ
- See Also:
- Constant Field Values
-
CHECK_WRITE
static final int CHECK_WRITE
- See Also:
- Constant Field Values
-
MEDIATE_WRITE
static final int MEDIATE_WRITE
- See Also:
- Constant Field Values
-
SERIALIZABLE
static final int SERIALIZABLE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getKnownClasses
String[] getKnownClasses() throws JDOMetaDataUserException, JDOMetaDataFatalError
Gets all known classnames.- Returns:
- All known classnames.
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
getKnownFields
String[] getKnownFields(String classname) throws JDOMetaDataUserException, JDOMetaDataFatalError
Gets all known fieldnames of a class.- Parameters:
classname
- The classname.- Returns:
- All known fieldnames.
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
getFieldType
String getFieldType(String classname, String fieldname) throws JDOMetaDataUserException, JDOMetaDataFatalError
Gets the type of a field.- Parameters:
classname
- The classname.fieldname
- The fieldname.- Returns:
- The type of the field.
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
getClassModifiers
int getClassModifiers(String classname) throws JDOMetaDataUserException, JDOMetaDataFatalError
Gets the modifiers of a class. The return value is a constant of thejava.lang.reflect.Modifier
class.- Parameters:
classname
- The classname.- Returns:
- The modifiers.
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
- See Also:
Modifier
-
getFieldModifiers
int getFieldModifiers(String classname, String fieldname) throws JDOMetaDataUserException, JDOMetaDataFatalError
Gets the modifiers of a field. The return value is a constant of thejava.lang.reflect.Modifier
class.- Parameters:
classname
- The classname.fieldname
- The fieldname.- Returns:
- The modifiers.
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
- See Also:
Modifier
-
getKeyClass
String getKeyClass(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
Returns the name of the key class of a class.The following holds: (String s = getKeyClass(classPath)) != null ==> !isPersistenceCapableClass(s) && isPersistenceCapableClass(classPath)
- Parameters:
classPath
- the non-null JVM-qualified name of the class- Returns:
- the name of the key class or null if there is none
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
- See Also:
JDOMetaData.isPersistenceCapableClass(String)
-
isKnownNonManagedField
boolean isKnownNonManagedField(String classPath, String fieldName, String fieldSig) throws JDOMetaDataUserException, JDOMetaDataFatalError
Returns whether a field of a class is known to be non-managed.This method differs from isManagedField() in that a field may or may not be managed if its not known as non-managed. The following holds (not vice versa!): isKnownNonManagedField(classPath, fieldName) ==> !isManagedField(classPath, fieldName)
This method doesn't require the field having been declared by declareField().
- Parameters:
classPath
- the non-null JVM-qualified name of the classfieldName
- the non-null name of the fieldfieldSig
- the non-null type signature of the field- Returns:
- true if this field is known to be non-managed; otherwise false
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
- See Also:
isManagedField(String, String)
-
isManagedField
boolean isManagedField(String classPath, String fieldName) throws JDOMetaDataUserException, JDOMetaDataFatalError
Returns whether a field of a class is transient transactional or persistent.A managed field must not be known as non-managed and must be either transient transactional or persistent. The following holds: isManagedField(classPath, fieldName) ==> !isKnownNonManagedField(classPath, fieldName) && (isPersistentField(classPath, fieldName) ^ isTransactionalField(classPath, fieldName))
This method requires the field having been declared by declareField().
- Parameters:
classPath
- the non-null JVM-qualified name of the classfieldName
- the non-null name of the field- Returns:
- true if this field is managed; otherwise false
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
- See Also:
isKnownNonManagedField(String, String, String)
,JDOMetaData.isPersistentField(String, String)
,JDOMetaData.isPersistenceCapableClass(String)
-
isKeyField
boolean isKeyField(String classPath, String fieldName) throws JDOMetaDataUserException, JDOMetaDataFatalError
Returns whether a field of a class is key.A key field must be persistent. The following holds: isKeyField(classPath, fieldName) ==> isPersistentField(classPath, fieldName) && !isDefaultFetchGroupField(classPath, fieldName)
This method requires the field having been declared by declareField().
- Parameters:
classPath
- the non-null JVM-qualified name of the classfieldName
- the non-null name of the field- Returns:
- true if this field is key; otherwise false
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
- See Also:
JDOMetaData.isPersistentField(String, String)
-
getFieldFlags
int getFieldFlags(String classPath, String fieldName) throws JDOMetaDataUserException, JDOMetaDataFatalError
Returns the field flags for a declared field of a class.The following holds for the field flags: int f = getFieldFlags(classPath, fieldName); !isManagedField(classPath, fieldName) ==> (f & CHECK_READ == 0) && (f & MEDIATE_READ == 0) && (f & CHECK_WRITE == 0) && (f & MEDIATE_WRITE == 0) isTransientField(classPath, fieldName) ==> (f & CHECK_READ == 0) && (f & MEDIATE_READ == 0) && (f & CHECK_WRITE != 0) && (f & MEDIATE_WRITE == 0) isKeyField(classPath, fieldName) ==> (f & CHECK_READ == 0) && (f & MEDIATE_READ == 0) && (f & CHECK_WRITE == 0) && (f & MEDIATE_WRITE != 0) isDefaultFetchGroupField(classPath, fieldName) ==> (f & CHECK_READ != 0) && (f & MEDIATE_READ != 0) && (f & CHECK_WRITE == 0) && (f & MEDIATE_WRITE == 0) isPersistentField(classPath, fieldName) && isKeyField(classPath, fieldName) && isDefaultFetchGroupField(classPath, fieldName) ==> (f & CHECK_READ == 0) && (f & MEDIATE_READ == 0) && (f & CHECK_WRITE != 0) && (f & MEDIATE_WRITE != 0)
This method requires the field having been declared by declareField().
- Parameters:
classPath
- the non-null JVM-qualified name of the classfieldName
- the non-null name of the field- Returns:
- the field flags for this field
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
getFieldFlags
int[] getFieldFlags(String classPath, String[] fieldNames) throws JDOMetaDataUserException, JDOMetaDataFatalError
Returns the field flags for some declared, managed fields of a class.This method requires all fields having been declared by declareField().
- Parameters:
classPath
- the non-null JVM-qualified name of the classfieldNames
- the non-null array of names of the declared fields- Returns:
- the field flags for the fields
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
getFieldType
String[] getFieldType(String classname, String[] fieldnames) throws JDOMetaDataUserException, JDOMetaDataFatalError
Gets the type of some fields.- Parameters:
classname
- The classname.fieldnames
- The fieldnames.- Returns:
- The type of the fields.
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
getFieldNo
int[] getFieldNo(String classPath, String[] fieldNames) throws JDOMetaDataUserException, JDOMetaDataFatalError
Returns the unique field index of some declared, managed fields of a class.This method requires all fields having been declared by declareField().
- Parameters:
classPath
- the non-null JVM-qualified name of the classfieldNames
- the non-null array of names of the declared fields- Returns:
- the non-negative, unique field indices
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
getKeyFields
String[] getKeyFields(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
Returns an array of field names of all key fields of a class.This method requires all fields having been declared by declareField().
- Parameters:
classPath
- the non-null JVM-qualified name of the class- Returns:
- an array of all declared key fields of a class
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
-
getPersistenceCapableSuperClass
String getPersistenceCapableSuperClass(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
Returns the name of the persistence-capable superclass of a class.The following holds: (String s = getPersistenceCapableSuperClass(classPath)) != null ==> isPersistenceCapableClass(classPath) && !isPersistenceCapableRootClass(classPath)
- Parameters:
classPath
- the non-null JVM-qualified name of the class- Returns:
- the name of the PC superclass or null if there is none
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
- See Also:
JDOMetaData.isPersistenceCapableClass(String)
,JDOMetaData.getPersistenceCapableRootClass(String)
-
getSuperKeyClass
String getSuperKeyClass(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
Returns the name of the key class of the next persistence-capable superclass that defines one.The following holds: (String s = getSuperKeyClass(classPath)) != null ==> !isPersistenceCapableClass(s) && isPersistenceCapableClass(classPath) && !isPersistenceCapableRootClass(classPath)
- Parameters:
classPath
- the non-null JVM-qualified name of the class- Returns:
- the name of the key class or null if there is none
- Throws:
JDOMetaDataUserException
JDOMetaDataFatalError
- See Also:
getKeyClass(String)
,getPersistenceCapableSuperClass(String)
-
-