Package Framework

Examples of Framework.IntegerData


     * @return ConcurrencyUserCB
     */
    private synchronized ConcurrencyUserCB getUserCB(@Input int clientID) {
        if (clientID <= 0 || clientID > this.users.size()) {

            throw new Error(Error.CM_ILLEGAL_CLIENT_ID, "GetUserCB", this, new IntegerData(clientID), Error.qq_Resolver.cERROR_METHODNAME_ORIGINATOR_PARAM1).getException();

        }
        else {

            ConcurrencyUserCB userCB = this.users.get(clientID-1);

            if (userCB.getNext() != ConcurrencyUserCB.IN_USE) {
                throw new Error(Error.CM_ILLEGAL_CLIENT_ID, "GetUserCB", this, new IntegerData(clientID), Error.qq_Resolver.cERROR_METHODNAME_ORIGINATOR_PARAM1).getException();
            }

            return userCB;

        }
View Full Code Here


            Logger.getLogger("task.part.logmgr").info("");
        }

        if (userCB.getStamp() == 0) {

            throw new Error(Error.CM_NO_TRANSACTION, "Load", this, new IntegerData(clientID), Error.qq_Resolver.cERROR_METHODNAME_ORIGINATOR_PARAM1).getException();

        }
        else {

            ConcurrencyKeyCB keyCB = null;
View Full Code Here

            Logger.getLogger("task.part.logmgr").info("");
        }

        if (userCB.getStamp() == 0) {

            throw new Error(Error.CM_NO_TRANSACTION, "Load", this, new IntegerData(clientID), Error.qq_Resolver.cERROR_METHODNAME_ORIGINATOR_PARAM1).getException();

        }
        else {

            ConcurrencyKeyCB keyCB = null;
View Full Code Here

        ConcurrencyUserCB userCB = this.getUserCB(clientID);

        if (userCB.getStamp() == 0) {

            throw new Error(Error.CM_NO_TRANSACTION, "Rollback", this, new IntegerData(clientID), Error.qq_Resolver.cERROR_METHODNAME_ORIGINATOR_PARAM1).getException();

        }
        else {

            Array_Of_ConcurrencyKeyCB<ConcurrencyKeyCB> qq_localVector = userCB.getLockedKeys();
View Full Code Here

                break;
            }

            default: {
                throw new Error(Error.CM_ILLEGAL_CACHE_MODE, "SetCacheMode", this, new IntegerData(mode), Error.qq_Resolver.cERROR_METHODNAME_ORIGINATOR_PARAM1).getException();

            }
        }
    }
