Package net.helipilot50.stocktrade.framework

Examples of net.helipilot50.stocktrade.framework.BooleanData


    // We're already closed, just discard the result set if any
    resultSet = null;
  }
 
  public boolean execute() throws SQLException {
    final BooleanData result = new BooleanData();
    useRealStatement(new StatementWorker() {
      public void doWork(PreparedStatement ps) throws SQLException {
        result.setValue(ps.execute());
       
        // Now get the results sets and remember them
        populateResults(ps, result.getValue());
      }
    });
    return result.getValue();
  }
View Full Code Here


    });
    return updateCount;
  }

  public boolean execute(final String sql) throws SQLException {
    final BooleanData result = new BooleanData();
    useRealStatement(new StatementWorker() {
      public void doWork(PreparedStatement ps) throws SQLException {
        result.setValue(ps.execute(sql));
       
        // Now get the results sets and remember them
        populateResults(ps, result.getValue());
      }
    });
    return result.getValue();
  }
View Full Code Here

    });
    return result.getValue();
  }

  public boolean execute(final String sql, final int autoGeneratedKeys) throws SQLException {
    final BooleanData result = new BooleanData();
    useRealStatement(new StatementWorker() {
      public void doWork(PreparedStatement ps) throws SQLException {
        result.setValue(ps.execute(sql, autoGeneratedKeys));
       
        // Now get the results sets and remember them
        populateResults(ps, result.getValue());
      }
    });
    return result.getValue();
  }
View Full Code Here

              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

        buildDate.setInstrumentID(systemID + 2);
        this.addInstrument(buildDate);

        isCompiled = new ConfigValueInst();
        isCompiled.getName().setValue(" IsCompiled ");
        isCompiled.updateData(new BooleanData(false).getTextValue());
        isCompiled.setIsReadOnly(true);
        isCompiled.setInstrumentID(systemID + 3);
        this.addInstrument(isCompiled);

        this.setState(Constants.SM_ONLINE);
View Full Code Here

                throw new UsageException(
                        "getBooleanData(int) could not handle column "
                                + pColumnID + ". Result =" + o);

            } else {
                return new BooleanData(this.mapBooleanFromDB(o));
            }
        } catch (SQLException e) {
          throw processException(e);
        }
    }
View Full Code Here

                throw new UsageException(
                        "getBooleanData(int) could not handle column "
                                + pColumnName + ". Result =" + o);

            } else {
                return new BooleanData(this.mapBooleanFromDB(o));
            }
        } catch (SQLException e) {
          throw processException(e);
        }
    }
View Full Code Here

    });
    return result.getValue();
  }

  public boolean execute(final String sql, final int[] columnIndexes) throws SQLException {
    final BooleanData result = new BooleanData();
    useRealStatement(new StatementWorker() {
      public void doWork(PreparedStatement ps) throws SQLException {
        result.setValue(ps.execute(sql, columnIndexes));
       
        // Now get the results sets and remember them
        populateResults(ps, result.getValue());
      }
    });
    return result.getValue();
  }
View Full Code Here

    });
    return result.getValue();
  }

  public boolean execute(final String sql, final String[] columnNames) throws SQLException {
    final BooleanData result = new BooleanData();
    useRealStatement(new StatementWorker() {
      public void doWork(PreparedStatement ps) throws SQLException {
        result.setValue(ps.execute(sql, columnNames));
       
        // Now get the results sets and remember them
        populateResults(ps, result.getValue());
      }
    });
    return result.getValue();
  }
View Full Code Here

//        EventManager.endEventChain();
    }

    public TextData getTextValue() {
        final TextData target = new TextData();
        final BooleanData isNull = new BooleanData(false);
        UIutils.invokeOnGuiThread(new Runnable () {
            public void run() {
                if (cb.isEditable()) {
                        target.setValue(cb.getEditor().getItem().toString());
                }
                else {
                    if (cb.getSelectedIndex() == -1)
                      isNull.setValue( true );
                    else
                        target.setValue(cb.getSelectedItem().toString());
                }
            }
        });
        if (!isNull.getBooleanValue()) {
          return target;
        }
        else {
          return null;
        }
View Full Code Here

TOP

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

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.