com.silverpeas.delegatednews.dao
Interface DelegatedNewsDao

All Superinterfaces:
org.springframework.data.repository.CrudRepository<DelegatedNews,Integer>, org.springframework.data.jpa.repository.JpaRepository<DelegatedNews,Integer>, org.springframework.data.repository.PagingAndSortingRepository<DelegatedNews,Integer>, org.springframework.data.repository.Repository<DelegatedNews,Integer>

public interface DelegatedNewsDao
extends org.springframework.data.jpa.repository.JpaRepository<DelegatedNews,Integer>


Method Summary
 List<DelegatedNews> findByStatus(String status)
           
 
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllInBatch, deleteInBatch, findAll, findAll, flush, save, saveAndFlush
 
Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAll
 
Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, delete, delete, deleteAll, exists, findAll, findOne, save
 

Method Detail

findByStatus

@Query(value="from DelegatedNews dn WHERE dn.status = :status and ((begindate is null and enddate is null) or (begindate is null and enddate is not null and CURRENT_TIMESTAMP <= enddate) or (begindate is not null and enddate is null and CURRENT_TIMESTAMP >= begindate) or (begindate is not null and enddate is not null and CURRENT_TIMESTAMP >= begindate and CURRENT_TIMESTAMP <= enddate) )order by dn.newsOrder ASC")
List<DelegatedNews> findByStatus(@Param(value="status")
                                       String status)


Copyright © 2016 Silverpeas. All Rights Reserved.