ENTITY - The type whose persistence is managed by this Dao.PARENT - The type of the parent (if any) of type ENTITY.BUILDER - The type of object that can build an ENTITY instance.PARENTBUILDER - The type of the object that can build a PARENT instance.public class DaoImpl<ENTITY,PARENT,BUILDER,PARENTBUILDER> extends AbstractDao<ENTITY,BUILDER> implements Dao<ENTITY>, DaoDescriptor<ENTITY,BUILDER>
Dao implementation.
There is no good reason to directly construct this class yourself.
Use a DaoBuilder or IndirectDaoBuilder.
connection, sqlBuilder, sqlRunner| Constructor and Description |
|---|
DaoImpl(Connection connection,
DaoDescriptor<ENTITY,BUILDER> daoDescriptor) |
| Modifier and Type | Method and Description |
|---|---|
void |
atomicDelete(ENTITY item)
Run a delete statement in the database within a transaction.
|
void |
atomicUpdate(ENTITY item)
Run an update statement to change the values in the database associated
with an existing record.
|
List<ChildrenDescriptor<ENTITY,?,BUILDER,?>> |
childrenDescriptors()
The definitions of any entities that are owned by type
ENTITY |
void |
delete(ENTITY item)
Run a delete statement in the database.
|
Long |
insert(ENTITY item)
Insert a record into the database.
|
ParentColumn<ENTITY,PARENT,BUILDER,PARENTBUILDER> |
parentColumn()
The parent column, if there is one, of the
ENTITY. |
Queries |
queries()
Access the
SQL this Dao is using. |
List<ENTITY> |
select(List<Long> ids)
Read several records from the database by their primary keys.
|
ENTITY |
selectOne(long id)
Read a record from the database by its primary key.
|
void |
update(ENTITY item)
Run an update statement to change the values in the database associated
with an existing record.
|
atomicInsert, buildFunction, foldingSelect, fromSingletonList, getColumnCollection, runBigDecimalFunction, runLongFunction, select, select, select, select, select, select, selectDistinct, selectDistinct, selectDistinct, selectOne, selectOne, supplier, tableNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitatomicInsert, foldingSelect, runBigDecimalFunction, runLongFunction, select, select, select, select, select, select, selectDistinct, selectDistinct, selectDistinct, selectOne, selectOnehasParent, primaryKeyallColumns, buildFunction, dataColumns, getColumnCollection, joinColumns, nonJoinColumns, select, supplier, tableNamepublic DaoImpl(Connection connection, DaoDescriptor<ENTITY,BUILDER> daoDescriptor)
public ParentColumn<ENTITY,PARENT,BUILDER,PARENTBUILDER> parentColumn()
DaoDescriptorENTITY.parentColumn in interface DaoDescriptor<ENTITY,BUILDER>public List<ChildrenDescriptor<ENTITY,?,BUILDER,?>> childrenDescriptors()
DaoDescriptorENTITYchildrenDescriptors in interface DaoDescriptor<ENTITY,BUILDER>childrenDescriptors in class AbstractDao<ENTITY,BUILDER>public Long insert(ENTITY item)
KeylessDaoDepending on how the Dao was constucted (whether from a regular
DaoBuilder or an IndirectDaoBuilder)
a particular instance of this class may or may not attempt
to mutate the state of the passed item by setting its primary
key.
insert in interface KeylessDao<ENTITY>insert in class AbstractDao<ENTITY,BUILDER>item - The instance to be inserted.public void update(ENTITY item)
Daopublic void delete(ENTITY item)
Daopublic ENTITY selectOne(long id)
Daopublic List<ENTITY> select(List<Long> ids)
Daopublic void atomicUpdate(ENTITY item)
DaoConnection
when complete.atomicUpdate in interface Dao<ENTITY>item - An instance of the class with a populated primary key field
and updated field values.public void atomicDelete(ENTITY item)
DaoConnection
when complete.atomicDelete in interface Dao<ENTITY>item - An instance of type ENTITY with a populated primary key.Copyright © 2019. All rights reserved.