Package org.apache.cayenne.exp.parser

Examples of org.apache.cayenne.exp.parser.ASTDbPath


    StringBuilder validPath = new StringBuilder();

    try {
      for (PathComponent<DbAttribute, DbRelationship> pathComponent : dbEntity
          .resolvePath(new ASTDbPath(path), Collections.emptyMap())) {

        if (validPath.length() > 0) {
          validPath.append(Entity.PATH_SEPARATOR);
        }
        validPath.append(pathComponent.getName());
View Full Code Here


        }

        try {
          // add new relationships from path
          Iterator<CayenneMapEntry> it = entity
              .resolvePathComponents(new ASTDbPath(
                  dbRelationshipPath));

          while (it.hasNext()) {
            DbRelationship relationship = (DbRelationship) it
                .next();
View Full Code Here

     */
    class DbEntityQualifierTransformer implements Transformer {

        public Object transform(Object input) {
            if (input instanceof ASTObjPath) {
                return new ASTDbPath(((SimpleNode) input).getOperand(0));
            }
            return input;
        }
View Full Code Here

    /**
     * A convenience method to create an DB_PATH "equal to" expression.
     */
    public static Expression matchDbExp(String pathSpec, Object value) {
        return new ASTEqual(new ASTDbPath(pathSpec), value);
    }
View Full Code Here

    /**
     * A convenience method to create an DB_PATH "not equal to" expression.
     */
    public static Expression noMatchDbExp(String pathSpec, Object value) {
        return new ASTNotEqual(new ASTDbPath(pathSpec), value);
    }
View Full Code Here

     * A convenience method to create an DB_PATH "less than" expression.
     *
     * @since 3.0
     */
    public static Expression lessDbExp(String pathSpec, Object value) {
        return new ASTLess(new ASTDbPath(pathSpec), value);
    }
View Full Code Here

     * A convenience method to create an DB_PATH "less than or equal to" expression.
     *
     * @since 3.0
     */
    public static Expression lessOrEqualDbExp(String pathSpec, Object value) {
        return new ASTLessOrEqual(new ASTDbPath(pathSpec), value);
    }
View Full Code Here

     * A convenience method to create an DB_PATH "greater than" expression.
     *
     * @since 3.0
     */
    public static Expression greaterDbExp(String pathSpec, Object value) {
        return new ASTGreater(new ASTDbPath(pathSpec), value);
    }
View Full Code Here

     * A convenience method to create an DB_PATH "greater than or equal to" expression.
     *
     * @since 3.0
     */
    public static Expression greaterOrEqualDbExp(String pathSpec, Object value) {
        return new ASTGreaterOrEqual(new ASTDbPath(pathSpec), value);
    }
View Full Code Here

     */
    public static Expression inDbExp(String pathSpec, Object... values) {
        if (values.length == 0) {
            return new ASTFalse();
        }
        return new ASTIn(new ASTDbPath(pathSpec), new ASTList(values));
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.exp.parser.ASTDbPath

Copyright © 2018 www.massapicom. 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.