Interface EnumerationDataRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<EnumerationDataBean,Long>, org.springframework.data.jpa.repository.JpaRepository<EnumerationDataBean,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<EnumerationDataBean>, org.springframework.data.repository.PagingAndSortingRepository<EnumerationDataBean,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<EnumerationDataBean>, org.springframework.data.repository.Repository<EnumerationDataBean,Long>

@Repository public interface EnumerationDataRepository extends org.springframework.data.jpa.repository.JpaRepository<EnumerationDataBean,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<EnumerationDataBean>
  • Method Details

    • findAllByTypeIdAndHiddenFalse

      org.springframework.data.domain.Page<EnumerationDataBean> findAllByTypeIdAndHiddenFalse(Integer enumerationTypeId, org.springframework.data.domain.Pageable pageable)
    • deleteEnumDataById

      @Transactional @Modifying @Query("UPDATE EnumerationDataBean SET hidden = :hidden WHERE enumerationDataId = :enumerationDataId") void deleteEnumDataById(@Param("enumerationDataId") Long enumerationDataId, @Param("hidden") boolean hidden)
    • getNonHiddenByEnumId

      @Query(value="SELECT * FROM enumeration_data WHERE enumeration_data_id = ?1 and hidden = ?2", nativeQuery=true) EnumerationDataBean getNonHiddenByEnumId(Long enumerationDataId, boolean hidden)
    • getEnumId

      @Query(value="SELECT * FROM enumeration_data WHERE enumeration_data_id = ?1", nativeQuery=true) EnumerationDataBean getEnumId(Integer enumerationDataId)
    • deleteAllEnumDataByEnumTypeId

      @Transactional @Modifying @Query(value="UPDATE enumeration_data SET hidden = ?2 WHERE enumeration_type_id = ?1", nativeQuery=true) void deleteAllEnumDataByEnumTypeId(Integer enumerationTypeId, boolean hidden)
    • getChildEnumTypeIdByEnumDataId

      @Query(value="SELECT child_enumeration_type_id FROM enumeration_data WHERE enumeration_data_id = ?1", nativeQuery=true) Integer getChildEnumTypeIdByEnumDataId(Integer enumerationDataId)
    • getParentEnumDataIdByEnumDataId

      @Query(value="SELECT parent_enumeration_data_id FROM enumeration_data WHERE enumeration_data_id = ?1", nativeQuery=true) Integer getParentEnumDataIdByEnumDataId(Integer enumerationDataId)
    • getHiddenByEnumerationDataId

      @Query(value="SELECT hidden FROM enumeration_data WHERE enumeration_data_id = ?1", nativeQuery=true) Object getHiddenByEnumerationDataId(Integer enumerationDataId)
    • denyChildEnumerationTypeByTypeId

      @Transactional @Modifying @Query(value="UPDATE enumeration_data SET child_enumeration_type_id = null WHERE enumeration_type_id = ?1", nativeQuery=true) void denyChildEnumerationTypeByTypeId(Long enumerationTypeId)
    • denyParentEnumerationDataByTypeId

      @Transactional @Modifying @Query(value="UPDATE enumeration_data SET parent_enumeration_data_id = null WHERE enumeration_type_id = ?1", nativeQuery=true) void denyParentEnumerationDataByTypeId(Long enumerationTypeId)
    • getIdByString1AndTypeId

      @Query("SELECT edb.id FROM EnumerationDataBean edb WHERE edb.string1 = :string1 AND edb.typeId = :typeId") Integer getIdByString1AndTypeId(@Param("string1") String string1, @Param("typeId") Integer typeId)
    • findMaxSortPriorityByTypeId

      @Query("SELECT MAX(edb.sortPriority) FROM EnumerationDataBean edb WHERE edb.typeId = :typeId") Optional<Integer> findMaxSortPriorityByTypeId(@Param("typeId") Integer typeId)
    • getAllDataIdsByTypeId

      @Query("SELECT edb.id FROM EnumerationDataBean edb WHERE edb.typeId = :typeId") Optional<List<Long>> getAllDataIdsByTypeId(@Param("typeId") Integer typeId)