Package siena

Examples of siena.SienaException


        mapJoins(models);
      }
     
      return nb;
    }catch(AmazonClientException ex){
      throw new SienaException(ex);
    }
  }
View Full Code Here


   
    try {
      checkDomain(domain);
      sdb.putAttributes(SdbMappingUtils.createPutRequest(domain, clazz, info, obj));
    }catch(AmazonClientException ex){
      throw new SienaException(ex);
    }
  }
View Full Code Here

                  domain,
                  doList.subList(i, sz)));     
        }
      }
    }catch(AmazonClientException ex){
      throw new SienaException(ex);
    }
    return nb;
  }
View Full Code Here

    String connectorImpl = p.getProperty("connector");
    if(connectorImpl != null) {
      try {
        connector = (Connector) Class.forName(connectorImpl).newInstance();
      } catch (Exception e) {
        throw new SienaException("Error while instantiating connector: "+connectorImpl, e);
      }
    } else {
      connector = new URLConnector();
    }
   
    String serializerImpl = p.getProperty("serializer");
    if(serializerImpl != null) {
      try {
        serializer = (Serializer) Class.forName(serializerImpl).newInstance();
      } catch (Exception e) {
        throw new SienaException("Error while instantiating serializer: "+serializerImpl, e);
      }
    } else {
      serializer = new XmlSerializer();
    }
   
View Full Code Here

   
    try {
      checkDomain(domain);
      sdb.deleteAttributes(SdbMappingUtils.createDeleteRequest(domain, clazz, obj));
    }catch(AmazonClientException ex){
      throw new SienaException(ex);
    }
  }
View Full Code Here

                  doList.subList(i, sz)));     

        }
      }   
    }catch(AmazonClientException ex){
      throw new SienaException(ex);
    }
    return nb;
  }
View Full Code Here

    Document request = createRequest(name, entity, ids);
    Document response = send(request);
    Element root = response.getRootElement();
    String rootName = root.getName();
    if("error".equals(rootName)) {
      throw new SienaException(root.attributeValue("class") + " " +root.getText());
    }
    if("object".equals(rootName)) {
      Common.parseEntity(entity, root, entity.getClass().getClassLoader());
    }
  }
View Full Code Here

      serializer.serialize(request, connector.getOutputStream());
      Document response = serializer.deserialize(connector.getInputStream());
      connector.close();
      return response;
    } catch(IOException e) {
      throw new SienaException(e);
    }
  }
View Full Code Here

      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);

      SdbMappingUtils.fillModel(req.getItemName(), res, clazz, obj);
     
      // join management
      if(!ClassInfo.getClassInfo(clazz).joinFields.isEmpty()){
        mapJoins(obj);
      }
     
      return obj;
    }catch(AmazonClientException ex){
      throw new SienaException(ex);
    }
  }
View Full Code Here

        mapJoins(models);
      }
     
      return models;
    }catch(AmazonClientException ex){
      throw new SienaException(ex);
    }
  }
View Full Code Here

TOP

Related Classes of siena.SienaException

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.