Package org.hibernate.criterion

Examples of org.hibernate.criterion.ProjectionList


   
    pracownikService.findByParams(listProjections, listCriterions);
  }
  @Test
  public void findByParamsProjectionsCriteriaOrder() throws Exception{
    ProjectionList listProjections = Projections.projectionList();
    listProjections.add(Projections.property(Pracownik.PROPERTY_ID));
    listProjections.add(Projections.property(Pracownik.PROPERTY_OBJECT_DZIALS+"."+Dzial.PROPERTY_NAZWA_DZIALU));
   
    List<Criterion> listCriterions = new ArrayList<Criterion>();
    listCriterions.add(Restrictions.isNotNull(Pracownik.PROPERTY_ID));
    listCriterions.add(Restrictions.isNotNull(Pracownik.PROPERTY_OBJECT_DZIALS+"."+Dzial.PROPERTY_ID));
   
View Full Code Here


    pracownikService.findByParams(listProjections, listCriterions, listOrders);
  }
 
  @Test
  public void findByParamsProjectionsCriteriaOrderStartIndexRowAmount() throws Exception{
    ProjectionList listProjections = Projections.projectionList();
    listProjections.add(Projections.property(Pracownik.PROPERTY_ID));
   
    List<Criterion> listCriterions = new ArrayList<Criterion>();
    listCriterions.add(Restrictions.isNotNull(Pracownik.PROPERTY_NAZWISKO));
    listCriterions.add(Restrictions.isNotNull(Pracownik.PROPERTY_OBJECT_DZIALS+"."+Dzial.PROPERTY_NAZWA_DZIALU));
   
View Full Code Here

    pracownikService.getRowCount(list);
  }

  @Test
  public void getRowCountProjectionCriteria() throws Exception{
    ProjectionList listProjections = Projections.projectionList();
    listProjections.add(Projections.distinct(Projections.property(Pracownik.PROPERTY_NAZWISKO)));
 
    List<Criterion> list = new ArrayList<Criterion>();
    list.add(Restrictions.isNotNull(Pracownik.PROPERTY_NAZWISKO));
    list.add(Restrictions.isNotNull(Pracownik.PROPERTY_OBJECT_DZIALS+"."+Dzial.PROPERTY_NAZWA_DZIALU));
    pracownikService.getRowCount(listProjections, list);
View Full Code Here

    pracownikService.getRowCount(listProjections, list);
  }
 
  @Test
  public void getRowCount() throws Exception {
    ProjectionList listProjections = Projections.projectionList();
    listProjections.add(Projections.property(Pracownik.PROPERTY_NAZWISKO));
   
    List<Criterion> list = new ArrayList<Criterion>();
    list.add(Restrictions.isNotNull(Pracownik.PROPERTY_NAZWISKO));
    System.out.println(pracownikService.getRowCount(listProjections, list));
  }
View Full Code Here

    System.out.println(stanowiskoService.getStanowiskoName(2));
  }

  @Test
  public void findByParamsProjections() throws Exception{
    ProjectionList list = Projections.projectionList();
    list.add(Projections.property(Stanowisko.PROPERTY_ID));
    list.add(Projections.property(Stanowisko.PROPERTY_OBJECT_PPRACOWNIKS+"."+Pracownik.PROPERTY_NAZWISKO));
    list.add(Projections.property(Stanowisko.PROPERTY_OBJECT_PPRACOWNIKS+"."+Pracownik.PROPERTY_OBJECT_DZIALS+"."+Dzial.PROPERTY_NAZWA_DZIALU));
    stanowiskoService.findByParams(list);
  }
