Class FileResourceMetadataRepositoryImpl<F extends de.digitalcollections.model.identifiable.resource.FileResource>

    • Constructor Detail

      • FileResourceMetadataRepositoryImpl

        @Autowired
        public FileResourceMetadataRepositoryImpl​(org.jdbi.v3.core.Jdbi dbi)
      • FileResourceMetadataRepositoryImpl

        protected FileResourceMetadataRepositoryImpl​(org.jdbi.v3.core.Jdbi dbi,
                                                     String tableName,
                                                     String tableAlias,
                                                     String mappingPrefix,
                                                     Class fileResourceImplClass,
                                                     String sqlSelectAllFields,
                                                     String sqlSelectReducedFields,
                                                     String sqlInsertFields,
                                                     String sqlInsertValues,
                                                     String sqlUpdateFieldValues)
    • 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()
      • getAllowedOrderByFields

        protected List<String> getAllowedOrderByFields()
        Overrides:
        getAllowedOrderByFields in class IdentifiableRepositoryImpl<F extends de.digitalcollections.model.identifiable.resource.FileResource>
        Returns:
        model properties names that are applicable for sorting, will be mapped to database column names using @see #getColumnName
      • getColumnName

        protected String getColumnName​(String modelProperty)
        Overrides:
        getColumnName in class IdentifiableRepositoryImpl<F extends de.digitalcollections.model.identifiable.resource.FileResource>
        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 F save​(F fileResource)
        Specified by:
        save in interface IdentifiableRepository<F extends de.digitalcollections.model.identifiable.resource.FileResource>
      • update

        public F update​(F fileResource)
        Specified by:
        update in interface IdentifiableRepository<F extends de.digitalcollections.model.identifiable.resource.FileResource>