Package com.amazonaws.services.simpledb

Examples of com.amazonaws.services.simpledb.AmazonSimpleDB.deleteDomain()


    public void deleteAll() throws AmazonClientException {
        EntityManagerSimpleJPA em = (EntityManagerSimpleJPA) factory.createEntityManager();
        AmazonSimpleDB db = em.getSimpleDb();
       
        String domainName = em.getDomainName(MyTestObject.class);
        db.deleteDomain(new DeleteDomainRequest().withDomainName(domainName));

        domainName = em.getDomainName(MyTestObject2.class);
        db.deleteDomain(new DeleteDomainRequest().withDomainName(domainName));

        domainName = em.getDomainName(MyInheritanceObject1.class);
View Full Code Here


       
        String domainName = em.getDomainName(MyTestObject.class);
        db.deleteDomain(new DeleteDomainRequest().withDomainName(domainName));

        domainName = em.getDomainName(MyTestObject2.class);
        db.deleteDomain(new DeleteDomainRequest().withDomainName(domainName));

        domainName = em.getDomainName(MyInheritanceObject1.class);
        db.deleteDomain(new DeleteDomainRequest().withDomainName(domainName));
       
        em.close();
View Full Code Here

        domainName = em.getDomainName(MyTestObject2.class);
        db.deleteDomain(new DeleteDomainRequest().withDomainName(domainName));

        domainName = em.getDomainName(MyInheritanceObject1.class);
        db.deleteDomain(new DeleteDomainRequest().withDomainName(domainName));
       
        em.close();
    }

    @Ignore("Rename feature is currently broken")
View Full Code Here

                .withAttributes(new ReplaceableAttribute("name", "value", true)));
         
          Assert.assertNotNull(DomainHelper.findItemById(sdbClient, domainName, "exist"));
        }
        finally {
          sdbClient.deleteDomain(new DeleteDomainRequest().withDomainName(domainName));
        }
  }
 
  @Test
  public void listAllItemsTests() {
View Full Code Here

          List<Item> items = DomainHelper.listAllItems(sdbClient, domainName);
          Assert.assertEquals(3, items.size());
        }
        finally {
          sdbClient.deleteDomain(new DeleteDomainRequest().withDomainName(domainName));
        }
  }
 
  @Test
  public void selectItemsTests() {
View Full Code Here

          result = DomainHelper.selectItems(sdbClient, String.format("select * from `%s` LIMIT 3", domainName), result.getNextToken());
          Assert.assertEquals(1, result.getItems().size());
          Assert.assertNull(result.getNextToken());
        }
        finally {
          sdbClient.deleteDomain(new DeleteDomainRequest().withDomainName(domainName));
        }
  } 
 
  @Test
  public void selectItemsWithWhereTests() {
View Full Code Here

          result = DomainHelper.selectItems(sdbClient, domainName, "name = 'value' LIMIT 3", result.getNextToken());
          Assert.assertEquals(1, result.getItems().size());
          Assert.assertNull(result.getNextToken());
        }
        finally {
          sdbClient.deleteDomain(new DeleteDomainRequest().withDomainName(domainName));
        }
  }   
}
View Full Code Here

            System.out.println("Deleting Item_03.\n");
            sdb.deleteAttributes(new DeleteAttributesRequest(myDomain, "Item_03"));

            // Delete a domain
            System.out.println("Deleting " + myDomain + " domain.\n");
            sdb.deleteDomain(new DeleteDomainRequest(myDomain));
        } catch (AmazonServiceException ase) {
            System.out.println("Caught an AmazonServiceException, which means your request made it "
                    + "to Amazon SimpleDB, but was rejected with an error response for some reason.");
            System.out.println("Error Message:    " + ase.getMessage());
            System.out.println("HTTP Status Code: " + ase.getStatusCode());
View Full Code Here

            System.out.println("Deleting Item_03.\n");
            sdb.deleteAttributes(new DeleteAttributesRequest(myDomain, "Item_03"));

            // Delete a domain
            System.out.println("Deleting " + myDomain + " domain.\n");
            sdb.deleteDomain(new DeleteDomainRequest(myDomain));
        } catch (AmazonServiceException ase) {
            System.out.println("Caught an AmazonServiceException, which means your request made it "
                    + "to Amazon SimpleDB, but was rejected with an error response for some reason.");
            System.out.println("Error Message:    " + ase.getMessage());
            System.out.println("HTTP Status Code: " + ase.getStatusCode());
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.