use of org.datanucleus.store.rdbms.exceptions.NoSuchPersistentFieldException in project datanucleus-rdbms by datanucleus.
the class ClassTable method getMemberMapping.
/**
* Accessor for the field mapping for the named field.
* The field may exist in a parent table or a secondary table.
* Throws a NoSuchPersistentFieldException if the field name is not found.
* TODO Use of this is discouraged since the fieldName is not fully qualified
* and if a superclass-table inheritance is used we could have 2 fields of that name here.
* @param memberName Name of field/property
* @return The mapping.
* @throws NoSuchPersistentFieldException Thrown when the field/property is not found
*/
public JavaTypeMapping getMemberMapping(String memberName) {
assertIsInitialized();
AbstractMemberMetaData mmd = getMetaDataForMember(memberName);
JavaTypeMapping m = getMemberMapping(mmd);
if (m == null) {
throw new NoSuchPersistentFieldException(cmd.getFullClassName(), memberName);
}
return m;
}
use of org.datanucleus.store.rdbms.exceptions.NoSuchPersistentFieldException in project datanucleus-rdbms by datanucleus.
the class ClassView method getMemberMapping.
/**
* Accessor for the mapping for the specified field/property.
* @param mmd Metadata for the field/property
* @return The Mapping for the field.
*/
public JavaTypeMapping getMemberMapping(AbstractMemberMetaData mmd) {
assertIsInitialized();
JavaTypeMapping m = fieldMappings[mmd.getAbsoluteFieldNumber()];
if (m == null) {
throw new NoSuchPersistentFieldException(cmd.getFullClassName(), mmd.getAbsoluteFieldNumber());
}
return m;
}
Aggregations