public class ContactDaoBean extends Object implements ContactDao
Constructor and Description |
---|
ContactDaoBean() |
Modifier and Type | Method and Description |
---|---|
void |
addContact(String name,
String email)
Add a new Contact.
|
Contact |
getContact(Long id)
Get Contact by ID.
|
List<Contact> |
getContacts()
Returns the currently available contacts.
|
void |
remove(Contact modelObject)
Remove a Contact.
|
public List<Contact> getContacts()
ContactDao
getContacts
in interface ContactDao
public Contact getContact(Long id)
getContact
in interface ContactDao
id
- The Id for the Contactpublic void addContact(String name, String email)
addContact
in interface ContactDao
name
- The name of the new Contactemail
- The e-mail address of the new Contactpublic void remove(Contact modelObject)
remove
in interface ContactDao
modelObject
- The specific Contact object, which we wants to removeCopyright © 2006–2021 Apache Software Foundation. All rights reserved.