Class DigitalObjectRepositoryImpl

    • Constructor Detail

      • DigitalObjectRepositoryImpl

        @Autowired
        public DigitalObjectRepositoryImpl​(org.jdbi.v3.core.Jdbi dbi,
                                           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()
      • extendReducedIdentifiable

        protected void extendReducedIdentifiable​(de.digitalcollections.model.identifiable.entity.DigitalObject identifiable,
                                                 org.jdbi.v3.core.result.RowView rowView)
        Description copied from class: IdentifiableRepositoryImpl
        Extend the reduced Identifiable by the contents of the provided RowView
        Overrides:
        extendReducedIdentifiable in class IdentifiableRepositoryImpl<de.digitalcollections.model.identifiable.entity.DigitalObject>
        Parameters:
        identifiable - the reduced Identifiable
        rowView - the rowView
      • findCollections

        public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> findCollections​(UUID digitalObjectUuid,
                                                                                                                                                de.digitalcollections.model.list.paging.PageRequest pageRequest)
        Specified by:
        findCollections in interface DigitalObjectRepository
      • findProjects

        public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Project> findProjects​(UUID digitalObjectUuid,
                                                                                                                                          de.digitalcollections.model.list.paging.PageRequest pageRequest)
        Specified by:
        findProjects in interface DigitalObjectRepository
      • getByIdentifier

        public de.digitalcollections.model.identifiable.entity.DigitalObject getByIdentifier​(de.digitalcollections.model.identifiable.Identifier identifier)
        Specified by:
        getByIdentifier in interface IdentifiableRepository<de.digitalcollections.model.identifiable.entity.DigitalObject>
        Overrides:
        getByIdentifier in class IdentifiableRepositoryImpl<de.digitalcollections.model.identifiable.entity.DigitalObject>
      • getColumnName

        public String getColumnName​(String modelProperty)
        Overrides:
        getColumnName in class EntityRepositoryImpl<de.digitalcollections.model.identifiable.entity.DigitalObject>
        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)
      • save

        public de.digitalcollections.model.identifiable.entity.DigitalObject save​(de.digitalcollections.model.identifiable.entity.DigitalObject digitalObject)
        Specified by:
        save in interface IdentifiableRepository<de.digitalcollections.model.identifiable.entity.DigitalObject>
      • setAgentEntityRepository

        public void setAgentEntityRepository​(EntityRepositoryImpl<de.digitalcollections.model.identifiable.entity.agent.Agent> agentEntityRepositoryImpl)
      • setFileResourceMetadataRepository

        public void setFileResourceMetadataRepository​(FileResourceMetadataRepositoryImpl<de.digitalcollections.model.identifiable.resource.FileResource> fileResourceMetadataRepositoryImpl)
      • setFileResources

        public List<de.digitalcollections.model.identifiable.resource.FileResource> setFileResources​(UUID digitalObjectUuid,
                                                                                                     List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources)
        Specified by:
        setFileResources in interface DigitalObjectRepository
      • setGeoLocationRepositoryImpl

        public void setGeoLocationRepositoryImpl​(GeoLocationRepositoryImpl geoLocationRepositoryImpl)
      • setGeolocationEntityRepositoryImpl

        public void setGeolocationEntityRepositoryImpl​(EntityRepositoryImpl<de.digitalcollections.model.identifiable.entity.geo.location.GeoLocation> geolocationEntityRepositoryImpl)
      • setPersonRepository

        public void setPersonRepository​(PersonRepositoryImpl personRepositoryImpl)
      • update

        public de.digitalcollections.model.identifiable.entity.DigitalObject update​(de.digitalcollections.model.identifiable.entity.DigitalObject digitalObject)
        Specified by:
        update in interface IdentifiableRepository<de.digitalcollections.model.identifiable.entity.DigitalObject>