Package weave.config.ConnectionConfig

Examples of weave.config.ConnectionConfig.ConnectionInfo


  // Columns
 
  private static ConnectionInfo getColumnConnectionInfo(DataEntity entity) throws RemoteException
  {
    String connName = entity.privateMetadata.get(PrivateMetadata.CONNECTION);
    ConnectionInfo connInfo = getConnectionConfig().getConnectionInfo(connName);
     if (connInfo == null)
    {
      String title = entity.publicMetadata.get(PublicMetadata.TITLE);
      throw new RemoteException(String.format("Connection named '%s' associated with column #%s (%s) no longer exists", connName, entity.id, title));
    }
View Full Code Here


    }
   
    String query = entity.privateMetadata.get(PrivateMetadata.SQLQUERY);
    String dataType = entity.publicMetadata.get(PublicMetadata.DATATYPE);
   
    ConnectionInfo connInfo = getColumnConnectionInfo(entity);
   
    List<String> keys = new ArrayList<String>();
    List<Double> numericData = null;
    List<String> stringData = null;
    List<Object> thirdColumn = null; // hack for dimension slider format
    List<PGGeom> geometricData = null;
   
    // use config min,max or param min,max to filter the data
    double minValue = Double.NaN;
    double maxValue = Double.NaN;
   
    // server min,max values take priority over user-specified params
    if (entity.publicMetadata.containsKey(PublicMetadata.MIN))
    {
      try {
        minValue = Double.parseDouble(entity.publicMetadata.get(PublicMetadata.MIN));
      } catch (Exception e) { }
    }
    else
    {
      minValue = minParam;
    }
    if (entity.publicMetadata.containsKey(PublicMetadata.MAX))
    {
      try {
        maxValue = Double.parseDouble(entity.publicMetadata.get(PublicMetadata.MAX));
      } catch (Exception e) { }
    }
    else
    {
      maxValue = maxParam;
    }
   
    if (Double.isNaN(minValue))
      minValue = Double.NEGATIVE_INFINITY;
   
    if (Double.isNaN(maxValue))
      maxValue = Double.POSITIVE_INFINITY;
   
    try
    {
      Connection conn = connInfo.getStaticReadOnlyConnection();
     
      // use default sqlParams if not specified by query params
      if (sqlParams == null || sqlParams.length == 0)
      {
        String sqlParamsString = entity.privateMetadata.get(PrivateMetadata.SQLPARAMS);
View Full Code Here

TOP

Related Classes of weave.config.ConnectionConfig.ConnectionInfo

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.