/** * Initialisation. * @param mmd MetaData for the field/property * @param table datastore container (table) * @param clr ClassLoader resolver */ public void initialize(AbstractMemberMetaData mmd, Table table, ClassLoaderResolver clr) { super.initialize(mmd, table, clr); if (mmd.getType().isInterface() && mmd.getFieldTypes() != null && mmd.getFieldTypes().length == 1) { // Field is an interface but field-type is specified with one value only so try to impose that // This is of particular use where the JDO2 TCK has fields defined as interfaces and the field-type // as the persistent-interface type, forcing the persistence of the property. Class fieldTypeCls = clr.classForName(mmd.getFieldTypes()[0]); if (fieldTypeCls.isInterface()) { type = mmd.getFieldTypes()[0]; } } }
else if (mmd != null && mmd.getFieldTypes() != null && mmd.getFieldTypes().length == 1) isPersistentInterface = mmgr.isPersistentInterface(mmd.getFieldTypes()[0]); if (isPersistentInterface) mappingJavaType = clr.classForName(mmd.getFieldTypes()[0]);
if (mmd.getFieldTypes() != null && mmd.getFieldTypes().length == 1) fieldTypeName = mmd.getFieldTypes()[0];
String[] fieldTypes = mmd.getFieldTypes(); if (fieldTypes != null)
if (mmd.getFieldTypes() != null || mmd.hasExtension(MetaData.EXTENSION_MEMBER_IMPLEMENTATION_CLASSES))
String[] fieldTypes = mmd.getFieldTypes(); if(fieldTypes != null && fieldTypes.length > 0)
if (mmd.getFieldTypes() != null && mmd.getFieldTypes().length > 0) embeddedType = ec.getClassLoaderResolver().classForName(mmd.getFieldTypes()[0]);
String[] fieldTypes = mmd.getFieldTypes(); if (fieldTypes != null && fieldTypes.length == 1) if (rootEmbCmd == null && mmd.getFieldTypes() != null && mmd.getFieldTypes().length == 1) rootEmbCmd = mmgr.getMetaDataForInterface(clr.classForName(mmd.getFieldTypes()[0]), clr);
if (mmd.getType().isInterface()) if (mmd.getFieldTypes() != null && mmd.getFieldTypes().length == 1) Class fldTypeCls = clr.classForName(mmd.getFieldTypes()[0]); if (fldTypeCls.isInterface()) clsNames = mmgr.getClassesImplementingInterface(mmd.getFieldTypes()[0], clr); clsNames = new String[] {mmd.getFieldTypes()[0]};