Interface ApiDbEntryRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<ApiDbEntry,String>, org.springframework.data.jpa.repository.JpaRepository<ApiDbEntry,String>, org.springframework.data.repository.PagingAndSortingRepository<ApiDbEntry,String>, org.springframework.data.repository.query.QueryByExampleExecutor<ApiDbEntry>, org.springframework.data.repository.Repository<ApiDbEntry,String>

@Repository @ConditionalOnProperty(value="openaire.exporter.enable.dsm", havingValue="true") public interface ApiDbEntryRepository extends org.springframework.data.jpa.repository.JpaRepository<ApiDbEntry,String>
Created by claudio on 15/06/2017.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addApiParam(String apiId, String param, String value)
     
     
    void
    setBaseurl(String id, String baseurl)
     
    void
    setRemovable(String id, boolean removable)
     
    void
    updateCompatibility(String apiId, String compatibility)
     
    void
    updateCompatibilityOverride(String apiId, String compatibility)
     
    void
    updateOaiSet(String apiId, String oaiSet)
     

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, saveAll, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findOne
  • Method Details

    • findByDatasource

      @Query("select a from #{#entityName} a where a.datasource = ?1") List<ApiDbEntry> findByDatasource(String dsId)
    • setBaseurl

      @Modifying @Query("update #{#entityName} a set a.baseurl = ?2 where a.id = ?1") void setBaseurl(String id, String baseurl)
    • updateCompatibility

      @Modifying @Query("update #{#entityName} a set a.compatibility = ?2 where a.id = ?1") void updateCompatibility(String apiId, String compatibility)
    • updateCompatibilityOverride

      @Modifying @Query("update #{#entityName} a set a.compatibilityOverride = ?2 where a.id = ?1") void updateCompatibilityOverride(String apiId, String compatibility)
    • updateOaiSet

      @Modifying @Query(value="update dsm_apiparams ap set value = ?2 where ap.param = \'set\' and ap.api = ?1", nativeQuery=true) void updateOaiSet(String apiId, String oaiSet)
    • addApiParam

      @Modifying @Query(value="insert into dsm_apiparams(api, param, value, _dnet_resource_identifier_) values(?1, ?2, ?3, ?1||\'@@\'||?2)", nativeQuery=true) void addApiParam(String apiId, String param, String value)
    • setRemovable

      @Modifying @Query("update #{#entityName} d set d.removable = ?2 where d.datasource = ?1") void setRemovable(String id, boolean removable)