Class ContactsEJB
- java.lang.Object
-
- info.ejava.examples.ejb.interceptor.ejb.ContactsEJB
-
- All Implemented Interfaces:
ContactsRemote
public class ContactsEJB extends Object implements ContactsRemote
-
-
Field Summary
Fields Modifier and Type Field Description private EntityManageremprivate static org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description ContactsEJB()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddContactInfo(int contactId, ContactInfo contactInfo)intcleanup()ContactcreateContact(Contact contact)ContactcreateNormalizedContact(Contact contact)This method will explicitly attempt to normalize the contact within the body of the call.voiddestroy()List<Contact>getContacts(String name, int offset, int limit)voidinit()voidtimeout(Timer timer)
-
-
-
Field Detail
-
logger
private static final org.slf4j.Logger logger
-
em
private EntityManager em
-
-
Method Detail
-
init
@PostConstruct public void init()
-
destroy
@PreDestroy public void destroy()
-
cleanup
public int cleanup()
- Specified by:
cleanupin interfaceContactsRemote
-
createContact
public Contact createContact(Contact contact) throws InvalidParam
- Specified by:
createContactin interfaceContactsRemote- Throws:
InvalidParam
-
createNormalizedContact
public Contact createNormalizedContact(Contact contact) throws InvalidParam
This method will explicitly attempt to normalize the contact within the body of the call.- Specified by:
createNormalizedContactin interfaceContactsRemote- Throws:
InvalidParam
-
addContactInfo
public void addContactInfo(int contactId, ContactInfo contactInfo) throws ContactNotFound, InvalidParam- Specified by:
addContactInfoin interfaceContactsRemote- Throws:
ContactNotFoundInvalidParam
-
getContacts
public List<Contact> getContacts(String name, int offset, int limit)
- Specified by:
getContactsin interfaceContactsRemote
-
timeout
public void timeout(Timer timer)
-
-