예제 #1
0
 @Override
 @Transactional
 public Boolean save(Reader reader) {
   Reader r =
       readerDAO.findReaderByFullName(reader.getName(), reader.getSurname(), reader.getBirth());
   if (r == null) {
     readerDAO.save(reader);
     return false;
   } else {
     return true;
   }
 }
예제 #2
0
 @Override
 @Transactional
 public void update(Reader reader, Integer id) {
   Reader reader1 = findById(id);
   reader1.setPhone(reader.getPhone());
   reader1.setName(reader.getName());
   reader1.setSurname(reader.getSurname());
   reader1.setBirth(reader.getBirth());
   reader1.setAdress(reader.getAdress());
   readerDAO.update(reader1);
 }