public Object copyDataStoreId(Object oid, ClassMetaData meta) { Id id = (Id) oid; return new Id(meta.getDescribedType(), id.getId(), id.hasSubclasses()); }
public Object copyDataStoreId(Object oid, ClassMetaData meta) { Id id = (Id) oid; return new Id(meta.getDescribedType(), id.getId(), id.hasSubclasses()); }
public Object copyDataStoreId(Object oid, ClassMetaData meta) { Id id = (Id) oid; return new Id(meta.getDescribedType(), id.getId(), id.hasSubclasses()); }
public Object copyDataStoreId(Object oid, ClassMetaData meta) { Id id = (Id) oid; return new Id(meta.getDescribedType(), id.getId(), id.hasSubclasses()); }
public Object copyDataStoreId(Object oid, ClassMetaData meta) { Id id = (Id) oid; return new Id(meta.getDescribedType(), id.getId(), id.hasSubclasses()); }
public Object copyDataStoreId(Object oid, ClassMetaData meta) { Id id = (Id) oid; return new Id(meta.getDescribedType(), id.getId(), id.hasSubclasses()); }
public Object copyDataStoreId(Object oid, ClassMetaData meta) { Id id = (Id) oid; return new Id(meta.getDescribedType(), id.getId(), id.hasSubclasses()); }
public Object copyDataStoreId(Object oid, ClassMetaData meta) { Id id = (Id) oid; return new Id(meta.getDescribedType(), id.getId(), id.hasSubclasses()); }
public Object copyDataStoreId(Object oid, ClassMetaData meta) { Id id = (Id) oid; return new Id(meta.getDescribedType(), id.getId(), id.hasSubclasses()); }
public Object copyDataStoreId(Object oid, ClassMetaData meta) { Id id = (Id) oid; return new Id(meta.getDescribedType(), id.getId(), id.hasSubclasses()); }
private Object[] getPKValues(OpenJPAStateManager sm, JDBCStore store) { Object[] pks = null; Object oid = sm.getObjectId(); if (_mapping.getIdentityType() == ClassMapping.ID_APPLICATION) pks = ApplicationIds.toPKValues(oid, _mapping); Object[] val = new Object[_pkCols.length]; int count = 0; for (int i = 0; i < _pkCols.length; i++, count++) { if (pks == null) val[0] = (oid == null) ? null : ((Id) oid).getId(); else { val[i] = _joins[i].getJoinValue(pks[_pkIndices[i]], _pkCols[i], store); } } return val; }
private Object[] getPKValues(OpenJPAStateManager sm, JDBCStore store) { Object[] pks = null; Object oid = sm.getObjectId(); if (_mapping.getIdentityType() == ClassMapping.ID_APPLICATION) pks = ApplicationIds.toPKValues(oid, _mapping); Object[] val = new Object[_pkCols.length]; int count = 0; for (int i = 0; i < _pkCols.length; i++, count++) { if (pks == null) val[0] = (oid == null) ? null : ((Id) oid).getId(); else { val[i] = _joins[i].getJoinValue(pks[_pkIndices[i]], _pkCols[i], store); } } return val; }
private Object[] getPKValues(OpenJPAStateManager sm, JDBCStore store) { Object[] pks = null; Object oid = sm.getObjectId(); if (_mapping.getIdentityType() == ClassMapping.ID_APPLICATION) pks = ApplicationIds.toPKValues(oid, _mapping); Object[] val = new Object[_pkCols.length]; int count = 0; for (int i = 0; i < _pkCols.length; i++, count++) { if (pks == null) val[0] = (oid == null) ? null : ((Id) oid).getId(); else { val[i] = _joins[i].getJoinValue(pks[_pkIndices[i]], _pkCols[i], store); } } return val; }
private Object[] getPKValues(OpenJPAStateManager sm, JDBCStore store) { Object[] pks = null; Object oid = sm.getObjectId(); if (_mapping.getIdentityType() == ClassMapping.ID_APPLICATION) pks = ApplicationIds.toPKValues(oid, _mapping); Object[] val = new Object[_pkCols.length]; int count = 0; for (int i = 0; i < _pkCols.length; i++, count++) { if (pks == null) val[0] = (oid == null) ? null : ((Id) oid).getId(); else { val[i] = _joins[i].getJoinValue(pks[_pkIndices[i]], _pkCols[i], store); } } return val; }
/** * Extract the oid value from the given result. If the next oid is the * same as the given one, returns the given JVM instance. */ private Object getNextObjectId(ClassMapping owner, JDBCStore store, Result res, Object oid) throws SQLException { // if this is a datastore id class we can avoid creating a new oid // object for the common case if (oid != null && owner.getIdentityType() == ClassMapping.ID_DATASTORE && owner.isPrimaryKeyObjectId(true)) { long nid = res.getLong(owner.getPrimaryKeyColumns()[0]); long id = ((Id) oid).getId(); return (nid == id) ? oid : store.newDataStoreId(nid, owner, true); } Object noid = owner.getObjectId(store, res, null, true, null); if (noid == null) return null; return (noid.equals(oid)) ? oid : noid; }
/** * Extract the oid value from the given result. If the next oid is the * same as the given one, returns the given JVM instance. */ private Object getNextObjectId(ClassMapping owner, JDBCStore store, Result res, Object oid) throws SQLException { // if this is a datastore id class we can avoid creating a new oid // object for the common case if (oid != null && owner.getIdentityType() == ClassMapping.ID_DATASTORE && owner.isPrimaryKeyObjectId(true)) { long nid = res.getLong(owner.getPrimaryKeyColumns()[0]); long id = ((Id) oid).getId(); return (nid == id) ? oid : store.newDataStoreId(nid, owner, true); } Object noid = owner.getObjectId(store, res, null, true, null); if (noid == null) return null; return (noid.equals(oid)) ? oid : noid; }
/** * Extract the oid value from the given result. If the next oid is the * same as the given one, returns the given JVM instance. */ private Object getNextObjectId(ClassMapping owner, JDBCStore store, Result res, Object oid) throws SQLException { // if this is a datastore id class we can avoid creating a new oid // object for the common case if (oid != null && owner.getIdentityType() == ClassMapping.ID_DATASTORE && owner.isPrimaryKeyObjectId(true)) { long nid = res.getLong(owner.getPrimaryKeyColumns()[0]); long id = ((Id) oid).getId(); return (nid == id) ? oid : store.newDataStoreId(nid, owner, true); } Object noid = owner.getObjectId(store, res, null, true, null); if (noid == null) return null; return (noid.equals(oid)) ? oid : noid; }
/** * Extract the oid value from the given result. If the next oid is the * same as the given one, returns the given JVM instance. */ private Object getNextObjectId(ClassMapping owner, JDBCStore store, Result res, Object oid) throws SQLException { // if this is a datastore id class we can avoid creating a new oid // object for the common case if (oid != null && owner.getIdentityType() == ClassMapping.ID_DATASTORE && owner.isPrimaryKeyObjectId(true)) { long nid = res.getLong(owner.getPrimaryKeyColumns()[0]); long id = ((Id) oid).getId(); return (nid == id) ? oid : store.newDataStoreId(nid, owner, true); } Object noid = owner.getObjectId(store, res, null, true, null); if (noid == null) return null; return (noid.equals(oid)) ? oid : noid; }
/** * Extract the oid value from the given result. If the next oid is the * same as the given one, returns the given JVM instance. */ private Object getNextObjectId(ClassMapping owner, JDBCStore store, Result res, Object oid) throws SQLException { // if this is a datastore id class we can avoid creating a new oid // object for the common case if (oid != null && owner.getIdentityType() == ClassMapping.ID_DATASTORE && owner.isPrimaryKeyObjectId(true)) { long nid = res.getLong(owner.getPrimaryKeyColumns()[0]); long id = ((Id) oid).getId(); return (nid == id) ? oid : store.newDataStoreId(nid, owner, true); } Object noid = owner.getObjectId(store, res, null, true, null); if (noid == null) return null; return (noid.equals(oid)) ? oid : noid; }
if (mapping.getIdentityType() == mapping.ID_DATASTORE) { if (val instanceof Id) return ((Id) val).getId(); return Filters.convert(val, long.class);