Examples of where()


Examples of org.apache.torque.criteria.Criteria.where()

     */
    public void testMultiplePk() throws Exception
    {
        // clean table
        Criteria criteria = new Criteria();
        criteria.where(MultiPkPeer.PK1, (Object) null, Criteria.NOT_EQUAL);
        MultiPkPeer.doDelete(criteria);

        // do test
        MultiPk mpk = new MultiPk();
        mpk.setPrimaryKey("Svarchar:N5:Schar:N3:N-42:N3:N4:N5:N6:D9999999999:");
View Full Code Here

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

  }

  @SuppressWarnings({ "unchecked", "rawtypes" })
  public Set<String> getResourceNames(int scope) {
    OqlBuilder query = OqlBuilder.from(Resource.class, "resource");
    query.where("resource.scope=:scope and resource.enabled=true", Integer.valueOf(scope));
    query.select("resource.name");
    return CollectUtils.newHashSet(entityDao.search(query));
  }

  /**
 
View Full Code Here

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

  }

  @SuppressWarnings({ "unchecked", "rawtypes" })
  public void updateState(Long[] resourceIds, boolean isEnabled) {
    OqlBuilder query = OqlBuilder.from(Resource.class, "resource");
    query.where("resource.id in (:ids)", resourceIds);
    List<Resource> resources = entityDao.search(query);
    for (Resource resource : resources) {
      resource.setEnabled(isEnabled);
    }
    entityDao.saveOrUpdate(resources);
View Full Code Here

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

  }

  @SuppressWarnings({ "rawtypes", "unchecked" })
  public Collection<Group> filter(Collection<Group> groups, Resource resource) {
    OqlBuilder builder = OqlBuilder.from(Authority.class, "au");
    builder.where("au.group in (:groups) and au.resource = :resource", groups, resource);
    builder.select("au.group");
    return entityDao.search(builder);
  }

  public Authority getAuthority(Group group, Resource resource) {
View Full Code Here

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

  @SuppressWarnings({ "rawtypes", "unchecked" })
  public List<Group> getGroups(User user, GroupMember.Ship ship) {
    if (isAdmin(user) && !ObjectUtils.equals(ship, GroupMember.Ship.MEMBER)) return entityDao
        .getAll(Group.class);
    OqlBuilder builder = OqlBuilder.from(GroupMember.class, "gm");
    builder.where("gm.user=:user", user).select("gm.group");
    if (null != ship) {
      if (ship.equals(GroupMember.Ship.MEMBER)) builder.where("gm.member=true");
      if (ship.equals(GroupMember.Ship.MANAGER)) builder.where("gm.manager=true");
      if (ship.equals(GroupMember.Ship.GRANTER)) builder.where("gm.granter=true");
    }
View Full Code Here

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

    if (isAdmin(user) && !ObjectUtils.equals(ship, GroupMember.Ship.MEMBER)) return entityDao
        .getAll(Group.class);
    OqlBuilder builder = OqlBuilder.from(GroupMember.class, "gm");
    builder.where("gm.user=:user", user).select("gm.group");
    if (null != ship) {
      if (ship.equals(GroupMember.Ship.MEMBER)) builder.where("gm.member=true");
      if (ship.equals(GroupMember.Ship.MANAGER)) builder.where("gm.manager=true");
      if (ship.equals(GroupMember.Ship.GRANTER)) builder.where("gm.granter=true");
    }
    builder.cacheable();
    return entityDao.search(builder);
View Full Code Here

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

        .getAll(Group.class);
    OqlBuilder builder = OqlBuilder.from(GroupMember.class, "gm");
    builder.where("gm.user=:user", user).select("gm.group");
    if (null != ship) {
      if (ship.equals(GroupMember.Ship.MEMBER)) builder.where("gm.member=true");
      if (ship.equals(GroupMember.Ship.MANAGER)) builder.where("gm.manager=true");
      if (ship.equals(GroupMember.Ship.GRANTER)) builder.where("gm.granter=true");
    }
    builder.cacheable();
    return entityDao.search(builder);
  }
View Full Code Here

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

    OqlBuilder builder = OqlBuilder.from(GroupMember.class, "gm");
    builder.where("gm.user=:user", user).select("gm.group");
    if (null != ship) {
      if (ship.equals(GroupMember.Ship.MEMBER)) builder.where("gm.member=true");
      if (ship.equals(GroupMember.Ship.MANAGER)) builder.where("gm.manager=true");
      if (ship.equals(GroupMember.Ship.GRANTER)) builder.where("gm.granter=true");
    }
    builder.cacheable();
    return entityDao.search(builder);
  }
View Full Code Here

Examples of org.jboss.test.deployers.scope.support.TestClassAnnotation.where()

         TestClassAspect.classAnnotation = null;
         proxy.doSomething();
        
         TestClassAnnotation annotation = TestClassAspect.classAnnotation;
         assertNotNull(annotation);
         assertEquals("Class", annotation.where());
      }
      finally
      {
         main.removeDeployment(a);
         main.process();
View Full Code Here

Examples of org.nutz.dao.sql.Criteria.where()

                PItem[] _cndItems = Pojos.Items.cnd(lnk.createCondition(obj));
                pojo.append(_cndItems);
                if (cnd != null) {
                    if (cnd instanceof Criteria) {
                        Criteria cri = (Criteria)cnd;
                        SqlExpressionGroup seg = cri.where();
                        if (_cndItems.length > 0 && seg != null && !seg.isEmpty()) {
                            seg.setTop(false);
                            pojo.append(Pojos.Items.wrap(" AND "));
                        }
                        pojo.append(cri);
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.