Interface UniqueObjectRepository<U extends de.digitalcollections.model.UniqueObject>
- All Superinterfaces:
PagingSortingFilteringRepository<U>
- All Known Subinterfaces:
AgentRepository<A>,ApplicationFileResourceRepository,ArticleRepository,AudioFileResourceRepository,CanyonRepository,CaveRepository,CollectionRepository,ContinentRepository,CorporateBodyRepository,CountryRepository,CreekRepository,DigitalObjectRepository,EntityRepository<E>,EventRepository,FamilyNameRepository,FileResourceMetadataRepository<F>,GeoLocationRepository<G>,GivenNameRepository,HeadwordEntryRepository,HeadwordRepository,HumanSettlementRepository,IdentifiableRepository<I>,IdentifierRepository,IdentifierTypeRepository,ImageFileResourceRepository,ItemRepository,LakeRepository,LicenseRepository,LinkedDataFileResourceRepository,ManifestationRepository,MountainRepository,NodeRepository<N>,OceanRepository,PersonRepository,PredicateRepository,ProjectRepository,RenderingTemplateRepository,RiverRepository,SeaRepository,StillWatersRepository,SubjectRepository,TagRepository,TextFileResourceRepository,TopicRepository,UrlAliasRepository,UserRepository,ValleyRepository,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 oneUniqueObjects by given properties in example instance.default UgetByExampleAndFiltering(U uniqueObject, de.digitalcollections.model.list.filtering.Filtering filtering) Retrieve aUniqueObjectby given properties in example instance and given filtering.getByExamples(List<U> uniqueObjects) RetrieveUniqueObjects by given properties in example instances.getByExamplesAndFiltering(List<U> uniqueObjects, de.digitalcollections.model.list.filtering.Filtering filtering) RetrieveUniqueObjects by given properties in example instances and given filtering.default URetrieves theUniqueObjectwith the supplied UUIDs (PK).default UgetByUuidAndFiltering(UUID uniqueObjectUuid, de.digitalcollections.model.list.filtering.Filtering filtering) getByUuids(List<UUID> uniqueObjectUuids) Retrieves theUniqueObjects with the supplied UUIDs (PK).getByUuidsAndFiltering(List<UUID> uniqueObjectUuids, 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 oneUniqueObjects by given properties in example instance.- Parameters:
uniqueObject- example instance containing unique property (PK: UUID)- Returns:
- The found
UniqueObjector null - Throws:
RepositoryException- in case of technical problems
-
getByExamples
RetrieveUniqueObjects by given properties in example instances.- Parameters:
uniqueObjects- example instances containing unique property (PK: UUID)- Returns:
- List of found
UniqueObjects - Throws:
RepositoryException- in case of technical problems
-
getByExampleAndFiltering
default U getByExampleAndFiltering(U uniqueObject, de.digitalcollections.model.list.filtering.Filtering filtering) throws RepositoryException Retrieve aUniqueObjectby given properties in example instance and given filtering.- Parameters:
uniqueObject- example instance containing unique propertyfiltering- filtering params- Returns:
- the found
UniqueObjector null - Throws:
RepositoryException- in case of problems
-
getByExamplesAndFiltering
default List<U> getByExamplesAndFiltering(List<U> uniqueObjects, de.digitalcollections.model.list.filtering.Filtering filtering) throws RepositoryException RetrieveUniqueObjects by given properties in example instances and given filtering.- Parameters:
uniqueObjects- example instances containing unique propertyfiltering- filtering params- Returns:
- List of found
UniqueObjects - Throws:
RepositoryException- in case of problems
-
getByUuid
Retrieves theUniqueObjectwith the supplied UUIDs (PK).- Parameters:
uniqueObjectUuid- UUID of unique object- Returns:
- the found
UniqueObjector null - Throws:
RepositoryException
-
getByUuids
Retrieves theUniqueObjects with the supplied UUIDs (PK).- Parameters:
uniqueObjectUuids- UUIDs of unique objects- Returns:
- list of found
UniqueObjects - Throws:
RepositoryException
-
getByUuidsAndFiltering
List<U> getByUuidsAndFiltering(List<UUID> uniqueObjectUuids, de.digitalcollections.model.list.filtering.Filtering filtering) throws RepositoryException - Throws:
RepositoryException
-
getByUuidAndFiltering
default 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
-