Package com.amazonaws.services.simpledb.model

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


        {
          selectExpression += " AND Level" + i + " = '" + paths[i] +"'";
        }

        System.out.println("Selecting: " + selectExpression + "\n");
        SelectRequest selectRequest = new SelectRequest(selectExpression);
        for (Item item : sdb.select(selectRequest).getItems()) {
            System.out.println("  Item");
            System.out.println("    Name: " + item.getName());
            for (Attribute attribute : item.getAttributes()) {
                System.out.println("      Attribute");
View Full Code Here


    }

        if(selectExpression.endsWith(" OR "))
          selectExpression = selectExpression.substring(0, selectExpression.length()-4);
        selectExpression += ") order by Levels";
        SelectRequest selectRequest = new SelectRequest(selectExpression);
        List<Item> items = sdb.select(selectRequest).getItems();
        anscestors = new DataObject[items.size()];
      int i = 0;

        for (Item item : items) {
View Full Code Here

        super();
        this.service = service;
    }

    public boolean execute(DumpDomainContext context) throws Exception {
        SelectRequest selectRequest = new SelectRequest(String.format("SELECT * FROM %s", context.getDomain()));
        SelectResult selectResult = service.select(selectRequest);

        ArrayNode rootNode = mapper.createArrayNode();

        while (!selectResult.getItems().isEmpty()) {
            for (Item item : selectResult.getItems())
                appendResult(rootNode, item);
                   
            if (isBlank(selectResult.getNextToken()))
                break;

            selectResult = service.select(selectRequest.withNextToken(selectResult.getNextToken()));
        }
       
        FileWriter writer = new FileWriter(context.getOutputFile());
       
        writeData(rootNode, writer);
View Full Code Here

            // Select data from a domain
            // Notice the use of backticks around the domain name in our select expression.
            String selectExpression = "select * from `" + myDomain + "` where Category = 'Clothes'";
            System.out.println("Selecting: " + selectExpression + "\n");
            SelectRequest selectRequest = new SelectRequest(selectExpression);
            for (Item item : sdb.select(selectRequest).getItems()) {
                System.out.println("  Item");
                System.out.println("    Name: " + item.getName());
                for (Attribute attribute : item.getAttributes()) {
                    System.out.println("      Attribute");
View Full Code Here

TOP

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

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.