Package net.helipilot50.stocktrade.framework

Examples of net.helipilot50.stocktrade.framework.DecimalNullable


              cachedRowSet.updateBigDecimal(pColOrdinal, value.getBigDecimal());
            } else if (pValue instanceof BooleanData) {
              BooleanData value = (BooleanData) pValue;
              cachedRowSet.updateBoolean(pColOrdinal, value.getBooleanValue());
            } else if (pValue instanceof DateTimeData) {
              DateTimeData value = (DateTimeData) pValue;
              cachedRowSet.updateDate(pColOrdinal, new Date(value.asDate().getTime()));
            } 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


              cachedRowSet.updateInt(pColOrdinal, integerValue.getIntegerValue());
            } else if (pValue instanceof DoubleData) {
              DoubleData doubleValue = (DoubleData) pValue;
              cachedRowSet.updateDouble(pColOrdinal, doubleValue.getDoubleValue());
            } else if (pValue instanceof DecimalData) {
              DecimalData value = (DecimalData) pValue;
              cachedRowSet.updateBigDecimal(pColOrdinal, value.getBigDecimal());
            } else if (pValue instanceof BooleanData) {
              BooleanData value = (BooleanData) pValue;
              cachedRowSet.updateBoolean(pColOrdinal, value.getBooleanValue());
            } else if (pValue instanceof DateTimeData) {
              DateTimeData value = (DateTimeData) pValue;
              cachedRowSet.updateDate(pColOrdinal, new Date(value.asDate().getTime()));
            } 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

     * @param pColumnID the ordinal number of the column to read
     * @return a DecimalNullable instance containing the value of the column in the database
     */
    public DecimalNullable getDecimalNullable(int pColumnID) {
        try {
            DecimalNullable dn = new DecimalNullable();

            double doub = resultSet.getDouble(pColumnID);
            if (resultSet.wasNull()) {
                dn.setNull();
            } else {
                dn.setValue(doub);
            }

            return dn;
        } catch (SQLException e) {
          throw processException(e);
View Full Code Here

        }
    }

    public DecimalNullable getDecimalNullable(int pColumnID, int pScale) {
        try {
            DecimalNullable dn = new DecimalNullable();
            dn.setScale(pScale);

            double doub = resultSet.getDouble(pColumnID);
            if (resultSet.wasNull()) {
                dn.setNull();
            } else {
                dn.setValue(doub);
            }

            return dn;
        } catch (SQLException e) {
          throw processException(e);
View Full Code Here

        }
    }

    public DecimalNullable getDecimalNullable(String pColumnName) {
        try {
            DecimalNullable dn = new DecimalNullable();

            double doub = resultSet.getDouble(pColumnName);
            if (resultSet.wasNull()) {
                dn.setNull();
            } else {
                dn.setValue(doub);
            }

            return dn;
        } catch (SQLException e) {
          throw processException(e);
View Full Code Here

        }
    }

    public DecimalNullable getDecimalNullable(String pColumnName, int pScale) {
        try {
            DecimalNullable dn = new DecimalNullable();
            dn.setScale(pScale);

            double doub = resultSet.getDouble(pColumnName);
            if (resultSet.wasNull()) {
                dn.setNull();
            } else {
                dn.setValue(doub);
            }

            return dn;
        } catch (SQLException e) {
          throw processException(e);
View Full Code Here

   * Get the value of the data field as a decimal nullable. This method was undocumented in Forte
   * @return
   */
  public DecimalNullable getDataNumeric() {
    try {
      return new DecimalNullable(Double.parseDouble(this.getText()), 4, DecimalNullable.qq_Resolver.cDOUBLEVALUE_SCALE);
    }
    catch (Exception e) {
      return new DecimalNullable(true, 4, DecimalNullable.qq_Resolver.cISNULL_SCALE);
    }
  }
View Full Code Here

              cachedRowSet.updateString(pColOrdinal, textValue.toString());
            } else if (pValue instanceof IntegerData) {
              IntegerData integerValue = (IntegerData) pValue;
              cachedRowSet.updateInt(pColOrdinal, integerValue.getIntegerValue());
            } else if (pValue instanceof DoubleData) {
              DoubleData doubleValue = (DoubleData) pValue;
              cachedRowSet.updateDouble(pColOrdinal, doubleValue.getDoubleValue());
            } else if (pValue instanceof DecimalData) {
              DecimalData value = (DecimalData) pValue;
              cachedRowSet.updateBigDecimal(pColOrdinal, value.getBigDecimal());
            } else if (pValue instanceof BooleanData) {
              BooleanData value = (BooleanData) pValue;
View Full Code Here

            DataValue theAttribute = null;
            if (attribute.getValue() instanceof java.lang.Integer) {
                theAttribute = new IntegerData((Integer)attribute.getValue());
            }
            if (attribute.getValue() instanceof java.lang.Double) {
                theAttribute = new DoubleData((Double)attribute.getValue());
            }
            if (attribute.getValue() instanceof java.lang.String) {
                theAttribute = new TextData((String)attribute.getValue());
            }
            ((ConfigValueInst)instrument).updateData(theAttribute);
View Full Code Here

        qq_Params.put("row", new ParameterHolder(0));
        qq_Params.put("column", new ParameterHolder(0));
        if (e.getSource() instanceof JRadioButtonMenuItem) {
            ButtonGroup bg = ((DefaultButtonModel) ((JRadioButtonMenuItem) e
                    .getSource()).getModel()).getGroup();
            eventsToPost.add(new EventHandle(bg, "Activate", qq_Params));
        } else {
            Component me = (Component) e.getSource();

            //System.out.println("Activate on ["+ me.toString() + "]");
            eventsToPost.add(new EventHandle(me, "Activate", qq_Params));
            // TF:13/11/07:Commented this out as there is now a childActivateListener to take care of this
            //ChildEventHelper.postEventToAllParents(me, "ChildActivate", null, eventsToPost);
        }
        /*
         * toData() must be called to update the mapped data object.
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.framework.DecimalNullable

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.