protected < E extends Identifiable > List < E > findEntitiesMarkedForDeletion ( EntityManager em , Class < E > type , final int limit ) { requireArgument ( em != null , "The entity manager cannot be null." ) ; requireArgument ( type != null , "The entity cannot be null." ) ; requireArgument ( limit == - 1 || limit > 0 , "Limit if not -1, must be greater than 0." ) ; em . getEntityManagerFactory ( ) . getCache ( ) . evictAll ( ) ; return JPAEntity . findEntitiesMarkedForDeletion ( em , type , limit ) ; }
Returns a list of entities of the given type that are marked for deletion but have not yet been physically deleted .