899091929394959697
datastore.put(entity); tx.commit(); } catch (EntityNotFoundException e) { e.printStackTrace(); throw new DAOException("Entity not found"); } }
117118119120121122123124
134135136137138139140141
datastore.put(entity); tx.commit(); } catch (Exception e) { e.printStackTrace(); throw new DAOException(); } }
177178179180181182183184
notesList.setNotes(notes); return notesList; } catch (EntityNotFoundException e) { e.printStackTrace(); throw new DAOException("Entity not found!"); } }
189190191192193194195196
Entity entity = datastore.get(key); Note note = Transformer.entity2Note(entity); return note; } catch (EntityNotFoundException e) { e.printStackTrace(); throw new DAOException(); } }
105106107108109110111112113114
em.getTransaction().commit(); } catch (Exception ex) { em.getTransaction().rollback(); ex.printStackTrace(); throw new DAOException(); } finally { em.close(); } }
125126127128129130131132133134
notesList.getNotes().remove(note); em.getTransaction().commit(); }catch (Exception ex) { em.getTransaction().rollback(); throw new DAOException(); } finally { em.close(); } }