Package com.amazonaws.services.simpledb.model

Examples of com.amazonaws.services.simpledb.model.Item


    public String getString(int columnIndex) throws SQLException {
      log.info("getString(int columnIndex) called with index " + columnIndex);
        checkPosition();

        Item item = items.get(currentPos);
        List<Attribute> attributes = item.getAttributes();
        Attribute attribute = attributes.get((columnIndex - 1));
        return getAttributeValue(attribute);
    }
View Full Code Here


    public String getString(String columnLabel) throws SQLException {
      log.info("getString(String columnLabel) called with value " + columnLabel);
        checkPosition();

        Item item = items.get(currentPos);
        List<Attribute> attributes = item.getAttributes();
        for (Attribute attribute : attributes) {
            if (getAttributeName(attribute).equals(columnLabel)) {
                return getAttributeValue(attribute);
            }
        }
View Full Code Here

    public String getColumnLabel(int i) throws SQLException {
        return this.getColumnName(i);
    }

    public String getColumnName(int i) throws SQLException {
        Item item = items.get(0);
        List<Attribute> attributes = item.getAttributes();
        try {
            Attribute attribute = attributes.get(i - 1);
            return attribute.getName();
        } catch (IndexOutOfBoundsException e) {
            return "Unknown";
View Full Code Here

  public int getNumberOfJobs(SchedulingContext ctxt) {
    logDebug("Finding number of jobs");
    try {
      SelectResult result = amazonSimpleDb.select(new SelectRequest(query
          .countJobs()));
      Item item = result.getItems().get(0);
      return Integer.parseInt(item.getAttributes().get(0).getValue());
    } catch (Exception e) {
      log.error("Could not find number of jobs", e);
      return -1;
    }
  }
View Full Code Here

TOP

Related Classes of com.amazonaws.services.simpledb.model.Item

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.