Examples of FunctionExpression


Examples of org.eclipse.persistence.internal.expressions.FunctionExpression

        // Is fixed up to be its first child or new expression builder if no children.
        // Child value expressions need their backpointer to their local base set,
        // this is not persisted so must be hooked back up after loading.
        descriptor.getEventManager().addListener(new DescriptorEventAdapter() {
            public void postBuild(DescriptorEvent event) {
                FunctionExpression expression = (FunctionExpression)event.getObject();
                for (int index = 0; index < expression.getChildren().size(); index++) {
                    Expression child = (Expression)expression.getChildren().get(index);
                    if (child.isValueExpression()) {
                        child.setLocalBase(new ExpressionBuilder());
                    }
                }
                if (expression.getChildren().size() > 0) {
                    expression.setBaseExpression((Expression)expression.getChildren().get(0));
                }
                else {
                    expression.setBaseExpression(new ExpressionBuilder());
                }
            }
        });

        XMLDirectMapping operatorMapping = new XMLDirectMapping();
View Full Code Here

Examples of org.eclipse.persistence.internal.expressions.FunctionExpression

        // Is fixed up to be its first child or new expression builder if no children.
        // Child value expressions need their backpointer to their local base set,
        // this is not persisted so must be hooked back up after loading.
        descriptor.getEventManager().addListener(new DescriptorEventAdapter() {
            public void postBuild(DescriptorEvent event) {
                FunctionExpression expression = (FunctionExpression)event.getObject();
                for (int index = 0; index < expression.getChildren().size(); index++) {
                    Expression child = (Expression)expression.getChildren().get(index);
                    if (child.isValueExpression()) {
                        child.setLocalBase(new ExpressionBuilder());
                    }
                }
                if (expression.getChildren().size() > 0) {
                    expression.setBaseExpression((Expression)expression.getChildren().get(0));
                }
                else {
                    expression.setBaseExpression(new ExpressionBuilder());
                }
            }
        });

        XMLDirectMapping operatorMapping = new XMLDirectMapping();
View Full Code Here

Examples of org.eclipse.persistence.internal.expressions.FunctionExpression

            return ((PredicateImpl)restriction).not();
        }
        org.eclipse.persistence.expressions.Expression parentNode = null;
        String name = "not";
        if (((InternalExpression)restriction).isCompoundExpression() && ((CompoundExpressionImpl)restriction).getOperation().equals("exists")){
            FunctionExpression exp = (FunctionExpression) ((InternalSelection)restriction).getCurrentNode();
            SubSelectExpression sub = (SubSelectExpression) exp.getChildren().get(0);
            parentNode = new ExpressionBuilder().notExists(sub.getSubQuery());
            name = "notExists";
        }else{
            parentNode = ((InternalSelection)restriction).getCurrentNode().not();
        }
View Full Code Here

Examples of org.eclipse.persistence.internal.expressions.FunctionExpression

        // Is fixed up to be its first child or new expression builder if no children.
        // Child value expressions need their backpointer to their local base set,
        // this is not persisted so must be hooked back up after loading.
        descriptor.getEventManager().addListener(new DescriptorEventAdapter() {
            public void postBuild(DescriptorEvent event) {
                FunctionExpression expression = (FunctionExpression)event.getObject();
                for (int index = 0; index < expression.getChildren().size(); index++) {
                    Expression child = (Expression)expression.getChildren().get(index);
                    if (child.isValueExpression()) {
                        child.setLocalBase(new ExpressionBuilder());
                    }
                }
                if (expression.getChildren().size() > 0) {
                    expression.setBaseExpression((Expression)expression.getChildren().get(0));
                }
                else {
                    expression.setBaseExpression(new ExpressionBuilder());
                }
            }
        });

        XMLDirectMapping operatorMapping = new XMLDirectMapping();
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.FunctionExpression

    if (stateObject.isDecorated()) {
      toText(stateObject);
    }
    else {
      FunctionExpression expression = stateObject.getExpression();

      // FUNC
      appendIdentifier((expression != null) ? expression.getActualIdentifier() : FUNC, FUNC);

      // (
      if (shouldOutput(expression) || expression.hasLeftParenthesis()) {
        writer.append(LEFT_PARENTHESIS);
      }
      else if (exactMatch && expression.hasSpaceAfterIdentifier()) {
        writer.append(SPACE);
      }

      // Function name
      if (stateObject.hasFunctionName()) {

        writer.append(stateObject.getQuotedFunctionName());

        if (shouldOutput(expression) || expression.hasComma()) {
          writer.append(COMMA);
        }

        if (shouldOutput(expression) || expression.hasSpaceAfterComma()) {
          writer.append(SPACE);
        }
      }

      // Arguments
      toStringChildren(stateObject, true);

      // )
      if (shouldOutput(expression) || expression.hasRightParenthesis()) {
        writer.append(RIGHT_PARENTHESIS);
      }
    }
  }
View Full Code Here

Examples of org.geotools.filter.FunctionExpression

        }
       
        Function newFunction(List<Expression> parameters, Literal fallback) throws Exception {
            // cache lookup
            if (FunctionExpression.class.isAssignableFrom(clazz)) {
                FunctionExpression function = (FunctionExpression) clazz.newInstance();
                if(parameters != null) {
                    function.setParameters(parameters);
                }
                if( fallback != null ){
                    function.setFallbackValue( fallback );
                }
                return function;
            }
            if(FunctionImpl.class.isAssignableFrom(clazz)) {
                FunctionImpl function = (FunctionImpl) clazz.newInstance();
                if(parameters != null){
                    function.setParameters( parameters );
                }
                if(fallback != null){
                    function.setFallbackValue( fallback );
                }
                return function;
            }
            //Function function = (Function) functionClass.newInstance();
            Constructor<Function> constructor = clazz.getConstructor( new Class[]{ List.class, Literal.class} );
View Full Code Here

Examples of org.neo4j.cypherdsl.query.FunctionExpression

     */
    public static BooleanExpression not( BooleanExpression expression )
    {
        Query.checkNull( expression, "Expression" );

        return new Value( new FunctionExpression( "not", expression ) );
    }
View Full Code Here

Examples of org.neo4j.cypherdsl.query.FunctionExpression

     * @param property
     * @return
     */
    public static BooleanExpression has( Property property )
    {
        return new Value( new FunctionExpression( "has", property ) );
    }
View Full Code Here

Examples of org.neo4j.cypherdsl.query.FunctionExpression

     * @param expression
     * @return
     */
    public static BooleanExpression has( Expression expression )
    {
        return new Value( new FunctionExpression( "has", expression ) );
    }
View Full Code Here

Examples of org.neo4j.cypherdsl.query.FunctionExpression

     * @return
     */
    public static PathExpression shortestPath( PathExpression path )
    {
        Query.checkNull( path, "Path" );
        return new Value( new FunctionExpression( "shortestPath", path ) );
    }
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.