Examples of Like


Examples of org.apache.ode.ql.tree.nodes.Like

        checkChildsNumber(node, 2);
        return new Equality(createIdentifier(node, 0), createValue(node, 1));
    }
    private Like createLike(Node node) {
        checkChildsNumber(node, 2);
        return new Like(createIdentifier(node, 0), createValue(node, 1));
    }
View Full Code Here

Examples of org.objectweb.medor.expression.lib.Like

          } catch (TypingException e1) {
            throw new JDOException(
              "Bad parameter type for the 'startsWith' method", e1);
          }
        }
        e = new Like(str, e);
        break;
      }
    case ENDS_WITH_OPERATOR:
      {
          stack.pop();
        Object oe = stack.pop();
                if (debug) {
                    logger.log(BasicLevel.DEBUG, "pop expression: " + oe);
                }
        Expression str = (Expression) oe;
        if (e instanceof BasicParameterOperand) {
            e = new StringComparatorParameterOperand((BasicParameterOperand) e, ".*", null);
        } else  if (e instanceof BasicOperand) {
          try {
            e = new BasicOperand("%" + ((BasicOperand) e).getString());
          } catch (TypingException e1) {
            throw new JDOException(
              "Bad parameter type for the 'startsWith' method", e1);
          }
        }
        e = new Like(str, e);
        break;
      }
    case EQUALS_OPERATOR:
//TODO: Support the equals operator
      break;
    case MATCHES_OPERATOR:
      {
          stack.pop();
        Object oe = stack.pop();
                if (debug) {
                    logger.log(BasicLevel.DEBUG, "pop expression: " + oe);
                }
        Expression str = (Expression) oe;
        if (e instanceof BasicParameterOperand) {
            //e = new StringComparatorParameterOperand((BasicParameterOperand) e, "%", "%");
        } else  if (e instanceof BasicOperand) {
          try {
            e = new BasicOperand(((BasicOperand) e).getString());
          } catch (TypingException e1) {
            throw new JDOException(
              "Bad parameter type for the 'startsWith' method", e1);
          }
        }
        e = new Like(str, e);
        break;
      }
    case SUBSTRING_OPERATOR:
      {
        stack.pop();
View Full Code Here

Examples of org.openblend.fejstbuk.domain.Like

    public void removePost(Post post) {
        em.remove(post);
    }

    public Like like(User user, Post post) {
        Like like = new Like();
        like.setPost(post);
        like.setUser(user);
        like.setTimestamp(new Date());
        em.persist(like);
        // post likes
        Set<Like> likes = post.getLikes();
        if (likes == null) {
            likes = new HashSet<Like>();
View Full Code Here

Examples of org.openrdf.query.algebra.Like

  {
    ValueExpr expr = (ValueExpr)node.getValueExpr().jjtAccept(this, null);
    String pattern = (String)node.getPattern().jjtAccept(this, null);
    boolean caseSensitive = !node.ignoreCase();

    return new Like(expr, pattern, caseSensitive);
  }
View Full Code Here

Examples of org.teiid.language.Like

    public void testGetLeftExpression() throws Exception {
        assertNotNull(example("abc", '.', false).getLeftExpression()); //$NON-NLS-1$
    }

    public void testGetRightExpression() throws Exception {
        Like like = example("abc", '.', false); //$NON-NLS-1$
        assertNotNull(like.getRightExpression());
        assertTrue(like.getRightExpression() instanceof Literal);
        assertEquals("abc", ((Literal)like.getRightExpression()).getValue()); //$NON-NLS-1$
    }
View Full Code Here

Examples of org.teiid.language.Like

    Like translate(MatchCriteria criteria) {
        Character escapeChar = null;
        if(criteria.getEscapeChar() != MatchCriteria.NULL_ESCAPE_CHAR) {
            escapeChar = new Character(criteria.getEscapeChar());
        }
        return new Like(translate(criteria.getLeftExpression()),
                                    translate(criteria.getRightExpression()),
                                    escapeChar,
                                    criteria.isNegated());
    }
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.