Class TopicRepositoryImpl
- java.lang.Object
-
- de.digitalcollections.cudami.server.backend.impl.database.AbstractPagingAndSortingRepositoryImpl
-
- de.digitalcollections.cudami.server.backend.impl.jdbi.JdbiRepositoryImpl
-
- de.digitalcollections.cudami.server.backend.impl.jdbi.identifiable.IdentifiableRepositoryImpl<E>
-
- de.digitalcollections.cudami.server.backend.impl.jdbi.identifiable.entity.EntityRepositoryImpl<de.digitalcollections.model.identifiable.entity.Topic>
-
- de.digitalcollections.cudami.server.backend.impl.jdbi.identifiable.entity.TopicRepositoryImpl
-
- All Implemented Interfaces:
EntityRepository<de.digitalcollections.model.identifiable.entity.Topic>,TopicRepository,IdentifiableRepository<de.digitalcollections.model.identifiable.entity.Topic>,NodeRepository<de.digitalcollections.model.identifiable.entity.Topic>
@Repository public class TopicRepositoryImpl extends EntityRepositoryImpl<de.digitalcollections.model.identifiable.entity.Topic> implements TopicRepository
-
-
Field Summary
Fields Modifier and Type Field Description static StringMAPPING_PREFIXstatic StringTABLE_ALIASstatic StringTABLE_NAME-
Fields inherited from class de.digitalcollections.cudami.server.backend.impl.jdbi.identifiable.IdentifiableRepositoryImpl
additionalReduceRowsBiFunction, basicReduceRowsBiFunction, fullReduceRowsBiFunction, identifiableImplClass, sqlSelectAllFields, sqlSelectAllFieldsJoins, sqlSelectReducedFields
-
Fields inherited from class de.digitalcollections.cudami.server.backend.impl.jdbi.JdbiRepositoryImpl
dbi, mappingPrefix, tableAlias, tableName
-
Fields inherited from class de.digitalcollections.cudami.server.backend.impl.database.AbstractPagingAndSortingRepositoryImpl
offsetForAlternativePaging
-
-
Constructor Summary
Constructors Constructor Description TopicRepositoryImpl(org.jdbi.v3.core.Jdbi dbi, EntityRepositoryImpl entityRepositoryImpl, FileResourceMetadataRepositoryImpl fileResourceMetadataRepositoryImpl, CudamiConfig cudamiConfig)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddChildren(UUID parentUuid, List<UUID> childrenUuids)de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic>findChildren(UUID uuid, de.digitalcollections.model.list.paging.PageRequest pageRequest)de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity>findEntities(UUID topicUuid, de.digitalcollections.model.list.paging.PageRequest pageRequest)de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource>findFileResources(UUID topicUuid, de.digitalcollections.model.list.paging.PageRequest pageRequest)de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic>findRootNodes(de.digitalcollections.model.list.paging.PageRequest pageRequest)de.digitalcollections.model.view.BreadcrumbNavigationgetBreadcrumbNavigation(UUID nodeUuid)de.digitalcollections.model.identifiable.entity.TopicgetByIdentifier(de.digitalcollections.model.identifiable.Identifier identifier)de.digitalcollections.model.identifiable.entity.TopicgetByUuidAndFiltering(UUID uuid, de.digitalcollections.model.list.filtering.Filtering filtering)List<de.digitalcollections.model.identifiable.entity.Topic>getChildren(UUID uuid)List<de.digitalcollections.model.identifiable.entity.Entity>getEntities(UUID topicUuid)List<de.digitalcollections.model.identifiable.resource.FileResource>getFileResources(UUID topicUuid)List<Locale>getLanguagesOfEntities(UUID topicUuid)List<Locale>getLanguagesOfFileResources(UUID topicUuid)de.digitalcollections.model.identifiable.entity.TopicgetParent(UUID nodeUuid)List<de.digitalcollections.model.identifiable.entity.Topic>getParents(UUID uuid)List<Locale>getRootNodesLanguages()static StringgetSqlInsertFields()static StringgetSqlInsertValues()static StringgetSqlSelectAllFields(String tableAlias, String mappingPrefix)static StringgetSqlSelectReducedFields(String tableAlias, String mappingPrefix)static StringgetSqlUpdateFieldValues()List<de.digitalcollections.model.identifiable.entity.Topic>getTopicsOfEntity(UUID entityUuid)List<de.digitalcollections.model.identifiable.entity.Topic>getTopicsOfFileResource(UUID fileResourceUuid)booleanremoveChild(UUID parentUuid, UUID childUuid)de.digitalcollections.model.identifiable.entity.Topicsave(de.digitalcollections.model.identifiable.entity.Topic topic)de.digitalcollections.model.identifiable.entity.TopicsaveWithParent(UUID childUuid, UUID parentUuid)List<de.digitalcollections.model.identifiable.entity.Entity>setEntities(UUID topicUuid, List<de.digitalcollections.model.identifiable.entity.Entity> entities)List<de.digitalcollections.model.identifiable.resource.FileResource>setFileResources(UUID topicUuid, List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources)de.digitalcollections.model.identifiable.entity.Topicupdate(de.digitalcollections.model.identifiable.entity.Topic topic)booleanupdateChildrenOrder(UUID parentUuid, List<de.digitalcollections.model.identifiable.entity.Topic> children)-
Methods inherited from class de.digitalcollections.cudami.server.backend.impl.jdbi.identifiable.entity.EntityRepositoryImpl
addRelatedFileresource, getAllowedOrderByFields, getByRefId, getColumnName, getRandom, getRelatedFileResources, save, setRelatedFileResources, update
-
Methods inherited from class de.digitalcollections.cudami.server.backend.impl.jdbi.identifiable.IdentifiableRepositoryImpl
addCrossTablePageRequestParams, addRelatedEntity, addSearchTermMappings, delete, extendReducedIdentifiable, find, find, find, find, findByLanguageAndInitial, getAllFull, getAllReduced, getIndex, getIndex, getLanguages, getRelatedEntities, getSearchTermTemplates, getSqlSelectAllFields, getSqlSelectReducedFields, getUniqueField, getWhereClause, retrieveCount, retrieveList, retrieveOne, retrieveOne, retrieveOne, setRelatedEntities, splitToArray, supportsCaseSensitivityForProperty
-
Methods inherited from class de.digitalcollections.cudami.server.backend.impl.jdbi.JdbiRepositoryImpl
addFiltering, addFiltering, addSearchTerm, count, count, escapeTermForJsonpath, getCommonSearchSql, getFilterClauses, getMappingPrefix, getTableAlias, getTableName, mapFilterExpressionsToOtherTableColumnNames, retrieveNextSortIndexForParentChildren
-
Methods inherited from class de.digitalcollections.cudami.server.backend.impl.database.AbstractPagingAndSortingRepositoryImpl
addOrderBy, addPageRequestParams, getOrderBy
-
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.backend.api.repository.identifiable.entity.EntityRepository
getByRefId, getRandom
-
Methods inherited from interface de.digitalcollections.cudami.server.backend.api.repository.identifiable.IdentifiableRepository
addRelatedEntity, addRelatedEntity, addRelatedFileresource, addRelatedFileresource, count, delete, delete, find, find, findByLanguageAndInitial, getAllFull, getAllReduced, getByIdentifier, getByUuid, getLanguages, getRelatedEntities, getRelatedEntities, getRelatedFileResources, getRelatedFileResources, save, setRelatedEntities, setRelatedEntities, setRelatedFileResources, setRelatedFileResources, update
-
Methods inherited from interface de.digitalcollections.cudami.server.backend.api.repository.identifiable.NodeRepository
addChild, addChild, addChildren, getChildren, removeChild
-
Methods inherited from interface de.digitalcollections.cudami.server.backend.api.repository.identifiable.entity.TopicRepository
getAllEntities, getFileResources, getTopicsOfEntity, getTopicsOfFileResource, setEntities, setFileResources
-
-
-
-
Field Detail
-
MAPPING_PREFIX
public static final String MAPPING_PREFIX
- See Also:
- Constant Field Values
-
TABLE_ALIAS
public static final String TABLE_ALIAS
- See Also:
- Constant Field Values
-
TABLE_NAME
public static final String TABLE_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TopicRepositoryImpl
@Autowired public TopicRepositoryImpl(org.jdbi.v3.core.Jdbi dbi, EntityRepositoryImpl entityRepositoryImpl, FileResourceMetadataRepositoryImpl fileResourceMetadataRepositoryImpl, CudamiConfig cudamiConfig)
-
-
Method Detail
-
getSqlInsertFields
public static String getSqlInsertFields()
-
getSqlInsertValues
public static String getSqlInsertValues()
-
getSqlSelectAllFields
public static String getSqlSelectAllFields(String tableAlias, String mappingPrefix)
-
getSqlSelectReducedFields
public static String getSqlSelectReducedFields(String tableAlias, String mappingPrefix)
-
getSqlUpdateFieldValues
public static String getSqlUpdateFieldValues()
-
addChildren
public boolean addChildren(UUID parentUuid, List<UUID> childrenUuids)
- Specified by:
addChildrenin interfaceNodeRepository<de.digitalcollections.model.identifiable.entity.Topic>
-
findChildren
public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> findChildren(UUID uuid, de.digitalcollections.model.list.paging.PageRequest pageRequest)
- Specified by:
findChildrenin interfaceNodeRepository<de.digitalcollections.model.identifiable.entity.Topic>
-
findEntities
public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity> findEntities(UUID topicUuid, de.digitalcollections.model.list.paging.PageRequest pageRequest)
- Specified by:
findEntitiesin interfaceTopicRepository
-
findFileResources
public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource> findFileResources(UUID topicUuid, de.digitalcollections.model.list.paging.PageRequest pageRequest)
- Specified by:
findFileResourcesin interfaceTopicRepository
-
findRootNodes
public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> findRootNodes(de.digitalcollections.model.list.paging.PageRequest pageRequest)
- Specified by:
findRootNodesin interfaceNodeRepository<de.digitalcollections.model.identifiable.entity.Topic>
-
getBreadcrumbNavigation
public de.digitalcollections.model.view.BreadcrumbNavigation getBreadcrumbNavigation(UUID nodeUuid)
- Specified by:
getBreadcrumbNavigationin interfaceNodeRepository<de.digitalcollections.model.identifiable.entity.Topic>
-
getByIdentifier
public de.digitalcollections.model.identifiable.entity.Topic getByIdentifier(de.digitalcollections.model.identifiable.Identifier identifier)
- Specified by:
getByIdentifierin interfaceIdentifiableRepository<de.digitalcollections.model.identifiable.entity.Topic>- Overrides:
getByIdentifierin classIdentifiableRepositoryImpl<de.digitalcollections.model.identifiable.entity.Topic>
-
getByUuidAndFiltering
public de.digitalcollections.model.identifiable.entity.Topic getByUuidAndFiltering(UUID uuid, de.digitalcollections.model.list.filtering.Filtering filtering)
- Specified by:
getByUuidAndFilteringin interfaceIdentifiableRepository<de.digitalcollections.model.identifiable.entity.Topic>- Overrides:
getByUuidAndFilteringin classIdentifiableRepositoryImpl<de.digitalcollections.model.identifiable.entity.Topic>
-
getChildren
public List<de.digitalcollections.model.identifiable.entity.Topic> getChildren(UUID uuid)
- Specified by:
getChildrenin interfaceNodeRepository<de.digitalcollections.model.identifiable.entity.Topic>
-
getEntities
public List<de.digitalcollections.model.identifiable.entity.Entity> getEntities(UUID topicUuid)
- Specified by:
getEntitiesin interfaceTopicRepository
-
getFileResources
public List<de.digitalcollections.model.identifiable.resource.FileResource> getFileResources(UUID topicUuid)
- Specified by:
getFileResourcesin interfaceTopicRepository
-
getLanguagesOfEntities
public List<Locale> getLanguagesOfEntities(UUID topicUuid)
- Specified by:
getLanguagesOfEntitiesin interfaceTopicRepository
-
getLanguagesOfFileResources
public List<Locale> getLanguagesOfFileResources(UUID topicUuid)
- Specified by:
getLanguagesOfFileResourcesin interfaceTopicRepository
-
getParent
public de.digitalcollections.model.identifiable.entity.Topic getParent(UUID nodeUuid)
- Specified by:
getParentin interfaceNodeRepository<de.digitalcollections.model.identifiable.entity.Topic>
-
getParents
public List<de.digitalcollections.model.identifiable.entity.Topic> getParents(UUID uuid)
- Specified by:
getParentsin interfaceNodeRepository<de.digitalcollections.model.identifiable.entity.Topic>
-
getRootNodesLanguages
public List<Locale> getRootNodesLanguages()
- Specified by:
getRootNodesLanguagesin interfaceNodeRepository<de.digitalcollections.model.identifiable.entity.Topic>
-
getTopicsOfEntity
public List<de.digitalcollections.model.identifiable.entity.Topic> getTopicsOfEntity(UUID entityUuid)
- Specified by:
getTopicsOfEntityin interfaceTopicRepository
-
getTopicsOfFileResource
public List<de.digitalcollections.model.identifiable.entity.Topic> getTopicsOfFileResource(UUID fileResourceUuid)
- Specified by:
getTopicsOfFileResourcein interfaceTopicRepository
-
removeChild
public boolean removeChild(UUID parentUuid, UUID childUuid)
- Specified by:
removeChildin interfaceNodeRepository<de.digitalcollections.model.identifiable.entity.Topic>
-
save
public de.digitalcollections.model.identifiable.entity.Topic save(de.digitalcollections.model.identifiable.entity.Topic topic)
- Specified by:
savein interfaceIdentifiableRepository<de.digitalcollections.model.identifiable.entity.Topic>
-
saveWithParent
public de.digitalcollections.model.identifiable.entity.Topic saveWithParent(UUID childUuid, UUID parentUuid)
- Specified by:
saveWithParentin interfaceNodeRepository<de.digitalcollections.model.identifiable.entity.Topic>
-
setEntities
public List<de.digitalcollections.model.identifiable.entity.Entity> setEntities(UUID topicUuid, List<de.digitalcollections.model.identifiable.entity.Entity> entities)
- Specified by:
setEntitiesin interfaceTopicRepository
-
setFileResources
public List<de.digitalcollections.model.identifiable.resource.FileResource> setFileResources(UUID topicUuid, List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources)
- Specified by:
setFileResourcesin interfaceTopicRepository
-
update
public de.digitalcollections.model.identifiable.entity.Topic update(de.digitalcollections.model.identifiable.entity.Topic topic)
- Specified by:
updatein interfaceIdentifiableRepository<de.digitalcollections.model.identifiable.entity.Topic>
-
updateChildrenOrder
public boolean updateChildrenOrder(UUID parentUuid, List<de.digitalcollections.model.identifiable.entity.Topic> children)
- Specified by:
updateChildrenOrderin interfaceNodeRepository<de.digitalcollections.model.identifiable.entity.Topic>
-
-