R - The generic record type.P - The generic POJO type.T - The generic primary key type. This is a regular
            <T> type for single-column keys, or a
            Record subtype for composite keys.public interface DAO<R extends TableRecord<R>,P,T>
This type is implemented by generated DAO classes to provide a common API for common actions on POJOs
| Modifier and Type | Method and Description | 
|---|---|
| Configuration | configuration()Expose the configuration in whose context this  DAOis
 operating. | 
| long | count()Count all records of the underlying table. | 
| void | delete(Collection<P> objects)Performs a  DELETEstatement for a given set of POJOs | 
| void | delete(P... objects)Performs a  DELETEstatement for a given set of POJOs | 
| void | deleteById(Collection<T> ids)Performs a  DELETEstatement for a given set of IDs | 
| void | deleteById(T... ids)Performs a  DELETEstatement for a given set of IDs | 
| boolean | exists(P object)Checks if a given POJO exists | 
| boolean | existsById(T id)Checks if a given ID exists | 
| <Z> List<P> | fetch(Field<Z> field,
     Z... values)Find records by a given field and a set of values. | 
| <Z> P | fetchOne(Field<Z> field,
        Z value)Find a unique record by a given field and a value. | 
| List<P> | findAll()Find all records of the underlying table. | 
| P | findById(T id)Find a record of the underlying table by ID. | 
| Table<R> | getTable()Get the underlying table | 
| Class<P> | getType()Get the underlying POJO type | 
| void | insert(Collection<P> objects)Performs a batch  INSERTstatement for a given set of POJOs | 
| void | insert(P... objects)Performs a batch  INSERTstatement for a given set of POJOs | 
| void | insert(P object)Performs an  INSERTstatement for a given POJO | 
| RecordMapper<R,P> | mapper()Expose the  RecordMapperthat is used internally by thisDAOto map from records of typeRto POJOs of
 typeP. | 
| void | update(Collection<P> objects)Performs a batch  UPDATEstatement for a given set of POJOs | 
| void | update(P... objects)Performs a batch  UPDATEstatement for a given set of POJOs | 
| void | update(P object)Performs an  UPDATEstatement for a given POJO | 
Configuration configuration()
DAO is
 operating.DAO's underlying ConfigurationRecordMapper<R,P> mapper()
RecordMapper that is used internally by this
 DAO to map from records of type R to POJOs of
 type P.DAO's underlying RecordMappervoid insert(P object) throws DataAccessException
INSERT statement for a given POJOobject - The POJO to be insertedDataAccessException - if something went wrong executing the queryvoid insert(P... objects) throws DataAccessException
INSERT statement for a given set of POJOsobjects - The POJOs to be insertedDataAccessException - if something went wrong executing the queryinsert(Collection)void insert(Collection<P> objects) throws DataAccessException
INSERT statement for a given set of POJOsobjects - The POJOs to be insertedDataAccessException - if something went wrong executing the queryinsert(Object...)void update(P object) throws DataAccessException
UPDATE statement for a given POJOobject - The POJO to be updatedDataAccessException - if something went wrong executing the queryvoid update(P... objects) throws DataAccessException
UPDATE statement for a given set of POJOsobjects - The POJOs to be updatedDataAccessException - if something went wrong executing the queryupdate(Collection)void update(Collection<P> objects) throws DataAccessException
UPDATE statement for a given set of POJOsobjects - The POJOs to be updatedDataAccessException - if something went wrong executing the queryupdate(Object...)void delete(P... objects) throws DataAccessException
DELETE statement for a given set of POJOsobjects - The POJOs to be deletedDataAccessException - if something went wrong executing the querydelete(Collection)void delete(Collection<P> objects) throws DataAccessException
DELETE statement for a given set of POJOsobjects - The POJOs to be deletedDataAccessException - if something went wrong executing the querydelete(Object...)void deleteById(T... ids) throws DataAccessException
DELETE statement for a given set of IDsids - The IDs to be deletedDataAccessException - if something went wrong executing the querydelete(Collection)void deleteById(Collection<T> ids) throws DataAccessException
DELETE statement for a given set of IDsids - The IDs to be deletedDataAccessException - if something went wrong executing the querydelete(Object...)boolean exists(P object) throws DataAccessException
object - The POJO whose existence is checkedDataAccessException - if something went wrong executing the queryboolean existsById(T id) throws DataAccessException
id - The ID whose existence is checkedDataAccessException - if something went wrong executing the querylong count()
    throws DataAccessException
DataAccessException - if something went wrong executing the queryList<P> findAll() throws DataAccessException
DataAccessException - if something went wrong executing the queryP findById(T id) throws DataAccessException
id - The ID of a record in the underlying tablenull if no record was found.DataAccessException - if something went wrong executing the query<Z> List<P> fetch(Field<Z> field, Z... values) throws DataAccessException
field - The field to compare values againstvalues - The accepted valuesfield IN (values)DataAccessException - if something went wrong executing the query<Z> P fetchOne(Field<Z> field, Z value) throws DataAccessException
field - The field to compare value againstvalue - The accepted valuefield = value, or
         nullDataAccessException - This exception is thrown
             Copyright © 2015. All Rights Reserved.