Exemplo n.º 1
0
  @Test
  // @Transactional
  public void JPAPageTest() {

    QCpCtrl qcpCtrl = QCpCtrl.cpCtrl;

    final Pageable page =
        new PageRequest(
            0,
            1,
            new Sort(
                new Sort.Order(Sort.Direction.ASC, "id.regstDay"),
                new Sort.Order(Sort.Direction.ASC, "id.regstTime")));

    Page<CpCtrl> cpCtrlEntries =
        cpCtrlRepository.findAll(
            qcpCtrl.id.eqpNum.eq(7).and(qcpCtrl.id.outletNum.eq(1)).and(qcpCtrl.transYn.eq("N")),
            page);

    cpCtrlEntries.forEach(
        c -> {
          System.out.println(c.getId().getRegstDay());
          System.out.println(c.getId().getRegstTime());
          // System.out.println(c.getCtrlParameter().toString());
          System.out.println(c.getOutletStat());
          System.out.println(c.getRegst());
        });
  }
Exemplo n.º 2
0
  @Test
  // @Transactional
  public void JPANativeQueryTest() {

    Iterable<CpCtrl> cpCtrlEntries = cpCtrlRepository.cpCtrlTest(2, "01", 2, "1", "20151127");

    cpCtrlEntries.forEach(
        c -> {
          System.out.println(c.getId().getRegstDay());
          System.out.println(c.getId().getRegstTime());
          // System.out.println(c.getCtrlParameter().toString());
          System.out.println(c.getOutletStat());
          System.out.println(c.getRegst());
        });
  }