|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jdo.api.persistence.enhancer.util.Assertion
com.sun.jdo.api.persistence.enhancer.util.Support
com.sun.jdo.api.persistence.enhancer.meta.JDOMetaDataPropertyImpl
public class JDOMetaDataPropertyImpl
Provides the JDO meta information based on properties.
| Field Summary |
|---|
| Fields inherited from class com.sun.jdo.api.persistence.enhancer.util.Support |
|---|
timer |
| Fields inherited from interface com.sun.jdo.api.persistence.enhancer.meta.ExtendedJDOMetaData |
|---|
CHECK_READ, CHECK_WRITE, MEDIATE_READ, MEDIATE_WRITE, SERIALIZABLE |
| Constructor Summary | |
|---|---|
JDOMetaDataPropertyImpl(Properties properties)
Creates an instance. |
|
JDOMetaDataPropertyImpl(Properties properties,
PrintWriter out)
Creates an instance. |
|
| Method Summary | |
|---|---|
int |
getClassModifiers(String classname)
Gets the access modifier 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 access modifier of a field. |
int |
getFieldNo(String classPath,
String fieldName)
Returns the unique field index of a declared, persistent field of a class. |
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()
No interface method. |
String[] |
getKnownFields(String classname)
Gets all known fields of a class. |
String[] |
getManagedFields(String classname)
Returns an array of field names of all declared, persistent fields of a class. |
String |
getPersistenceCapableRootClass(String classPath)
Returns the name of the persistence-capable root class of a class. |
String |
getPersistenceCapableSuperClass(String classPath)
Returns the name of the persistence-capable superclass of a class. |
String |
getSuperClass(String classname)
Returns the 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 |
isDefaultFetchGroupField(String classPath,
String fieldName)
Tests whether a field of a class is known to be part of the Default Fetch Group. |
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. |
boolean |
isMutableSecondClassObjectType(String classPath)
Tests whether a type is known 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 type is known 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. |
| Methods inherited from class com.sun.jdo.api.persistence.enhancer.util.Support |
|---|
getI18N, getI18N, getI18N, getI18N, getI18N, getI18N |
| Methods inherited from class com.sun.jdo.api.persistence.enhancer.util.Assertion |
|---|
affirm, affirm, affirm, affirm |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JDOMetaDataPropertyImpl(Properties properties,
PrintWriter out)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
JDOMetaDataUserException
JDOMetaDataFatalError
public JDOMetaDataPropertyImpl(Properties properties)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
JDOMetaDataUserException
JDOMetaDataFatalError| Method Detail |
|---|
public boolean isPersistenceCapableClass(String classPath)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
isPersistenceCapableClass in interface JDOMetaDataclassPath - the JVM-qualified name of the class
JDOMetaDataUserException
JDOMetaDataFatalError
public boolean isTransientClass(String classPath)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
JDOMetaDataThe following invariant holds: isTransientClass(classPath) => !isPersistenceCapableClass(classPath)
isTransientClass in interface JDOMetaDataclassPath - the JVM-qualified name of the class
JDOMetaDataUserException
JDOMetaDataFatalError
public boolean isPersistenceCapableRootClass(String classPath)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
isPersistenceCapableRootClass in interface JDOMetaDataclassPath - the JVM-qualified name of the class
JDOMetaDataUserException
JDOMetaDataFatalError
public String getPersistenceCapableRootClass(String classPath)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
getPersistenceCapableRootClass in interface JDOMetaDataclassPath - the JVM-qualified name of the class
JDOMetaDataUserException
JDOMetaDataFatalErrorpublic final String getSuperClass(String classname)
getSuperClass in interface JDOMetaDataclassname - the JVM-qualified name of the class
public boolean isSecondClassObjectType(String classPath)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
isSecondClassObjectType in interface JDOMetaDataclassPath - the JVM-qualified name of the type
JDOMetaDataUserException
JDOMetaDataFatalError
public boolean isMutableSecondClassObjectType(String classPath)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
isMutableSecondClassObjectType in interface JDOMetaDataclassPath - the JVM-qualified name of the type
JDOMetaDataUserException
JDOMetaDataFatalError
public boolean isPersistentField(String classPath,
String fieldName)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
isPersistentField in interface JDOMetaDataclassPath - the JVM-qualified name of the classfieldName - the name of the field
JDOMetaDataUserException
JDOMetaDataFatalError
public boolean isTransactionalField(String classPath,
String fieldName)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
isTransactionalField in interface JDOMetaDataclassPath - the JVM-qualified name of the classfieldName - the name of the field
JDOMetaDataUserException
JDOMetaDataFatalError
public boolean isPrimaryKeyField(String classPath,
String fieldName)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
isPrimaryKeyField in interface JDOMetaDataclassPath - the JVM-qualified name of the classfieldName - the name of the field
JDOMetaDataUserException
JDOMetaDataFatalError
public boolean isDefaultFetchGroupField(String classPath,
String fieldName)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
isDefaultFetchGroupField in interface JDOMetaDataclassPath - the JVM-qualified name of the classfieldName - the name of the field
JDOMetaDataUserException
JDOMetaDataFatalError
public int getFieldNo(String classPath,
String fieldName)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
getFieldNo in interface JDOMetaDataclassPath - the JVM-qualified name of the classfieldName - the name of the field
JDOMetaDataUserException
JDOMetaDataFatalErrorpublic String[] getManagedFields(String classname)
getManagedFields in interface JDOMetaDataclassname - the JVM-qualified name of the class
public final String[] getKnownClasses()
getKnownClasses in interface ExtendedJDOMetaDatapublic final String[] getKnownFields(String classname)
getKnownFields in interface ExtendedJDOMetaDataclassname - The classname.
public final int getClassModifiers(String classname)
getClassModifiers in interface ExtendedJDOMetaDataclassname - The classname.
Modifier
public final int getFieldModifiers(String classname,
String fieldname)
getFieldModifiers in interface ExtendedJDOMetaDataclassname - The classname.fieldname - The fieldname.
Modifier
public final String getFieldType(String classname,
String fieldname)
ExtendedJDOMetaData
getFieldType in interface ExtendedJDOMetaDataclassname - The classname.fieldname - The fieldname.
public String getKeyClass(String classPath)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
ExtendedJDOMetaDataThe following holds: (String s = getKeyClass(classPath)) != null ==> !isPersistenceCapableClass(s) && isPersistenceCapableClass(classPath)
getKeyClass in interface ExtendedJDOMetaDataclassPath - the non-null JVM-qualified name of the class
JDOMetaDataUserException
JDOMetaDataFatalErrorJDOMetaData.isPersistenceCapableClass(String)
public boolean isKeyField(String classPath,
String fieldName)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
ExtendedJDOMetaDataA 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().
isKeyField in interface ExtendedJDOMetaDataclassPath - the non-null JVM-qualified name of the classfieldName - the non-null name of the field
JDOMetaDataUserException
JDOMetaDataFatalErrorJDOMetaData.isPersistentField(String, String)
public boolean isKnownNonManagedField(String classPath,
String fieldName,
String fieldSig)
ExtendedJDOMetaDataThis 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().
isKnownNonManagedField in interface ExtendedJDOMetaDataclassPath - the non-null JVM-qualified name of the classfieldName - the non-null name of the fieldfieldSig - the non-null type signature of the field
ExtendedJDOMetaData.isManagedField(String, String)
public boolean isManagedField(String classPath,
String fieldName)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
ExtendedJDOMetaDataA 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().
isManagedField in interface ExtendedJDOMetaDataclassPath - the non-null JVM-qualified name of the classfieldName - the non-null name of the field
JDOMetaDataUserException
JDOMetaDataFatalErrorExtendedJDOMetaData.isKnownNonManagedField(String, String, String),
JDOMetaData.isPersistentField(String, String),
JDOMetaData.isPersistenceCapableClass(String)
public int getFieldFlags(String classPath,
String fieldName)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
ExtendedJDOMetaDataThe 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().
getFieldFlags in interface ExtendedJDOMetaDataclassPath - the non-null JVM-qualified name of the classfieldName - the non-null name of the field
JDOMetaDataUserException
JDOMetaDataFatalError
public int[] getFieldFlags(String classPath,
String[] fieldNames)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
ExtendedJDOMetaDataThis method requires all fields having been declared by declareField().
getFieldFlags in interface ExtendedJDOMetaDataclassPath - the non-null JVM-qualified name of the classfieldNames - the non-null array of names of the declared fields
JDOMetaDataUserException
JDOMetaDataFatalError
public final String[] getFieldType(String classname,
String[] fieldnames)
ExtendedJDOMetaData
getFieldType in interface ExtendedJDOMetaDataclassname - The classname.fieldnames - The fieldnames.
public int[] getFieldNo(String classPath,
String[] fieldNames)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
ExtendedJDOMetaDataThis method requires all fields having been declared by declareField().
getFieldNo in interface ExtendedJDOMetaDataclassPath - the non-null JVM-qualified name of the classfieldNames - the non-null array of names of the declared fields
JDOMetaDataUserException
JDOMetaDataFatalError
public String[] getKeyFields(String classPath)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
ExtendedJDOMetaDataThis method requires all fields having been declared by declareField().
getKeyFields in interface ExtendedJDOMetaDataclassPath - the non-null JVM-qualified name of the class
JDOMetaDataUserException
JDOMetaDataFatalError
public String getPersistenceCapableSuperClass(String classPath)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
ExtendedJDOMetaDataThe following holds: (String s = getPersistenceCapableSuperClass(classPath)) != null ==> isPersistenceCapableClass(classPath) && !isPersistenceCapableRootClass(classPath)
getPersistenceCapableSuperClass in interface ExtendedJDOMetaDataclassPath - the non-null JVM-qualified name of the class
JDOMetaDataUserException
JDOMetaDataFatalErrorJDOMetaData.isPersistenceCapableClass(String),
JDOMetaData.getPersistenceCapableRootClass(String)
public String getSuperKeyClass(String classPath)
throws JDOMetaDataUserException,
JDOMetaDataFatalError
ExtendedJDOMetaDataThe following holds: (String s = getSuperKeyClass(classPath)) != null ==> !isPersistenceCapableClass(s) && isPersistenceCapableClass(classPath) && !isPersistenceCapableRootClass(classPath)
getSuperKeyClass in interface ExtendedJDOMetaDataclassPath - the non-null JVM-qualified name of the class
JDOMetaDataUserException
JDOMetaDataFatalErrorExtendedJDOMetaData.getKeyClass(String),
ExtendedJDOMetaData.getPersistenceCapableSuperClass(String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||