public class JDOMetaDataPropertyImpl extends Support implements ExtendedJDOMetaData
CHECK_READ, CHECK_WRITE, MEDIATE_READ, MEDIATE_WRITE, SERIALIZABLE
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
Constructor and Description |
---|
JDOMetaDataPropertyImpl(Properties properties)
Creates an instance.
|
JDOMetaDataPropertyImpl(Properties properties,
PrintWriter out)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
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.
|
getI18N, getI18N, getI18N, getI18N, getI18N, getI18N
public JDOMetaDataPropertyImpl(Properties properties, PrintWriter out) throws JDOMetaDataUserException, JDOMetaDataFatalError
public JDOMetaDataPropertyImpl(Properties properties) throws JDOMetaDataUserException, JDOMetaDataFatalError
public boolean isPersistenceCapableClass(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
isPersistenceCapableClass
in interface JDOMetaData
classPath
- the JVM-qualified name of the classJDOMetaDataUserException
JDOMetaDataFatalError
public boolean isTransientClass(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
JDOMetaData
The following invariant holds: isTransientClass(classPath) => !isPersistenceCapableClass(classPath)
isTransientClass
in interface JDOMetaData
classPath
- the JVM-qualified name of the classJDOMetaDataUserException
JDOMetaDataFatalError
public boolean isPersistenceCapableRootClass(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
isPersistenceCapableRootClass
in interface JDOMetaData
classPath
- the JVM-qualified name of the classJDOMetaDataUserException
JDOMetaDataFatalError
public String getPersistenceCapableRootClass(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
getPersistenceCapableRootClass
in interface JDOMetaData
classPath
- the JVM-qualified name of the classJDOMetaDataUserException
JDOMetaDataFatalError
public final String getSuperClass(String classname)
getSuperClass
in interface JDOMetaData
classname
- the JVM-qualified name of the classpublic boolean isSecondClassObjectType(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
isSecondClassObjectType
in interface JDOMetaData
classPath
- the JVM-qualified name of the typeJDOMetaDataUserException
JDOMetaDataFatalError
public boolean isMutableSecondClassObjectType(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
isMutableSecondClassObjectType
in interface JDOMetaData
classPath
- the JVM-qualified name of the typeJDOMetaDataUserException
JDOMetaDataFatalError
public boolean isPersistentField(String classPath, String fieldName) throws JDOMetaDataUserException, JDOMetaDataFatalError
isPersistentField
in interface JDOMetaData
classPath
- the JVM-qualified name of the classfieldName
- the name of the fieldJDOMetaDataUserException
JDOMetaDataFatalError
public boolean isTransactionalField(String classPath, String fieldName) throws JDOMetaDataUserException, JDOMetaDataFatalError
isTransactionalField
in interface JDOMetaData
classPath
- the JVM-qualified name of the classfieldName
- the name of the fieldJDOMetaDataUserException
JDOMetaDataFatalError
public boolean isPrimaryKeyField(String classPath, String fieldName) throws JDOMetaDataUserException, JDOMetaDataFatalError
isPrimaryKeyField
in interface JDOMetaData
classPath
- the JVM-qualified name of the classfieldName
- the name of the fieldJDOMetaDataUserException
JDOMetaDataFatalError
public boolean isDefaultFetchGroupField(String classPath, String fieldName) throws JDOMetaDataUserException, JDOMetaDataFatalError
isDefaultFetchGroupField
in interface JDOMetaData
classPath
- the JVM-qualified name of the classfieldName
- the name of the fieldJDOMetaDataUserException
JDOMetaDataFatalError
public int getFieldNo(String classPath, String fieldName) throws JDOMetaDataUserException, JDOMetaDataFatalError
getFieldNo
in interface JDOMetaData
classPath
- the JVM-qualified name of the classfieldName
- the name of the fieldJDOMetaDataUserException
JDOMetaDataFatalError
public String[] getManagedFields(String classname)
getManagedFields
in interface JDOMetaData
classname
- the JVM-qualified name of the classpublic final String[] getKnownClasses()
getKnownClasses
in interface ExtendedJDOMetaData
public final String[] getKnownFields(String classname)
getKnownFields
in interface ExtendedJDOMetaData
classname
- The classname.public final int getClassModifiers(String classname)
getClassModifiers
in interface ExtendedJDOMetaData
classname
- The classname.Modifier
public final int getFieldModifiers(String classname, String fieldname)
getFieldModifiers
in interface ExtendedJDOMetaData
classname
- The classname.fieldname
- The fieldname.Modifier
public final String getFieldType(String classname, String fieldname)
ExtendedJDOMetaData
getFieldType
in interface ExtendedJDOMetaData
classname
- The classname.fieldname
- The fieldname.public String getKeyClass(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
ExtendedJDOMetaData
The following holds: (String s = getKeyClass(classPath)) != null ==> !isPersistenceCapableClass(s) && isPersistenceCapableClass(classPath)
getKeyClass
in interface ExtendedJDOMetaData
classPath
- the non-null JVM-qualified name of the classJDOMetaDataUserException
JDOMetaDataFatalError
JDOMetaData.isPersistenceCapableClass(String)
public boolean isKeyField(String classPath, String fieldName) throws JDOMetaDataUserException, JDOMetaDataFatalError
ExtendedJDOMetaData
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().
isKeyField
in interface ExtendedJDOMetaData
classPath
- the non-null JVM-qualified name of the classfieldName
- the non-null name of the fieldJDOMetaDataUserException
JDOMetaDataFatalError
JDOMetaData.isPersistentField(String, String)
public boolean isKnownNonManagedField(String classPath, String fieldName, String fieldSig)
ExtendedJDOMetaData
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().
isKnownNonManagedField
in interface ExtendedJDOMetaData
classPath
- the non-null JVM-qualified name of the classfieldName
- the non-null name of the fieldfieldSig
- the non-null type signature of the fieldExtendedJDOMetaData.isManagedField(String, String)
public boolean isManagedField(String classPath, String fieldName) throws JDOMetaDataUserException, JDOMetaDataFatalError
ExtendedJDOMetaData
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().
isManagedField
in interface ExtendedJDOMetaData
classPath
- the non-null JVM-qualified name of the classfieldName
- the non-null name of the fieldJDOMetaDataUserException
JDOMetaDataFatalError
ExtendedJDOMetaData.isKnownNonManagedField(String, String, String)
,
JDOMetaData.isPersistentField(String, String)
,
JDOMetaData.isPersistenceCapableClass(String)
public int getFieldFlags(String classPath, String fieldName) throws JDOMetaDataUserException, JDOMetaDataFatalError
ExtendedJDOMetaData
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().
getFieldFlags
in interface ExtendedJDOMetaData
classPath
- the non-null JVM-qualified name of the classfieldName
- the non-null name of the fieldJDOMetaDataUserException
JDOMetaDataFatalError
public int[] getFieldFlags(String classPath, String[] fieldNames) throws JDOMetaDataUserException, JDOMetaDataFatalError
ExtendedJDOMetaData
This method requires all fields having been declared by declareField().
getFieldFlags
in interface ExtendedJDOMetaData
classPath
- the non-null JVM-qualified name of the classfieldNames
- the non-null array of names of the declared fieldsJDOMetaDataUserException
JDOMetaDataFatalError
public final String[] getFieldType(String classname, String[] fieldnames)
ExtendedJDOMetaData
getFieldType
in interface ExtendedJDOMetaData
classname
- The classname.fieldnames
- The fieldnames.public int[] getFieldNo(String classPath, String[] fieldNames) throws JDOMetaDataUserException, JDOMetaDataFatalError
ExtendedJDOMetaData
This method requires all fields having been declared by declareField().
getFieldNo
in interface ExtendedJDOMetaData
classPath
- the non-null JVM-qualified name of the classfieldNames
- the non-null array of names of the declared fieldsJDOMetaDataUserException
JDOMetaDataFatalError
public String[] getKeyFields(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
ExtendedJDOMetaData
This method requires all fields having been declared by declareField().
getKeyFields
in interface ExtendedJDOMetaData
classPath
- the non-null JVM-qualified name of the classJDOMetaDataUserException
JDOMetaDataFatalError
public String getPersistenceCapableSuperClass(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
ExtendedJDOMetaData
The following holds: (String s = getPersistenceCapableSuperClass(classPath)) != null ==> isPersistenceCapableClass(classPath) && !isPersistenceCapableRootClass(classPath)
getPersistenceCapableSuperClass
in interface ExtendedJDOMetaData
classPath
- the non-null JVM-qualified name of the classJDOMetaDataUserException
JDOMetaDataFatalError
JDOMetaData.isPersistenceCapableClass(String)
,
JDOMetaData.getPersistenceCapableRootClass(String)
public String getSuperKeyClass(String classPath) throws JDOMetaDataUserException, JDOMetaDataFatalError
ExtendedJDOMetaData
The following holds: (String s = getSuperKeyClass(classPath)) != null ==> !isPersistenceCapableClass(s) && isPersistenceCapableClass(classPath) && !isPersistenceCapableRootClass(classPath)
getSuperKeyClass
in interface ExtendedJDOMetaData
classPath
- the non-null JVM-qualified name of the classJDOMetaDataUserException
JDOMetaDataFatalError
ExtendedJDOMetaData.getKeyClass(String)
,
ExtendedJDOMetaData.getPersistenceCapableSuperClass(String)
Copyright © 2021. All rights reserved.