Package org.hibernate

Examples of org.hibernate.Criteria.list()


            criteria.addOrder(Order.asc("orderNr")).addOrder(
                Order.asc("defaultArticle")).addOrder(
                Order.desc("numberOfItems")).addOrder(
                Order.asc("orderLineId"));

            return criteria.list();
          }

        });
  }
View Full Code Here


                
          //        p1.add(Projections.property("address"));
    }          
                 
          c1.setProjection(p1);
                   List l1 = (List) c1.list();
                 // Iterator i =l1.iterator();
                 // while(i.hasNext())
                  //{
       //                   Object o[]=(Object [])i.next();
       //                   System.out.println(o[0] + "==" + o[1]);
View Full Code Here

    session.beginTransaction();
   
    Criteria criteria = session.createCriteria(Role.class)
    .add(Restrictions.eq("tipo", "Sistema"));
   
    List<Role> roles = criteria.list();
   
    session.close();
   
    return roles;
  }
View Full Code Here

    session.beginTransaction();
   
    Criteria criteria = session.createCriteria(Role.class)
    .add(Restrictions.eq("tipo", "Proyecto"));
   
    List<Role> roles = criteria.list();
   
    session.close();
   
    return roles;
  }
View Full Code Here

    session.beginTransaction();
   
    Criteria criteria = session.createCriteria(Role.class)
    .add(Restrictions.eq("tipo", "Sistema"));
   
    List<Role> roles = criteria.list();
   
    criteria = session.createCriteria(Usuario.class)
    .add(Restrictions.in("role", roles));
       
    usuarios = (Collection<Usuario>) criteria.list();
View Full Code Here

    List<Role> roles = criteria.list();
   
    criteria = session.createCriteria(Usuario.class)
    .add(Restrictions.in("role", roles));
       
    usuarios = (Collection<Usuario>) criteria.list();
   
    session.close();
   
    return usuarios;
  }
View Full Code Here

    session.beginTransaction();

    Criteria criteria = session.createCriteria(TipoItem.class)
    .add(Restrictions.eq("proyecto", proyecto));
   
    List<TipoItem> tipoItems = criteria.list();
   
    session.close();

    return tipoItems;
   
View Full Code Here

    session.beginTransaction();

    Criteria criteria = session.createCriteria(Estado.class)
    .add(Restrictions.eq("tipoItem", tipoItem));
   
    List<Estado> estados = criteria.list();
   
    session.close();

    return estados;
View Full Code Here

    session.beginTransaction();
   
    Criteria criteria = session.createCriteria(Item.class)
    .add(Restrictions.eq("proyecto", proyecto));

    List<Item> items = criteria.list();
   
    session.close();
   
    return items;
    }
View Full Code Here

    .setProjection(Projections.property("estadoHistorico"))
    .createCriteria("estadoActual")
    .add(Restrictions.eq("item", item))
    .addOrder(Order.asc("fechaInicio") );
   
    List<EstadoItem> estadosHistoricos = criteria.list();

    session.close();
   
    return estadosHistoricos;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.