Package net.helipilot50.stocktrade.framework

Examples of net.helipilot50.stocktrade.framework.TextData$qq_Resolver


     * @return The width of the title, or 0 if there is no title.
     */
    public int getTitleWidth(GridField parentGrid) {
        if (cachedTitleWidth < 0) {
            int captionWidth = 0;
            TextData tdCaption = parentGrid.getCaption();
            String caption = (tdCaption == null) ? "": tdCaption.toString();
            if ("".equals(caption)) {
                captionWidth = 0;
            }
            else {
                Font font = null;
View Full Code Here


        Connection connection = null;
        try {
            connection = this.getConnection();
            ResultSet rs = connection.getMetaData().getTables(null, null, pName, null);
            while (rs.next()) {
                tableNames.add(new TextData(rs.getString(3)));
            }
        } catch (SQLException e) {
            throw new UsageException(e);
        } finally {
            releaseConnection(connection);
View Full Code Here

        int systemID = getLastIID();

        ConfigValueInst archName = new ConfigValueInst();
        archName.getName().setValue("Architecture");
        archName.updateData(new TextData(System.getProperty("os.arch")));
        archName.setIsReadOnly(true);
        archName.setInstrumentID(systemID + 1);
        this.addInstrument(archName);

        ConfigValueInst modelNode = new ConfigValueInst();
        modelNode.getName().setValue("ModelNode");
        modelNode.updateData(new TextData("false"));
        modelNode.setIsReadOnly(true);
        modelNode.setInstrumentID(systemID + 2);
        this.addInstrument(modelNode);

View Full Code Here

            Stream outStream) {
            int systemIndex = CommandIndexValues.AGENT_CMD_LASTVALUE;
            int index = cmdIndex - systemIndex;
            switch (index){
            case MOD_LOGGER_REMOTE_INDEX:{
                TextData flags = (TextData)parameters.get(0);
                modLoggerRemote(flags.toString());
                return null;
            }
            case MOD_LOG4J_REMOTE_INDEX:{
              TextData logger = (TextData)parameters.get(0);
                TextData level = (TextData)parameters.get(1);
                modLog4JRemote(logger.toString(), level.toString());
                return null;
            }
            case EXEC_CMD_REMOTE_INDEX:{
                try {
                  TextData command = (TextData)parameters.get(0);
                    Runtime.getRuntime().exec(command.toString());
                    return null;
                } catch (IOException e) {
                    return e.getMessage();
                }
            }
View Full Code Here

        this.setNameAsString(Application.getName() + "_Server");
        int systemID = getLastIID();

        PID = new ConfigValueInst();
        PID.getName().setValue("ProcessID");
        PID.updateData(new TextData());
        PID.setIsReadOnly(true);
        PID.setInstrumentID(systemID + 1);
        this.addInstrument(PID);

        buildDate = new ConfigValueInst();
        buildDate.getName().setValue("BuildDate");
        buildDate.updateData(new TextData(System.getProperty("BuildDate")));
        buildDate.setIsReadOnly(true);
        buildDate.setInstrumentID(systemID + 2);
        this.addInstrument(buildDate);

        isCompiled = new ConfigValueInst();
View Full Code Here

    }
   
    @Override
    public void updateInstrument(Instrument inst) {
      //PM:01/07/2008:deferred getting the process id until updateInstrument() is called
      PID.updateData(new TextData(Partition.getPID()));
      super.updateInstrument(inst);
    }
View Full Code Here

            qq_SQL = "select StockName from Stock ";
            qq_cmd = dBConnection.getPreparedStatement(qq_SQL);
            qq_rs = qq_cmd.executeQuery();
            ResultSetHelper qq_rsHelper = new ResultSetHelper(qq_rs);
            while (qq_rsHelper.next()) {
                TextData temp = qq_rsHelper.getTextData(1);
                ListElement row = new ListElement();
                row.getTextValue().setValue( temp.getValue() );
                this.stockNameList.add(row);
            }
        }
        catch (SQLException qq_error) {
            throw new SQLErrorCodeSQLExceptionTranslator(dBConnection.getDataSource()).translate("Running SQL", qq_SQL, qq_error);
View Full Code Here

        super();
        this.setName(name);
    }
    public Instrument(String name) {
        super();
        this.setName(new TextData(name));
    }
View Full Code Here

     * dumpStats<p>
     * <p>
     */
    public void dumpStats() {
        String title1 = null;
        TextData title2 = null;
        TextNullable title3 = null;
        int numCustomers = 0;
        IntegerData numStocks = null;
        double totalValue = 0;

        DBConnectionManager dBConnection = DBConnectionManager.getInstance("DBConnection");

        // -- =============== Original SQL ===============
        // select 
        //     'Customers',
        //     count(distinct CustomerName),
        //     'Stocks',
        //     count(distinct StockName),
        //     'Total value',
        //     sum(Price*Quantity)
        // into
        //     :title1,
        //     :numCustomers,
        //     :title2,
        //     :numStocks,
        //     :title3,
        //     :totalValue
        // from Holding
        // on session DBConnection
        // -- ============================================
        String qq_SQL = "select " +
                        "'Customers', " +
                        "count(distinct CustomerName), " +
                        "'Stocks', " +
                        "count(distinct StockName), " +
                        "'Total value', " +
                        "sum(Price*Quantity) " +
                        "from Holding ";
        final ParameterHolder qqh_title1 = new ParameterHolder(title1);
        final ParameterHolder qqh_numCustomers = new ParameterHolder(numCustomers);
        final ParameterHolder qqh_title2 = new ParameterHolder(title2);
        final ParameterHolder qqh_numStocks = new ParameterHolder(numStocks);
        final ParameterHolder qqh_title3 = new ParameterHolder(title3);
        final ParameterHolder qqh_totalValue = new ParameterHolder(totalValue);
        RowCountCallbackHandler qq_RowCounter = new RowCountCallbackHandler() {
            protected void processRow(ResultSet pResultSet, int pRow) throws SQLException {
                if (pRow >= 1) {
                    throw new IncorrectResultSizeDataAccessException(1, pRow+1);
                }
                ResultSetHelper helper = new ResultSetHelper(pResultSet);
                qqh_title1.setObject(helper.getString(1));
                qqh_numCustomers.setInt(helper.getInt(2));
                qqh_title2.setObject(helper.getTextData(3));
                qqh_numStocks.setObject(helper.getIntegerData(4));
                qqh_title3.setObject(helper.getTextNullable(5));
                qqh_totalValue.setDouble(helper.getDouble(6));
            }
        };
        dBConnection.getTemplate().query(qq_SQL, qq_RowCounter);
        title1 = (String)qqh_title1.getObject();
        numCustomers = qqh_numCustomers.getInt();
        title2 = (TextData)qqh_title2.getObject();
        numStocks = (IntegerData)qqh_numStocks.getObject();
        title3 = (TextNullable)qqh_title3.getObject();
        totalValue = qqh_totalValue.getDouble();

        TextData aMsg = new TextData();
        aMsg.concat(title1).concat(":").concat(numCustomers).concat(", ").concat(title2).concat(":").concat(numStocks).concat(", ").concat(title3).concat(totalValue);

        Log.standardLog().info(aMsg);
    }
View Full Code Here

        return aCustomer;
    }
   
  public Customer getCustomer(String pGetCustCustomerName) {
    return getCustomer(new TextData(pGetCustCustomerName));
  }
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.framework.TextData$qq_Resolver

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.