protected String getCacheKeyForId(Object id) { // Because single-field id doesn't include target class name in toString() if (IdentityUtils.isSingleFieldIdentity(id)) { String targetClassName = ((SingleFieldId)id).getTargetClassName(); return cacheName + targetClassName + ":" + id.toString().hashCode(); } return cacheName + id.toString().hashCode(); } }
protected String getCacheKeyForId(Object id) { // Because single-field id doesn't include target class name in toString() if (IdentityUtils.isSingleFieldIdentity(id)) { String targetClassName = ((SingleFieldId)id).getTargetClassName(); return cacheName + targetClassName + ":" + id.toString().hashCode(); } return cacheName + id.toString().hashCode(); } }
protected String getCacheKeyForId(Object id) { if (IdentityUtils.isSingleFieldIdentity(id)) { String targetClassName = ((SingleFieldId) id).getTargetClassName(); return cacheName + targetClassName + ":" + id.toString().hashCode(); } return cacheName + id.toString().hashCode(); } }
private Cache getCacheForId(Object id) { if (IdentityUtils.isSingleFieldIdentity(id) || IdentityUtils.isDatastoreIdentity(id)) { return getCacheForClass(IdentityUtils.getTargetClassNameForIdentity(id)); } return defaultCache; } }
private Cache getCacheForId(Object id) { if (IdentityUtils.isSingleFieldIdentity(id) || IdentityUtils.isDatastoreIdentity(id)) { return getCacheForClass(IdentityUtils.getTargetClassNameForIdentity(id)); } return defaultCache; } }
@Override public String getClassNameForObjectID(Object id, ClassLoaderResolver clr, ExecutionContext ec) { String targetClassName = null; if (IdentityUtils.isSingleFieldIdentity(id)) { // Using SingleFieldIdentity so can assume that object is of the target class or a subclass targetClassName = IdentityUtils.getTargetClassNameForIdentity(id); String[] subclasses = getMetaDataManager().getSubclassesForClass(targetClassName, true); if (subclasses == null) { // No subclasses so must be the specified type return targetClassName; } String[] possibleNames = new String[subclasses.length+1]; possibleNames[0] = targetClassName; for (int i=0;i<subclasses.length;i++) { possibleNames[i+1] = subclasses[i]; } return getClassNameForIdentity(ec, possibleNames, id); } return super.getClassNameForObjectID(id, clr, ec); }
if (IdentityUtils.isSingleFieldIdentity(id) && (cmd.getIdentityType() != IdentityType.APPLICATION || !cmd.getObjectidClass().equals(id.getClass().getName())))
if (IdentityUtils.isSingleFieldIdentity(id))
if (IdentityUtils.isDatastoreIdentity(oid) || IdentityUtils.isSingleFieldIdentity(oid)) else if (IdentityUtils.isSingleFieldIdentity(oid))
else if (IdentityUtils.isSingleFieldIdentity(value))
else if (IdentityUtils.isSingleFieldIdentity(value))
else if (IdentityUtils.isSingleFieldIdentity(value))
if (IdentityUtils.isSingleFieldIdentity(id) && javaTypeMappings.length > 1)