Examples of ItemRangeGroup


Examples of com.michelboudreau.alternator.models.ItemRangeGroup

    if (!this.tables.containsKey(tableName)) {
      throw new ResourceNotFoundException("The table you're currently trying to access (" + tableName + ") doesn't exists.");
    }
    // Check to make sure Key is valid
    String hashKeyValue = getKeyValue(key.getHashKeyElement());
        ItemRangeGroup rangeGroup = this.tables.get(tableName).getItemRangeGroup(hashKeyValue);

    if (rangeGroup == null) {
      return new GetItemResult();
      // throw new ResourceNotFoundException("No item with Hash Key (" + hashKeyValue + ") exists.");
    } else {
View Full Code Here

Examples of com.michelboudreau.alternator.models.ItemRangeGroup

      throw createInternalServerException(errors);
    }
    result.setConsumedCapacityUnits(0.5);
    List<Map<String, AttributeValue>> items = new ArrayList<Map<String, AttributeValue>>();
    for (String key : this.tables.get(request.getTableName()).getItemRangeGroups().keySet()) {
          ItemRangeGroup rangeGroup = this.tables.get(request.getTableName()).getItemRangeGroup(key);
          for (String rangeKey : rangeGroup.getKeySet()) {
      Map<String, AttributeValue> item = rangeGroup.getItem(rangeKey);
      if (request.getScanFilter() != null) {
                //Don't add item immediately - evaluate all conditions first
                boolean shouldAddItem = true;
        for (String k : request.getScanFilter().keySet()) {
                    //Set this to true if one of conditions matches
View Full Code Here

Examples of com.michelboudreau.alternator.models.ItemRangeGroup

    QueryResult queryResult = new QueryResult();
    List<Map<String, AttributeValue>> list = new ArrayList<Map<String, AttributeValue>>();

        KeySchema keySchema = table.getKeySchema();
        KeySchemaElement rangeKeyElement = keySchema.getRangeKeyElement();
        ItemRangeGroup rangeGroup = table.getItemRangeGroup(hashKeyValue);
        if (rangeGroup != null) {
      for (Map<String, AttributeValue> item : rangeGroup.getItems(rangeKeyElement, request.getRangeKeyCondition())) {
        if (request.getScanIndexForward() == null || request.getScanIndexForward() == true) {
                    // The default value is true (forward).
                    // If ScanIndexForward is not specified, the results are returned in ascending order.
          list.add(getItemWithAttributesToGet(item, attributesToGet));
        } else {
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.