当前位置: 首页>>代码示例>>Java>>正文


Java Direction类代码示例

本文整理汇总了Java中org.odata4j.expression.OrderByExpression.Direction的典型用法代码示例。如果您正苦于以下问题:Java Direction类的具体用法?Java Direction怎么用?Java Direction使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Direction类属于org.odata4j.expression.OrderByExpression包,在下文中一共展示了Direction类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: parseOrderBy

import org.odata4j.expression.OrderByExpression.Direction; //导入依赖的package包/类
/**
 * orderbyのパース.
 * @param value orderbyの値
 * @return パース結果
 */
public static List<OrderByExpression> parseOrderBy(String value) {
    List<Token> tokens = tokenize(value);
    // dump(value,tokens,null);

    List<CommonExpression> expressions = readExpressions(tokens);
    if (ExpressionParser.DUMP_EXPRESSION_INFO) {
        dump(value, tokens, Enumerable.create(expressions).toArray(CommonExpression.class));
    }

    return Enumerable.create(expressions).select(new Func1<CommonExpression, OrderByExpression>() {
        public OrderByExpression apply(CommonExpression input) {
            if (input instanceof OrderByExpression) {
                return (OrderByExpression) input;
            }
            return Expression.orderBy(input, Direction.ASCENDING); // default to asc
        }
    }).toList();
}
 
开发者ID:personium,项目名称:personium-core,代码行数:24,代码来源:PersoniumExpressionParser.java

示例2: parseOrderBy

import org.odata4j.expression.OrderByExpression.Direction; //导入依赖的package包/类
public static List<OrderByExpression> parseOrderBy(String value) {
  List<Token> tokens = tokenize(value);
  // dump(value,tokens,null);

  List<CommonExpression> expressions = readExpressions(tokens);
  if (DUMP_EXPRESSION_INFO) {
    dump(value, tokens, Enumerable.create(expressions).toArray(CommonExpression.class));
  }

  return Enumerable.create(expressions).select(new Func1<CommonExpression, OrderByExpression>() {
    public OrderByExpression apply(CommonExpression input) {
      if (input instanceof OrderByExpression) {
        return (OrderByExpression) input;
      }
      return Expression.orderBy(input, Direction.ASCENDING); // default to asc
    }
  }).toList();
}
 
开发者ID:teiid,项目名称:oreva,代码行数:19,代码来源:ExpressionParser.java

示例3: getOrderOption

import org.odata4j.expression.OrderByExpression.Direction; //导入依赖的package包/类
/**
 * $orderbyのオプションを取得する.
 * @param option odata4jのオプション
 * @return optionValue 取得したオプション
 */
public String getOrderOption(Direction option) {
    String optionValue;
    // デフォルト値は昇順(ASCENDING)
    if (option == null || option.equals(Direction.ASCENDING)) {
        optionValue = SORT_ASC;
    } else {
        optionValue = SORT_DESC;
    }
    return optionValue;
}
 
开发者ID:personium,项目名称:personium-core,代码行数:16,代码来源:EsQueryHandler.java

示例4: visit

import org.odata4j.expression.OrderByExpression.Direction; //导入依赖的package包/类
@Override
public void visit(Direction direction) {
	Expression expr = stack.pop();
	if (expr instanceof CompareCriteria) {
		expr = ((CompareCriteria)expr).getLeftExpression();
	}
	this.orderBy.addVariable(expr, direction == Direction.ASCENDING);
}
 
开发者ID:kenweezy,项目名称:teiid,代码行数:9,代码来源:ODataSQLBuilder.java

示例5: visit

import org.odata4j.expression.OrderByExpression.Direction; //导入依赖的package包/类
@Override
public void visit(Direction direction) {
    log.debug("visit(Direction direction)");
}
 
开发者ID:personium,项目名称:personium-core,代码行数:5,代码来源:EsQueryHandler.java

示例6: visit

import org.odata4j.expression.OrderByExpression.Direction; //导入依赖的package包/类
@Override
public void visit(Direction direction) {
  append(direction == Direction.ASCENDING ? "asc" : "desc");
}
 
开发者ID:teiid,项目名称:oreva,代码行数:5,代码来源:PrintExpressionVisitor.java

示例7: visit

import org.odata4j.expression.OrderByExpression.Direction; //导入依赖的package包/类
@Override
public void visit(Direction direction) {
}
 
开发者ID:teiid,项目名称:oreva,代码行数:4,代码来源:AbstractExpressionVisitor.java

示例8: visit

import org.odata4j.expression.OrderByExpression.Direction; //导入依赖的package包/类
@Override
public void visit(Direction direction) {
  throw new UnsupportedOperationException();
}
 
开发者ID:teiid,项目名称:oreva,代码行数:5,代码来源:FilterExpressionVisitor.java

示例9: orderBy

import org.odata4j.expression.OrderByExpression.Direction; //导入依赖的package包/类
public static OrderByExpression orderBy(final CommonExpression expression, final Direction direction) {
  return new OrderByExpressionImpl(expression, direction);
}
 
开发者ID:teiid,项目名称:oreva,代码行数:4,代码来源:Expression.java

示例10: OrderByExpressionImpl

import org.odata4j.expression.OrderByExpression.Direction; //导入依赖的package包/类
protected OrderByExpressionImpl(CommonExpression expression, Direction direction) {
  super(OrderByExpression.class, expression);
  this.direction = direction;
}
 
开发者ID:teiid,项目名称:oreva,代码行数:5,代码来源:Expression.java

示例11: getDirection

import org.odata4j.expression.OrderByExpression.Direction; //导入依赖的package包/类
@Override
public Direction getDirection() {
  return direction;
}
 
开发者ID:teiid,项目名称:oreva,代码行数:5,代码来源:Expression.java


注:本文中的org.odata4j.expression.OrderByExpression.Direction类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。