T - The entity typeID - The identity type of entitypublic interface Dao<T extends Entity<ID>,ID extends java.io.Serializable>
| Modifier and Type | Method and Description |
|---|---|
long |
count(Condition<T> condition)
Returns records count by conditions
|
void |
delete(Condition<T> condition)
Delete by conditions
|
void |
deleteOne(ID id)
Delete by entity id
|
boolean |
exists(Condition<T> condition)
Check exists by conditions
|
default boolean |
exists(ID id)
Check exists of entity id
|
java.util.List<T> |
find(Condition<T> condition)
Find by conditions
|
T |
findFirst(Condition<T> condition)
Find first record by conditions
|
T |
findOne(ID id)
Find entity by id
|
void |
save(java.util.List<T> entities)
Save many entities
|
void |
saveOne(T entity)
Save one entity
|
default void |
saveOrUpdate(T entity)
Save or update entity, if the entity has id value, then update it
|
default PageData<T> |
sliceup(Condition<T> condition)
Returns paged entities by conditions
|
void |
update(T entity)
Update entity by id
|
void |
updateNullable(T entity)
Update entity by id, and null value properties update to null
|
void saveOne(T entity)
entity - Entityvoid save(java.util.List<T> entities)
entities - The entitiesdefault void saveOrUpdate(T entity)
entity - Entityvoid deleteOne(ID id)
id - Entity idT findFirst(Condition<T> condition)
condition - The conditionsjava.util.List<T> find(Condition<T> condition)
condition - The conditionslong count(Condition<T> condition)
condition - The conditionsdefault PageData<T> sliceup(Condition<T> condition)
condition - The conditionsdefault boolean exists(ID id)
id - The entity idboolean exists(Condition<T> condition)
condition - The conditionsvoid update(T entity)
entity - The entity with id valuevoid updateNullable(T entity)
entity - The entity with id valueCopyright © 2019. All Rights Reserved.