|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
R
- The generic record typeP
- The generic POJO typeT
- The generic primary key typepublic interface DAO<R extends TableRecord<R>,P,T>
A generic DAO interface for a pojo and a primary key type.
This type is implemented by generated DAO classes to provide a common API for common actions on POJOs
Method Summary | |
---|---|
long |
count()
Count all records of the underlying table. |
void |
delete(Collection<P> objects)
Performs a DELETE statement for a given set of POJOs |
void |
delete(P... objects)
Performs a DELETE statement for a given set of POJOs |
void |
deleteById(Collection<T> ids)
Performs a DELETE statement for a given set of IDs |
void |
deleteById(T... ids)
Performs a DELETE statement 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 |
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 INSERT statement for a given set of POJOs |
void |
insert(P... objects)
Performs a batch INSERT statement for a given set of POJOs |
void |
insert(P object)
Performs an INSERT statement for a given POJO |
void |
update(Collection<P> objects)
Performs a batch UPDATE statement for a given set of POJOs |
void |
update(P... objects)
Performs a batch UPDATE statement for a given set of POJOs |
void |
update(P object)
Performs an UPDATE statement for a given POJO |
Method Detail |
---|
void insert(P object) throws DataAccessException
INSERT
statement for a given POJO
object
- The POJO to be inserted
DataAccessException
- if something went wrong executing the queryvoid insert(P... objects) throws DataAccessException
INSERT
statement for a given set of POJOs
objects
- The POJOs to be inserted
DataAccessException
- if something went wrong executing the queryinsert(Collection)
void insert(Collection<P> objects) throws DataAccessException
INSERT
statement for a given set of POJOs
objects
- The POJOs to be inserted
DataAccessException
- if something went wrong executing the queryinsert(Object...)
void update(P object) throws DataAccessException
UPDATE
statement for a given POJO
object
- The POJO to be updated
DataAccessException
- if something went wrong executing the queryvoid update(P... objects) throws DataAccessException
UPDATE
statement for a given set of POJOs
objects
- The POJOs to be updated
DataAccessException
- if something went wrong executing the queryupdate(Collection)
void update(Collection<P> objects) throws DataAccessException
UPDATE
statement for a given set of POJOs
objects
- The POJOs to be updated
DataAccessException
- if something went wrong executing the queryupdate(Object...)
void delete(P... objects) throws DataAccessException
DELETE
statement for a given set of POJOs
objects
- The POJOs to be deleted
DataAccessException
- if something went wrong executing the querydelete(Collection)
void delete(Collection<P> objects) throws DataAccessException
DELETE
statement for a given set of POJOs
objects
- The POJOs to be deleted
DataAccessException
- if something went wrong executing the querydelete(Object...)
void deleteById(T... ids) throws DataAccessException
DELETE
statement for a given set of IDs
ids
- The IDs to be deleted
DataAccessException
- if something went wrong executing the querydelete(Collection)
void deleteById(Collection<T> ids) throws DataAccessException
DELETE
statement for a given set of IDs
ids
- The IDs to be deleted
DataAccessException
- if something went wrong executing the querydelete(Object...)
boolean exists(P object) throws DataAccessException
object
- The POJO whose existence is checked
DataAccessException
- if something went wrong executing the queryboolean existsById(T id) throws DataAccessException
id
- The ID whose existence is checked
DataAccessException
- 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 table
null
if no record was found.
DataAccessException
- if something went wrong executing the queryTable<R> getTable()
Class<P> getType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |