Class EntityToEntityRelationRepositoryImpl
java.lang.Object
de.digitalcollections.cudami.server.backend.impl.database.AbstractPagingSortingFilteringRepositoryImpl
de.digitalcollections.cudami.server.backend.impl.jdbi.JdbiRepositoryImpl
de.digitalcollections.cudami.server.backend.impl.jdbi.identifiable.entity.relation.EntityToEntityRelationRepositoryImpl
- All Implemented Interfaces:
EntityToEntityRelationRepository,PagingSortingFilteringRepository<de.digitalcollections.model.identifiable.entity.relation.EntityRelation>
@Repository
public class EntityToEntityRelationRepositoryImpl
extends JdbiRepositoryImpl
implements EntityToEntityRelationRepository
-
Field Summary
FieldsFields inherited from class de.digitalcollections.cudami.server.backend.impl.jdbi.JdbiRepositoryImpl
dbi, mappingPrefix, tableAlias, tableNameFields inherited from class de.digitalcollections.cudami.server.backend.impl.database.AbstractPagingSortingFilteringRepositoryImpl
offsetForAlternativePaging -
Constructor Summary
ConstructorsConstructorDescriptionEntityToEntityRelationRepositoryImpl(org.jdbi.v3.core.Jdbi dbi, EntityRepositoryImpl<de.digitalcollections.model.identifiable.entity.Entity> entityRepositoryImpl, CudamiConfig cudamiConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRelation(UUID subjectEntityUuid, String predicate, UUID objectEntityUuid) voiddeleteByObject(UUID objectEntityUuid) voiddeleteBySubject(UUID subjectEntityUuid) de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.relation.EntityRelation>find(de.digitalcollections.model.list.paging.PageRequest pageRequest) de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.relation.EntityRelation>findBySubject(UUID subjectUuid, de.digitalcollections.model.list.paging.PageRequest pageRequest) getColumnName(String modelProperty) protected Stringvoidvoidprotected booleansupportsCaseSensitivityForProperty(String modelProperty) Returns whether the passed property can be sorted case sensitive (in general).Methods inherited from class de.digitalcollections.cudami.server.backend.impl.jdbi.JdbiRepositoryImpl
addFiltering, addFiltering, count, count, escapeTermForJsonpath, execUpdateWithList, execUpdateWithMap, filterByLocalizedTextFields, filterBySplitField, getJsonbFields, getMappingPrefix, getTableAlias, getTableName, getTargetExpression, getWhereClause, getWhereClauses, hasSplitColumn, mapFilterExpressionsToOtherTableColumnNames, retrieveCount, retrieveNextSortIndexForParentChildren, splitToArray, splitToArrayMethods inherited from class de.digitalcollections.cudami.server.backend.impl.database.AbstractPagingSortingFilteringRepositoryImpl
addOrderBy, addPagingAndSorting, getOrderByMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.digitalcollections.cudami.server.backend.api.repository.identifiable.entity.relation.EntityToEntityRelationRepository
addRelation, deleteByObject, deleteBySubject, findBySubject, save
-
Field Details
-
MAPPING_PREFIX
- See Also:
-
TABLE_ALIAS
- See Also:
-
TABLE_NAME
- See Also:
-
-
Constructor Details
-
EntityToEntityRelationRepositoryImpl
public EntityToEntityRelationRepositoryImpl(org.jdbi.v3.core.Jdbi dbi, @Qualifier("entityRepositoryImpl") EntityRepositoryImpl<de.digitalcollections.model.identifiable.entity.Entity> entityRepositoryImpl, CudamiConfig cudamiConfig)
-
-
Method Details
-
addRelation
public void addRelation(UUID subjectEntityUuid, String predicate, UUID objectEntityUuid) throws RepositoryException - Specified by:
addRelationin interfaceEntityToEntityRelationRepository- Throws:
RepositoryException
-
deleteByObject
- Specified by:
deleteByObjectin interfaceEntityToEntityRelationRepository
-
deleteBySubject
- Specified by:
deleteBySubjectin interfaceEntityToEntityRelationRepository
-
find
public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.relation.EntityRelation> find(de.digitalcollections.model.list.paging.PageRequest pageRequest) - Specified by:
findin interfacePagingSortingFilteringRepository<de.digitalcollections.model.identifiable.entity.relation.EntityRelation>
-
findBySubject
public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.relation.EntityRelation> findBySubject(UUID subjectUuid, de.digitalcollections.model.list.paging.PageRequest pageRequest) throws RepositoryException - Specified by:
findBySubjectin interfaceEntityToEntityRelationRepository- Throws:
RepositoryException
-
getAllowedOrderByFields
- Specified by:
getAllowedOrderByFieldsin classAbstractPagingSortingFilteringRepositoryImpl- Returns:
- model properties names that are applicable for sorting, will be mapped to database column names using @see #getColumnName
-
getColumnName
- Specified by:
getColumnNamein classAbstractPagingSortingFilteringRepositoryImpl- Parameters:
modelProperty- name of model property passed as String, e.g. "lastModified"- Returns:
- full qualified column name as used in sql queries ("last_modified" or e.g. "w.last_modified" if prefix used in queries)
-
getUniqueField
- Specified by:
getUniqueFieldin classAbstractPagingSortingFilteringRepositoryImpl- Returns:
- name of model property that guarantees an unique sorting, e.g. a db primary key or another unique column/field
-
save
public void save(List<de.digitalcollections.model.identifiable.entity.relation.EntityRelation> entityRelations) throws RepositoryException - Specified by:
savein interfaceEntityToEntityRelationRepository- Throws:
RepositoryException
-
save
public void save(UUID subjectEntityUuid, String predicate, UUID objectEntityUuid) throws RepositoryException - Specified by:
savein interfaceEntityToEntityRelationRepository- Throws:
RepositoryException
-
supportsCaseSensitivityForProperty
Description copied from class:AbstractPagingSortingFilteringRepositoryImplReturns whether the passed property can be sorted case sensitive (in general). This method should be kept in sync withAbstractPagingSortingFilteringRepositoryImpl.getAllowedOrderByFields().- Specified by:
supportsCaseSensitivityForPropertyin classAbstractPagingSortingFilteringRepositoryImpl- Parameters:
modelProperty- the property name (similar toAbstractPagingSortingFilteringRepositoryImpl.getColumnName(java.lang.String))- Returns:
trueonly if case (in)sensitive sorting is possible
-