public class ContactsDaoJdbc extends java.lang.Object implements ContactsDao
Contact
s.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
Frag s. |
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)
ContactsDao
Contact
to the database.addContact
in interface ContactsDao
public Contact getNewestContact()
ContactsDao
getNewestContact
in interface ContactsDao
public java.util.HashMap<java.lang.String,java.util.Date> getContactOldestMap(Chain chain)
ContactsDao
getContactOldestMap
in interface ContactsDao
chain
- The Chain to processpublic Contact getContact(int cid, java.lang.String uuid)
ContactsDao
getContact
in interface ContactsDao
cid
- 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)
ContactsDao
getContact
in interface ContactsDao
cid
- The Chain Id of the Chain to querysetName
- The name of the Setsize
- The thumbnail sizeindex
- which contact number in this series