| Package | Description |
|---|---|
| org.panteleyev.persistence |
This package defines persistence API.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Record> |
DAO.get(Integer id,
Class<? extends T> clazz)
Retrieves record from the database using record ID.
|
<T extends Record> |
DAO.getAll(Class<T> clazz)
Retrieves all records of the specified type.
|
<T extends Record> |
DAO.getAll(Class<T> clazz,
Map<Integer,T> result)
Retrieves all records of the specified type and fills the map.
|
<T extends Record> |
DAO.insert(T record)
This method inserts new record with predefined id into the database.
|
<T extends Record> |
DAO.update(T record)
Updates record in the database.
|
| Modifier and Type | Method and Description |
|---|---|
void |
DAO.delete(Record record)
Deleted record from the database.
|
| Modifier and Type | Method and Description |
|---|---|
void |
DAO.createTables(List<Class<? extends Record>> tables)
This method creates table for the specified classes according to their annotations.
|
void |
DAO.delete(Integer id,
Class<? extends Record> clazz)
Deletes record from the database.
|
Integer |
DAO.generatePrimaryKey(Class<? extends Record> clazz)
Returns next available primary key value.
|
void |
DAO.preload(Collection<Class<? extends Record>> tables)
Pre-loads necessary information from the just opened database.
|
Copyright © 2017, Petr Panteleyev