Class LicenseRepositoryImpl
- 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.legal.LicenseRepositoryImpl
-
- All Implemented Interfaces:
LicenseRepository
@Repository public class LicenseRepositoryImpl extends JdbiRepositoryImpl implements LicenseRepository
-
-
Field Summary
Fields Modifier and Type Field Description static StringMAPPING_PREFIXstatic StringSQL_FULL_FIELDS_LIstatic StringSQL_INSERT_FIELDSstatic StringSQL_INSERT_VALUESstatic StringSQL_REDUCED_FIELDS_LIstatic StringTABLE_ALIASstatic StringTABLE_NAME-
Fields inherited from class de.digitalcollections.cudami.server.backend.impl.jdbi.JdbiRepositoryImpl
dbi, mappingPrefix, tableAlias, tableName
-
Fields inherited from class de.digitalcollections.cudami.server.backend.impl.database.AbstractPagingAndSortingRepositoryImpl
offsetForAlternativePaging
-
-
Constructor Summary
Constructors Constructor Description LicenseRepositoryImpl(org.jdbi.v3.core.Jdbi dbi, CudamiConfig cudamiConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteByUrl(URL url)voiddeleteByUuid(UUID uuid)voiddeleteByUuids(List<UUID> uuids)de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.legal.License>find(de.digitalcollections.model.list.paging.PageRequest pageRequest)protected de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.legal.License>find(de.digitalcollections.model.list.paging.PageRequest pageRequest, String commonSql, Map<String,Object> argumentMappings)List<de.digitalcollections.model.legal.License>getAll()protected List<String>getAllowedOrderByFields()de.digitalcollections.model.legal.LicensegetByUrl(URL url)de.digitalcollections.model.legal.LicensegetByUuid(UUID uuid)StringgetColumnName(String modelProperty)protected List<String>getSearchTermTemplates(String tableAlias, String originalSearchTerm)protected StringgetUniqueField()longretrieveCount(StringBuilder sqlCount, Map<String,Object> argumentMappings)List<de.digitalcollections.model.legal.License>retrieveList(String fieldsSql, StringBuilder innerQuery, String orderBy)de.digitalcollections.model.legal.Licensesave(de.digitalcollections.model.legal.License license)protected booleansupportsCaseSensitivityForProperty(String modelProperty)Returns whether the passed property can be sorted case sensitive (in general).de.digitalcollections.model.legal.Licenseupdate(de.digitalcollections.model.legal.License license)-
Methods inherited from class de.digitalcollections.cudami.server.backend.impl.jdbi.JdbiRepositoryImpl
addFiltering, addFiltering, addSearchTerm, addSearchTermMappings, count, count, escapeTermForJsonpath, getCommonSearchSql, getFilterClauses, getMappingPrefix, getTableAlias, getTableName, getWhereClause, mapFilterExpressionsToOtherTableColumnNames, retrieveNextSortIndexForParentChildren
-
Methods inherited from class de.digitalcollections.cudami.server.backend.impl.database.AbstractPagingAndSortingRepositoryImpl
addOrderBy, addPageRequestParams, getOrderBy
-
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.legal.LicenseRepository
count
-
-
-
-
Field Detail
-
MAPPING_PREFIX
public static final String MAPPING_PREFIX
- See Also:
- Constant Field Values
-
SQL_INSERT_FIELDS
public static final String SQL_INSERT_FIELDS
- See Also:
- Constant Field Values
-
SQL_INSERT_VALUES
public static final String SQL_INSERT_VALUES
- See Also:
- Constant Field Values
-
SQL_REDUCED_FIELDS_LI
public static final String SQL_REDUCED_FIELDS_LI
- See Also:
- Constant Field Values
-
SQL_FULL_FIELDS_LI
public static final String SQL_FULL_FIELDS_LI
- 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
-
LicenseRepositoryImpl
@Autowired public LicenseRepositoryImpl(org.jdbi.v3.core.Jdbi dbi, CudamiConfig cudamiConfig)
-
-
Method Detail
-
deleteByUrl
public void deleteByUrl(URL url)
- Specified by:
deleteByUrlin interfaceLicenseRepository
-
deleteByUuid
public void deleteByUuid(UUID uuid)
- Specified by:
deleteByUuidin interfaceLicenseRepository
-
deleteByUuids
public void deleteByUuids(List<UUID> uuids)
- Specified by:
deleteByUuidsin interfaceLicenseRepository
-
find
public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.legal.License> find(de.digitalcollections.model.list.paging.PageRequest pageRequest)
- Specified by:
findin interfaceLicenseRepository
-
find
protected de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.legal.License> find(de.digitalcollections.model.list.paging.PageRequest pageRequest, String commonSql, Map<String,Object> argumentMappings)
-
getAll
public List<de.digitalcollections.model.legal.License> getAll()
- Specified by:
getAllin interfaceLicenseRepository
-
getAllowedOrderByFields
protected List<String> getAllowedOrderByFields()
- Specified by:
getAllowedOrderByFieldsin classAbstractPagingAndSortingRepositoryImpl- Returns:
- model properties names that are applicable for sorting, will be mapped to database column names using @see #getColumnName
-
getByUrl
public de.digitalcollections.model.legal.License getByUrl(URL url)
- Specified by:
getByUrlin interfaceLicenseRepository
-
getByUuid
public de.digitalcollections.model.legal.License getByUuid(UUID uuid)
- Specified by:
getByUuidin interfaceLicenseRepository
-
getColumnName
public String getColumnName(String modelProperty)
- Specified by:
getColumnNamein classAbstractPagingAndSortingRepositoryImpl- 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)
-
getSearchTermTemplates
protected List<String> getSearchTermTemplates(String tableAlias, String originalSearchTerm)
- Overrides:
getSearchTermTemplatesin classJdbiRepositoryImpl
-
getUniqueField
protected String getUniqueField()
- Specified by:
getUniqueFieldin classAbstractPagingAndSortingRepositoryImpl- Returns:
- name of model property that guarantees an unique sorting, e.g. a db primary key or another unique column/field
-
retrieveCount
public long retrieveCount(StringBuilder sqlCount, Map<String,Object> argumentMappings)
-
retrieveList
public List<de.digitalcollections.model.legal.License> retrieveList(String fieldsSql, StringBuilder innerQuery, String orderBy)
-
save
public de.digitalcollections.model.legal.License save(de.digitalcollections.model.legal.License license)
- Specified by:
savein interfaceLicenseRepository
-
supportsCaseSensitivityForProperty
protected boolean supportsCaseSensitivityForProperty(String modelProperty)
Description copied from class:AbstractPagingAndSortingRepositoryImplReturns whether the passed property can be sorted case sensitive (in general). This method should be kept in sync withAbstractPagingAndSortingRepositoryImpl.getAllowedOrderByFields().- Specified by:
supportsCaseSensitivityForPropertyin classAbstractPagingAndSortingRepositoryImpl- Parameters:
modelProperty- the property name (similar toAbstractPagingAndSortingRepositoryImpl.getColumnName(java.lang.String))- Returns:
trueonly if case (in)sensitive sorting is possible
-
update
public de.digitalcollections.model.legal.License update(de.digitalcollections.model.legal.License license)
- Specified by:
updatein interfaceLicenseRepository
-
-