Exemplo n.º 1
0
 @Override
 @Transactional
 public void saveOrUpdate(Collection<AbstractEntity> clients) {
   for (AbstractEntity payment : clients) {
     paymentDAO.saveOrUpdate((Payment) payment);
   }
 }
Exemplo n.º 2
0
 @Override
 public List<Payment> getPayments(String clientId) {
   if (StringUtils.isEmpty(clientId)) {
     return Collections.emptyList();
   }
   return paymentDAO.getPayments(clientId);
 }
Exemplo n.º 3
0
 @Override
 public List<Payment> findByContract(String contractId) {
   if (StringUtils.isEmpty(contractId)) {
     return Collections.emptyList();
   }
   List<Payment> payments = paymentDAO.findByContractId(contractId);
   for (Payment payment : payments) {
     Hibernate.initialize(payment.getContract());
   }
   return payments;
 }
Exemplo n.º 4
0
 @Override
 @Transactional()
 public void removeAll() {
   paymentDAO.deleteAll();
 }
Exemplo n.º 5
0
 @Override
 @Transactional()
 public void save(Payment payment) {
   paymentDAO.saveOrUpdate(payment);
 }