- All Implemented Interfaces:
- DAO<R,- P, - T> 
DAO.
 
 Unlike many other elements in the jOOQ API, DAO may be used in
 the context of Spring, CDI, or EJB lifecycle management. This means that no
 methods in the DAO type hierarchy must be made final. See also
 https://github.com/jOOQ/
 jOOQ/issues/4696 for more details.
- Author:
- Lukas Eder
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected TcompositeKeyRecord(Object... values) Expose the configuration in whose context thisDAOis operating.longcount()Count all records of the underlying table.ctx()voiddelete(Collection<P> objects) Performs aDELETEstatement for a given set of POJOs.voidPerforms aDELETEstatement for a POJOvoidPerforms aDELETEstatement for a given set of POJOs.voiddeleteById(Collection<T> ids) Performs aDELETEstatement for a given set of IDs.voiddeleteById(T ids) Performs aDELETEstatement for a given set of IDs.voiddeleteById(T... ids) Performs aDELETEstatement for a given set of IDs.dialect()TheSQLDialectwrapped by this context.booleanChecks if a given POJO exists.booleanexistsById(T id) Checks if a given ID exists.family()TheSQLDialect.family()wrapped by this context.fetch(Field<Z> field, Collection<? extends Z> values) Find records by a given field and a set of values.Find records by a given field and a set of values.<Z> PFind a unique record by a given field and a value.fetchOptional(Field<Z> field, Z value) Find a unique record by a given field and a value.fetchRange(Field<Z> field, Z lowerInclusive, Z upperInclusive) Find records by a given field and a range of values.findAll()Find all records of the underlying table.Find a record of the underlying table by ID.findOptionalById(T id) Find a record of the underlying table by ID.getTable()Get the underlying table.getType()Get the underlying POJO type.voidinsert(Collection<P> objects) Performs a batchINSERTstatement for a given set of POJOs.voidPerforms anINSERTstatement for a given POJO.voidPerforms a batchINSERTstatement for a given set of POJOs.mapper()Expose theRecordMapperthat is used internally by thisDAOto map from records of typeRto POJOs of typeP.voidmerge(Collection<P> objects) Performs a batchMERGEstatement for a given set of POJOs.voidPerforms anMERGEstatement for a given POJO.voidPerforms a batchMERGEstatement for a given set of POJOs.voidsetConfiguration(Configuration configuration) Inject a configuration.settings()The settings wrapped by this context.voidupdate(Collection<P> objects) Performs a batchUPDATEstatement for a given set of POJOs.voidPerforms anUPDATEstatement for a given POJO.voidPerforms a batchUPDATEstatement for a given set of POJOs.
- 
Constructor Details- 
DAOImpl
- 
DAOImpl
 
- 
- 
Method Details- 
setConfigurationInject a configuration.This method is maintained to be able to configure a DAOusing Spring. It is not exposed in the public API.
- 
ctx
- 
configurationDescription copied from interface:DAOExpose the configuration in whose context thisDAOis operating.- Specified by:
- configurationin interface- DAO<R extends UpdatableRecord<R>,- P, - T> 
- Returns:
- the DAO's underlyingConfiguration
 
