Interface UniqueObjectRepository<U extends de.digitalcollections.model.UniqueObject>
- All Superinterfaces:
PagingSortingFilteringRepository<U>
- All Known Subinterfaces:
AgentRepository<A>,ApplicationFileResourceRepository,ArticleRepository,AudioFileResourceRepository,CollectionRepository,CorporateBodyRepository,DigitalObjectRepository,EntityRepository<E>,EventRepository,FamilyNameRepository,FileResourceMetadataRepository<F>,GeoLocationRepository<G>,GivenNameRepository,HeadwordEntryRepository,HeadwordRepository,HumanSettlementRepository,IdentifiableRepository<I>,IdentifierRepository,IdentifierTypeRepository,ImageFileResourceRepository,ItemRepository,LicenseRepository,LinkedDataFileResourceRepository,ManifestationRepository,NodeRepository<N>,PersonRepository,PredicateRepository,ProjectRepository,RenderingTemplateRepository,SubjectRepository,TagRepository,TextFileResourceRepository,TopicRepository,UrlAliasRepository,UserRepository,VideoFileResourceRepository,WebpageRepository,WebsiteRepository,WorkRepository
public interface UniqueObjectRepository<U extends de.digitalcollections.model.UniqueObject>
extends PagingSortingFilteringRepository<U>
-
Method Summary
Modifier and TypeMethodDescriptionlongcount()Return count ofUniqueObjects.create()Create a new instance ofUniqueObjectdefault intDelete a list ofUniqueObjectsdefault booleanbooleandeleteByUuid(UUID uniqueObjectUuid) Delete a singleUniqueObjectby its UUIDintdeleteByUuids(List<UUID> uuidList) Remove theUniqueObjects with the provided UUIDs (PK).default UgetByExample(U uniqueObject) Retrieve oneUniqueObjectby given properties in example instance.default UgetByExampleAndFiltering(U uniqueObject, de.digitalcollections.model.list.filtering.Filtering filtering) Retrieve oneUniqueObjectby given properties in example instance and given filtering.default URetrieve theUniqueObjectwith the supplied UUID (PK).getByUuidAndFiltering(UUID uniqueObjectUuid, de.digitalcollections.model.list.filtering.Filtering filtering) getRandom(int count) default voidSave anUniqueObjectobject.voiddefault voidsaveOrUpdate(U uniqueObject) default voidUpdate an existingUniqueObjectobject.voidMethods inherited from interface de.digitalcollections.cudami.server.backend.api.repository.PagingSortingFilteringRepository
find
-
Method Details
-
count
Return count ofUniqueObjects.- Returns:
- the count of
UniqueObjects - Throws:
RepositoryException
-
create
Create a new instance ofUniqueObject- Returns:
- new instance of
UniqueObject - Throws:
RepositoryException
-
delete
Delete a list ofUniqueObjects- Parameters:
uniqueObjects- a List ofUniqueObjects- Returns:
- count of removed datasets
- Throws:
RepositoryException
-
delete
- Throws:
RepositoryException
-
deleteByUuid
Delete a singleUniqueObjectby its UUID- Parameters:
uniqueObjectUuid- the UUID- Returns:
- true if the
UniqueObjectexisted and could be deleted or false, if it did not exist and thus could not be deleted - Throws:
RepositoryException- in case of an error
-
deleteByUuids
Remove theUniqueObjects with the provided UUIDs (PK).- Parameters:
uuidList- List of unique object UUIDs to remove- Returns:
- count of removed datasets
- Throws:
RepositoryException
-
getByExample
Retrieve oneUniqueObjectby given properties in example instance.- Parameters:
uniqueObject- example instance containing unique property (PK: UUID)- Returns:
- the found
UniqueObjectornull - Throws:
RepositoryException- in case of technical problems
-
getByExampleAndFiltering
default U getByExampleAndFiltering(U uniqueObject, de.digitalcollections.model.list.filtering.Filtering filtering) throws RepositoryException Retrieve oneUniqueObjectby given properties in example instance and given filtering.- Parameters:
uniqueObject- example instance containing unique propertyfiltering- filtering params- Returns:
- the found
UniqueObjectornull - Throws:
RepositoryException- in case of problems
-
getByUuid
Retrieve theUniqueObjectwith the supplied UUID (PK).- Parameters:
uniqueObjectUuid- UUID of unique object- Returns:
- the found
UniqueObjectornull - Throws:
RepositoryException
-
getByUuidAndFiltering
U getByUuidAndFiltering(UUID uniqueObjectUuid, de.digitalcollections.model.list.filtering.Filtering filtering) throws RepositoryException - Throws:
RepositoryException
-
getRandom
- Throws:
RepositoryException
-
save
Save anUniqueObjectobject.- Parameters:
uniqueObject- the unique object to save- Throws:
RepositoryException
-
save
- Throws:
RepositoryException
-
saveOrUpdate
- Throws:
RepositoryException
-
update
Update an existingUniqueObjectobject.- Parameters:
uniqueObject- the existing object with changed properties- Throws:
RepositoryException
-
update
- Throws:
RepositoryException
-