Пример #1
0
 @Override
 //	@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
 //	@TransactionAttribute(TransactionAttributeType.REQUIRED)
 public ArrayList<Contact> getAllContact() {
   ArrayList<Contact> result = new ArrayList<>();
   for (Contact contact : contactDao.findAll()) {
     result.add(contact);
   }
   return result;
 }
Пример #2
0
 //	@TransactionAttribute
 @Override
 public Contact createContact(
     String nom,
     String prenom,
     String mail,
     String telephone,
     String message,
     Boolean copymessage,
     Date dateMessage,
     Contactorigine contactorigine) {
   Contact contact =
       new Contact(
           nom, prenom, mail, telephone, message, copymessage, dateMessage, contactorigine);
   contactDao.persist(contact);
   return contact;
 }
Пример #3
0
 @Override
 //	@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
 //	@TransactionAttribute(TransactionAttributeType.REQUIRED)
 public Contact getContact(Long contactId) {
   return contactDao.findById(contactId);
 }