public class ContactDaoBean extends Object implements ContactDaoLocal
Constructor and Description |
---|
ContactDaoBean() |
Modifier and Type | Method and Description |
---|---|
void |
addContact(String name,
String email)
Persist a new Contact in the DB
|
Contact |
getContact(Long id)
Returns a specific Contact from DB
|
List<Contact> |
getContacts()
Returns the currently available contacts
|
void |
remove(Contact modelObject)
Removes a specific item from the DB
|
public List<Contact> getContacts()
getContacts
in interface ContactDaoLocal
public Contact getContact(Long id)
getContact
in interface ContactDaoLocal
id
- The Id for the Contactpublic void addContact(String name, String email)
addContact
in interface ContactDaoLocal
name
- The name of the new Contactemail
- The e-mail address of the new Contactpublic void remove(Contact modelObject)
remove
in interface ContactDaoLocal
modelObject
- The specific Contact object, which we wants to removeCopyright © 2015. All rights reserved.