Example usage for org.springframework.data.jpa.repository JpaSpecificationExecutor interface-usage

List of usage examples for org.springframework.data.jpa.repository JpaSpecificationExecutor interface-usage

Introduction

In this page you can find the example usage for org.springframework.data.jpa.repository JpaSpecificationExecutor interface-usage.

Usage

From source file com.gamewin.weixin.repository.HistoryUrlDao.java

public interface HistoryUrlDao
        extends PagingAndSortingRepository<HistoryUrl, Long>, JpaSpecificationExecutor<HistoryUrl> {

    @Query("SELECT COUNT(t.taskId) FROM HistoryUrl  t WHERE  t.userIp=?1 AND t.qrcodeId=?2")
    Integer selectHistoryUrlByuserIpAndqrcodeId(String userIp, Long qrcodeId);
}

From source file com.gamewin.weixin.repository.WeiXinUserDao.java

public interface WeiXinUserDao
        extends PagingAndSortingRepository<WeiXinUser, Long>, JpaSpecificationExecutor<WeiXinUser> {

    @Query("SELECT COUNT(DISTINCT t.fromUserName) FROM WeiXinUser  t WHERE  t.event='subscribe' AND t.eventKey=?1")
    int selectSubscribeByUserId(String key);
}

From source file th.co.geniustree.dental.repo.DetailHealRepo.java

/**
 *
 * @author User
 */
public interface DetailHealRepo extends JpaRepository<DetailHeal, Integer>, JpaSpecificationExecutor<DetailHeal> {

From source file com.gamewin.weixin.repository.HistoryWeixinDao.java

public interface HistoryWeixinDao
        extends PagingAndSortingRepository<HistoryWeixin, Long>, JpaSpecificationExecutor<HistoryWeixin> {

    @Query("SELECT COUNT(t.taskId) FROM HistoryWeixin  t WHERE  t.taskId=?1 AND t.fromUserName=?2")
    Integer selectHistoryWeixinBytaskId(Long taskId, String fromUserName);
}

From source file th.co.geniustree.dental.repo.AppointmentRepo.java

/**
 *
 * @author Best
 */
public interface AppointmentRepo
        extends JpaRepository<Appointment, Integer>, JpaSpecificationExecutor<Appointment> {

From source file com.mycompany.apsdtask.repository.EMailRepository.java

@Repository
public interface EMailRepository extends CrudRepository<EMail, Long>, JpaSpecificationExecutor {

    @Query("select m from EMail m where m.date>?1 and m.date<?2")
    public Stream<EMail> findByDate(Date after, Date before);

From source file th.co.geniustree.dental.repo.PriceAndExpireProductRepo.java

/**
 *
 * @author User
 */
public interface PriceAndExpireProductRepo
        extends JpaRepository<PriceAndExpireProduct, Integer>, JpaSpecificationExecutor<PriceAndExpireProduct> {

From source file com.gamewin.weixin.repository.UserDao.java

public interface UserDao extends PagingAndSortingRepository<User, Long>, JpaSpecificationExecutor<User> {
    User findByLoginName(String loginName);

    @Query("SELECT t FROM User t WHERE upuser.id =?1 OR upuser.id IN (SELECT id FROM User WHERE upuser.id=?1)")
    List<User> findByTwoAdmin(Long id);

From source file beadsan.repository.TrnDesignRepository.java

/**
 *
 * @author ko-aoki
 */
public interface TrnDesignRepository
        extends JpaRepository<TrnDesign, Integer>, JpaSpecificationExecutor<TrnDesign> {

From source file com.gamewin.weixin.repository.ActivationCodeDao.java

public interface ActivationCodeDao
        extends PagingAndSortingRepository<ActivationCode, Long>, JpaSpecificationExecutor<ActivationCode> {

    Page<ActivationCode> findByUserId(Long id, Pageable pageRequest);

}