View Full Code Here

    }
  }
 
  @Test
  public void findByParamsProjectionsCriteria() throws Exception{
    ProjectionList listProjections = Projections.projectionList();
    listProjections.add(Projections.property(Stanowisko.PROPERTY_ID));
    listProjections.add(Projections.property(Stanowisko.PROPERTY_OBJECT_PPRACOWNIKS+"."+Pracownik.PROPERTY_NAZWISKO));
    listProjections.add(Projections.property(Stanowisko.PROPERTY_OBJECT_PPRACOWNIKS+"."+Pracownik.PROPERTY_OBJECT_DZIALS+"."+Dzial.PROPERTY_ID));
   
    List<Criterion> listCriterions = new ArrayList<Criterion>();
    listCriterions.add(Restrictions.isNotNull(Stanowisko.PROPERTY_ID));
    listCriterions.add(Restrictions.isNotNull(Stanowisko.PROPERTY_OBJECT_PPRACOWNIKS+"."+Pracownik.PROPERTY_ID));
   
View Full Code Here

   
    stanowiskoService.findByParams(listProjections, listCriterions);
  }
  @Test
  public void findByParamsProjectionsCriteriaOrder() throws Exception{
    ProjectionList listProjections = Projections.projectionList();
    listProjections.add(Projections.property(Stanowisko.PROPERTY_ID));
    listProjections.add(Projections.property(Stanowisko.PROPERTY_OBJECT_PPRACOWNIKS+"."+Pracownik.PROPERTY_IMIE));
    listProjections.add(Projections.property(Stanowisko.PROPERTY_OBJECT_PPRACOWNIKS+"."+Pracownik.PROPERTY_OBJECT_DZIALS+"."+Dzial.PROPERTY_NAZWA_DZIALU));
   
    List<Criterion> listCriterions = new ArrayList<Criterion>();
    listCriterions.add(Restrictions.isNotNull(Stanowisko.PROPERTY_ID));
    listCriterions.add(Restrictions.isNotNull(Stanowisko.PROPERTY_OBJECT_PPRACOWNIKS+"."+Pracownik.PROPERTY_ID));
    listCriterions.add(Restrictions.isNotNull(Stanowisko.PROPERTY_OBJECT_PPRACOWNIKS+"."+Pracownik.PROPERTY_OBJECT_DZIALS+"."+Dzial.PROPERTY_ID));
View Full Code Here

    stanowiskoService.findByParams(listProjections, listCriterions, listOrders);
  }
 
  @Test
  public void findByParamsProjectionsCriteriaOrderStartIndexRowAmount() throws Exception{
    ProjectionList listProjections = Projections.projectionList();
    listProjections.add(Projections.property(Stanowisko.PROPERTY_ID));
   
    List<Criterion> listCriterions = new ArrayList<Criterion>();
    listCriterions.add(Restrictions.isNotNull(Stanowisko.PROPERTY_NAZWA));
    listCriterions.add(Restrictions.isNotNull(Stanowisko.PROPERTY_OBJECT_PPRACOWNIKS+"."+Pracownik.PROPERTY_ID));
    listCriterions.add(Restrictions.isNotNull(Stanowisko.PROPERTY_OBJECT_PPRACOWNIKS+"."+Pracownik.PROPERTY_OBJECT_DZIALS+"."+Dzial.PROPERTY_ID));
View Full Code Here

    stanowiskoService.getRowCount(list);
  }

  @Test
  public void getRowCountProjectionCriteria() throws Exception{
    ProjectionList listProjections = Projections.projectionList();
    listProjections.add(Projections.distinct(Projections.property(Stanowisko.PROPERTY_NAZWA)));
 
    List<Criterion> list = new ArrayList<Criterion>();
    list.add(Restrictions.isNotNull(Stanowisko.PROPERTY_NAZWA));
    list.add(Restrictions.isNotNull(Stanowisko.PROPERTY_OBJECT_PPRACOWNIKS+"."+Pracownik.PROPERTY_ID));
    stanowiskoService.getRowCount(listProjections, list);
View Full Code Here

    stanowiskoService.getRowCount(listProjections, list);
  }
 
  @Test
  public void getRowCount() throws Exception {
    ProjectionList listProjections = Projections.projectionList();
    listProjections.add(Projections.property(Stanowisko.PROPERTY_NAZWA));
   
    List<Criterion> list = new ArrayList<Criterion>();
    list.add(Restrictions.isNotNull(Stanowisko.PROPERTY_NAZWA));
    System.out.println(stanowiskoService.getRowCount(listProjections, list));
  }
View Full Code Here

TOP

Related Classes of org.hibernate.criterion.ProjectionList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.