PK - the generic type of the primary keyDO - the generic type of the domain objectpublic interface DomainService<PK extends Serializable,DO extends DomainObject<PK>>
DomainService provide methods for crud processes.| Modifier and Type | Method and Description |
|---|---|
DO |
create(DO domainObject)
Creates an entity from the given domain object and persist it to the underlying database.
|
void |
delete(DO domainObject)
Deletes an entity in the underlying database from the given domain object
|
DO |
delete(PK id)
Deletes an entity with the given id.
|
boolean |
exists(PK id)
Checks if an entry exists with the given id.
|
List<DO> |
findAll()
Returns a list of all domain objects.
|
Collection<PK> |
persist(Collection<DO> domainObjects)
Persist all new domain objects in the given
Collection. |
DO |
read(PK id)
Read an entity with the given id and maps it to a domain object that will be returned.
|
DO |
update(DO domainObject)
Updates the given domain object to the underlying database.
|
DO create(DO domainObject)
domainObject - the domain objectvoid delete(DO domainObject)
domainObject - the domain object to be deletedDO delete(PK id)
id - the idboolean exists(PK id)
id - the id to checkList<DO> findAll()
Collection<PK> persist(Collection<DO> domainObjects)
Collection.domainObjects - the Collection of domain objects to persistCollection with the id's of the persisted objectsDO read(PK id)
id - the idCopyright © 2015–2019 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.