Examples of DecimalData


Examples of Framework.DecimalData

            if (o == null || resultSet.wasNull()) {
                throw new UsageException(
                        "getDecimalData(String) could not handle column " + pColumnName + ". Result =" + o,
                        SP_ER_PARAMETERERROR, SP_ER_USER, UsageException.qq_Resolver.cMESSAGE_REASONCODE_SEVERITY);
            }
            DecimalData dd = new DecimalData(resultSet.getDouble(pColumnName));
            return dd;
        } catch (SQLException e) {
          throw processException(e);
        }
    }
View Full Code Here

Examples of net.helipilot50.stocktrade.framework.DecimalData

              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

Examples of net.helipilot50.stocktrade.framework.DecimalData

            try {
              // TF:10/4/08:Added in the scale of decimaldatas if necessary
              Object currentValue = this.docFilter.field.getValue();
          DataValue dataValue = FormatterUtils.createDataValueInstance(numericValueClass);
          if (currentValue instanceof DecimalData) {
            DecimalData originalValue = (DecimalData)currentValue;
            if (!originalValue.isNull() && dataValue instanceof DecimalData) {
              ((DecimalData)dataValue).setScale(originalValue.getScale());
            }
          }
          // TF:29 sept. 2008:Changed this to use the generic method to prevent numerics being
          // converted to strings, and hence losing international formatting characters
          FormatterUtils.setDataValue(dataValue, value);
View Full Code Here

Examples of net.helipilot50.stocktrade.framework.DecimalData

            if (o == null || resultSet.wasNull()) {
                throw new UsageException(
                        "getDecimalData(int) could not handle column " + pColumnID + ". Result =" + o,
                        SP_ER_PARAMETERERROR, SP_ER_USER, UsageException.qq_Resolver.cMESSAGE_REASONCODE_SEVERITY);
            }
            DecimalData dd = new DecimalData(resultSet.getDouble(pColumnID));
            return dd;
        } catch (SQLException e) {
          throw processException(e);
        }
    }
View Full Code Here

Examples of net.helipilot50.stocktrade.framework.DecimalData

            if (o == null || resultSet.wasNull()) {
                throw new UsageException(
                        "getDecimalData(String) could not handle column " + pColumnName + ". Result =" + o,
                        SP_ER_PARAMETERERROR, SP_ER_USER, UsageException.qq_Resolver.cMESSAGE_REASONCODE_SEVERITY);
            }
            DecimalData dd = new DecimalData(resultSet.getDouble(pColumnName));
            return dd;
        } catch (SQLException e) {
          throw processException(e);
        }
    }
View Full Code Here

Examples of net.helipilot50.stocktrade.framework.DecimalData

                        int outputQuantity = (Integer)qq_currentEvent.getParam("pMTQuantity");
                        float outputPrice = (Float)qq_currentEvent.getParam("pMTPrice");
                        String returnSecName = qq_currentEvent.getParam("return");
                        TextData tempMsg = new TextData();
                        TextData objSecName = new TextData(returnSecName);
                        DecimalData objPrice = new DecimalData(outputPrice);
                        IntegerData objQuantity = new IntegerData(outputQuantity);
                        tempMsg.replaceParameters("Trade for %1 at price $%2 for %3 shares completed successfully", objSecName, objPrice, objQuantity);
                        WindowManager.messageDialog(this, tempMsg, Constants.MT_INFO, 50);

                        //   when TradeSO.MakeTrade_exception do
View Full Code Here

Examples of net.sf.cb2java.data.DecimalData

        // System.out.println(bigI);

        Data data = create();

        if (data instanceof DecimalData) {
            DecimalData dData = (DecimalData) data;

            BigDecimal bigD = new BigDecimal(bigI, decimalPlaces());

            dData.setValue(bigD);

            return data;
        } else {
            IntegerData iData = (IntegerData) data;
View Full Code Here

Examples of net.sf.cb2java.data.DecimalData

       
        BigInteger big = s == null ? null : new BigInteger(s);
        Data data = create();
       
        if (data instanceof DecimalData) {
            DecimalData dData = (DecimalData) data;
            BigDecimal bigD = big == null ? null : new BigDecimal(big, decimalPlaces());
           
            dData.setValue(bigD);
           
            return data;
        } else {
            IntegerData iData = (IntegerData) data;
           
View Full Code Here

Examples of net.sf.cb2java.data.DecimalData

        BigInteger bigI = new BigInteger(input);
       
        Data data = create();
       
        if (data instanceof DecimalData) {
            DecimalData dData = (DecimalData) data;
           
            BigDecimal bigD = new BigDecimal(bigI, decimalPlaces());
           
            dData.setValue(bigD);
           
            return data;
        } else {
            IntegerData iData = (IntegerData) data;
           
View Full Code Here

Examples of net.sf.cb2java.data.DecimalData

    }
   
    public Data create()
    {
        if (decimalPlaces() > 0) {
            return new DecimalData(this);
        } else {
            return new IntegerData(this);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.