Package net.helipilot50.stocktrade.framework

Examples of net.helipilot50.stocktrade.framework.UUIDGen


        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

        if (!stack.isEmpty()) {
          // We are in the middle of a transaction, and we're about to cross a process boundary
          TransactionData data = stack.get(0);
          if (data.distributedTransactionID == null) {
            // This is the first time the transaction has cross a process boundary, allocate an id
            UUIDGen gen = new UUIDGen();
            gen.generate();
            data.distributedTransactionID = gen.asCharPtr();
          }
          // Add this key to the list of invokers if not already there
          data.currentInvoker = remoteMechanism;
          if (data.distributedInvokers != null) {
            boolean found = false;
View Full Code Here

        if (!stack.isEmpty()) {
          // We are in the middle of a transaction, and we're about to cross a process boundary
          TransactionData data = stack.get(0);
          if (data.distributedTransactionID == null) {
            // This is the first time the transaction has cross a process boundary, allocate an id
            UUIDGen gen = new UUIDGen();
            gen.generate();
            data.distributedTransactionID = gen.asCharPtr();
          }
          // Add this key to the list of invokers if not already there
          data.currentInvoker = remoteMechanism;
          if (data.distributedInvokers != null) {
            boolean found = false;
View Full Code Here

    private String objectName = null;

    public ServiceInvoker(Anchorable pObject) {
      this.wrappedObject = pObject;

        UUIDGen uid = new UUIDGen();
        uid.generate();
        this.objectName = "Anchored-" + pObject.getClass().getName() + "-" + uid.asCharPtr();
    }
View Full Code Here

            this.orientation = or;
            this.firePropertyChange("orientation", oldValue, this.orientation);
            updateSize();
            break;
        default:
            UsageException errorVar = new UsageException("The value " + or + " cannot be set as the orientation on a RadioList");
            ErrorMgr.addError(errorVar);
            throw errorVar;
        }
    }
View Full Code Here

            this.layoutPolicy = pPolicy;
            this.firePropertyChange("layoutPolicy", oldValue, this.layoutPolicy);
            updateSize();
            break;
        default:
            UsageException errorVar = new UsageException("The value " + pPolicy + " cannot be set as the orientation on a RadioList");
            ErrorMgr.addError(errorVar);
            throw errorVar;
        }
    }
View Full Code Here

            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

TOP

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

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.