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


Java Condition.setComparisonOperator方法代码示例

本文整理汇总了Java中com.amazonaws.services.dynamodbv2.model.Condition.setComparisonOperator方法的典型用法代码示例。如果您正苦于以下问题:Java Condition.setComparisonOperator方法的具体用法?Java Condition.setComparisonOperator怎么用?Java Condition.setComparisonOperator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.amazonaws.services.dynamodbv2.model.Condition的用法示例。


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

示例1: createCondition

import com.amazonaws.services.dynamodbv2.model.Condition; //导入方法依赖的package包/类
@Override
public Condition createCondition() {
  Condition condition = new Condition();
  condition.setComparisonOperator(operator.getDynamoDBName());
  List<AttributeValue> attributeValueList = new ArrayList<AttributeValue>();
  attributeValueList.add(HiveDynamoDBTypeFactory.getTypeObjectFromHiveType(columnType)
      .getAttributeValue(columnValue));
  condition.setAttributeValueList(attributeValueList);
  return condition;
}
 
开发者ID:awslabs,项目名称:emr-dynamodb-connector,代码行数:11,代码来源:DynamoDBBinaryFilter.java

示例2: createCondition

import com.amazonaws.services.dynamodbv2.model.Condition; //导入方法依赖的package包/类
@Override
public Condition createCondition() {
  Condition condition = new Condition();
  condition.setComparisonOperator(operator.getDynamoDBName());

  List<AttributeValue> attributeValueList = new ArrayList<>();
  for (String value : columnValues) {
    attributeValueList.add(HiveDynamoDBTypeFactory.getTypeObjectFromHiveType(columnType)
        .getAttributeValue(value));
  }
  condition.setAttributeValueList(attributeValueList);

  return condition;
}
 
开发者ID:awslabs,项目名称:emr-dynamodb-connector,代码行数:15,代码来源:DynamoDBNAryFilter.java

示例3: getBooksFromLibrary

import com.amazonaws.services.dynamodbv2.model.Condition; //导入方法依赖的package包/类
public List<Book> getBooksFromLibrary(final String libraryId, final String isbn){
	final Book book = new Book();
	book.setIsbn(isbn);
	book.setLibraryId(libraryId);
	final Condition condition = new Condition();
	condition.setComparisonOperator(ComparisonOperator.EQ);
	final List<Book> books = this.mapper.queryIndexHashAndRangeKey(Book.class, book, Book.GLOBAL_INDEX_LIBRARY_ISBN, "libraryId", condition, DEFAULT_PAGE_LIMIT);
	return books;
}
 
开发者ID:shagwood,项目名称:micro-genie,代码行数:10,代码来源:BookRepository.java

示例4: getBooksByIsbnAndStatus

import com.amazonaws.services.dynamodbv2.model.Condition; //导入方法依赖的package包/类
/***
 * Get books by ISBN and Status
 * @param isbn
 * @param status
 * @return bookList
 */
public List<Book> getBooksByIsbnAndStatus(final String isbn, final String status){
	
	final Book book = new Book();
	book.setIsbn(isbn);
	book.setStatus(status);
	
	final Condition condition = new Condition();
	condition.setComparisonOperator(ComparisonOperator.EQ);
	
	final List<Book> books = this.mapper.queryIndexHashKey(Book.class, book, Book.GLOBAL_INDEX_ISBN_STATUS, DEFAULT_PAGE_LIMIT);
	return books;
}
 
开发者ID:shagwood,项目名称:micro-genie,代码行数:19,代码来源:BookRepository.java

示例5: createCondition

import com.amazonaws.services.dynamodbv2.model.Condition; //导入方法依赖的package包/类
@Override
public Condition createCondition() {
  Condition condition = new Condition();
  condition.setComparisonOperator(operator.getDynamoDBName());
  return condition;
}
 
开发者ID:awslabs,项目名称:emr-dynamodb-connector,代码行数:7,代码来源:DynamoDBUnaryFilter.java

示例6: visit

import com.amazonaws.services.dynamodbv2.model.Condition; //导入方法依赖的package包/类
@Override
public Object visit(Operation<?> expr, DynamoDBScanExpression scanExpression) {
    Operator op = expr.getOperator();
    Condition condition = new Condition();
    if (op == Ops.EQ) {
        condition.setComparisonOperator(ComparisonOperator.EQ);
    } else if (op == Ops.STARTS_WITH) {
        condition.setComparisonOperator(ComparisonOperator.BEGINS_WITH);
    } else if (op == Ops.BETWEEN) {
        condition.setComparisonOperator(ComparisonOperator.BETWEEN);
    } else if (op == Ops.STRING_CONTAINS) {
        condition.setComparisonOperator(ComparisonOperator.CONTAINS);
    } else if (op == Ops.GOE) {
        condition.setComparisonOperator(ComparisonOperator.GE);
    } else if (op == Ops.GT) {
        condition.setComparisonOperator(ComparisonOperator.GT);
    } else if (op == Ops.LT) {
        condition.setComparisonOperator(ComparisonOperator.LT);
    } else if (op == Ops.LOE) {
        condition.setComparisonOperator(ComparisonOperator.LE);
    } else if (op == Ops.IN) {
        condition.setComparisonOperator(ComparisonOperator.IN);
    } else if (op == Ops.NE) {
        condition.setComparisonOperator(ComparisonOperator.NE);
    } else if (op == Ops.IS_NULL) {
        condition.setComparisonOperator(ComparisonOperator.NULL);
    } else if (op == Ops.IS_NOT_NULL) {
        condition.setComparisonOperator(ComparisonOperator.NOT_NULL);
    } else if (op == Ops.NOT) {
        Expression<?> arg = expr.getArg(0);
        if (arg instanceof BooleanOperation) {
            Operator subOp = ((BooleanOperation) arg).getOperator();
            if (subOp == Ops.STRING_CONTAINS) {
                condition.setComparisonOperator(ComparisonOperator.NOT_CONTAINS);
                expr = (Operation<?>) arg;
            } else {
                throw new UnsupportedOperationException(String.valueOf(op));
            }
        } else {
            throw new UnsupportedOperationException(String.valueOf(op));
        }
    } else if (op == Ops.AND) {
        List<Expression<?>> args = expr.getArgs();
        for (Expression<?> expression : args) {
            expression.accept(this, scanExpression);
        }
        return null;
    } else {
        throw new UnsupportedOperationException(String.valueOf(op));
    }

    populateScanExpression(expr.getArgs(), condition, scanExpression);
    return condition;

}
 
开发者ID:querydsl,项目名称:querydsl-contrib,代码行数:56,代码来源:DynamodbSerializer.java


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