All pastes #2466966 Raw Edit

Miscellany

public unlisted java v1 · immutable
#2466966 ·published 2013-10-15 15:49 UTC
rendered paste body
        public boolean deleteBox(Long id){            Boxes box = new Boxes();             box = entityManager.find(Boxes.class, id);             entityManager.remove(box);             if(box==null){                 return true;             }else{                 return false;             }        }public void remove(EntityId id) throws EntityNotFoundException, TransactionRequiredException {  Entity entity = findbyId(id);  try {    entityManager.remove(entity);   }  catch(IllegalArgumentException e) {    log.warn(e.getMessage());    throw new EntityNotFoundException(e);  }  catch(TransactionRequiredException e) {    log.warn(e.getMessage());    throw e;  }}