Package Framework

Examples of Framework.BooleanNullable


        this.setRadioListIntegerNullable(new IntegerNullable(3));

        this.setToggle7(new BooleanData());
        this.setToggle8(new BooleanData());
        this.setToggle9(new BooleanNullable());
        this.setToggle10(new BooleanNullable());

        this.setStaticScrollListSingleSelectIntegerData(new IntegerData());
        this.setStaticScrollListSingleSelectTextData(new TextData());

    }
View Full Code Here


    public BooleanData getToggle2() {
        return this.toggle2;
    }

    public void setToggle3(BooleanNullable toggle3) {
        BooleanNullable oldValue = this.toggle3;
        this.toggle3 = toggle3;
        this.qq_Listeners.firePropertyChange("toggle3", oldValue, this.toggle3);
    }
View Full Code Here

    public BooleanData getToggle4() {
        return this.toggle4;
    }

    public void setToggle5(BooleanNullable toggle5) {
        BooleanNullable oldValue = this.toggle5;
        this.toggle5 = toggle5;
        this.qq_Listeners.firePropertyChange("toggle5", oldValue, this.toggle5);
    }
View Full Code Here

    public BooleanData getToggle8() {
        return this.toggle8;
    }

    public void setToggle9(BooleanNullable toggle9) {
        BooleanNullable oldValue = this.toggle9;
        this.toggle9 = toggle9;
        this.qq_Listeners.firePropertyChange("toggle9", oldValue, this.toggle9);
    }
View Full Code Here

    public BooleanNullable getToggle9() {
        return this.toggle9;
    }

    public void setToggle10(BooleanNullable toggle10) {
        BooleanNullable oldValue = this.toggle10;
        this.toggle10 = toggle10;
        this.qq_Listeners.firePropertyChange("toggle10", oldValue, this.toggle10);
    }
View Full Code Here

                        CursorMgr.startEvent();
                        // ================ Begin Forte Event Handler Translation ================
                        this.setToggle1(true);
                        this.setToggle6(false);
                        this.setToggle2(new BooleanData(true, BooleanData.qq_Resolver.cVALUE));
                        this.setToggle3(new BooleanNullable(true, BooleanNullable.qq_Resolver.cISNULL));
                        this.setToggle4(new BooleanData(false, BooleanData.qq_Resolver.cVALUE));
                        this.setToggle5(new BooleanNullable(true, BooleanNullable.qq_Resolver.cVALUE));
                        this.getToggle7().setValue(true);
                        this.getToggle8().setValue(false);
                        this.getToggle9().setValue(true);
                        this.getToggle10().setValue(false);
