com.sun.jdo.api.persistence.enhancer.meta
Interface JDOMetaData

All Known Subinterfaces:
ExtendedJDOMetaData
All Known Implementing Classes:
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 ...


Field Summary
static java.lang.String javaLangCloneablePath
           
static java.lang.String JDOExternalPath
           
static java.lang.String JDOFlagsFieldName
           
static java.lang.String JDOFlagsFieldSig
           
static java.lang.String JDOFlagsFieldType
           
static java.lang.String JDOInstanceCallbacksName
           
static java.lang.String JDOInstanceCallbacksPath
           
static java.lang.String JDOInstanceCallbacksSig
           
static java.lang.String JDOInstanceCallbacksType
           
static java.lang.String JDOPath
           
static java.lang.String JDOPersistenceCapableName
           
static java.lang.String JDOPersistenceCapablePath
           
static java.lang.String JDOPersistenceCapableSig
           
static java.lang.String JDOPersistenceCapableType
           
static java.lang.String JDOPersistenceManagerName
           
static java.lang.String JDOPersistenceManagerPath
           
static java.lang.String JDOPersistenceManagerSig
           
static java.lang.String JDOPersistenceManagerType
           
static java.lang.String JDOSecondClassObjectBaseName
           
static java.lang.String JDOSecondClassObjectBasePath
           
static java.lang.String JDOSecondClassObjectBaseSig
           
static java.lang.String JDOSecondClassObjectBaseType
           
static java.lang.String JDOStateManagerFieldName
           
static java.lang.String JDOStateManagerFieldSig
           
static java.lang.String JDOStateManagerFieldType
           
static java.lang.String JDOStateManagerName
           
static java.lang.String JDOStateManagerPath
           
static java.lang.String JDOStateManagerSig
           
