Package org.beangle.model.query.builder

Examples of org.beangle.model.query.builder.OqlBuilder.select()


  }

  @SuppressWarnings({ "rawtypes", "unchecked" })
  public int count() {
    OqlBuilder builder = OqlBuilder.from(Sessioninfo.class, "info");
    builder.select("count(id)");
    List<Number> numbers = entityDao.search(builder);
    if (numbers.isEmpty()) return 0;
    else return (numbers.get(0)).intValue();
  }
View Full Code Here


  @SuppressWarnings({ "rawtypes", "unchecked" })
  public Collection<GroupProfile> getProfiles(Collection<Group> groups, Resource resource) {
    if (groups.isEmpty()) return Collections.EMPTY_LIST;
    OqlBuilder builder = OqlBuilder.from("from "+ Authority.class.getName() + " au,"+GroupProfile.class.getName()+" gp");
    builder.where("au.group in (:groups) and au.resource = :resource and au.group=gp.group", groups, resource);
    builder.select("gp");
    return entityDao.search(builder);
  }

  private List<RestrictionHolder> getAuthorityRestrictions(User user, Resource resource) {
    OqlBuilder<RestrictionHolder> query = OqlBuilder.hql("from " + Authority.class.getName() + " r "
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.