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, identifierRepository, sqlSelectAllFields, sqlSelectAllFieldsJoins, sqlSelectReducedFields
-
Fields inherited from class de.digitalcollections.cudami.server.backend.impl.jdbi.JdbiRepositoryImpl
dbi, mappingPrefix, tableAlias, tableName
-
-
Constructor Summary
Constructors Constructor Description TopicRepositoryImpl(org.jdbi.v3.core.Jdbi dbi, IdentifierRepository identifierRepository, EntityRepositoryImpl entityRepositoryImpl, FileResourceMetadataRepositoryImpl fileResourceMetadataRepositoryImpl)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddChildren(UUID parentUuid, List<UUID> childrenUuids)de.digitalcollections.model.paging.SearchPageResponse<de.digitalcollections.model.identifiable.entity.Topic>findChildren(UUID uuid, de.digitalcollections.model.paging.SearchPageRequest searchPageRequest)de.digitalcollections.model.identifiable.entity.TopicfindOne(de.digitalcollections.model.identifiable.Identifier identifier)de.digitalcollections.model.identifiable.entity.TopicfindOne(UUID uuid, de.digitalcollections.model.filter.Filtering filtering)de.digitalcollections.model.paging.SearchPageResponse<de.digitalcollections.model.identifiable.entity.Topic>findRootNodes(de.digitalcollections.model.paging.SearchPageRequest searchPageRequest)List<de.digitalcollections.model.identifiable.entity.Entity>getAllEntities(UUID topicUuid)de.digitalcollections.model.view.BreadcrumbNavigationgetBreadcrumbNavigation(UUID nodeUuid)List<de.digitalcollections.model.identifiable.entity.Topic>getChildren(UUID uuid)de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic>getChildren(UUID nodeUuid, de.digitalcollections.model.paging.PageRequest pageRequest)de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity>getEntities(UUID topicUuid, de.digitalcollections.model.paging.PageRequest pageRequest)List<de.digitalcollections.model.identifiable.resource.FileResource>getFileResources(UUID topicUuid)de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource>getFileResources(UUID topicUuid, de.digitalcollections.model.paging.PageRequest pageRequest)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)de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic>getRootNodes(de.digitalcollections.model.paging.PageRequest pageRequest)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)List<de.digitalcollections.model.identifiable.entity.Entity>saveEntities(UUID topicUuid, List<de.digitalcollections.model.identifiable.entity.Entity> entities)List<de.digitalcollections.model.identifiable.resource.FileResource>saveFileResources(UUID topicUuid, List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources)de.digitalcollections.model.identifiable.entity.TopicsaveWithParent(de.digitalcollections.model.identifiable.entity.Topic child, UUID parentUuid)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, findOneByRefId, findRandom, getAllowedOrderByFields, getColumnName, getRelatedFileResources, save, saveRelatedFileResources, update
-
Methods inherited from class de.digitalcollections.cudami.server.backend.impl.jdbi.identifiable.IdentifiableRepositoryImpl
addRelatedEntity, delete, deleteIdentifiers, escapeTermForJsonpath, find, find, find, find, findAllFull, findAllReduced, findByLanguageAndInitial, getCommonSearchSql, getIndex, getIndex, getLanguages, getRelatedEntities, getSqlSelectAllFields, getSqlSelectReducedFields, retrieveCount, retrieveList, retrieveNextSortIndexForParentChildren, retrieveOne, saveIdentifiers, saveRelatedEntities
-
Methods inherited from class de.digitalcollections.cudami.server.backend.impl.jdbi.JdbiRepositoryImpl
count, getMappingPrefix, getTableAlias, getTableName
-
Methods inherited from class de.digitalcollections.cudami.server.backend.impl.database.AbstractPagingAndSortingRepositoryImpl
addFiltering, addFiltering, addLimit, addOffset, addOrderBy, addPageRequestParams, convertToSqlString, getFilterClauses, getOrderBy, getWhereClause
-
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
findOneByRefId, findRandom
-
Methods inherited from interface de.digitalcollections.cudami.server.backend.api.repository.identifiable.IdentifiableRepository
addRelatedEntity, addRelatedEntity, addRelatedFileresource, addRelatedFileresource, count, delete, delete, deleteIdentifiers, find, find, find, findAllFull, findAllReduced, findByLanguageAndInitial, findOne, findOneByIdentifier, getLanguages, getRelatedEntities, getRelatedEntities, getRelatedFileResources, getRelatedFileResources, save, saveRelatedEntities, saveRelatedEntities, saveRelatedFileResources, saveRelatedFileResources, 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, saveEntities, saveFileResources
-
-
-
-
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, IdentifierRepository identifierRepository, EntityRepositoryImpl entityRepositoryImpl, FileResourceMetadataRepositoryImpl fileResourceMetadataRepositoryImpl)
-
-
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.paging.SearchPageResponse<de.digitalcollections.model.identifiable.entity.Topic> findChildren(UUID uuid, de.digitalcollections.model.paging.SearchPageRequest searchPageRequest)
- Specified by:
findChildrenin interfaceNodeRepository<de.digitalcollections.model.identifiable.entity.Topic>
-
findOne
public de.digitalcollections.model.identifiable.entity.Topic findOne(UUID uuid, de.digitalcollections.model.filter.Filtering filtering)
- Specified by:
findOnein interfaceIdentifiableRepository<de.digitalcollections.model.identifiable.entity.Topic>- Overrides:
findOnein classIdentifiableRepositoryImpl<de.digitalcollections.model.identifiable.entity.Topic>
-
findOne
public de.digitalcollections.model.identifiable.entity.Topic findOne(de.digitalcollections.model.identifiable.Identifier identifier)
- Specified by:
findOnein interfaceIdentifiableRepository<de.digitalcollections.model.identifiable.entity.Topic>- Overrides:
findOnein classIdentifiableRepositoryImpl<de.digitalcollections.model.identifiable.entity.Topic>
-
getAllEntities
public List<de.digitalcollections.model.identifiable.entity.Entity> getAllEntities(UUID topicUuid)
- Specified by:
getAllEntitiesin interfaceTopicRepository
-
getBreadcrumbNavigation
public de.digitalcollections.model.view.BreadcrumbNavigation getBreadcrumbNavigation(UUID nodeUuid)
- Specified by:
getBreadcrumbNavigationin interfaceNodeRepository<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>
-
getChildren
public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> getChildren(UUID nodeUuid, de.digitalcollections.model.paging.PageRequest pageRequest)
- Specified by:
getChildrenin interfaceNodeRepository<de.digitalcollections.model.identifiable.entity.Topic>
-
getEntities
public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity> getEntities(UUID topicUuid, de.digitalcollections.model.paging.PageRequest pageRequest)
- Specified by:
getEntitiesin interfaceTopicRepository
-
getFileResources
public List<de.digitalcollections.model.identifiable.resource.FileResource> getFileResources(UUID topicUuid)
- Specified by:
getFileResourcesin interfaceTopicRepository
-
getFileResources
public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource> getFileResources(UUID topicUuid, de.digitalcollections.model.paging.PageRequest pageRequest)
- 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>
-
getRootNodes
public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> getRootNodes(de.digitalcollections.model.paging.PageRequest pageRequest)
- Specified by:
getRootNodesin interfaceNodeRepository<de.digitalcollections.model.identifiable.entity.Topic>
-
findRootNodes
public de.digitalcollections.model.paging.SearchPageResponse<de.digitalcollections.model.identifiable.entity.Topic> findRootNodes(de.digitalcollections.model.paging.SearchPageRequest searchPageRequest)
- Specified by:
findRootNodesin 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>
-
saveEntities
public List<de.digitalcollections.model.identifiable.entity.Entity> saveEntities(UUID topicUuid, List<de.digitalcollections.model.identifiable.entity.Entity> entities)
- Specified by:
saveEntitiesin interfaceTopicRepository
-
saveFileResources
public List<de.digitalcollections.model.identifiable.resource.FileResource> saveFileResources(UUID topicUuid, List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources)
- Specified by:
saveFileResourcesin interfaceTopicRepository
-
saveWithParent
public de.digitalcollections.model.identifiable.entity.Topic saveWithParent(de.digitalcollections.model.identifiable.entity.Topic child, UUID parentUuid)- Specified by:
saveWithParentin interfaceNodeRepository<de.digitalcollections.model.identifiable.entity.Topic>
-
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>
-
-