Class ManifestationRepositoryImpl
java.lang.Object
de.digitalcollections.cudami.server.backend.impl.database.AbstractPagingSortingFilteringRepositoryImpl
de.digitalcollections.cudami.server.backend.impl.jdbi.JdbiRepositoryImpl<U>
de.digitalcollections.cudami.server.backend.impl.jdbi.UniqueObjectRepositoryImpl<I>
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.manifestation.Manifestation>
de.digitalcollections.cudami.server.backend.impl.jdbi.identifiable.entity.work.ManifestationRepositoryImpl
- All Implemented Interfaces:
EntityRepository<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>,ManifestationRepository,IdentifiableRepository<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>,PagingSortingFilteringRepository<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>,UniqueObjectRepository<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>
@Repository
public class ManifestationRepositoryImpl
extends EntityRepositoryImpl<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>
implements ManifestationRepository
-
Field Summary
FieldsFields inherited from class de.digitalcollections.cudami.server.backend.impl.jdbi.UniqueObjectRepositoryImpl
additionalReduceRowsBiConsumer, basicReduceRowsBiConsumer, fullReduceRowsBiConsumer, uniqueObjectImplClassFields 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
ConstructorsConstructorDescriptionManifestationRepositoryImpl(org.jdbi.v3.core.Jdbi jdbi, CudamiConfig cudamiConfig, IdentifierRepository identifierRepository, UrlAliasRepository urlAliasRepository, MainSubTypeMapper.ExpressionTypeMapper expressionTypeMapper, LocalDateRangeMapper dateRangeMapper, TitleMapper titleMapper, EntityRepositoryImpl<de.digitalcollections.model.identifiable.entity.Entity> entityRepository, AgentRepositoryImpl<de.digitalcollections.model.identifiable.entity.agent.Agent> agentRepository, HumanSettlementRepositoryImpl humanSettlementRepository) -
Method Summary
Modifier and TypeMethodDescriptionde.digitalcollections.model.identifiable.entity.manifestation.Manifestationcreate()protected BiConsumer<Map<UUID,de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>, org.jdbi.v3.core.result.RowView> For details select (only used in find one, not lists): if additional objects should be "joined" into instance, set bi function for doing this.protected voidextendReducedIdentifiable(de.digitalcollections.model.identifiable.entity.manifestation.Manifestation manifestation, org.jdbi.v3.core.result.RowView rowView) Extend the reduced Identifiable by the contents of the provided RowViewde.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>findManifestationsByWork(UUID workUuid, de.digitalcollections.model.list.paging.PageRequest pageRequest) de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>findSubParts(UUID uuid, de.digitalcollections.model.list.paging.PageRequest pageRequest) getColumnName(String modelProperty) getLanguagesOfManifestationsForWork(UUID workUuid) protected Stringprotected StringDo not change order! Must match order in getSqlInsertFields!!!getSqlSelectAllFields(String tableAlias, String mappingPrefix) SQL-snippet for fields to be returned for complete field request.
If already all fields are returned with reduced fields request: just return reduced field set here, otherwise add additional fields to reduced set to get all fields.protected StringgetSqlSelectReducedFields(String tableAlias, String mappingPrefix) protected StringbooleanremoveParent(de.digitalcollections.model.identifiable.entity.manifestation.Manifestation manifestation, de.digitalcollections.model.identifiable.entity.manifestation.Manifestation parentManifestation) voidsave(de.digitalcollections.model.identifiable.entity.manifestation.Manifestation manifestation, Map<String, Object> bindings) protected booleansupportsCaseSensitivityForProperty(String modelProperty) Returns whether the passed property can be sorted case sensitive (in general).voidupdate(de.digitalcollections.model.identifiable.entity.manifestation.Manifestation manifestation, Map<String, Object> bindings) Methods inherited from class de.digitalcollections.cudami.server.backend.impl.jdbi.identifiable.entity.EntityRepositoryImpl
addRelatedFileresource, findRelatedEntities, findRelatedFileResources, getByRefId, getJsonbFields, getRandom, getReturnedFieldsOnInsertUpdate, hasSplitColumn, insertUpdateCallback, isRepoForNamedEntity, save, setRelatedFileResources, updateMethods inherited from class de.digitalcollections.cudami.server.backend.impl.jdbi.identifiable.IdentifiableRepositoryImpl
addCrossTablePagingAndSorting, addRelatedEntity, createBasicReduceRowsBiConsumer, createFullReduceRowsBiConcumer, deleteByUuids, find, findByLanguageAndInitial, getByIdentifier, getLanguages, retrieveList, retrieveList, retrieveOne, setRelatedEntitiesMethods inherited from class de.digitalcollections.cudami.server.backend.impl.jdbi.UniqueObjectRepositoryImpl
deleteByUuid, execSelectForList, extractUuids, find, find, find, getByUuidAndFiltering, getIndex, getIndex, getSqlSelectAllFields, getSqlSelectReducedFields, getUniqueField, retrieveCount, retrieveOne, retrieveOne, sqlSelectReducedFieldsMethods inherited from class de.digitalcollections.cudami.server.backend.impl.jdbi.JdbiRepositoryImpl
addFiltering, addFiltering, count, count, escapeTermForJsonpath, execUpdateWithList, execUpdateWithMap, filterByLocalizedTextFields, filterBySplitField, getMappingPrefix, getTableAlias, getTableName, getTargetExpression, getWhereClause, getWhereClauses, mapFilterExpressionsToOtherTableColumnNames, 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.EntityRepository
getByRefId, setRelatedEntitiesMethods inherited from interface de.digitalcollections.cudami.server.backend.api.repository.identifiable.IdentifiableRepository
addRelatedEntity, addRelatedEntity, addRelatedFileresource, addRelatedFileresource, findByLanguageAndInitial, findRelatedEntities, findRelatedEntities, findRelatedFileResources, findRelatedFileResources, getByIdentifiable, getByIdentifier, getByIdentifier, getLanguages, setRelatedEntities, setRelatedFileResources, setRelatedFileResourcesMethods inherited from interface de.digitalcollections.cudami.server.backend.api.repository.identifiable.entity.work.ManifestationRepository
findManifestationsByWork, findSubParts, getLanguagesOfManifestationsForWorkMethods inherited from interface de.digitalcollections.cudami.server.backend.api.repository.PagingSortingFilteringRepository
findMethods inherited from interface de.digitalcollections.cudami.server.backend.api.repository.UniqueObjectRepository
count, delete, delete, deleteByUuid, deleteByUuids, getByExample, getByExampleAndFiltering, getByUuid, getByUuidAndFiltering, getRandom, save, saveOrUpdate, update
-
Field Details
-
MAPPING_PREFIX
- See Also:
-
TABLE_ALIAS
- See Also:
-
TABLE_NAME
- See Also:
-
-
Constructor Details
-
ManifestationRepositoryImpl
public ManifestationRepositoryImpl(org.jdbi.v3.core.Jdbi jdbi, CudamiConfig cudamiConfig, IdentifierRepository identifierRepository, UrlAliasRepository urlAliasRepository, MainSubTypeMapper.ExpressionTypeMapper expressionTypeMapper, LocalDateRangeMapper dateRangeMapper, TitleMapper titleMapper, EntityRepositoryImpl<de.digitalcollections.model.identifiable.entity.Entity> entityRepository, AgentRepositoryImpl<de.digitalcollections.model.identifiable.entity.agent.Agent> agentRepository, HumanSettlementRepositoryImpl humanSettlementRepository)
-
-
Method Details
-
create
public de.digitalcollections.model.identifiable.entity.manifestation.Manifestation create() throws RepositoryException- Specified by:
createin interfaceUniqueObjectRepository<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>- Overrides:
createin classIdentifiableRepositoryImpl<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>- Throws:
RepositoryException
-
createAdditionalReduceRowsBiConsumer
protected BiConsumer<Map<UUID,de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>, createAdditionalReduceRowsBiConsumer()org.jdbi.v3.core.result.RowView> Description copied from class:UniqueObjectRepositoryImplFor details select (only used in find one, not lists): if additional objects should be "joined" into instance, set bi function for doing this.- Overrides:
createAdditionalReduceRowsBiConsumerin classIdentifiableRepositoryImpl<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>- Returns:
- BiConsumer function
-
extendReducedIdentifiable
protected void extendReducedIdentifiable(de.digitalcollections.model.identifiable.entity.manifestation.Manifestation manifestation, org.jdbi.v3.core.result.RowView rowView) Description copied from class:IdentifiableRepositoryImplExtend the reduced Identifiable by the contents of the provided RowView- Overrides:
extendReducedIdentifiablein classIdentifiableRepositoryImpl<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>- Parameters:
manifestation- the reduced IdentifiablerowView- the rowView
-
findManifestationsByWork
public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation> findManifestationsByWork(UUID workUuid, de.digitalcollections.model.list.paging.PageRequest pageRequest) throws RepositoryException - Specified by:
findManifestationsByWorkin interfaceManifestationRepository- Throws:
RepositoryException
-
findSubParts
public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation> findSubParts(UUID uuid, de.digitalcollections.model.list.paging.PageRequest pageRequest) throws RepositoryException - Specified by:
findSubPartsin interfaceManifestationRepository- Throws:
RepositoryException
-
getAllowedOrderByFields
- Overrides:
getAllowedOrderByFieldsin classEntityRepositoryImpl<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>- Returns:
- model properties names that are applicable for sorting, will be mapped to database column names using @see #getColumnName
-
getColumnName
- Overrides:
getColumnNamein classEntityRepositoryImpl<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>- 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)
-
getLanguagesOfManifestationsForWork
- Specified by:
getLanguagesOfManifestationsForWorkin interfaceManifestationRepository
-
getSqlInsertFields
- Overrides:
getSqlInsertFieldsin classEntityRepositoryImpl<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>- Returns:
- SQL for field names for insert statement of
UniqueObject
-
getSqlInsertValues
Description copied from class:UniqueObjectRepositoryImplDo not change order! Must match order in getSqlInsertFields!!!- Overrides:
getSqlInsertValuesin classEntityRepositoryImpl<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>- Returns:
- SQL for value mapping for field names for insert statement of
UniqueObject
-
getSqlSelectAllFields
Description copied from class:IdentifiableRepositoryImplSQL-snippet for fields to be returned for complete field request.
If already all fields are returned with reduced fields request: just return reduced field set here, otherwise add additional fields to reduced set to get all fields.- Overrides:
getSqlSelectAllFieldsin classEntityRepositoryImpl<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>- Returns:
- SQL snippet
-
getSqlSelectAllFieldsJoins
- Overrides:
getSqlSelectAllFieldsJoinsin classUniqueObjectRepositoryImpl<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>- Returns:
- SQL for joined fields for complete field set from other table(s) (optional). Default: ""
-
getSqlSelectReducedFields
- Overrides:
getSqlSelectReducedFieldsin classEntityRepositoryImpl<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>- Returns:
- SQL for fields of reduced field set of
UniqueObject
-
getSqlSelectReducedFieldsJoins
- Overrides:
getSqlSelectReducedFieldsJoinsin classUniqueObjectRepositoryImpl<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>- Returns:
- SQL for joined fields for reduced field set from other table(s) (optional). Default: ""
-
getSqlUpdateFieldValues
- Overrides:
getSqlUpdateFieldValuesin classEntityRepositoryImpl<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>
-
removeParent
public boolean removeParent(de.digitalcollections.model.identifiable.entity.manifestation.Manifestation manifestation, de.digitalcollections.model.identifiable.entity.manifestation.Manifestation parentManifestation) throws RepositoryException - Specified by:
removeParentin interfaceManifestationRepository- Throws:
RepositoryException
-
save
public void save(de.digitalcollections.model.identifiable.entity.manifestation.Manifestation manifestation, Map<String, Object> bindings) throws RepositoryException- Specified by:
savein interfaceUniqueObjectRepository<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>- Overrides:
savein classUniqueObjectRepositoryImpl<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>- 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().- Overrides:
supportsCaseSensitivityForPropertyin classIdentifiableRepositoryImpl<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>- Parameters:
modelProperty- the property name (similar toAbstractPagingSortingFilteringRepositoryImpl.getColumnName(java.lang.String))- Returns:
trueonly if case (in)sensitive sorting is possible
-
update
public void update(de.digitalcollections.model.identifiable.entity.manifestation.Manifestation manifestation, Map<String, Object> bindings) throws RepositoryException- Specified by:
updatein interfaceUniqueObjectRepository<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>- Overrides:
updatein classEntityRepositoryImpl<de.digitalcollections.model.identifiable.entity.manifestation.Manifestation>- Throws:
RepositoryException
-