Class EntityServiceImpl<E extends de.digitalcollections.model.api.identifiable.entity.Entity>
- java.lang.Object
-
- de.digitalcollections.cudami.server.business.impl.service.identifiable.IdentifiableServiceImpl<E>
-
- de.digitalcollections.cudami.server.business.impl.service.identifiable.entity.EntityServiceImpl<E>
-
- All Implemented Interfaces:
EntityService<E>,IdentifiableService<E>
- Direct Known Subclasses:
ArticleServiceImpl,CollectionServiceImpl,CorporateBodyServiceImpl,DigitalObjectServiceImpl,ProjectServiceImpl,TopicServiceImpl,WebsiteServiceImpl
@Service public class EntityServiceImpl<E extends de.digitalcollections.model.api.identifiable.entity.Entity> extends IdentifiableServiceImpl<E> implements EntityService<E>
-
-
Field Summary
-
Fields inherited from class de.digitalcollections.cudami.server.business.impl.service.identifiable.IdentifiableServiceImpl
repository
-
-
Constructor Summary
Constructors Constructor Description EntityServiceImpl(EntityRepository<E> repository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRelatedFileresource(E entity, de.digitalcollections.model.api.identifiable.resource.FileResource fileResource)voidaddRelatedFileresource(UUID entityUuid, UUID fileResourceUuid)voidaddRelation(de.digitalcollections.model.api.identifiable.entity.EntityRelation relation)voidaddRelation(UUID subjectEntityUuid, String predicate, UUID objectEntityUuid)protected de.digitalcollections.model.api.filter.FilteringfilteringForActive()EgetByRefId(long refId)List<de.digitalcollections.model.api.identifiable.resource.FileResource>getRelatedFileResources(E entity)List<de.digitalcollections.model.api.identifiable.resource.FileResource>getRelatedFileResources(UUID entityUuid)List<de.digitalcollections.model.api.identifiable.entity.EntityRelation>getRelations(E subjectEntity)List<de.digitalcollections.model.api.identifiable.entity.EntityRelation>getRelations(UUID subjectEntityUuid)List<de.digitalcollections.model.api.identifiable.resource.FileResource>saveRelatedFileResources(E entity, List<de.digitalcollections.model.api.identifiable.resource.FileResource> fileResources)Save list of file resources related to an entity.List<de.digitalcollections.model.api.identifiable.resource.FileResource>saveRelatedFileResources(UUID entityUuid, List<de.digitalcollections.model.api.identifiable.resource.FileResource> fileResources)List<de.digitalcollections.model.api.identifiable.entity.EntityRelation>saveRelations(List<de.digitalcollections.model.api.identifiable.entity.EntityRelation> relations)Save list of entities related to an entity.Prerequisites: entities have been saved before (exist already) and subject is for all relations the same-
Methods inherited from class de.digitalcollections.cudami.server.business.impl.service.identifiable.IdentifiableServiceImpl
count, find, find, find, get, get, get, getByIdentifier, reduceMultilanguageFieldsToGivenLocale, save, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.digitalcollections.cudami.server.business.api.service.identifiable.IdentifiableService
cleanupLabelFromUnwantedLocales, count, find, find, find, get, get, get, getByIdentifier, save, update
-
-
-
-
Constructor Detail
-
EntityServiceImpl
@Autowired public EntityServiceImpl(@Qualifier("entityRepositoryImpl") EntityRepository<E> repository)
-
-
Method Detail
-
addRelatedFileresource
public void addRelatedFileresource(E entity, de.digitalcollections.model.api.identifiable.resource.FileResource fileResource)
- Specified by:
addRelatedFileresourcein interfaceEntityService<E extends de.digitalcollections.model.api.identifiable.entity.Entity>
-
addRelatedFileresource
public void addRelatedFileresource(UUID entityUuid, UUID fileResourceUuid)
- Specified by:
addRelatedFileresourcein interfaceEntityService<E extends de.digitalcollections.model.api.identifiable.entity.Entity>
-
addRelation
public void addRelation(de.digitalcollections.model.api.identifiable.entity.EntityRelation relation)
- Specified by:
addRelationin interfaceEntityService<E extends de.digitalcollections.model.api.identifiable.entity.Entity>
-
addRelation
public void addRelation(UUID subjectEntityUuid, String predicate, UUID objectEntityUuid)
- Specified by:
addRelationin interfaceEntityService<E extends de.digitalcollections.model.api.identifiable.entity.Entity>
-
filteringForActive
protected de.digitalcollections.model.api.filter.Filtering filteringForActive()
-
getByRefId
public E getByRefId(long refId)
- Specified by:
getByRefIdin interfaceEntityService<E extends de.digitalcollections.model.api.identifiable.entity.Entity>
-
getRelatedFileResources
public List<de.digitalcollections.model.api.identifiable.resource.FileResource> getRelatedFileResources(E entity)
- Specified by:
getRelatedFileResourcesin interfaceEntityService<E extends de.digitalcollections.model.api.identifiable.entity.Entity>
-
getRelatedFileResources
public List<de.digitalcollections.model.api.identifiable.resource.FileResource> getRelatedFileResources(UUID entityUuid)
- Specified by:
getRelatedFileResourcesin interfaceEntityService<E extends de.digitalcollections.model.api.identifiable.entity.Entity>
-
getRelations
public List<de.digitalcollections.model.api.identifiable.entity.EntityRelation> getRelations(E subjectEntity)
- Specified by:
getRelationsin interfaceEntityService<E extends de.digitalcollections.model.api.identifiable.entity.Entity>
-
getRelations
public List<de.digitalcollections.model.api.identifiable.entity.EntityRelation> getRelations(UUID subjectEntityUuid)
- Specified by:
getRelationsin interfaceEntityService<E extends de.digitalcollections.model.api.identifiable.entity.Entity>
-
saveRelatedFileResources
public List<de.digitalcollections.model.api.identifiable.resource.FileResource> saveRelatedFileResources(E entity, List<de.digitalcollections.model.api.identifiable.resource.FileResource> fileResources)
Description copied from interface:EntityServiceSave list of file resources related to an entity. Prerequisite: file resources have been saved before (exist already)- Specified by:
saveRelatedFileResourcesin interfaceEntityService<E extends de.digitalcollections.model.api.identifiable.entity.Entity>- Parameters:
entity- entity the fileresources are related tofileResources- the fileresources that are related to the entity- Returns:
- the list of the related fileresources
-
saveRelatedFileResources
public List<de.digitalcollections.model.api.identifiable.resource.FileResource> saveRelatedFileResources(UUID entityUuid, List<de.digitalcollections.model.api.identifiable.resource.FileResource> fileResources)
- Specified by:
saveRelatedFileResourcesin interfaceEntityService<E extends de.digitalcollections.model.api.identifiable.entity.Entity>
-
saveRelations
public List<de.digitalcollections.model.api.identifiable.entity.EntityRelation> saveRelations(List<de.digitalcollections.model.api.identifiable.entity.EntityRelation> relations)
Description copied from interface:EntityServiceSave list of entities related to an entity.Prerequisites: entities have been saved before (exist already) and subject is for all relations the same- Specified by:
saveRelationsin interfaceEntityService<E extends de.digitalcollections.model.api.identifiable.entity.Entity>- Parameters:
relations- a list of entity-predicate-entity relations- Returns:
- the list of the relations for the same subject-entity
-
-