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

JDOMetaData

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;")

Fields Summary
String
JDOExternalPath
String
JDOPath
String
JDOPersistenceCapableName
String
JDOPersistenceCapablePath
String
JDOPersistenceCapableSig
String
JDOPersistenceCapableType
static String
javaLangCloneablePath
String
JDOInstanceCallbacksName
String
JDOInstanceCallbacksPath
String
JDOInstanceCallbacksSig
String
JDOInstanceCallbacksType
String
JDOSecondClassObjectBaseName
String
JDOSecondClassObjectBasePath
String
JDOSecondClassObjectBaseSig
String
JDOSecondClassObjectBaseType
String
JDOPersistenceManagerName
String
JDOPersistenceManagerPath
String
JDOPersistenceManagerSig
String
JDOPersistenceManagerType
String
JDOStateManagerName
String
JDOStateManagerPath
String
JDOStateManagerSig
String
JDOStateManagerType
String
JDOStateManagerFieldName
String
JDOStateManagerFieldType
String
JDOStateManagerFieldSig
String
JDOFlagsFieldName
String
JDOFlagsFieldType
String
JDOFlagsFieldSig
Constructors Summary
Methods Summary
public intgetFieldNo(java.lang.String classPath, java.lang.String fieldName)
Returns the unique field index of a declared, persistent field of a class.

param
classPath the JVM-qualified name of the class
param
fieldName the name of the field
return
the non-negative, unique field index

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

param
classPath the JVM-qualified name of the class
return
an array of all declared persistent and transactional fields of a class

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

param
classPath the JVM-qualified name of the class
return
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.

public java.lang.StringgetSuperClass(java.lang.String classPath)
Returns the name of the superclass of a class.

param
classPath the JVM-qualified name of the class
return
the name of the superclass.

public booleanisDefaultFetchGroupField(java.lang.String classPath, java.lang.String fieldName)
Tests whether a field of a class is known to be part of the Default Fetch Group.

param
classPath the JVM-qualified name of the class
param
fieldName the name of the field
return
true if this field is known to be part of the default fetch group; otherwise false

public booleanisMutableSecondClassObjectType(java.lang.String classPath)
Tests whether a class is known as type for Mutable Second Class Objects.

param
classPath the JVM-qualified name of the type
return
true if this type is known for mutable second class objects; otherwise false

public booleanisPersistenceCapableClass(java.lang.String classPath)
Tests whether a class is known to be persistence-capable.

The following invariant holds: isPersistenceCapableClass(classPath) => !isTransientClass(classPath) && !isSecondClassObjectType(classPath)

param
classPath the JVM-qualified name of the class
return
true if this class is persistence-capable; otherwise false

public booleanisPersistenceCapableRootClass(java.lang.String classPath)
Tests whether a class is known as a persistence-capable root class.

param
classPath the JVM-qualified name of the class
return
true if this class is persistence-capable and does not derive from another persistence-capable class; otherwise false

public booleanisPersistentField(java.lang.String classPath, java.lang.String fieldName)
Tests whether a field of a class is known to be persistent.

param
classPath the JVM-qualified name of the class
param
fieldName the name of the field
return
true if this field is known to be persistent; otherwise false

public booleanisPrimaryKeyField(java.lang.String classPath, java.lang.String fieldName)
Tests whether a field of a class is known to be Primary Key.

param
classPath the JVM-qualified name of the class
param
fieldName the name of the field
return
true if this field is known to be primary key; otherwise false

public booleanisSecondClassObjectType(java.lang.String classPath)
Tests whether a class is known as type for Second Class Objects.

The following invariant holds: isSecondClassObjectType(classPath) => !isPersistenceCapableClass(classPath)

param
classPath the JVM-qualified name of the type
return
true if this type is known for second class objects; otherwise false

public booleanisTransactionalField(java.lang.String classPath, java.lang.String fieldName)
Tests whether a field of a class is known to be transactional.

param
classPath the JVM-qualified name of the class
param
fieldName the name of the field
return
true if this field is known to be transactional; otherwise false

public booleanisTransientClass(java.lang.String classPath)
Tests whether a class is known to be transient.

The following invariant holds: isTransientClass(classPath) => !isPersistenceCapableClass(classPath)

param
classPath the JVM-qualified name of the class
return
true if this class is known to be transient; otherwise false