Class EntityToEntityRelationServiceImpl
java.lang.Object
de.digitalcollections.cudami.server.business.impl.service.identifiable.entity.relation.EntityToEntityRelationServiceImpl
- All Implemented Interfaces:
EntityToEntityRelationService
@Service
@Transactional(rollbackFor=java.lang.Exception.class)
public class EntityToEntityRelationServiceImpl
extends Object
implements EntityToEntityRelationService
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRelation(de.digitalcollections.model.identifiable.entity.relation.EntityRelation relation) voiddeleteByObject(de.digitalcollections.model.identifiable.entity.Entity objectEntity) voiddeleteBySubject(de.digitalcollections.model.identifiable.entity.Entity subjectEntity) de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.relation.EntityRelation>find(de.digitalcollections.model.list.paging.PageRequest pageRequest) Get paged, sorted, filtered relationsde.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.relation.EntityRelation>findBySubject(de.digitalcollections.model.identifiable.entity.Entity subjectEntity, de.digitalcollections.model.list.paging.PageRequest pageRequest) voidSave (means create or update) a list of entity relations.voidsetEntityRelations(de.digitalcollections.model.identifiable.entity.Entity entity, List<de.digitalcollections.model.identifiable.entity.relation.EntityRelation> relations, boolean deleteExisting)
-
Constructor Details
-
EntityToEntityRelationServiceImpl
-
-
Method Details
-
addRelation
public void addRelation(de.digitalcollections.model.identifiable.entity.relation.EntityRelation relation) throws ServiceException - Specified by:
addRelationin interfaceEntityToEntityRelationService- Throws:
ServiceException
-
deleteByObject
public void deleteByObject(de.digitalcollections.model.identifiable.entity.Entity objectEntity) throws ServiceException - Specified by:
deleteByObjectin interfaceEntityToEntityRelationService- Throws:
ServiceException
-
deleteBySubject
public void deleteBySubject(de.digitalcollections.model.identifiable.entity.Entity subjectEntity) throws ServiceException - Specified by:
deleteBySubjectin interfaceEntityToEntityRelationService- Throws:
ServiceException
-
find
public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.relation.EntityRelation> find(de.digitalcollections.model.list.paging.PageRequest pageRequest) throws ServiceException Description copied from interface:EntityToEntityRelationServiceGet paged, sorted, filtered relations- Specified by:
findin interfaceEntityToEntityRelationService- Parameters:
pageRequest- request param container for paging, sorting, filtering- Returns:
- result as paged response
- Throws:
ServiceException
-
findBySubject
public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.relation.EntityRelation> findBySubject(de.digitalcollections.model.identifiable.entity.Entity subjectEntity, de.digitalcollections.model.list.paging.PageRequest pageRequest) throws ServiceException - Specified by:
findBySubjectin interfaceEntityToEntityRelationService- Throws:
ServiceException
-
save
public void save(List<de.digitalcollections.model.identifiable.entity.relation.EntityRelation> entityRelations) throws ServiceException Description copied from interface:EntityToEntityRelationServiceSave (means create or update) a list of entity relations. This method is idempotent.- Specified by:
savein interfaceEntityToEntityRelationService- Parameters:
entityRelations- a list of entity relations to persist- Throws:
ServiceException
-
setEntityRelations
public void setEntityRelations(de.digitalcollections.model.identifiable.entity.Entity entity, List<de.digitalcollections.model.identifiable.entity.relation.EntityRelation> relations, boolean deleteExisting) throws ServiceException - Specified by:
setEntityRelationsin interfaceEntityToEntityRelationService- Throws:
ServiceException
-