static java.lang.String JDOStateManagerType
           
 
Method Summary
 int getFieldNo(java.lang.String classPath, java.lang.String fieldName)
          Returns the unique field index of a declared, persistent field of a class.
 java.lang.String[] getManagedFields(java.lang.String classPath)
          Returns an array of field names of all declared persistent and transactional fields of a class.
 java.lang.String getPersistenceCapableRootClass(java.lang.String classPath)
          Returns the name of the persistence-capable root class of a class.
 java.lang.String getSuperClass(java.lang.String classPath)
          Returns the name of the superclass of a class.
 boolean isDefaultFetchGroupField(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.
 boolean isMutableSecondClassObjectType(java.lang.String classPath)
          Tests whether a class is known as type for Mutable Second Class Objects.
 boolean isPersistenceCapableClass(java.lang.String classPath)
          Tests whether a class is known to be persistence-capable.
 boolean isPersistenceCapableRootClass(java.lang.String classPath)
          Tests whether a class is known as a persistence-capable root class.
 boolean isPersistentField(java.lang.String classPath, java.lang.String fieldName)
          Tests whether a field of a class is known to be persistent.
 boolean isPrimaryKeyField(java.lang.String classPath, java.lang.String fieldName)
          Tests whether a field of a class is known to be Primary Key.
 boolean isSecondClassObjectType(java.lang.String classPath)
          Tests whether a class is known as type for Second Class Objects.
 boolean isTransactionalField(java.lang.String classPath, java.lang.String fieldName)
          Tests whether a field of a class is known to be transactional.
 boolean isTransientClass(java.lang.String classPath)
          Tests whether a class is known to be transient.
 

Field Detail

JDOExternalPath

static final java.lang.String JDOExternalPath
See Also:
Constant Field Values

JDOPath

static final java.lang.String JDOPath
See Also:
Constant Field Values

JDOPersistenceCapableName

static final java.lang.String JDOPersistenceCapableName
See Also:
Constant Field Values

JDOPersistenceCapablePath

static final java.lang.String JDOPersistenceCapablePath
See Also:
Constant Field Values

JDOPersistenceCapableSig

static final java.lang.String JDOPersistenceCapableSig
See Also:
Constant Field Values

JDOPersistenceCapableType

static final java.lang.String JDOPersistenceCapableType

javaLangCloneablePath

static final java.lang.String javaLangCloneablePath
See Also:
Constant Field Values

JDOInstanceCallbacksName

static final java.lang.String JDOInstanceCallbacksName
See Also:
Constant Field Values

JDOInstanceCallbacksPath

static final java.lang.String JDOInstanceCallbacksPath
See Also:
Constant Field Values

JDOInstanceCallbacksSig

static final java.lang.String JDOInstanceCallbacksSig
See Also:
Constant Field Values

JDOInstanceCallbacksType

static final java.lang.String JDOInstanceCallbacksType

JDOSecondClassObjectBaseName

static final java.lang.String JDOSecondClassObjectBaseName
See Also:
Constant Field Values

JDOSecondClassObjectBasePath

static final java.lang.String JDOSecondClassObjectBasePath
See Also:
Constant Field Values

JDOSecondClassObjectBaseSig

static final java.lang.String JDOSecondClassObjectBaseSig
See Also:
Constant Field Values

JDOSecondClassObjectBaseType

static final java.lang.String JDOSecondClassObjectBaseType

JDOPersistenceManagerName

static final java.lang.String JDOPersistenceManagerName
See Also:
Constant Field Values

JDOPersistenceManagerPath

static final java.lang.String JDOPersistenceManagerPath
See Also:
Constant Field Values

JDOPersistenceManagerSig

static final java.lang.String JDOPersistenceManagerSig
See Also:
Constant Field Values

JDOPersistenceManagerType

static final java.lang.String JDOPersistenceManagerType

JDOStateManagerName

static final java.lang.String JDOStateManagerName
See Also:
Constant Field Values

JDOStateManagerPath

static final java.lang.String JDOStateManagerPath
See Also:
Constant Field Values

JDOStateManagerSig

static final java.lang.String JDOStateManagerSig
See Also:
Constant Field Values

JDOStateManagerType

static final java.lang.String JDOStateManagerType

JDOStateManagerFieldName

static final java.lang.String JDOStateManagerFieldName
See Also:
Constant Field Values

JDOStateManagerFieldType

static final java.lang.String JDOStateManagerFieldType

JDOStateManagerFieldSig

static final java.lang.String JDOStateManagerFieldSig
See Also:
Constant Field Values

JDOFlagsFieldName

static final java.lang.String JDOFlagsFieldName
See Also:
Constant Field Values

JDOFlagsFieldType

static final java.lang.String JDOFlagsFieldType
See Also:
Constant Field Values

JDOFlagsFieldSig

static final java.lang.String JDOFlagsFieldSig
See Also:
Constant Field Values
Method Detail

isTransientClass

boolean isTransientClass(java.lang.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(java.lang.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(java.lang.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

java.lang.String getPersistenceCapableRootClass(java.lang.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

java.lang.String getSuperClass(java.lang.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(java.lang.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(java.lang.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(java.lang.String classPath,
                          java.lang.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 class
fieldName - the name of the field
Returns:
true if this field is known to be persistent; otherwise false
Throws:
JDOMetaDataUserException
JDOMetaDataFatalError

isTransactionalField

boolean isTransactionalField(java.lang.String classPath,
                             java.lang.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 class
fieldName - the name of the field
Returns:
true if this field is known to be transactional; otherwise false
Throws:
JDOMetaDataUserException
JDOMetaDataFatalError

isPrimaryKeyField

boolean isPrimaryKeyField(java.lang.String classPath,
                          java.lang.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 class
fieldName - the name of the field
Returns:
true if this field is known to be primary key; otherwise false
Throws:
JDOMetaDataUserException
JDOMetaDataFatalError

isDefaultFetchGroupField

boolean isDefaultFetchGroupField(java.lang.String classPath,
                                 java.lang.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 class
fieldName - 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(java.lang.String classPath,
               java.lang.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 class
fieldName - the name of the field
Returns:
the non-negative, unique field index
Throws:
JDOMetaDataUserException
JDOMetaDataFatalError

getManagedFields

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


Copyright © 2012 GlassFish Community. All Rights Reserved.