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. |
ENTITY |
select(long id)
Read a record from the database by its primary key.
|
List<ENTITY> |
selectMany(List<Long> ids)
Read several records from the database by their primary keys.
|
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, selectAll, selectAll, selectByColumns, selectManyByColumns, selectManyByColumns
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.ENTITY select(long id)
id
- The primary key of the record desired.List<ENTITY> selectMany(List<Long> ids)
ids
- The primary keys of the records desired.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.