/** Tests whether the parameter instance is persistent. * * Instances that represent persistent objects in the data store * return <code>true</code>. * *<P>Transient instances and instances of classes that do not implement * <code>PersistenceCapable</code> return <code>false</code>. *<P> * @see PersistenceManager#makePersistent(Object pc) * @see PersistenceCapable#jdoIsPersistent() * @param pc the <code>PersistenceCapable</code> instance. * @return <code>true</code> if the parameter instance is persistent. */ public static boolean isPersistent(Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoIsPersistent(); } else { return implHelper.nonBinaryCompatibleIs(pc, isPersistent); } }
/** Tests whether the parameter instance is transactional. * * Instances whose state is associated with the current transaction * return true. * *<P>Transient instances and instances of classes that do not implement * <code>PersistenceCapable</code> return <code>false</code>. * @see PersistenceCapable#jdoIsTransactional() * @param pc the <code>PersistenceCapable</code> instance. * @return <code>true</code> if the parameter instance is transactional. */ public static boolean isTransactional(Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoIsTransactional(); } else { return implHelper.nonBinaryCompatibleIs(pc, isTransactional); } }
/** * Tests whether the parameter instance has been detached. * * Instances that have been detached return true. * * <P>Transient instances return false. * <P> * @see PersistenceCapable#jdoIsDetached() * @return <code>true</code> if this instance is detached. * @since 2.0 * @param pc the instance */ public static boolean isDetached(Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoIsDetached(); } else { return implHelper.nonBinaryCompatibleIs(pc, isDetached); } }
/** Tests whether the parameter instance is transactional. * * Instances whose state is associated with the current transaction * return true. * *<P>Transient instances and instances of classes that do not implement * <code>PersistenceCapable</code> return <code>false</code>. * @see PersistenceCapable#jdoIsTransactional() * @param pc the <code>PersistenceCapable</code> instance. * @return <code>true</code> if the parameter instance is transactional. */ public static boolean isTransactional(Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoIsTransactional(); } else { return implHelper.nonBinaryCompatibleIs(pc, isTransactional); } }
/** * Tests whether the parameter instance has been detached. * * Instances that have been detached return true. * * <P>Transient instances return false. * <P> * @see PersistenceCapable#jdoIsDetached() * @return <code>true</code> if this instance is detached. * @since 2.0 * @param pc the instance */ public static boolean isDetached(Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoIsDetached(); } else { return implHelper.nonBinaryCompatibleIs(pc, isDetached); } }
/** Tests whether the parameter instance is persistent. * * Instances that represent persistent objects in the data store * return <code>true</code>. * *<P>Transient instances and instances of classes that do not implement * <code>PersistenceCapable</code> return <code>false</code>. *<P> * @see PersistenceManager#makePersistent(Object pc) * @see PersistenceCapable#jdoIsPersistent() * @param pc the <code>PersistenceCapable</code> instance. * @return <code>true</code> if the parameter instance is persistent. */ public static boolean isPersistent(Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoIsPersistent(); } else { return implHelper.nonBinaryCompatibleIs(pc, isPersistent); } }
/** Tests whether the parameter instance has been newly made persistent. * * Instances that have been made persistent in the current transaction * return <code>true</code>. * *<P>Transient instances and instances of classes that do not implement * <code>PersistenceCapable</code> return <code>false</code>. *<P> * @see PersistenceManager#makePersistent(Object pc) * @see PersistenceCapable#jdoIsNew() * @param pc the <code>PersistenceCapable</code> instance. * @return <code>true</code> if the parameter instance was made persistent * in the current transaction. */ public static boolean isNew(Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoIsNew(); } else { return implHelper.nonBinaryCompatibleIs(pc, isNew); } }
/** Tests whether the parameter instance has been deleted. * * Instances that have been deleted in the current transaction return * <code>true</code>. * *<P>Transient instances and instances of classes that do not implement * <code>PersistenceCapable</code> return <code>false</code>. *<P> * @see PersistenceManager#deletePersistent(Object pc) * @see PersistenceCapable#jdoIsDeleted() * @param pc the <code>PersistenceCapable</code> instance. * @return <code>true</code> if the parameter instance was deleted * in the current transaction. */ public static boolean isDeleted(Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoIsDeleted(); } else { return implHelper.nonBinaryCompatibleIs(pc, isDeleted); } }
/** Tests whether the parameter instance has been newly made persistent. * * Instances that have been made persistent in the current transaction * return <code>true</code>. * *<P>Transient instances and instances of classes that do not implement * <code>PersistenceCapable</code> return <code>false</code>. *<P> * @see PersistenceManager#makePersistent(Object pc) * @see PersistenceCapable#jdoIsNew() * @param pc the <code>PersistenceCapable</code> instance. * @return <code>true</code> if the parameter instance was made persistent * in the current transaction. */ public static boolean isNew(Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoIsNew(); } else { return implHelper.nonBinaryCompatibleIs(pc, isNew); } }
/** Tests whether the parameter instance has been deleted. * * Instances that have been deleted in the current transaction return * <code>true</code>. * *<P>Transient instances and instances of classes that do not implement * <code>PersistenceCapable</code> return <code>false</code>. *<P> * @see PersistenceManager#deletePersistent(Object pc) * @see PersistenceCapable#jdoIsDeleted() * @param pc the <code>PersistenceCapable</code> instance. * @return <code>true</code> if the parameter instance was deleted * in the current transaction. */ public static boolean isDeleted(Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoIsDeleted(); } else { return implHelper.nonBinaryCompatibleIs(pc, isDeleted); } }
/** Tests whether the parameter instance is dirty. * * Instances that have been modified, deleted, or newly * made persistent in the current transaction return <code>true</code>. * *<P>Transient instances and instances of classes that do not implement * <code>PersistenceCapable</code> return <code>false</code>. *<P> * @see javax.jdo.spi.StateManager#makeDirty(PersistenceCapable pc, * String fieldName) * @see PersistenceCapable#jdoIsDirty() * @param pc the <code>PersistenceCapable</code> instance. * @return <code>true</code> if the parameter instance has been modified in * the current transaction. */ public static boolean isDirty(Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoIsDirty(); } else { return implHelper.nonBinaryCompatibleIs(pc, isDirty); } }
/** Tests whether the parameter instance is dirty. * * Instances that have been modified, deleted, or newly * made persistent in the current transaction return <code>true</code>. * *<P>Transient instances and instances of classes that do not implement * <code>PersistenceCapable</code> return <code>false</code>. *<P> * @see javax.jdo.spi.StateManager#makeDirty(PersistenceCapable pc, * String fieldName) * @see PersistenceCapable#jdoIsDirty() * @param pc the <code>PersistenceCapable</code> instance. * @return <code>true</code> if the parameter instance has been modified in * the current transaction. */ public static boolean isDirty(Object pc) { if (pc instanceof PersistenceCapable) { return ((PersistenceCapable)pc).jdoIsDirty(); } else { return implHelper.nonBinaryCompatibleIs(pc, isDirty); } }