- 
settingsDescription copied from interface:DAOThe settings wrapped by this context.This method is a convenient way of accessing configuration().settings().
- 
dialectDescription copied from interface:DAOTheSQLDialectwrapped by this context.This method is a convenient way of accessing configuration().dialect().
- 
familyDescription copied from interface:DAOTheSQLDialect.family()wrapped by this context.This method is a convenient way of accessing configuration().family().
- 
mapperExpose theRecordMapperthat is used internally by thisDAOto map from records of typeRto POJOs of typeP.Subclasses may override this method to provide custom implementations. 
- 
insertDescription copied from interface:DAOPerforms anINSERTstatement for a given POJO.Depending on various settings, like Settings.isReturnRecordToPojo(),Settings.isReturnIdentityOnUpdatableRecord(),Settings.isReturnAllOnUpdatableRecord(), and others, the argument POJO, if mutable, will receive any server side generated values using aRecord.into(Object)call.
- 
insertDescription copied from interface:DAOPerforms a batchINSERTstatement for a given set of POJOs.Depending on various settings, like Settings.isReturnRecordToPojo(),Settings.isReturnIdentityOnUpdatableRecord(),Settings.isReturnAllOnUpdatableRecord(), and others, the argument POJO, if mutable, will receive any server side generated values using aRecord.into(Object)call.
- 
insertDescription copied from interface:DAOPerforms a batchINSERTstatement for a given set of POJOs.Depending on various settings, like Settings.isReturnRecordToPojo(),Settings.isReturnIdentityOnUpdatableRecord(),Settings.isReturnAllOnUpdatableRecord(), and others, the argument POJO, if mutable, will receive any server side generated values using aRecord.into(Object)call.
- 
updateDescription copied from interface:DAOPerforms anUPDATEstatement for a given POJO.Depending on various settings, like Settings.isReturnRecordToPojo(),Settings.isReturnIdentityOnUpdatableRecord(),Settings.isReturnAllOnUpdatableRecord(), and others, the argument POJO, if mutable, will receive any server side generated values using aRecord.into(Object)call, ifUPDATE … RETURNINGis supported by the dialect.
- 
updateDescription copied from interface:DAOPerforms a batchUPDATEstatement for a given set of POJOs.Depending on various settings, like Settings.isReturnRecordToPojo(),Settings.isReturnIdentityOnUpdatableRecord(),Settings.isReturnAllOnUpdatableRecord(), and others, the argument POJO, if mutable, will receive any server side generated values using aRecord.into(Object)call, ifUPDATE … RETURNINGis supported by the dialect.
- 
updateDescription copied from interface:DAOPerforms a batchUPDATEstatement for a given set of POJOs.Depending on various settings, like Settings.isReturnRecordToPojo(),Settings.isReturnIdentityOnUpdatableRecord(),Settings.isReturnAllOnUpdatableRecord(), and others, the argument POJO, if mutable, will receive any server side generated values using aRecord.into(Object)call, ifUPDATE … RETURNINGis supported by the dialect.
- 
mergeDescription copied from interface:DAOPerforms anMERGEstatement for a given POJO.
- 
mergeDescription copied from interface:DAOPerforms a batchMERGEstatement for a given set of POJOs.
- 
mergeDescription copied from interface:DAOPerforms a batchMERGEstatement for a given set of POJOs.
- 
deleteDescription copied from interface:DAOPerforms aDELETEstatement for a POJO
- 
deleteDescription copied from interface:DAOPerforms aDELETEstatement for a given set of POJOs.
- 
deleteDescription copied from interface:DAOPerforms aDELETEstatement for a given set of POJOs.
- 
deleteByIdDescription copied from interface:DAOPerforms aDELETEstatement for a given set of IDs.- Specified by:
- deleteByIdin interface- DAO<R extends UpdatableRecord<R>,- P, - T> 
- See Also:
 
- 
deleteByIdDescription copied from interface:DAOPerforms aDELETEstatement for a given set of IDs.- Specified by:
- deleteByIdin interface- DAO<R extends UpdatableRecord<R>,- P, - T> 
- Parameters:
- ids- The IDs to be deleted
- See Also:
 
- 
deleteByIdDescription copied from interface:DAOPerforms aDELETEstatement for a given set of IDs.- Specified by:
- deleteByIdin interface- DAO<R extends UpdatableRecord<R>,- P, - T> 
- Parameters:
- ids- The IDs to be deleted
- See Also:
 
- 
existsDescription copied from interface:DAOChecks if a given POJO exists.
- 
existsByIdDescription copied from interface:DAOChecks if a given ID exists.- Specified by:
- existsByIdin interface- DAO<R extends UpdatableRecord<R>,- P, - T> 
- Parameters:
- id- The ID whose existence is checked
- Returns:
- Whether the ID already exists
 
- 
countpublic long count()Description copied from interface:DAOCount all records of the underlying table.
- 
findAllDescription copied from interface:DAOFind all records of the underlying table.
- 
findByIdDescription copied from interface:DAOFind a record of the underlying table by ID.
- 
findOptionalByIdDescription copied from interface:DAOFind a record of the underlying table by ID.- Specified by:
- findOptionalByIdin interface- DAO<R extends UpdatableRecord<R>,- P, - T> 
- Parameters:
- id- The ID of a record in the underlying table
- Returns:
- A record of the underlying table given its ID.
 
- 
fetchRangeDescription copied from interface:DAOFind records by a given field and a range of values.- Specified by:
- fetchRangein interface- DAO<R extends UpdatableRecord<R>,- P, - T> 
- Parameters:
- field- The field to compare values against
- lowerInclusive- The range's lower bound (inclusive), or unbounded if- null.
- upperInclusive- The range's upper bound (inclusive), or unbounded if- null.
- Returns:
- A list of records fulfilling
         field BETWEEN lowerInclusive AND upperInclusive
 
- 
fetchDescription copied from interface:DAOFind records by a given field and a set of values.
- 
fetchDescription copied from interface:DAOFind records by a given field and a set of values.
- 
fetchOneDescription copied from interface:DAOFind a unique record by a given field and a value.
- 
fetchOptionalDescription copied from interface:DAOFind a unique record by a given field and a value.- Specified by:
- fetchOptionalin interface- DAO<R extends UpdatableRecord<R>,- P, - T> 
- Parameters:
- field- The field to compare value against
- value- The accepted value
- Returns:
- A record fulfilling field = value
 
- 
getTableDescription copied from interface:DAOGet the underlying table.
- 
getTypeDescription copied from interface:DAOGet the underlying POJO type.
- 
compositeKeyRecord
 
-