Class ShadesContactDao

  • All Implemented Interfaces:
    ContactDao

    public class ShadesContactDao
    extends Object
    implements ContactDao
    Author:
    Geoffrey Rummens Hendrey
    • Constructor Detail

      • ShadesContactDao

        public ShadesContactDao()
        Creates a new instance of ShadesContactDao
    • Method Detail

      • load

        public Contact load​(long id)
        Description copied from interface: ContactDao
        Load a Contact from the DB, given it's id.
        Specified by:
        load in interface ContactDao
        Parameters:
        id - The id of the Contact to load.
        Returns:
        Contact
      • save

        public Contact save​(Contact contact)
        Description copied from interface: ContactDao
        Save the contact to the DB
        Specified by:
        save in interface ContactDao
        Returns:
        persistent instance of contact
      • delete

        public void delete​(long id)
        Description copied from interface: ContactDao
        Delete a Contact from the DB, given it's id.
        Specified by:
        delete in interface ContactDao
        Parameters:
        id - The id of the Contact to delete.
      • find

        public Iterator<Contact> find​(QueryParam qp,
                                      Contact filter)
        Description copied from interface: ContactDao
        Query the DB, using the supplied query details.
        Specified by:
        find in interface ContactDao
        Parameters:
        qp - Query Paramaters to use.
        Returns:
        The results of the query as an Iterator.
      • count

        public int count​(Contact filter)
        Description copied from interface: ContactDao
        Return the number of Contacts in the DB.
        Specified by:
        count in interface ContactDao
        Returns:
        count
      • getUniqueLastNames

        public List<String> getUniqueLastNames()
        Description copied from interface: ContactDao
        Returns the list of all unique last names in the database
        Specified by:
        getUniqueLastNames in interface ContactDao
        Returns:
        the list of all unique last names in the database
      • setDataSource

        public final void setDataSource​(DataSource ds)
      • getDataSource

        public final DataSource getDataSource()