FileDocCategorySizeDatePackage
ExtendedJDOMetaData.javaAPI DocGlassfish v2 API15481Fri May 04 22:34:38 BST 2007com.sun.jdo.api.persistence.enhancer.meta

ExtendedJDOMetaData

public interface ExtendedJDOMetaData implements JDOMetaData
Provides extended JDO meta information for byte-code enhancement.

Fields Summary
int
CHECK_READ
The JDO field flags.
int
MEDIATE_READ
int
CHECK_WRITE
int
MEDIATE_WRITE
int
SERIALIZABLE
Constructors Summary
Methods Summary
public intgetClassModifiers(java.lang.String classname)
Gets the modifiers of a class. The return value is a constant of the java.lang.reflect.Modifier class.

param
classname The classname.
return
The modifiers.
see
java.lang.reflect.Modifier

public intgetFieldFlags(java.lang.String classPath, java.lang.String fieldName)
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().

param
classPath the non-null JVM-qualified name of the class
param
fieldName the non-null name of the field
return
the field flags for this field
see
#declareField(String, String, String)

public int[]getFieldFlags(java.lang.String classPath, java.lang.String[] fieldNames)
Returns the field flags for some declared, managed fields of a class.

This method requires all fields having been declared by declareField().

param
classPath the non-null JVM-qualified name of the class
param
fieldNames the non-null array of names of the declared fields
return
the field flags for the fields
see
#declareField(String, String, String)

public intgetFieldModifiers(java.lang.String classname, java.lang.String fieldname)
Gets the modifiers of a field. The return value is a constant of the java.lang.reflect.Modifier class.

param
classname The classname.
param
fieldname The fieldname.
return
The modifiers.
see
java.lang.reflect.Modifier

public int[]getFieldNo(java.lang.String classPath, java.lang.String[] fieldNames)
Returns the unique field index of some declared, managed fields of a class.

This method requires all fields having been declared by declareField().

param
classPath the non-null JVM-qualified name of the class
param
fieldNames the non-null array of names of the declared fields
return
the non-negative, unique field indices
see
#declareField(String, String, String)

public java.lang.String[]getFieldType(java.lang.String classname, java.lang.String[] fieldnames)
Gets the type of some fields.

param
classname The classname.
param
fieldnames The fieldnames.
return
The type of the fields.

public java.lang.StringgetFieldType(java.lang.String classname, java.lang.String fieldname)
Gets the type of a field.

param
classname The classname.
param
fieldname The fieldname.
return
The type of the field.

public java.lang.StringgetKeyClass(java.lang.String classPath)
Returns the name of the key class of a class.

The following holds: (String s = getKeyClass(classPath)) != null ==> !isPersistenceCapableClass(s) && isPersistenceCapableClass(classPath)

param
classPath the non-null JVM-qualified name of the class
return
the name of the key class or null if there is none
see
#isPersistenceCapableClass(String)

public java.lang.String[]getKeyFields(java.lang.String classPath)
Returns an array of field names of all key fields of a class.

This method requires all fields having been declared by declareField().

param
classPath the non-null JVM-qualified name of the class
return
an array of all declared key fields of a class
see
#declareField(String, String, String)

public java.lang.String[]getKnownClasses()
Gets all known classnames.

return
All known classnames.

public java.lang.String[]getKnownFields(java.lang.String classname)
Gets all known fieldnames of a class.

param
classname The classname.
return
All known fieldnames.

public java.lang.StringgetPersistenceCapableSuperClass(java.lang.String classPath)
Returns the name of the persistence-capable superclass of a class.

The following holds: (String s = getPersistenceCapableSuperClass(classPath)) != null ==> isPersistenceCapableClass(classPath) && !isPersistenceCapableRootClass(classPath)

param
classPath the non-null JVM-qualified name of the class
return
the name of the PC superclass or null if there is none
see
#isPersistenceCapableClass(String)
see
#getPersistenceCapableRootClass(String)

public java.lang.StringgetSuperKeyClass(java.lang.String classPath)
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)

param
classPath the non-null JVM-qualified name of the class
return
the name of the key class or null if there is none
see
#getKeyClass(String)
see
#getPersistenceCapableSuperClass(String)

public booleanisKeyField(java.lang.String classPath, java.lang.String fieldName)
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().

param
classPath the non-null JVM-qualified name of the class
param
fieldName the non-null name of the field
return
true if this field is key; otherwise false
see
#isPersistentField(String, String)
see
#declareField(String, String, String)

public booleanisKnownNonManagedField(java.lang.String classPath, java.lang.String fieldName, java.lang.String fieldSig)
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().

param
classPath the non-null JVM-qualified name of the class
param
fieldName the non-null name of the field
param
fieldSig the non-null type signature of the field
return
true if this field is known to be non-managed; otherwise false
see
#isManagedField(String, String)
see
#declareField(String, String, String)

public booleanisManagedField(java.lang.String classPath, java.lang.String fieldName)
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().

param
classPath the non-null JVM-qualified name of the class
param
fieldName the non-null name of the field
return
true if this field is managed; otherwise false
see
#isKnownNonManagedField(String, String)
see
#isPersistentField(String, String)
see
#isTransientField(String, String)
see
#isPersistenceCapableClass(String)