ENTITY
- The type of the data to be persisted.public interface Dao<ENTITY> extends KeylessDao<ENTITY>
Dao
is an interface that allows basic CRUD operations to be performed.
Using a Dao
, you can insert, select, update, and delete records.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.
|
void |
delete(ENTITY item)
Run a delete statement in the database.
|
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, foldingSelect, insert, runBigDecimalFunction, runLongFunction, select, select, select, select, select, select, selectDistinct, selectDistinct, selectDistinct, selectOne, selectOne
ENTITY selectOne(long id)
id
- The primary key of the record desired.List<ENTITY> select(List<Long> ids)
ids
- The primary keys of the records desired.void update(ENTITY item)
item
- An instance of the class with a populated primary key field
and updated field values.void delete(ENTITY item)
item
- An instance of type ENTITY with a populated primary key.void atomicUpdate(ENTITY item)
Connection
when complete.item
- An instance of the class with a populated primary key field
and updated field values.void atomicDelete(ENTITY item)
Connection
when complete.item
- An instance of type ENTITY with a populated primary key.Queries queries()
SQL
this Dao
is using.
The SQL
provided is suitable for being passed to a
PreparedStatement
.
SQL
.Copyright © 2019. All rights reserved.