Codota Logo
PutAttributesRequest.withAttributes
Code IndexAdd Codota to your IDE (free)

How to use
withAttributes
method
in
com.amazonaws.services.simpledb.model.PutAttributesRequest

Best Java code snippets using com.amazonaws.services.simpledb.model.PutAttributesRequest.withAttributes (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: airlift/airship

@Override
public void setExpectedState(ExpectedSlotStatus slotStatus)
{
  Preconditions.checkNotNull(slotStatus, "slotStatus is null");
  if (isDomainCreated()) {
    List<ReplaceableAttribute> attributes = newArrayList();
    attributes.add(new ReplaceableAttribute("state", slotStatus.getStatus().toString(), true));
    if (slotStatus.getAssignment() != null) {
      attributes.add(new ReplaceableAttribute("binary", slotStatus.getAssignment().getBinary(), true));
      attributes.add(new ReplaceableAttribute("config", slotStatus.getAssignment().getConfig(), true));
    }
    try {
      simpleDb.putAttributes(new PutAttributesRequest().withDomainName(domainName).withItemName(slotStatus.getId().toString()).withAttributes(attributes));
      expectedStateStoreUp();
    }
    catch (Exception e) {
      expectedStateStoreDown(e);
    }
  }
}
origin: com.proofpoint.galaxy/galaxy-coordinator

@Override
public void setExpectedState(ExpectedSlotStatus slotStatus)
{
  Preconditions.checkNotNull(slotStatus, "slotStatus is null");
  if (isDomainCreated()) {
    List<ReplaceableAttribute> attributes = newArrayList();
    attributes.add(new ReplaceableAttribute("state", slotStatus.getStatus().toString(), true));
    if (slotStatus.getAssignment() != null) {
      attributes.add(new ReplaceableAttribute("binary", slotStatus.getAssignment().getBinary(), true));
      attributes.add(new ReplaceableAttribute("config", slotStatus.getAssignment().getConfig(), true));
    }
    try {
      simpleDb.putAttributes(new PutAttributesRequest().withDomainName(domainName).withItemName(slotStatus.getId().toString()).withAttributes(attributes));
      expectedStateStoreUp();
    }
    catch (Exception e) {
      expectedStateStoreDown(e);
    }
  }
}
origin: appoxy/simplejpa

private void putAndDelete(String domainName, String oldAttributeName, String newAttributeName, List<Item> items) throws AmazonClientException {
  AmazonSimpleDB db = factory.getSimpleDb();
  for (Item item : items) {
    GetAttributesResult getOldResults = db.getAttributes(new GetAttributesRequest().withDomainName(domainName).withConsistentRead(true).withItemName(
        item.getName()).withAttributeNames(oldAttributeName));
    List<Attribute> oldAtts = getOldResults.getAttributes();
    if (oldAtts.size() > 0) {
      Attribute oldAtt = oldAtts.get(0);
      List<ReplaceableAttribute> atts = new ArrayList<ReplaceableAttribute>();
      atts.add(new ReplaceableAttribute(newAttributeName, oldAtt.getValue(), true));
      db.putAttributes(new PutAttributesRequest().withDomainName(domainName).withItemName(item.getName()).withAttributes(atts));
      db.deleteAttributes(new DeleteAttributesRequest().withDomainName(domainName).withItemName(item.getName()).withAttributes(oldAtts));
    }
  }
}
origin: appoxy/simplejpa

if (!attsToPut.isEmpty()) {
  this.em.getSimpleDb().putAttributes(
      new PutAttributesRequest().withDomainName(domainName).withItemName(id).withAttributes(attsToPut)
          .withExpected(expected));
  duration2 = System.currentTimeMillis() - start2;
com.amazonaws.services.simpledb.modelPutAttributesRequestwithAttributes

Javadoc

The list of attributes.

Popular methods of PutAttributesRequest

  • <init>
    Constructs a new PutAttributesRequest object. Callers should use the setter or fluent setter (with..
  • setExpected
    The update condition which, if specified, determines whether the specified attributes will be update
  • withDomainName
    The name of the domain in which to perform the operation.
  • withItemName
    The name of the item.
  • getAttributes
    The list of attributes.
  • getDomainName
    The name of the domain in which to perform the operation.
  • getExpected
    The update condition which, if specified, determines whether the specified attributes will be update
  • getItemName
    The name of the item.
  • setAttributes
    The list of attributes.
  • setDomainName
    The name of the domain in which to perform the operation.
  • setItemName
    The name of the item.
  • withExpected
    The update condition which, if specified, determines whether the specified attributes will be update
  • setItemName,
  • withExpected

Popular in Java

  • Updating database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • getSystemService (Context)
  • getApplicationContext (Context)
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now