Package org.hibernate.criterion

Examples of org.hibernate.criterion.ProjectionList


          //      c1.setProjection(Projections.property("username"));
          //      c1.setProjection(Projections.property("address"));
    int len=s.length;
    System.out.println(len);
   
    ProjectionList p1=Projections.projectionList();        
    for(int i=0; i<len; i++)
    {
                 p1.add(Projections.property(s[i]));
                 System.out.println(s[i]);
                
          //        p1.add(Projections.property("address"));
    }          
                 
View Full Code Here


    StanowiskoService stanowiskoService = null;
    try {
     
      stanowiskoService = (StanowiskoService) BusinessUtil
          .findBusiness("StanowiskoService");
      ProjectionList projectionList = Projections.projectionList();
      projectionList.add(Projections.property(Stanowisko.PROPERTY_ID));
      projectionList.add(Projections.property(Stanowisko.PROPERTY_NAZWA));



      List<Object[]> dane = stanowiskoService.findByParams(
          projectionList);
View Full Code Here

    try {
      stanowiskoService = (StanowiskoService) BusinessUtil
          .findBusiness("StanowiskoService");
      req.setAttribute("stanowisko", stanowiskoService.load(1));

      ProjectionList projectionList = Projections.projectionList();
      projectionList.add(Projections.property(Stanowisko.PROPERTY_ID));
      projectionList.add(Projections.property(Stanowisko.PROPERTY_NAZWA));
      req.setAttribute("stanowiskaDoSelecta", stanowiskoService
          .findByParams(projectionList));
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

  private void setTableData(HttpServletRequest req) {
    PracownikService pracownikService=null;
    try {
      pracownikService=(PracownikService)BusinessUtil.findBusiness("PracownikService");
     
      ProjectionList projectionList = Projections.projectionList();
      projectionList.add(Projections.property(Pracownik.PROPERTY_ID));
      projectionList.add(Projections.property(Pracownik.PROPERTY_IMIE));
      projectionList.add(Projections.property(Pracownik.PROPERTY_NAZWISKO));
      projectionList.add(Projections.property(Pracownik.PROPERTY_ADRES));
      projectionList.add(Projections.property(Pracownik.PROPERTY_OBJECT_STANOWSKO+"."+Stanowisko.PROPERTY_NAZWA));
      projectionList.add(Projections.property(Pracownik.PROPERTY_OBJECT_DZIALS+"."+Dzial.PROPERTY_NAZWA_DZIALU));
     
      List<Object[]> dane=pracownikService.findByParams(projectionList);
      List<Object[]> pusteDane = new ArrayList<Object[]>();
     
      req.setAttribute("daneDoTabelki", dane);
View Full Code Here

    try {
      pracownikService = (PracownikService) BusinessUtil
          .findBusiness("PracownikService");
      req.setAttribute("pracownik", pracownikService.load(1));

      ProjectionList projectionList = Projections.projectionList();
      projectionList.add(Projections.property(Pracownik.PROPERTY_ID));
      projectionList.add(Projections.property(Pracownik.PROPERTY_IMIE));
      projectionList.add(Projections.property(Pracownik.PROPERTY_NAZWISKO));
      projectionList.add(Projections.property(Pracownik.PROPERTY_ADRES));
      projectionList.add(Projections.property(Pracownik.PROPERTY_OBJECT_STANOWSKO+"."+Stanowisko.PROPERTY_NAZWA));
      projectionList.add(Projections.property(Pracownik.PROPERTY_OBJECT_DZIALS+"."+Dzial.PROPERTY_NAZWA_DZIALU));
     
      req.setAttribute("pracownicyDoSelecta", pracownikService
          .findByParams(projectionList));
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

      String[] projections, String columnOrder, String columnOrderDir,
      int startIndex) throws Exception {
    OfferService offerService = (OfferService) BusinessUtil
        .findBusiness("OfferService");

    ProjectionList projectionList = Projections.projectionList();
    for (int i = 0; i < projections.length; i++) {
      projectionList.add(Projections.property(projections[i]));
    }
    List<Criterion> criterions = new ArrayList<Criterion>();

    FiltersUtil filtersUtil = new FiltersUtil();
    criterions = filtersUtil
View Full Code Here

    return orders;
  }

  @Override
  public ProjectionList setProjections() {
    ProjectionList projectionList = Projections.projectionList();
    projectionList.add(Projections.property(Academy.PROPERTY_NAME));
    projectionList.add(Projections.property(Academy.PROPERTY_ADDRESS));
    projectionList.add(Projections.property(Academy.PROPERTY_USERLOGIN));
    return projectionList;
  }
View Full Code Here

   
    try {
      dzialService = (DzialService) BusinessUtil
          .findBusiness("DzialService");

      ProjectionList projectionList = Projections.projectionList();
      for (int i = 0; i < projections.length; i++) {
        projectionList.add(Projections.property(projections[i]));
      }

      List<Criterion> criterions = new ArrayList<Criterion>();
      if (filters.size() > 0) {
        if (!ValidatorUtil.isBlankOrNull(filters
View Full Code Here

    try {
      pracownikService = (PracownikService) BusinessUtil
          .findBusiness("PracownikService");

      ProjectionList projectionList = Projections.projectionList();
      for (int i = 0; i < projections.length; i++) {
        projectionList.add(Projections.property(projections[i]));
      }

      List<Criterion> criterions = new ArrayList<Criterion>();
      if (filters.size() > 0) {
        if (!ValidatorUtil.isBlankOrNull(filters
View Full Code Here

   
    try {
      stanowiskoService = (StanowiskoService) BusinessUtil
          .findBusiness("StanowiskoService");

      ProjectionList projectionList = Projections.projectionList();
      for (int i = 0; i < projections.length; i++) {
        projectionList.add(Projections.property(projections[i]));
      }

      List<Criterion> criterions = new ArrayList<Criterion>();
      if (filters.size() > 0) {
        if (!ValidatorUtil.isBlankOrNull(filters
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.