View Full Code Here

     */
    public synchronized void qq_setConcurrencyMode(@Input int mode) {
        if (this.concurrencyMode != mode) {

            if (this.concurrencyMode != ConcurrencyMgr.CO_NONE) {
                throw new Error(Error.CM_CANNOT_CHANGE_MODE, "SetConcurrencyMode", this, new IntegerData(this.concurrencyMode), new IntegerData(mode)).getException();
            }

            switch (mode) {

                case ConcurrencyMgr.CO_NONE: {
                    this.concurrencyMode = ConcurrencyMgr.CO_NONE;

                    break;
                }
                case ConcurrencyMgr.CO_DB_NATIVE: {
                    this.concurrencyMode = ConcurrencyMgr.CO_DB_NATIVE;

                    break;
                }
                case ConcurrencyMgr.CO_DB_EXPLICIT: {
                    this.concurrencyMode = ConcurrencyMgr.CO_DB_EXPLICIT;

                    break;
                }
                case ConcurrencyMgr.CO_OPT_VERIFY: {
                    this.concurrencyMode = ConcurrencyMgr.CO_OPT_VERIFY;

                    break;
                }
                case ConcurrencyMgr.CO_OPT_EXPRESS: {
                    this.concurrencyMode = ConcurrencyMgr.CO_OPT_EXPRESS;

                    break;
                }

                default: {
                    throw new Error(Error.CM_ILLEGAL_CONCURRENCY_MODE, "SetConcurrencyMode", this, new IntegerData(mode), Error.qq_Resolver.cERROR_METHODNAME_ORIGINATOR_PARAM1).getException();

                }
            }

        }
View Full Code Here

        ConcurrencyUserCB userCB = this.getUserCB(clientID);

        if (transactionMode == ConcurrencyMgr.TR_CONTINUE) {

            if (userCB.getStamp() == 0) {
                throw new Error(Error.CM_NO_TRANSACTION, "StartTrans", this, new IntegerData(clientID), Error.qq_Resolver.cERROR_METHODNAME_ORIGINATOR_PARAM1).getException();
            }

        }
        else {

            if (userCB.getStamp() > 0) {

                if (userCB.getLockedKeys() == null) {

                    this.endTrans(userCB);

                }
                else {

                    Array_Of_ConcurrencyKeyCB<ConcurrencyKeyCB> qq_localVector = userCB.getLockedKeys();
                    if (qq_localVector != null) {
                        for (ConcurrencyKeyCB keyCB : qq_localVector) {

                            keyCB.setLocked(false);
                            keyCB.setStamp(userCB.getStamp());
                            keyCB.setUpdateStamp(userCB.getStamp());

                        }
                    }

                    userCB.setLockedKeys(null);

                    this.endTrans(userCB);

                    throw new Error(Error.CM_TRANSACTION_IN_PROGRESS, "StartTrans", this, new IntegerData(clientID), Error.qq_Resolver.cERROR_METHODNAME_ORIGINATOR_PARAM1).getException();

                }

            }
View Full Code Here

        if (Integer.class.equals(elementClass)) {
            return new Integer(element.getIntegerValue());
        }
        else if (IntegerData.class.isAssignableFrom(elementClass)) {
            try {
                IntegerData newValue = (IntegerData)elementClass.newInstance();
                newValue.setValue(element.getIntegerValue());
                return newValue;
            }
            catch (Exception e) {
                // Shouldn't get here, let's keep the compiler happy
                return new IntegerData(element.getIntegerValue());
            }
        }
        else if (TextData.class.isAssignableFrom(elementClass)) {
            try {
                TextData newValue = (TextData)elementClass.newInstance();
                newValue.setValue(element.getTextValue());
                return newValue;
            }
            catch (Exception e) {
                // Shouldn't get here, let's keep the compiler happy
                return element == null ? null : element.getTextValue();
View Full Code Here

            format = new TextData("my name is %1 %2");
            text.replaceParameters(format, new TextData("Fred"), new TextData("Jones"));
            //
            //   with textdata format and 3 parameters
            format = new TextData("my name is %1 %2, age: %3");
            text.replaceParameters(format, new TextData("Fred"), new TextData("Jones"), new IntegerData(35));
            //
            //   with textdata format and 4 parameters
            format = new TextData("my name is %1 %2, age: %3, weight %4");
            text.replaceParameters(format, new TextData("Fred"), new TextData("Jones"), new IntegerData(35), new IntegerData(85));
            //
            //   with textdata format and 5 parameters
            format = new TextData("my name is %1 %2, age: %3, weight %4, married %5");
            text.replaceParameters(format, new TextData("Fred"), new TextData("Jones"), new IntegerData(35), new IntegerData(85), new BooleanData(true, BooleanData.qq_Resolver.cVALUE));
            //
            //   with textdata format and 6 parameters
            format = new TextData("my name is %1 %2, age: %3, weight %4, married %5, born %6");
            text.replaceParameters(format, new TextData("Fred"), new TextData("Jones"), new IntegerData(35), new IntegerData(85), new BooleanData(true, BooleanData.qq_Resolver.cVALUE), new DateTimeData(new TextData("01-Jan-1960"), DateTimeData.qq_Resolver.cVALUE));
            //
            //   with textdata format and 7 parameters
            format = new TextData("my name is %1 %2, age: %3, weight %4, married %5, born %6, ratio %7");
            text.replaceParameters(format, new TextData("Fred"), new TextData("Jones"), new IntegerData(35), new IntegerData(85), new BooleanData(true, BooleanData.qq_Resolver.cVALUE), new DateTimeData(new TextData("01-Jan-1960"), DateTimeData.qq_Resolver.cVALUE), new DoubleData(3.4));
            //
            //   with textdata format and 8 parameters
            format = new TextData("my name is %1 %2, age: %3, weight %4, married %5, born %6, ratio %7, income %8");
            text.replaceParameters(format, new TextData("Fred"), new TextData("Jones"), new IntegerData(35), new IntegerData(85), new BooleanData(true, BooleanData.qq_Resolver.cVALUE), new DateTimeData(new TextData("01-Jan-1960"), DateTimeData.qq_Resolver.cVALUE), new DoubleData(3.4), new DecimalData(50010.35));
            //
            //   with textdata format and 9 parameters
            format = new TextData("my name is %1 %2, age: %3, weight %4, married %5, born %6, ratio %7, income %8, happy %9");
            text.replaceParameters(format, new TextData("Fred"), new TextData("Jones"), new IntegerData(35), new IntegerData(85), new BooleanData(true, BooleanData.qq_Resolver.cVALUE), new DateTimeData(new TextData("01-Jan-1960"), DateTimeData.qq_Resolver.cVALUE), new DoubleData(3.4), new DecimalData(50010.35), new BooleanData(true, BooleanData.qq_Resolver.cVALUE));

            //
            //   with string format and 1 parameter
            text.replaceParameters("my name is %1", new TextData("Fred"));
            //
            //   with string format and 2 parameters
            text.replaceParameters("my name is %1 %2", new TextData("Fred"), new TextData("Jones"));
            //
            //   with string format and 3 parameters
            text.replaceParameters("my name is %1 %2, age: %3", new TextData("Fred"), new TextData("Jones"), new IntegerData(35));
            //
            //   with string format and 4 parameters
            text.replaceParameters("my name is %1 %2, age: %3, weight %4", new TextData("Fred"), new TextData("Jones"), new IntegerData(35), new IntegerData(85));
            //
            //   with string format and 5 parameters
            text.replaceParameters("my name is %1 %2, age: %3, weight %4, married %5", new TextData("Fred"), new TextData("Jones"), new IntegerData(35), new IntegerData(85), new BooleanData(true, BooleanData.qq_Resolver.cVALUE));
            //
            //   with string format and 6 parameters
            text.replaceParameters("my name is %1 %2, age: %3, weight %4, married %5, born %6", new TextData("Fred"), new TextData("Jones"), new IntegerData(35), new IntegerData(85), new BooleanData(true, BooleanData.qq_Resolver.cVALUE), new DateTimeData(new TextData("01-Jan-1960"), DateTimeData.qq_Resolver.cVALUE));
            //
            //   with string format and 7 parameters
            text.replaceParameters("my name is %1 %2, age: %3, weight %4, married %5, born %6, ratio %7", new TextData("Fred"), new TextData("Jones"), new IntegerData(35), new IntegerData(85), new BooleanData(true, BooleanData.qq_Resolver.cVALUE), new DateTimeData(new TextData("01-Jan-1960"), DateTimeData.qq_Resolver.cVALUE), new DoubleData(3.4));
            //
            //   with string format and 8 parameters
            text.replaceParameters("my name is %1 %2, age: %3, weight %4, married %5, born %6, ratio %7, income %8", new TextData("Fred"), new TextData("Jones"), new IntegerData(35), new IntegerData(85), new BooleanData(true, BooleanData.qq_Resolver.cVALUE), new DateTimeData(new TextData("01-Jan-1960"), DateTimeData.qq_Resolver.cVALUE), new DoubleData(3.4), new DecimalData(50010.35));
            //
            //   with string format and 9 parameters
            text.replaceParameters("my name is %1 %2, age: %3, weight %4, married %5, born %6, ratio %7, income %8, happy %9", new TextData("Fred"), new TextData("Jones"), new IntegerData(35), new IntegerData(85), new BooleanData(true, BooleanData.qq_Resolver.cVALUE), new DateTimeData(new TextData("01-Jan-1960"), DateTimeData.qq_Resolver.cVALUE), new DoubleData(3.4), new DecimalData(50010.35), new BooleanData(true, BooleanData.qq_Resolver.cVALUE));

        }

        int time = (int)sw.split();
        Logger.getLogger("task.part.logmgr").info( Integer.toString(time));
View Full Code Here

        this.setADoubleDomain(new DoubleDomain(3.14159, DoubleDomain.qq_Resolver.cVALUE));
        this.setADouble(new DoubleData(3.14159));
        this.setAImageDomain(new ImageDomain());
        this.getAImageDomain().setValue(ImageValue.get(this.getqq_aPicture()));
        this.setAIntegerDomain(new IntegerDomain(42, IntegerDomain.qq_Resolver.cVALUE));
        this.setAInteger(new IntegerData(43));
        this.setAIntegerNullable(new IntegerNullable(44));
        this.setALongTextDomain(new LongTextDomain("A peaceful spot is Pipers Flat. \n" +
           "...\n" +
           "But the folk are now rejoicing as they ne'er rejoiced before\n" +
           "For we've played Molongo at cricket and McDougal topped the score", LongTextDomain.qq_Resolver.cVALUE));
View Full Code Here

TOP

Related Classes of Framework.IntegerData

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.