Package net.helipilot50.stocktrade.displayproject

Examples of net.helipilot50.stocktrade.displayproject.RadioList


            CachedRowSet rowSet = new CachedRowSetImpl();
            rowSet.populate(pResults);
              this.resultSet = rowSet;
          }
          catch (SQLException e) {
                UsageException errorVar = new UsageException(e.getMessage(), SP_ER_USER, SP_ER_PARAMETERERROR, e);
                ErrorMgr.addError(errorVar);
                throw errorVar;
          }
        }
        else {
View Full Code Here


        return resultSet.findColumn(pColName);
      } catch (SQLException e) {
        // Ignore the exception because one will be raised below
      }
      }
        UsageException errorVar = new UsageException("Could not find ordinal for " + pColName);
        ErrorMgr.addError(errorVar);
        throw errorVar;
    }
View Full Code Here

              // At this stage setting the UDS Data Type to Unknown. May need to create a mapping from the JDBC DataType to a DB_DT_ constant
              cds.add(new DBColumnDesc(result.getInt("COLUMN_SIZE"), 0, result.getInt("DATA_TYPE"), result.getString("COLUMN_NAME"), result.getBoolean("NULLABLE"), result.getInt("DECIMAL_DIGITS")));
              columnCount++;
            }
            if (columnCount == 0) {
              UsageException errorVar = new UsageException("Cannot get column List from table: " + this.tableName + ", Table does not exist.");
              ErrorMgr.addError(errorVar);
              throw errorVar;
            }
            }
            // TF:24/07/2008:Added support for columns descriptors on input data sets too
            else if (statement != null && this.inputColMapping != null) { //PM:Aug 15, 2008:added null check on inputColMapping
              // It's possibly a request for the column list off the input metadata
              ParameterMetaData data = null;
              try {
                data = statement.getParameterMetaData();
              }
              catch (Exception e) {
                // No dice, go with what we've got
              }
              int numCols = this.inputColMapping.size();
              for (int i = 0; i < numCols; i++) {
                String name =  ":" + this.inputColMapping.get(i);
                int type = Types.OTHER;
                try {
                  if (data != null) {
                    type = data.getParameterType(i);
                  }
                }
                catch (Exception e) {}
                int scale = 2;
                try {
                  if (data != null) {
                    scale = data.getPrecision(i);
                  }
                }
                catch (Exception e) {};
                cds.add(new DBColumnDesc(4, type, type, name, false, scale));
              }
            }
            else if (resultSet != null) {
              ResultSetMetaData data = this.resultSet.getMetaData();
                int numCols = data.getColumnCount();
                // AD:24/09/08 Column Count starts at 1 not 0
                for (int i = 1; i <= numCols; i++) {
                    cds.add(new DBColumnDesc(data, i));
                }
            }
        } catch (SQLException e) {
            DataAccessException errorVar = new SQLErrorCodeSQLExceptionTranslator().translate("Cannot get column List from result set\n" + e.getMessage(), "", e );
            ErrorMgr.addError(errorVar);
            throw errorVar;
            // PM:16/07/2008
        } catch (NullPointerException e){
          String msg = (e.getMessage() == null) ? e.getClass().getName() : e.getMessage();
            UsageException errorVar = new UsageException("Cannot get column List from result set\n" + msg , e );
            ErrorMgr.addError(errorVar);
            throw errorVar;
        }
        return cds;
    }
View Full Code Here

            } else if (pValue instanceof BinaryData) {
              BinaryData value = (BinaryData) pValue;
              cachedRowSet.updateBinaryStream(pColOrdinal, new ByteArrayInputStream(value.getValue()), value.getActualSize());
            }
          } catch (SQLException e) {
            UsageException errorVar = new UsageException(e.getMessage(), net.helipilot50.stocktrade.framework.Constants.SP_ER_USER, net.helipilot50.stocktrade.framework.Constants.SP_ER_PARAMETERERROR, e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
          }
        }
      }
View Full Code Here

        if (resultSet instanceof CachedRowSet) {
          CachedRowSet cachedRowSet = (CachedRowSet) resultSet;
          try {
            cachedRowSet.updateInt(pColOrdinal, pValue);
          } catch (SQLException e) {
            UsageException errorVar = new UsageException(e.getMessage(), net.helipilot50.stocktrade.framework.Constants.SP_ER_USER, net.helipilot50.stocktrade.framework.Constants.SP_ER_PARAMETERERROR, e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
          }
        }
      }
View Full Code Here

        if (resultSet instanceof CachedRowSet) {
          CachedRowSet cachedRowSet = (CachedRowSet) resultSet;
          try {
            cachedRowSet.updateFloat(pColOrdinal, pValue);
          } catch (SQLException e) {
            UsageException errorVar = new UsageException(e.getMessage(), net.helipilot50.stocktrade.framework.Constants.SP_ER_USER, net.helipilot50.stocktrade.framework.Constants.SP_ER_PARAMETERERROR, e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
          }
        }
      }
View Full Code Here

        if (resultSet instanceof CachedRowSet) {
          CachedRowSet cachedRowSet = (CachedRowSet) resultSet;
          try {
            cachedRowSet.updateDouble(pColOrdinal, pValue);
          } catch (SQLException e) {
            UsageException errorVar = new UsageException(e.getMessage(), net.helipilot50.stocktrade.framework.Constants.SP_ER_USER, net.helipilot50.stocktrade.framework.Constants.SP_ER_PARAMETERERROR, e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
          }
        }
      }
View Full Code Here

        if (resultSet instanceof CachedRowSet) {
          CachedRowSet cachedRowSet = (CachedRowSet) resultSet;
          try {
            cachedRowSet.updateLong(pColOrdinal, pValue);
          } catch (SQLException e) {
            UsageException errorVar = new UsageException(e.getMessage(), net.helipilot50.stocktrade.framework.Constants.SP_ER_USER, net.helipilot50.stocktrade.framework.Constants.SP_ER_PARAMETERERROR, e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
          }
        }
      }
View Full Code Here

        if (resultSet instanceof CachedRowSet) {
          CachedRowSet cachedRowSet = (CachedRowSet) resultSet;
          try {
            cachedRowSet.updateBoolean(pColOrdinal, pValue);
          } catch (SQLException e) {
            UsageException errorVar = new UsageException(e.getMessage(), net.helipilot50.stocktrade.framework.Constants.SP_ER_USER, net.helipilot50.stocktrade.framework.Constants.SP_ER_PARAMETERERROR, e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
          }
        }
      }
View Full Code Here

        if (resultSet instanceof CachedRowSet) {
          CachedRowSet cachedRowSet = (CachedRowSet) resultSet;
          try {
            cachedRowSet.updateShort(pColOrdinal, pValue);
          } catch (SQLException e) {
            UsageException errorVar = new UsageException(e.getMessage(), net.helipilot50.stocktrade.framework.Constants.SP_ER_USER, net.helipilot50.stocktrade.framework.Constants.SP_ER_PARAMETERERROR, e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
          }
        }
      }
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.displayproject.RadioList

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.