private ZooPC checkObjectForRefresh ( Object pc ) { if ( ! ( pc instanceof ZooPC ) ) { throw DBLogger . newUser ( "The object is not persistent capable: " + pc . getClass ( ) ) ; } ZooPC pci = ( ZooPC ) pc ; if ( ! pci . jdoZooIsPersistent ( ) ) { return pci ; } if ( pci . jdoZooGetContext ( ) . getSession ( ) != this ) { throw DBLogger . newUser ( "The object belongs to a different PersistenceManager." ) ; } return pci ; }
For refresh we can ignore things like deletion or transience .