public boolean isUnknownPrimaryKey() { String keyName = getPrimaryKeyName(); if (keyName == null) return false; //test whether it is unknown or we have the WAS generated key for the unknown prim key boolean genTest = keyName.equals(UNKNOWN_PRIMARY_KEY) || keyName.equals(WAS_GENERATED_STRING_KEY); if (genTest) return true; //Lastly, test for the findByPrimaryKey(Object) method on the home. JavaClass home = getHomeInterface(); if (home == null) home = getLocalHomeInterface(); if (home == null) return false; List parmType = new ArrayList(1); parmType.add(UNKNOWN_PRIMARY_KEY); return home.getMethodExtended(FIND_BY_PRIM_KEY_METHOD_NAME, parmType) != null; } /**
public org.eclipse.emf.ecore.EClassifier getAccessorType() { if (getEjbClass() != null) { Method getter = getEjbClass().getMethodExtended(getGetterName(), Collections.EMPTY_LIST); if (getter != null) return getter.getReturnType(); } return null; } public ContainerManagedEntity getCMPEntity() {
public EClassifier get20Type() { EClassifier type = null; if (getEjbClass() != null) { String getterName = getGetterName(); if (getterName != null && getterName.length() > 0) { Method getter = getEjbClass().getMethodExtended(getterName, Collections.EMPTY_LIST); if (getter != null) type = getter.getReturnType(); } } if (type == null) type = getKeyFieldTypeFromKeyClass(); return type; } /**