JDOPersistentObjectItf jdopo = (JDOPersistentObjectItf) po;
//check the meta info about the detachability of the class
if(jdopo.jdoIsPersistent()){
if(jdopo.jdoIsDeleted()){
//persistent_deleted
if(!jdopo.jdoIsNew())
throw new JDOUserException("This object cannot be detached: it has been deleted from the datastore.");
}
}
else{
//makePersistent