/** * Return the version of the instance. * @since 2.0 * @param pc the instance * @return the version of the instance */ public static Object getVersion (Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoGetVersion(); } else { return implHelper.nonBinaryCompatibleGet(pc, getVersion); } } /** Tests whether the parameter instance is dirty.
/** * Return the version of the instance. * @since 2.0 * @param pc the instance * @return the version of the instance */ public static Object getVersion (Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoGetVersion(); } else { return implHelper.nonBinaryCompatibleGet(pc, getVersion); } } /** Tests whether the parameter instance is dirty.
/** Return a copy of the JDO identity associated with the parameter * instance. * * @see PersistenceCapable#jdoGetTransactionalObjectId() * @see PersistenceManager#getObjectById(Object oid, boolean validate) * @param pc the <code>PersistenceCapable</code> instance. * @return a copy of the ObjectId of the parameter instance as modified in * this transaction. */ public static Object getTransactionalObjectId(Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoGetTransactionalObjectId(); } else { return implHelper.nonBinaryCompatibleGet( pc, getTransactionalObjectId); } }
/** Return a copy of the JDO identity associated with the parameter * instance. * * @see PersistenceCapable#jdoGetTransactionalObjectId() * @see PersistenceManager#getObjectById(Object oid, boolean validate) * @param pc the <code>PersistenceCapable</code> instance. * @return a copy of the ObjectId of the parameter instance as modified in * this transaction. */ public static Object getTransactionalObjectId(Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoGetTransactionalObjectId(); } else { return implHelper.nonBinaryCompatibleGet( pc, getTransactionalObjectId); } }
/** Return the associated <code>PersistenceManager</code> if there is one. * Transactional and persistent instances return the associated * <code>PersistenceManager</code>. * * <P>Transient non-transactional instances and instances of classes * that do not implement <code>PersistenceCapable</code> return * <code>null</code>. * @see PersistenceCapable#jdoGetPersistenceManager() * @param pc the <code>PersistenceCapable</code> instance. * @return the <code>PersistenceManager</code> associated with the parameter * instance. */ public static PersistenceManager getPersistenceManager(Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoGetPersistenceManager(); } else { return (PersistenceManager) implHelper.nonBinaryCompatibleGet(pc, getPersistenceManager); } }
/** Return the associated <code>PersistenceManager</code> if there is one. * Transactional and persistent instances return the associated * <code>PersistenceManager</code>. * * <P>Transient non-transactional instances and instances of classes * that do not implement <code>PersistenceCapable</code> return * <code>null</code>. * @see PersistenceCapable#jdoGetPersistenceManager() * @param pc the <code>PersistenceCapable</code> instance. * @return the <code>PersistenceManager</code> associated with the parameter * instance. */ public static PersistenceManager getPersistenceManager(Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoGetPersistenceManager(); } else { return (PersistenceManager) implHelper.nonBinaryCompatibleGet(pc, getPersistenceManager); } }
return ((PersistenceCapable)pc).jdoGetObjectId(); } else { return implHelper.nonBinaryCompatibleGet(pc, getObjectId);
return ((PersistenceCapable)pc).jdoGetObjectId(); } else { return implHelper.nonBinaryCompatibleGet(pc, getObjectId);