Examples of like()


Examples of com.google.code.lightssh.common.dao.SearchCondition.like()

    if( ra != null ){
      if( ra.getRoleChange() != null ){
        RoleChange rc = ra.getRoleChange();
        if( rc.getRole() != null ){
          if( !StringUtils.isEmpty(rc.getRole().getName()) ){
            sc.like("roleChange.role.name", rc.getRole().getName().trim());
          }
        }
      }
    }
   
View Full Code Here

Examples of com.google.code.lightssh.common.dao.SearchCondition.like()

      if( t.getRole() != null ){
        if( !StringUtils.isEmpty(t.getRole().getId()) ){
          sc.equal("role.id",t.getRole().getId().trim());
        }
        if( !StringUtils.isEmpty(t.getRole().getName()) ){
          sc.like("role.name",t.getRole().getName().trim());
        }
      }
    }
    sc.in("status",RoleChange.Status.NEW.name(),RoleChange.Status.PROCESSING.name());
    //sc.equal("status",RoleChange.Status.NEW);
View Full Code Here

Examples of com.google.code.lightssh.common.dao.SearchCondition.like()

      return null;
   
    ListPage<RoleChange> page = new ListPage<RoleChange>();
    SearchCondition sc = new SearchCondition();
    if( !StringUtils.isEmpty(role.getId()) ){
      sc.like("role.id",role.getId().trim());
    }
   
    return getDao().list(page,sc).getList();
  }
 
View Full Code Here

Examples of com.google.code.lightssh.common.dao.SearchCondition.like()

  public ListPage<LoginAccountChange> listTodoAudit(ListPage<LoginAccountChange> page,LoginAccountChange t ){
    SearchCondition sc = new SearchCondition();
    if( t != null ){
      if( t.getLoginAccount() != null ){
        if( !StringUtils.isEmpty(t.getLoginAccount().getLoginName()) ){
          sc.like("loginAccount.loginName",t.getLoginAccount().getLoginName().trim());
        }
      }
    }
    sc.in("status",RoleChange.Status.NEW.name(),RoleChange.Status.PROCESSING.name());
    //sc.equal("status",RoleChange.Status.NEW);
View Full Code Here

Examples of com.j256.ormlite.stmt.Where.like()

        Where where = qb.where();
        where.eq("nightCard", false);
        where.eq("splitCardHalf", false);
        int clausesCount = 2;
        if (name != null) {
            where.like("name", new SelectArg('%' + name + '%'));
            clausesCount++;
        }
        if (rules != null) {
            where.like("rules", new SelectArg('%' + rules + '%'));
            clausesCount++;
View Full Code Here

Examples of com.sissi.context.JIDs.like()

   * @see com.sissi.pipeline.Input#input(com.sissi.context.JIDContext, com.sissi.protocol.Protocol)
   */
  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    JIDs exists = this.mapping.mapping(super.build(protocol.getTo()));
    return exists.isEmpty() || (this.multi ? exists.like(context.jid()) : exists.same(context.jid())) ? true : this.writeAndReturn(context, protocol);
  }

  private boolean writeAndReturn(JIDContext context, Protocol protocol) {
    context.write(protocol.parent().reply().setError(this.error));
    return false;
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.like()

        Expression<String> literal = cb.literal((String) "%"
            + searchstring + "%");
        // crit.add(Restrictions.ilike(searchcriteria, "%" +
        // searchstring + "%"));
        Path<String> path = c.get(searchcriteria);
        Predicate predicate = cb.like(path, literal);
        Predicate condition = cb.notEqual(c.get("deleted"), "true");
        cq.where(condition, predicate);
        cq.distinct(asc);
        if (asc) {
          cq.orderBy(cb.asc(c.get(orderby)));
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.like()

        List<Predicate> predicates = new ArrayList<Predicate>();
        predicates.add(builder.equal(root.get(identityToProperty.getName()),
                lookupIdentity(identity, em)));

        Path<String> rolesOnly = root.get(relationshipNameProperty.getName());
        predicates.add(builder.like(rolesOnly, "%"));

        criteria.where(predicates.toArray(new Predicate[predicates.size()]));

        List<?> results = em.createQuery(criteria).getResultList();
        for (Object result : results) {
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.like()

            Path<?> path = from.get(attribute);
            Class<?> javaType = attribute.getType().getJavaType();

            Predicate currentClause;
            if (javaType.equals(String.class)) {
                currentClause = cb.like((Expression<String>) path, (String) args[i++]);
            } else if (Number.class.isAssignableFrom(javaType) || javaType.isPrimitive()) {
                currentClause = cb.equal(path, args[i++]);
            } else {
                LOGGER.warning("field " + condition + " not found, ignoring");
                continue;
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.like()

        Root<Conference> root = cq.from(Conference.class);

        Path<String> name = root.get("name");

        if(criteria.getName() != null) {
            cq.where(cb.like(name, "*" + criteria.getName() + "*"));
        }
        return getManager().createQuery(cq)
            .setFirstResult(criteria.getFirstResult())
            .setMaxResults(criteria.getMaxResult()).getResultList();
    }
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.