candidateCmd = null;
}
else
{
MappedStoreManager storeMgr = (MappedStoreManager)om.getStoreManager();
DatastoreAdapter dba = storeMgr.getDatastoreAdapter();
candidateCmd = om.getMetaDataManager().getMetaDataForClass(candidateClass,om.getClassLoaderResolver());
if (candidateCmd == null)
{
throw new ClassNotPersistenceCapableException(candidateClass.getName());
}
if (candidateCmd.getPersistenceCapableSuperclass() != null)
{
throw new PersistentSuperclassNotAllowedException(candidateClass.getName());
}
if (candidateCmd.isRequiresExtent())
{
throw new JPOXUserException(LOCALISER_RDBMS.msg("060000",
candidateClass.getName()));
}
if (candidateCmd.getIdentityType() != IdentityType.NONDURABLE)
{
throw new JPOXUserException(LOCALISER_RDBMS.msg("060001",
candidateClass.getName()));
}
int fieldCount = candidateCmd.getNoOfManagedMembers();
int[] fn = new int[fieldCount];
statementExpressionIndex = new StatementExpressionIndex[fieldCount];
fieldColumnNames = new ArrayList(fieldCount);
int n = 0;
for (int fieldNumber = 0; fieldNumber < fieldCount; ++fieldNumber)
{
statementExpressionIndex[fieldNumber] = new StatementExpressionIndex();
AbstractMemberMetaData fmd = candidateCmd.getMetaDataForManagedMemberAtPosition(fieldNumber);
String fieldName = fmd.getName();
Class fieldType = fmd.getType();
if (fmd.getPersistenceModifier() == FieldPersistenceModifier.PERSISTENT)
{
JavaTypeMapping m = dba.getMapping(fieldType, storeMgr, om.getClassLoaderResolver());
if (m.includeInFetchStatement())
{
statementExpressionIndex[fieldNumber].setMapping(m);
fn[n++] = fieldNumber;