|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
DomainModel - The class of the entity's domain model.ID - The class of the entity's identifier. Usually, this should be a
java.lang.Long.public interface IRepository<ID extends Serializable,DomainModel extends IIdentifiable<ID>>
Interface with common data access methods.
| Method Summary | |
|---|---|
DomainModel |
create(DomainModel entity)
Persists the given entity. |
void |
delete(Collection<DomainModel> t)
Deletes the specified entities. |
void |
delete(DomainModel t)
Deletes the specified entity. |
void |
delete(ID id)
Deletes the entity with the specified identifier. |
void |
deleteAll()
Deletes all persisted entities. |
boolean |
exists(DomainModel entity)
Checks for the existence of the specified entity. |
boolean |
exists(ID id)
Checks if an entity with the specified identifier exists. |
List<DomainModel> |
retrieveAll()
Retrieves all persisted entities. |
List<DomainModel> |
retrieveAll(Page pageParam)
Retrieves persisted entities from the specified page. |
DomainModel |
retrieveById(ID id)
Retrieves an entity using its identifier. |
void |
update(Collection<DomainModel> entities)
Updates all given entities. |
void |
update(DomainModel t)
Updates the given entity. |
| Method Detail |
|---|
DomainModel create(DomainModel entity)
entity - The entity that must be persisted. Must not be
null.
List<DomainModel> retrieveAll()
DomainModel retrieveById(ID id)
id - The identifier.
List<DomainModel> retrieveAll(Page pageParam)
java.util.List with persisted entities
from the specified page.boolean exists(DomainModel entity)
entity - The entity.
true if the entity is persisted,
false else.boolean exists(ID id)
id - The identifier.
true if the entity exists, false else.void update(DomainModel t)
t - The entity which must be updated.void update(Collection<DomainModel> entities)
entities - A java.lang.Collection with all entities which
must be updated. Must not be null. May be an empty.void delete(DomainModel t)
t - The entity which must be deleted.void delete(ID id)
id - The identifier.void delete(Collection<DomainModel> t)
t - A java.util.Collection with all entities which
must be deleted.void deleteAll()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||