Methods Summary |
---|
public int | getClassModifiers(java.lang.String classPath)
return Modifier.PUBLIC;
|
public int | getFieldFlags(java.lang.String classPath, java.lang.String fieldName)
if (!isManagedField(classPath, fieldName)) {
affirm(!isTransactionalField(classPath, fieldName));
affirm(!isPersistentField(classPath, fieldName));
affirm(!isKeyField(classPath, fieldName));
affirm(!isDefaultFetchGroupField(classPath, fieldName));
return 0;
}
//affirm(isManagedField(classPath, fieldName));
if (isTransactionalField(classPath, fieldName)) {
affirm(!isPersistentField(classPath, fieldName));
affirm(!isKeyField(classPath, fieldName));
// ignore any dfg membership of transactional fields
//affirm(!isDefaultFetchGroupField(classPath, fieldName));
return CHECK_WRITE;
}
//affirm(!isTransactionalField(classPath, fieldName));
affirm(isPersistentField(classPath, fieldName));
if (isKeyField(classPath, fieldName)) {
// ignore any dfg membership of key fields
//affirm(!isDefaultFetchGroupField(classPath, fieldName));
return MEDIATE_WRITE;
}
//affirm(!isKeyField(classPath, fieldName));
if (isDefaultFetchGroupField(classPath, fieldName)) {
if (Boolean.getBoolean("AllowMediatedWriteInDefaultFetchGroup")) {
return CHECK_READ | MEDIATE_WRITE;
}
return CHECK_READ | CHECK_WRITE;
}
//affirm(!isDefaultFetchGroupField(classPath, fieldName));
return MEDIATE_READ | MEDIATE_WRITE;
|
public int[] | getFieldFlags(java.lang.String classPath, java.lang.String[] fieldNames)
final int n = (fieldNames != null ? fieldNames.length : 0);
final int[] flags = new int[n];
for (int i = 0; i < n; i++) {
flags[i] = getFieldFlags(classPath, fieldNames[i]);
}
return flags;
|
public int | getFieldModifiers(java.lang.String classPath, java.lang.String fieldName)
final String className = pathToName(classPath);
return model.getModifiers(model.getField(className, fieldName));
|
public int[] | getFieldNo(java.lang.String classPath, java.lang.String[] fieldNames)
final int n = (fieldNames != null ? fieldNames.length : 0);
final int[] flags = new int[n];
for (int i = 0; i < n; i++) {
flags[i] = getFieldNo(classPath, fieldNames[i]);
}
return flags;
|
public java.lang.String[] | getFieldType(java.lang.String className, java.lang.String[] fieldNames)
final int n = (fieldNames != null ? fieldNames.length : 0);
final String[] types = new String[n];
for (int i = 0; i < n; i++) {
types[i] = getFieldType(className, fieldNames[i]);
}
return types;
|
public java.lang.String | getFieldType(java.lang.String classPath, java.lang.String fieldName)
final String className = pathToName(classPath);
String ftype = model.getFieldType(className, fieldName);
return nameToPath(ftype);
|
public java.lang.String | getKeyClass(java.lang.String classPath)
final String className = pathToName(classPath);
String keyClass = model.getPersistenceClass(className).getKeyClass();
if (keyClass.toLowerCase().endsWith(".oid")) {
int ind = keyClass.lastIndexOf('.");
keyClass = keyClass.substring(0, ind) + "$Oid";
}
return nameToPath(keyClass);
|
public java.lang.String[] | getKeyFields(java.lang.String classPath)
final List keys = new ArrayList();
final String[] fieldNames = getManagedFields(classPath);
final int n = fieldNames.length;
for (int i = 0; i < n; i++) {
if (isKeyField(classPath, fieldNames[i])) {
keys.add(fieldNames[i]);
}
}
return (String[])keys.toArray(new String[keys.size()]);
|
public java.lang.String[] | getKnownClasses()
throw new UnsupportedOperationException();
|
public java.lang.String[] | getKnownFields(java.lang.String classPath)
return getManagedFields(classPath);
|
public java.lang.String | getPersistenceCapableSuperClass(java.lang.String classPath)
return null;
|
public java.lang.String | getSuperKeyClass(java.lang.String classPath)
return null;
|
public boolean | isKeyField(java.lang.String classPath, java.lang.String fieldName)
return isPrimaryKeyField(classPath, fieldName);
|
public boolean | isKnownNonManagedField(java.lang.String classPath, java.lang.String fieldName, java.lang.String fieldSig)
return !isPersistentField(classPath, fieldName);
|
public boolean | isManagedField(java.lang.String classPath, java.lang.String fieldName)
return (isPersistentField(classPath, fieldName)
|| isTransactionalField(classPath, fieldName));
|
public boolean | isPrimaryKeyField(java.lang.String classPath, java.lang.String fieldName)
final String className = pathToName(classPath);
final PersistenceFieldElement pfe
= model.getPersistenceField(className, fieldName);
if (pfe != null) {
return pfe.isKey();
} else {
return false;
}
|