Deleting Instances
A persistent-nontransactional instance transitions to
persistent-deleted if it is a parameter of deletePersistent( )
.
The values of the fields of the instance in memory are unchanged but are
saved for verification during commit. To minimize the possibility of a
conflict at commit, you can load fresh values from the datastore by
calling refresh( )
or
refreshAll( )
with the
instance as a parameter.
A hollow instance transitions to persistent-deleted if it is a
parameter of deletePersistent( )
.
Since there is no state loaded into the instance, the instance will not
be verified during commit. To force verification at commit, you should
first call refresh( )
or refreshAll( )
with the instance as a
parameter.
Get Java Data Objects now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.