public class ContactsDaoJdbc extends java.lang.Object implements ContactsDao
Contacts.| Modifier and Type | Class and Description |
|---|---|
protected class |
ContactsDaoJdbc.ContactInsert
Contact Insert Object. |
protected class |
ContactsDaoJdbc.ContactSummaryInsert
ContactSummary Insert Object. |
protected class |
ContactsDaoJdbc.Frag
A single Contact is made up of many (short) rows, the db calls these
Frags. |
| Constructor and Description |
|---|
ContactsDaoJdbc() |
| Modifier and Type | Method and Description |
|---|---|
void |
addContact(Contact c)
Add this
Contact to the database. |
Contact |
getContact(int cid,
java.lang.String uuid)
Fetch a Contact from the database
|
Contact |
getContact(int cid,
java.lang.String setName,
int size,
int index)
Fetch a Contact from the database.
|
java.util.HashMap<java.lang.String,java.util.Date> |
getContactOldestMap(Chain chain)
Return a map of the oldest contacts in this chain.
|
Contact |
getNewestContact()
Fetch the newest contact we made
|
void |
setDataSource(javax.sql.DataSource ds)
Set the JDBC datasource reference
|
public void setDataSource(javax.sql.DataSource ds)
ds - The DataSource as generated by the Spring config/setup.public void addContact(Contact c)
ContactsDaoContact to the database.addContact in interface ContactsDaopublic Contact getNewestContact()
ContactsDaogetNewestContact in interface ContactsDaopublic java.util.HashMap<java.lang.String,java.util.Date> getContactOldestMap(Chain chain)
ContactsDaogetContactOldestMap in interface ContactsDaochain - The Chain to processpublic Contact getContact(int cid, java.lang.String uuid)
ContactsDaogetContact in interface ContactsDaocid - The Chain Id of the Chain to queryuuid - The uuid of the contact i.e. G-100-02public Contact getContact(int cid, java.lang.String setName, int size, int index)
ContactsDaogetContact in interface ContactsDaocid - The Chain Id of the Chain to querysetName - The name of the Setsize - The thumbnail sizeindex - which contact number in this series