Package Framework

Examples of Framework.ParameterHolder_integer


                if (LogMgr.getInstance().test(Framework.Constants.SP_MT_DEBUG, Framework.Constants.SP_ST_EX, 30, 10) ) Logger.getLogger("task.part.logmgr").info(" items to server for update.");
   
                // ----------------------------------------
                // Parameters for call to IsSaveAppropriate
                // ----------------------------------------
                ParameterHolder_integer qq_ccMode = new ParameterHolder_integer(ccMode);
                boolean qq_IsSaveAppropriate = this.isSaveAppropriate(qq_ccMode);
                ccMode = qq_ccMode.getInt();
                if (!(qq_IsSaveAppropriate)) {
                    if (!(this.getIsInTestMode())) {
                        JOptionPane.showMessageDialog(this, this.getAppBroker().getLocalString(ApplicationBroker.MS_MESSAGE_SET, ApplicationBroker.MN_ERROR_CANNOT_SAVE), "Warning", JOptionPane.WARNING_MESSAGE );
                    }
                    else {
                        Logger.getLogger("task.part.logmgr").info(this.getAppBroker().getLocalString(ApplicationBroker.MS_MESSAGE_SET, ApplicationBroker.MN_ERROR_CANNOT_SAVE));
                    }
   
                    this.getAppBroker().setIsSaving(false);
                    return false;
                }
   
            }
            else {
                if (!(this.getIsInTestMode())) {
                    JOptionPane.showMessageDialog(this, this.getAppBroker().getLocalString(ApplicationBroker.MS_MESSAGE_SET, ApplicationBroker.MN_ERROR_CANNOT_SAVE), "Warning", JOptionPane.WARNING_MESSAGE );
                }
                else {
                    Logger.getLogger("task.part.logmgr").info(this.getAppBroker().getLocalString(ApplicationBroker.MS_MESSAGE_SET, ApplicationBroker.MN_ERROR_CANNOT_SAVE));
                }
   
                this.getAppBroker().setIsSaving(false);
                return false;
            }
   
            //
            // retreive any extra records the developer has
            // added in custom code.
            //
            Array_Of_BusinessClass<BusinessClass> extraRecords = null;
            try {
                extraRecords = this.addRecordsToSave();
                if (extraRecords != null) {
                    if (extraRecords != null) {
                        for (BusinessClass r : extraRecords) {
                            this.getResultSet().add(r);
                        }
                    }
                }
   
                this.getBusinessClient().update(this.getResultSet(), ccMode);
   
                //
                // remove any extra records the developer has
                // added in custom code.
                //
                if (extraRecords != null) {
          for (Iterator<BusinessClass> iterator = extraRecords
              .iterator(); iterator.hasNext();) {
            BusinessClass r = iterator.next();
            this.getResultSet().deleteRow(r);
          }
        }
   
                //
                // remove any extra records the developer has
                // added in custom code.
                //
            }
            catch (Throwable qq_ElseException) {
                if (extraRecords != null) {
          for (Iterator<BusinessClass> iterator = extraRecords
              .iterator(); iterator.hasNext();) {
            BusinessClass r = iterator.next();
            this.getResultSet().deleteRow(r);
          }
        }
                // ----------------------------------------
                // Parameters for call to IsSaveAppropriate
                // ----------------------------------------
                ParameterHolder_integer qq_ccMode = new ParameterHolder_integer(ccMode);
                boolean qq_IsSaveAppropriate = this.isSaveAppropriate(qq_ccMode);
                ccMode = qq_ccMode.getInt();
                if (qq_IsSaveAppropriate) {
                   
                    throw (RuntimeException)qq_ElseException;
                }
                else {
View Full Code Here


            //
            if (this.getIsResultSetModified() == true && !(this.getWindowInfo().getIsReadOnlyResultSet())) {
                // ----------------------------------------
                // Parameters for call to IsSaveAppropriate
                // ----------------------------------------
                ParameterHolder_integer qq_ccMode = new ParameterHolder_integer(tempInteger);
                boolean qq_IsSaveAppropriate = this.isSaveAppropriate(qq_ccMode);
                tempInteger = qq_ccMode.getInt();
                if (qq_IsSaveAppropriate) {
                    int answer = 0;
                    answer = this.getAppBroker().confirmationDialog(new TextData(this.getAppBroker().getLocalString(ApplicationBroker.MS_MESSAGE_SET, ApplicationBroker.MN_CONFIRM_SEARCH_MODE)), this.getWindowName(), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.YES_OPTION, 50, this.getAppBroker().getPreferences().getConfirmMode());
                    //
                    // save if so instructed
View Full Code Here

                    for (int t1 = 1; t1 <= lNumTables; t1++) {
                        t2 = t1;
                        // ------------------------------------
                        // Parameters for call to GetColumnName
                        // ------------------------------------
                        ParameterHolder_integer qq_tableIndex = new ParameterHolder_integer(t2);
                        ParameterHolder_TextData qq_columnName = new ParameterHolder_TextData();
                        this.getColumnName(i, qq_tableIndex, qq_columnName);
                        t2 = qq_tableIndex.getInt();
                        c = (TextData)qq_columnName.getObject();
                        sq.addConstraint(t2, c, ConstraintOperation.OP_EQ, this.getKey().getValues().get(i-1));
                    }
                }

                //
                //  Add user specified constraints.
                //
                sq.addConstraint(this.getConstraint());

                break;
            }
            case BusinessQuery.OP_INSERT: {

                //
                //  For inserts the constraints represent the values to be inserted.
                //
                sq.addValue(this.getValues());

                break;
            }
            case BusinessQuery.OP_DELETE: {

                //
                //  For deletes we need only specify the key attributes as constraints.
                //
                for (int i = 1; i <= lNumKeyAttrs; i++) {
                    for (int t1 = 1; t1 <= lNumTables; t1++) {
                        t2 = t1;
                        // ------------------------------------
                        // Parameters for call to GetColumnName
                        // ------------------------------------
                        ParameterHolder_integer qq_tableIndex = new ParameterHolder_integer(t2);
                        ParameterHolder_TextData qq_columnName = new ParameterHolder_TextData();
                        this.getColumnName(i, qq_tableIndex, qq_columnName);
                        t2 = qq_tableIndex.getInt();
                        c = (TextData)qq_columnName.getObject();
                        sq.addConstraint(t2, c, ConstraintOperation.OP_EQ, this.getKey().getValues().get(i-1));
                    }
                }

                //
                //  Add user specified constraints.
                //
                sq.addConstraint(this.getConstraint());

                break;
            }
            case BusinessQuery.OP_SELECT: {

                //
                // Add attributes to the select list.
                //   
                int attrs = 0;
                int index = 0;
                int baseIndex = 1;
                int lNumDBAttrs = this.getNumDBAttrs();
                // cache virtual attribute

                if (this.getTargetAttrs() != null) {
                    for (IntegerData attr : this.getTargetAttrs()) {
                        if (baseIndex+30 <= lNumKeyAttrs) {
                            //
                            //  All attributes are key attributes -- make sure they're all set.
                            //
                            attr.setValue(2147483647);
                        }
                        else if (baseIndex <= lNumKeyAttrs) {
                            //
                            //  Or in key attributes
                            //
                            attr.setValue(attr.getValue()|((int)(new DoubleData().power(2, lNumKeyAttrs-baseIndex+1).getValue()-1)));
                        }
                        index = baseIndex;
                        attrs = attr.getValue();
                        while ((attrs > 0) && (index <= lNumDBAttrs)) {
                            if ((attrs&1) > 0) {
                                t = 1;
                                // ------------------------------------
                                // Parameters for call to GetColumnName
                                // ------------------------------------
                                ParameterHolder_integer qq_tableIndex = new ParameterHolder_integer(t);
                                ParameterHolder_TextData qq_columnName = new ParameterHolder_TextData();
                                this.getColumnName(index, qq_tableIndex, qq_columnName);
                                t = qq_tableIndex.getInt();
                                c = (TextData)qq_columnName.getObject();
                                sq.addColumn(t, c, (DataValue)null);
                                if (index <= lNumKeyAttrs && lNumTables > 1) {
                                    for (int tindex = 2; tindex <= lNumTables; tindex++) {
                                        t2 = tindex;
                                        // ------------------------------------
                                        // Parameters for call to GetColumnName
                                        // ------------------------------------
                                        ParameterHolder_integer qq_tableIndex1 = new ParameterHolder_integer(t2);
                                        ParameterHolder_TextData qq_columnName1 = new ParameterHolder_TextData();
                                        this.getColumnName(index, qq_tableIndex1, qq_columnName1);
                                        t2 = qq_tableIndex1.getInt();
                                        c = (TextData)qq_columnName1.getObject();
                                        if (this.getConstraint() == null) {
                                            this.setConstraint(new QueryConstraint());
                                        }
                                        this.getConstraint().addAttr(this, index, 1);
                                        this.getConstraint().addAttr(this, index, tindex);
                                        this.getConstraint().addOperation(ConstraintOperation.OP_EQ);
                                    }
                                }
                            }
                            attrs = attrs/2;
                            index = index+1;
                        }
                        baseIndex = baseIndex+31;
                    }
                }

                //
                // Finally do foreign entities.
                //
                if (this.getForeignClasses() != null) {
                    for (BusinessQuery fe : this.getForeignClasses()) {

                        if ((fe.getExecuteInfo().getStatus()&QueryExecuteInfo.ST_JOINED) > 0) {
                            //
                            //  Check what kind of join we are going to do
                            //
                            int op = 0;
                            if ((fe.getParentMult()&BusinessQuery.ASSOC_MULT_OPTIONAL) == 0) {
                                op = ConstraintOperation.OP_EQUIJOIN;
                                sq.setOptions(sq.getOptions()|SqlQuery.OPT_INNER_JOIN);
                            }
                            else {
                                op = ConstraintOperation.OP_LEFTJOIN;
                                sq.setOptions(sq.getOptions()|SqlQuery.OPT_OUTER_JOIN);
                            }

                            //
                            //  Put in a join to the foreign table
                            //
                            this.addJoinConstraint(op, fe);

                            //
                            //  Now have the foreign entity describe itself as we just did and
                            //  append this to the sqlQuery we are building up.
                            //
                            // ---------------------------------
                            // Parameters for call to BuildQuery
                            // ---------------------------------
                            ParameterHolder_SqlQuery qq_query = new ParameterHolder_SqlQuery(sq);
                            fe.buildQuery(qq_query);
                            sq = (SqlQuery)qq_query.getObject();

                        }
                        else if (fe.getTargetAttrs() == null) {
                            //
                            //  This is the case where we have a 1-to-many association
                            //  which has a constraint on the foreign class which is
                            //  suppossed to limit the primary.  We need an "in" sql
                            //  condition of the form:
                            //    where (<join-column-list>) in
                            //      (select <join-column-list> from <foreignTable> ...)
                            //       
                            TextData queryText = null;
                            SqlQuery subQuery = null;

                            // ---------------------------------
                            // Parameters for call to BuildQuery
                            // ---------------------------------
                            ParameterHolder_SqlQuery qq_query = new ParameterHolder_SqlQuery(subQuery);
                            fe.buildQuery(qq_query);
                            subQuery = (SqlQuery)qq_query.getObject();
                            //
                            //  Don't really want this query to look like its executed.
                            //
                            fe.getExecuteInfo().setStatus(fe.getExecuteInfo().getStatus()&~QueryExecuteInfo.ST_BUILT);

                            //
                            //  First build the sub-query and get its text.  Note:
                            //  this query really has the wrong column list.  We'll
                            //  fix that up and reset the query text in a minute, but
                            //  need to get the text now as input data isn't
                            //  computed until we do and we need to know that now.
                            //
                            queryText = subQuery.getText().get(0);

                            if (subQuery.getData().get(0).getValues().size() > 0) {
                                //
                                //  Push input data for the sub-query, if any.
                                //
                                this.getConstraint().addSqlData(subQuery.getData().get(0));
                            }

                            //  Next push the suq-query, we'll fix this up at the end.
                            //
                            this.getConstraint().addValue(queryText);

                            subQuery.clearColumnList();
                            //
                            //  Now clear the column list and recompute it.  At the
                            //  same time push on the column list for the outer query.
                            //       
                            Array_Of_QueryAttrMap<QueryAttrMap> qq_localVector = this.getForeignAttrMap(fe.getParentAttr());
                            if (qq_localVector != null) {
                                for (QueryAttrMap attr : qq_localVector) {
                                    t = 1;
                                    // ------------------------------------
                                    // Parameters for call to GetColumnName
                                    // ------------------------------------
                                    ParameterHolder_integer qq_tableIndex = new ParameterHolder_integer(t);
                                    ParameterHolder_TextData qq_columnName = new ParameterHolder_TextData();
                                    fe.getColumnName(attr.getForeign(), qq_tableIndex, qq_columnName);
                                    t = qq_tableIndex.getInt();
                                    c = (TextData)qq_columnName.getObject();
                                    subQuery.addColumn(t, c, (DataValue)null);
                                    this.getConstraint().addAttr(this, attr.getLocal(), 1);
                                }
                            }
View Full Code Here

                    //  (index) in the dataset.
                    //
                    // -------------------------------
                    // Parameters for call to SetAttrs
                    // -------------------------------
                    ParameterHolder_integer qq_index = new ParameterHolder_integer(index.getInt());
                    q.setAttrs(fe, data, qq_index);
                    index.setInt(qq_index.getInt());

                    //
                    //  If this is an optional foreign attribute then we check that the
                    //  record really existed.  If it didn't we delete the class.  We
                    //  make the existance check by looking for a non-NULL key.
View Full Code Here

        if (confirm == true && this.getIsResultSetModified() == true && !(this.getWindowInfo().getIsReadOnlyResultSet())) {
            // ----------------------------------------
            // Parameters for call to IsSaveAppropriate
            // ----------------------------------------
            ParameterHolder_integer qq_ccMode = new ParameterHolder_integer(tempInteger);
            boolean qq_IsSaveAppropriate = this.isSaveAppropriate(qq_ccMode);
            tempInteger = qq_ccMode.getInt();
            if (qq_IsSaveAppropriate) {
                int answer = 0;
                //
                // request confirmation
                //
View Full Code Here

            //
            if (confirm == true) {
                // ----------------------------------------
                // Parameters for call to IsSaveAppropriate
                // ----------------------------------------
                ParameterHolder_integer qq_ccMode = new ParameterHolder_integer(tempInteger);
                boolean qq_IsSaveAppropriate = this.isSaveAppropriate(qq_ccMode);
                tempInteger = qq_ccMode.getInt();
                if (!(this.getWindowInfo().getIsAggregateResultSet()) && qq_IsSaveAppropriate) {
                    int answer = 0;
                    //
                    // request confirmation
                    //
View Full Code Here

                if (LogMgr.getInstance().test(Framework.Constants.SP_MT_DEBUG, Framework.Constants.SP_ST_EX, 30, 10) ) Logger.getLogger("task.part.logmgr").info(" items to server for update.");
   
                // ----------------------------------------
                // Parameters for call to IsSaveAppropriate
                // ----------------------------------------
                ParameterHolder_integer qq_ccMode = new ParameterHolder_integer(ccMode);
                boolean qq_IsSaveAppropriate = this.isSaveAppropriate(qq_ccMode);
                ccMode = qq_ccMode.getInt();
                if (!(qq_IsSaveAppropriate)) {
                    if (!(this.getIsInTestMode())) {
                        JOptionPane.showMessageDialog(this, this.getAppBroker().getLocalString(ApplicationBroker.MS_MESSAGE_SET, ApplicationBroker.MN_ERROR_CANNOT_SAVE), "Warning", JOptionPane.WARNING_MESSAGE );
                    }
                    else {
                        Logger.getLogger("task.part.logmgr").info(this.getAppBroker().getLocalString(ApplicationBroker.MS_MESSAGE_SET, ApplicationBroker.MN_ERROR_CANNOT_SAVE));
                    }
   
                    this.getAppBroker().setIsSaving(false);
                    return false;
                }
   
            }
            else {
                if (!(this.getIsInTestMode())) {
                    JOptionPane.showMessageDialog(this, this.getAppBroker().getLocalString(ApplicationBroker.MS_MESSAGE_SET, ApplicationBroker.MN_ERROR_CANNOT_SAVE), "Warning", JOptionPane.WARNING_MESSAGE );
                }
                else {
                    Logger.getLogger("task.part.logmgr").info(this.getAppBroker().getLocalString(ApplicationBroker.MS_MESSAGE_SET, ApplicationBroker.MN_ERROR_CANNOT_SAVE));
                }
   
                this.getAppBroker().setIsSaving(false);
                return false;
            }
   
            //
            // retreive any extra records the developer has
            // added in custom code.
            //
            Array_Of_BusinessClass<BusinessClass> extraRecords = null;
            try {
                extraRecords = this.addRecordsToSave();
                if (extraRecords != null) {
                    if (extraRecords != null) {
                        for (BusinessClass r : extraRecords) {
                            this.getResultSet().add(r);
                        }
                    }
                }
   
                this.getBusinessClient().update(this.getResultSet(), ccMode);
   
                //
                // remove any extra records the developer has
                // added in custom code.
                //
                if (extraRecords != null) {
          for (Iterator<BusinessClass> iterator = extraRecords
              .iterator(); iterator.hasNext();) {
            BusinessClass r = iterator.next();
            this.getResultSet().deleteRow(r);
          }
        }
   
                //
                // remove any extra records the developer has
                // added in custom code.
                //
            }
            catch (Throwable qq_ElseException) {
                if (extraRecords != null) {
          for (Iterator<BusinessClass> iterator = extraRecords
              .iterator(); iterator.hasNext();) {
            BusinessClass r = iterator.next();
            this.getResultSet().deleteRow(r);
          }
        }
                // ----------------------------------------
                // Parameters for call to IsSaveAppropriate
                // ----------------------------------------
                ParameterHolder_integer qq_ccMode = new ParameterHolder_integer(ccMode);
                boolean qq_IsSaveAppropriate = this.isSaveAppropriate(qq_ccMode);
                ccMode = qq_ccMode.getInt();
                if (qq_IsSaveAppropriate) {
                   
                    throw (RuntimeException)qq_ElseException;
                }
                else {
View Full Code Here

            //
            if (this.getIsResultSetModified() == true && !(this.getWindowInfo().getIsReadOnlyResultSet())) {
                // ----------------------------------------
                // Parameters for call to IsSaveAppropriate
                // ----------------------------------------
                ParameterHolder_integer qq_ccMode = new ParameterHolder_integer(tempInteger);
                boolean qq_IsSaveAppropriate = this.isSaveAppropriate(qq_ccMode);
                tempInteger = qq_ccMode.getInt();
                if (qq_IsSaveAppropriate) {
                    int answer = 0;
                    answer = this.getAppBroker().confirmationDialog(new TextData(this.getAppBroker().getLocalString(ApplicationBroker.MS_MESSAGE_SET, ApplicationBroker.MN_CONFIRM_SEARCH_MODE)), this.getWindowName(), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.YES_OPTION, 50, this.getAppBroker().getPreferences().getConfirmMode());
                    //
                    // save if so instructed
View Full Code Here

            public void focusGained(FocusEvent e) {
                EventManager.startEventChain();
                int reason = ForteKeyboardFocusManager.getTraversalReason();
                if (reason != Constants.FC_SUPRESS) {
                    Hashtable<String, Object> params = new Hashtable<String, Object>();
                    params.put("reason", new ParameterHolder_integer(reason));
                    ClientEventManager.postEvent( Panel.this, "AfterFocusGain", params );
                }
                EventManager.endEventChain();
            }

            public void focusLost(FocusEvent e) {
                EventManager.startEventChain();
                int reason = ForteKeyboardFocusManager.getTraversalReason();
                if (reason != Constants.FC_SUPRESS) {
                    Hashtable<String, Object> params = new Hashtable<String, Object>();
                    params.put("reason", new ParameterHolder_integer(reason));
                    ClientEventManager.postEvent( Panel.this, "BeforeFocusLoss", params );
                }
                EventManager.endEventChain();
            }
        });
View Full Code Here

                            this.validateMatch(qq_pBuyOrder, qq_pSellOrder);
                            buyOrder = qq_pBuyOrder.get();
                            sellOrder = qq_pSellOrder.get();
                            //self.OrderList.DeleteRow(object=buyOrder);
                            //self.OrderList.DeleteRow(object=sellOrder);
                            new TradeMgr.AsyncRunner(true).makeTrade(TradeSO_proxy.getInstance(), buyOrder, sellOrder, new ParameterHolder_integer(), new ParameterHolder_float());

                            //self.Window.MessageDialog(messagetext='Trade completed successfully',
                            //              messagetype = MT_INFO);

                        }
View Full Code Here

TOP

Related Classes of Framework.ParameterHolder_integer

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.