Package com.amazonaws.services.simpledb.model

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


    try {
      checkDomain(domain);
      GetAttributesRequest req = SdbMappingUtils.createGetRequest(domain, clazz, obj);
      // sets consistent read to true when reading one single object
      req.setConsistentRead(isReadConsistent());
      GetAttributesResult res = sdb.getAttributes(req);
      if(res.getAttributes().size() == 0){
        throw new SienaException(req.getItemName()+" not found in domain "+req.getDomainName());
      }
       
      SdbMappingUtils.fillModel(req.getItemName(), res, clazz, obj);
     
View Full Code Here


    try {
      checkDomain(domain);
      GetAttributesRequest req = SdbMappingUtils.createGetRequestFromKey(domain, clazz, key);
      // sets consistent read to true when reading one single object
      req.setConsistentRead(isReadConsistent());
      GetAttributesResult res = sdb.getAttributes(req);
      if(res.getAttributes().size() == 0){
        throw new SienaException(req.getItemName()+" not found in domain "+req.getDomainName());
      }
       
      T obj = Util.createObjectInstance(clazz);
View Full Code Here

   
    @Override
    public GetAttributesResult getAttributes(GetAttributesRequest getAttributesRequest) throws AmazonServiceException, AmazonClientException {
        this.getAttributesRequest = getAttributesRequest;
       
        return new GetAttributesResult()
                .withAttributes(new Attribute("AttributeOne", "Value One"))
                .withAttributes(new Attribute("AttributeTwo", "Value Two"));
    }
View Full Code Here

   
    @Override
    public GetAttributesResult getAttributes(GetAttributesRequest getAttributesRequest) throws AmazonServiceException, AmazonClientException {
        this.getAttributesRequest = getAttributesRequest;
       
        return new GetAttributesResult()
                .withAttributes(new Attribute("AttributeOne", "Value One"))
                .withAttributes(new Attribute("AttributeTwo", "Value Two"));
    }
View Full Code Here

            .withItemName(determineItemName())
            .withConsistentRead(determineConsistentRead())
            .withAttributeNames(determineAttributeNames());
        log.trace("Sending request [{}] for exchange [{}]...", request, exchange);
       
        GetAttributesResult result = this.sdbClient.getAttributes(request);
       
        log.trace("Received result [{}]", result);
       
        Message msg = getMessageForResponse(exchange);
        msg.setHeader(SdbConstants.ATTRIBUTES, result.getAttributes());
    }
View Full Code Here

  @Override
  public JobDetail retrieveJob(SchedulingContext ctxt, String jobName,
      String groupName) {
    log.debug("Retrieving Job: " + groupName + "." + jobName);
    String key = JobWrapper.getJobNameKey(jobName, groupName);
    GetAttributesResult result = amazonSimpleDb
        .getAttributes(new GetAttributesRequest(jobDomain, key)
            .withConsistentRead(new Boolean(true)));
    JobDetail job = null;
    try {
      job = jobDetailFromAttributes(result.getAttributes());
    } catch (Exception e) {
      log.error("Could not retrieve Job: " + groupName + "." + jobName, e);
    }
    return job;
  }
View Full Code Here

  @Override
  public Trigger retrieveTrigger(SchedulingContext ctxt, String triggerName,
      String groupName) {
    log.debug("Retrieving Trigger: " + triggerName + "." + groupName);
    String key = TriggerWrapper.getTriggerNameKey(triggerName, groupName);
    GetAttributesResult result = amazonSimpleDb
        .getAttributes(new GetAttributesRequest(triggerDomain, key)
            .withConsistentRead(new Boolean(true)));
    TriggerWrapper tw = null;
    try {
      tw = triggerFromAttributes(result.getAttributes());
      return tw.trigger;
    } catch (Exception e) {
      log.error("Could not retrieve Trigger: " + triggerName + "."
          + groupName, e);
    }
View Full Code Here

      String groupName) throws JobPersistenceException {
    log.debug("Finding state of Trigger: " + triggerName + "." + groupName);
    String key = TriggerWrapper.getTriggerNameKey(triggerName, groupName);

    TriggerWrapper tw = null;
    GetAttributesResult result = amazonSimpleDb
        .getAttributes(new GetAttributesRequest(triggerDomain, key)
            .withConsistentRead(new Boolean(true)));
    try {
      tw = triggerFromAttributes(result.getAttributes());
    } catch (Exception e) {
      log.error("Error finding state of Trigger: " + triggerName + "."
          + groupName, e);
    }
View Full Code Here

  @Override
  public void pauseTrigger(SchedulingContext ctxt, String triggerName,
      String groupName) {
    log.debug("Pausing Trigger: " + triggerName + "." + groupName);
    String key = TriggerWrapper.getTriggerNameKey(triggerName, groupName);
    GetAttributesResult result = amazonSimpleDb
        .getAttributes(new GetAttributesRequest(triggerDomain, key)
            .withConsistentRead(new Boolean(true)));
    TriggerWrapper tw = null;

    try {
      tw = triggerFromAttributes(result.getAttributes());
    } catch (Exception e) {
      log.error("Could not create trigger for Item: " + result.toString());
    }

    // does the trigger exist?
    if (tw == null || tw.trigger == null) {
      return;
View Full Code Here

  public void resumeTrigger(SchedulingContext ctxt, String triggerName,
      String groupName) {
    log.debug("Resuming Trigger: " + triggerName + "." + groupName);
    String key = TriggerWrapper.getTriggerNameKey(triggerName, groupName);

    GetAttributesResult result = amazonSimpleDb
        .getAttributes(new GetAttributesRequest(triggerDomain, key)
            .withConsistentRead(new Boolean(true)));
    TriggerWrapper tw = null;

    try {
      tw = triggerFromAttributes(result.getAttributes());
    } catch (Exception e) {
      log.error("Could not create trigger for Item: " + result.toString());
    }

    // does the trigger exist?
    if (tw == null || tw.trigger == null) {
      return;
View Full Code Here

TOP

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

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.