View Full Code Here

     * <p>
     * @param source Type: BusinessKey
     * @return int
     */
    public int compare(BusinessKey source) {
        BooleanNullable result = null;
        DataValue srcItem = null;
        int srcItemIndex = 0;

        if (source == null || this.getValues() == null) {
            return BusinessKey.CMP_NULL;
        }

        //
        //  Iterate through each DataValues item in the Values array and compare
        //  it against the corresponding element in source's Values array.
        // 
        if (this.getValues() != null) {
            for (DataValue item : this.getValues()) {

                srcItemIndex = srcItemIndex+1;

                if (item == null) {
                    return BusinessKey.CMP_NULL;
                    //
                    //  If source runs out of items then we must be greater
                    //
                }
                else if (srcItemIndex > source.getValues().size()) {
                    return BusinessKey.CMP_LONGER;
                }
                else {
                    srcItem = source.getValues().get(srcItemIndex-1);
                    if (srcItem == null) {
                        return BusinessKey.CMP_NULL;
                    }
                }

                //
                //  Numeric things might not be of the same class but they can all compare
                //  against each other so check this case first
                //
                if (item instanceof NumericData && srcItem instanceof NumericData) {

                    result = ((NumericData)item).isEqual((NumericData)srcItem);
                    if (result.getIsNull()) {
                        return BusinessKey.CMP_NULL;
                    }
                    else if (!(result.getValue())) {
                        result = ((NumericData)item).isGreaterThan((NumericData)srcItem);
                        if ((result).getValue()) {
                            return BusinessKey.CMP_GT;
                        }
                        return BusinessKey.CMP_LT;
                    }

                }
                else {
                    //
                    //  Everthing else can only compare if it is of the same data type.
                    //  We and the data type with 0x7F to mask off the nullable bit.
                    //   
                    int myType = item.dataType()&127;
                    int srcType = srcItem.dataType()&127;

                    if (myType != srcType) {
                        result = item.getTextValue().isEqual(srcItem.getTextValue());
                        if (result.getIsNull()) {
                            return BusinessKey.CMP_NULL;
                        }
                        else if (!(result.getValue())) {
                            return BusinessKey.CMP_NE;
                        }

                    }
                    else {
                        switch (myType) {

                            case Constants.DV_DT_TEXT: {
                                result = ((TextData)item).isEqual((TextData)srcItem);
                                if (result.getIsNull()) {
                                    return BusinessKey.CMP_NULL;
                                }
                                else if (!(result.getValue())) {
                                    result = ((TextData)item).isGreaterThan((TextData)srcItem);
                                    if ((result).getValue()) {
                                        return BusinessKey.CMP_GT;
                                    }
                                    return BusinessKey.CMP_LT;
                                }

                                break;
                            }
                            case Constants.DV_DT_DATETIME: {
                                result = ((DateTimeData)item).isEqual((DateTimeData)srcItem);
                                if (result.getIsNull()) {
                                    return BusinessKey.CMP_NULL;
                                }
                                else if (!(result.getValue())) {
                                    result = ((DateTimeData)item).isGreaterThan((DateTimeData)srcItem);
                                    if ((result).getValue()) {
                                        return BusinessKey.CMP_GT;
                                    }
                                    return BusinessKey.CMP_LT;
                                }

                                break;
                            }
                            case Constants.DV_DT_INTERVAL: {
                                result = ((IntervalData)item).isEqual((IntervalData)srcItem);
                                if (result.getIsNull()) {
                                    return BusinessKey.CMP_NULL;
                                }
                                else if (!(result.getValue())) {
                                    result = ((IntervalData)item).isGreaterThan((IntervalData)srcItem);
                                    if ((result).getValue()) {
                                        return BusinessKey.CMP_GT;
                                    }
                                    return BusinessKey.CMP_LT;
                                }

                                break;
                            }
                            case Constants.DV_DT_BOOLEAN: {
                                result = ((BooleanData)item).isEqual((BooleanData)srcItem);
                                if (result.getIsNull()) {
                                    return BusinessKey.CMP_NULL;
                                }
                                else if (!(result.getValue())) {
                                    return BusinessKey.CMP_NE;
                                }

                                break;
                            }

                            default: {
                                result = item.getTextValue().isEqual(srcItem.getTextValue());
                                if (result.getIsNull()) {
                                    return BusinessKey.CMP_NULL;
                                }
                                else if (!(result.getValue())) {
                                    return BusinessKey.CMP_NE;
                                }

                                break;
                            }
View Full Code Here

     * <p>
     * @param source Type: BusinessKey
     * @return int
     */
    public int compare(BusinessKey source) {
        BooleanNullable result = null;
        DataValue srcItem = null;
        int srcItemIndex = 0;

        if (source == null || this.getValues() == null) {
            return BusinessKey.CMP_NULL;
        }

        //
        //  Iterate through each DataValues item in the Values array and compare
        //  it against the corresponding element in source's Values array.
        // 
        if (this.getValues() != null) {
            for (DataValue item : this.getValues()) {

                srcItemIndex = srcItemIndex+1;

                if (item == null) {
                    return BusinessKey.CMP_NULL;
                    //
                    //  If source runs out of items then we must be greater
                    //
                }
                else if (srcItemIndex > source.getValues().size()) {
                    return BusinessKey.CMP_LONGER;
                }
                else {
                    srcItem = source.getValues().get(srcItemIndex-1);
                    if (srcItem == null) {
                        return BusinessKey.CMP_NULL;
                    }
                }

                //
                //  Numeric things might not be of the same class but they can all compare
                //  against each other so check this case first
                //
                if (item instanceof NumericData && srcItem instanceof NumericData) {

                    result = ((NumericData)item).isEqual((NumericData)srcItem);
                    if (result.getIsNull()) {
                        return BusinessKey.CMP_NULL;
                    }
                    else if (!(result.getValue())) {
                        result = ((NumericData)item).isGreaterThan((NumericData)srcItem);
                        if ((result).getValue()) {
                            return BusinessKey.CMP_GT;
                        }
                        return BusinessKey.CMP_LT;
                    }

                }
                else {
                    //
                    //  Everthing else can only compare if it is of the same data type.
                    //  We and the data type with 0x7F to mask off the nullable bit.
                    //   
                    int myType = item.dataType()&127;
                    int srcType = srcItem.dataType()&127;

                    if (myType != srcType) {
                        result = item.getTextValue().isEqual(srcItem.getTextValue());
                        if (result.getIsNull()) {
                            return BusinessKey.CMP_NULL;
                        }
                        else if (!(result.getValue())) {
                            return BusinessKey.CMP_NE;
                        }

                    }
                    else {
                        switch (myType) {

                            case Constants.DV_DT_TEXT: {
                                result = ((TextData)item).isEqual((TextData)srcItem);
                                if (result.getIsNull()) {
                                    return BusinessKey.CMP_NULL;
                                }
                                else if (!(result.getValue())) {
                                    result = ((TextData)item).isGreaterThan((TextData)srcItem);
                                    if ((result).getValue()) {
                                        return BusinessKey.CMP_GT;
                                    }
                                    return BusinessKey.CMP_LT;
                                }

                                break;
                            }
                            case Constants.DV_DT_DATETIME: {
                                result = ((DateTimeData)item).isEqual((DateTimeData)srcItem);
                                if (result.getIsNull()) {
                                    return BusinessKey.CMP_NULL;
                                }
                                else if (!(result.getValue())) {
                                    result = ((DateTimeData)item).isGreaterThan((DateTimeData)srcItem);
                                    if ((result).getValue()) {
                                        return BusinessKey.CMP_GT;
                                    }
                                    return BusinessKey.CMP_LT;
                                }

                                break;
                            }
                            case Constants.DV_DT_INTERVAL: {
                                result = ((IntervalData)item).isEqual((IntervalData)srcItem);
                                if (result.getIsNull()) {
                                    return BusinessKey.CMP_NULL;
                                }
                                else if (!(result.getValue())) {
                                    result = ((IntervalData)item).isGreaterThan((IntervalData)srcItem);
                                    if ((result).getValue()) {
                                        return BusinessKey.CMP_GT;
                                    }
                                    return BusinessKey.CMP_LT;
                                }

                                break;
                            }
                            case Constants.DV_DT_BOOLEAN: {
                                result = ((BooleanData)item).isEqual((BooleanData)srcItem);
                                if (result.getIsNull()) {
                                    return BusinessKey.CMP_NULL;
                                }
                                else if (!(result.getValue())) {
                                    return BusinessKey.CMP_NE;
                                }

                                break;
                            }

                            default: {
                                result = item.getTextValue().isEqual(srcItem.getTextValue());
                                if (result.getIsNull()) {
                                    return BusinessKey.CMP_NULL;
                                }
                                else if (!(result.getValue())) {
                                    return BusinessKey.CMP_NE;
                                }

                                break;
                            }
View Full Code Here

      instance.setValue(value);
      subject.setValue(instance);
    }
    catch (Exception e) {
          if (subjectType.equals(BooleanNullable.class)) {
              subject.setValue(new BooleanNullable(value));
          }
          else {
              subject.setValue(new BooleanData(value));
          }
    }
View Full Code Here

        Object o = null;
        try {
            o = resultSet.getObject(pColumnID);

            if (o == null || resultSet.wasNull()) {
                BooleanNullable result = new BooleanNullable();
                result.setNull();
                return result;
            } else {
                return new BooleanNullable(this.mapBooleanFromDB(o));
            }
        } catch (SQLException e) {
          throw processException(e);
        }
    }
View Full Code Here

TOP

Related Classes of Framework.BooleanNullable

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.