public class ShadesContactDao extends Object implements ContactDao
Constructor and Description |
---|
ShadesContactDao()
Creates a new instance of ShadesContactDao
|
Modifier and Type | Method and Description |
---|---|
int |
count(Contact filter)
Return the number of Contacts in the DB.
|
void |
delete(long id)
Delete a
Contact from the DB, given it's id. |
Iterator<Contact> |
find(QueryParam qp,
Contact filter)
Query the DB, using the supplied query details.
|
DataSource |
getDataSource() |
List<String> |
getUniqueLastNames()
Returns the list of all unique last names in the database
|
Contact |
load(long id)
Load a
Contact from the DB, given it's id. |
Contact |
save(Contact contact)
Save the contact to the DB
|
void |
setDataSource(DataSource ds) |
public ShadesContactDao()
public Contact load(long id)
ContactDao
Contact
from the DB, given it's id.load
in interface ContactDao
id
- The id of the Contact to load.public Contact save(Contact contact)
ContactDao
save
in interface ContactDao
public void delete(long id)
ContactDao
Contact
from the DB, given it's id.delete
in interface ContactDao
id
- The id of the Contact to delete.public Iterator<Contact> find(QueryParam qp, Contact filter)
ContactDao
find
in interface ContactDao
qp
- Query Paramaters to use.public int count(Contact filter)
ContactDao
count
in interface ContactDao
public List<String> getUniqueLastNames()
ContactDao
getUniqueLastNames
in interface ContactDao
public final void setDataSource(DataSource ds)
public final DataSource getDataSource()
Copyright © 2015. All rights reserved.