Package Framework

Examples of Framework.IntegerData


            throw e;

        }

        if ((foundListMem.getListValue().get(row-1)) == null) {
            Object[] qq_Args = { listName, new IntegerData(row) };
            GenericException e = new GenericException(MessageFormat.format( "The list {0} does not contain the requested row={1}\n\\n    Use the ListItems method to determine correct number of rows for this list.", qq_Args ) );
            e.setDetectingMethod("ResultSet::FindMember");
            throw e;

View Full Code Here


                            dep.getExecuteInfo().setDependentValues(new Array_Of_DataValue<DataValue>());
                            if (attrMap != null) {
                                for (QueryAttrMap attr : attrMap) {
                                    val = leafClass.getAttr(attr.getLocal());
                                    if (val == null) {
                                        throw new Error(Error.BM_NEED_FOREIGN_KEY, "SQLselect", this, new IntegerData(queries.get(queries.size()-1-1).getParentAttr()), new IntegerData(attr.getLocal())).getException();
                                    }
                                    val = CloneHelper.clone(val, false);
                                    dep.getExecuteInfo().getDependentValues().add(val);
                                    dep.addConstraint(attr.getForeign(), ConstraintOperation.OP_EQ, val);
                                }
                            }
                        }
                        else {
                            //
                            //  Need to set value for constraint to identify the current
                            //  row (leafClass)
                            //
                            for (int i = 1; i <= attrMap.size(); i++) {
                                dep.getExecuteInfo().getDependentValues().get(i-1).setValue(leafClass.getAttr(attrMap.get(i-1).getLocal()));
                            }
                        }

                        Array_Of_BusinessClass<BusinessClass> fresult = this.select(dep);

                        if ((query.getForeignAttrMult(dep.getParentAttr())&BusinessQuery.ASSOC_MULT_ONE_MASK) == 0) {
                            leafClass.setAttr(dep.getParentAttr(), fresult);
                        }
                        else {
                            if (fresult.size() > 1) {
                                throw new Error(Error.BM_TOO_MANY_ROWS, "SelectCorrelated", this, new TextData( leafClass.getClass().getSimpleName() ), new IntegerData(dep.getParentAttr())).getException();
                            }
                            else if (fresult.size() == 1) {
                                leafClass.setAttr(dep.getParentAttr(), fresult.get(0));
                            }
                        }
View Full Code Here

    public DateTimeData getModDate() {
        return this.modDate;
    }

    public void setSize(IntegerData size) {
        IntegerData oldValue = this.size;
        this.size = size;
//        this.qq_Listeners.firePropertyChange("size", oldValue, this.size);
    }
View Full Code Here

        this.setDVNodeText(aFile.getPrefix());
        this.setExtension(aFile.getSuffix());
        this.setRelated(aFile);
        try {
            aFile.getUsageTime(this.getAccessDate(), this.getModDate());
            this.setSize(new IntegerData(aFile.size()));
        }
        catch (RuntimeException qq_e) {
            GenericException e = GenericException.transformToGenericException(qq_e);

        }
View Full Code Here

            }

            if (attr != BusinessQuery.ATTR_SIMPLE) {

                if (attr > this.getNumAttrs()) {
                    throw new Error(Error.BQ_ILLEGAL_ATTR, "AddAttr", this, new IntegerData(attr), Error.qq_Resolver.cERROR_METHODNAME_ORIGINATOR_PARAM1).getException();
                }
                else {
                    int row = (attr-1)/31+1;
                    double bit = (attr-1) % 31;
                    for (int i = this.getTargetAttrs().size()+1; i <= row; i++) {
                        this.getTargetAttrs().set(i-1, new IntegerData(0));
                    }
                    this.getTargetAttrs().get(row-1).setValue(this.getTargetAttrs().get(row-1).getValue()|((int)new DoubleData(2).power(bit).getValue()));
                }

            }
            else {
                //
                //  ATTR_SIMPLE means add all simple attributes
                //
                int attrs = 0;
                int numAtts = this.getNumAttrs();
                // virtual attr.
                while (attrs+31 < numAtts) {
                    attrs = attrs+31;
                    this.getTargetAttrs().set(attrs/31-1, new IntegerData(2147483647));
                }
                this.getTargetAttrs().set(attrs/31+1-1, new IntegerData((int)(new DoubleData(2).power(numAtts-attrs).getValue()-1)));

            }

        }
        else {

            //
            //  It is a foreign attribute.
            //

            if (query == null) {

                throw new Error(Error.BQ_NEED_QUERY, "AddAttr", this, new IntegerData(attr), Error.qq_Resolver.cERROR_METHODNAME_ORIGINATOR_PARAM1).getException();

            }
            else if (attr-BusinessQuery.ATTR_FOREIGN > this.getNumForeignAttrs()) {

                throw new Error(Error.BQ_ILLEGAL_ATTR, "AddAttr", this, new IntegerData(attr), Error.qq_Resolver.cERROR_METHODNAME_ORIGINATOR_PARAM1).getException();

            }
            else if (this.operation != BusinessQuery.OP_SELECT && query.operation == BusinessQuery.OP_SELECT) {

                throw new Error(Error.BQ_INCONSISTENT_OP, "AddAttr", this, new IntegerData(query.operation), new IntegerData(this.operation)).getException();
            }

            if (this.getForeignClasses() == null) {
                this.setForeignClasses(new Array_Of_BusinessQuery<BusinessQuery>());
            }
View Full Code Here

    public void addConstraint(int attr, DataValue value, DataValue type, TextData templateText) {
        DataValue kind = null;

        if (attr > this.getNumAttrs()) {

            throw new Error(Error.BQ_ILLEGAL_ATTR, "AddConstraint", this, new IntegerData(attr), Error.qq_Resolver.cERROR_METHODNAME_ORIGINATOR_PARAM1).getException();

        }
        else if (type == null || !(value instanceof TextData)) {

            // no need to parse or do SetValue() on "value".
View Full Code Here

     * @param value Type: DataValue (Input) (default in Forte: NIL)
     */
    public void addConstraint(int attr, int operation, DataValue value) {
        if (attr > this.getNumAttrs()) {

            throw new Error(Error.BQ_ILLEGAL_ATTR, "AddConstraint", this, new IntegerData(attr), Error.qq_Resolver.cERROR_METHODNAME_ORIGINATOR_PARAM1).getException();

        }
        else if (this.operation == BusinessQuery.OP_INSERT) {

            throw new Error(Error.BQ_ILLEGAL_ACTION_FOR_OP, "AddConstraint", this, new IntegerData(this.operation), Error.qq_Resolver.cERROR_METHODNAME_ORIGINATOR_PARAM1).getException();

        }
        else if (this.getConstraint() == null) {
            this.setConstraint(new QueryConstraint());
        }

        if ((operation&ConstraintOperation.TYPE_MASK) == ConstraintOperation.TYPE_ORDERBY) {

            //
            //  Check that this attr isn't already specified in an "order by" constraint
            //
            for (int i = this.getConstraint().getStack().size(); i >= 2; i--) {
                if (this.getConstraint().getStack().get(i-1) instanceof ConstraintOperation && ((((ConstraintOperation)(this.getConstraint().getStack().get(i-1))).getOperation()&ConstraintOperation.TYPE_MASK) == ConstraintOperation.TYPE_ORDERBY) && ((ConstraintAttr)(this.getConstraint().getStack().get(i-1-1))).getAttr() == attr && ((ConstraintAttr)(this.getConstraint().getStack().get(i-1-1))).getEntity() == this) {
                    throw new Error(Error.BQ_CONS_DUP_ORDERBY_ATTR, "AddConstraint", this, new IntegerData(attr), Error.qq_Resolver.cERROR_METHODNAME_ORIGINATOR_PARAM1).getException();
                }
            }

            if (value != null) {
                this.getConstraint().addValue(value);
            }


        }
        else if (operation == ConstraintOperation.OP_NULL || operation == ConstraintOperation.OP_NOTNULL) {
            if (value != null) {
                throw new Error(Error.BQ_CONS_OP_PROHIBITS_VALUE, "AddConstraint", this, new IntegerData(operation), new IntegerData(attr)).getException();
            }

        }
        else if (value == null) {
            throw new Error(Error.BQ_CONS_OP_NEEDS_VALUE, "AddConstraint", this, new IntegerData(operation), new IntegerData(attr)).getException();

        }
        else {
            this.getConstraint().addValue(value);

View Full Code Here

     * <p>
     * @param attr Type: int
     * @return String
     */
    public String getAttrName(int attr) {
        throw new Error(Error.BQ_ILLEGAL_ATTR, "GetAttrName", this, new IntegerData(attr), Error.qq_Resolver.cERROR_METHODNAME_ORIGINATOR_PARAM1).getException();
    }
View Full Code Here

     * @param attr Type: int
     * @param tableIndex Type: int
     * @param columnName Type: TextData
     */
    public void getColumnName(int attr, ParameterHolder_integer tableIndex, ParameterHolder_TextData columnName) {
        throw new Error(Error.BQ_ILLEGAL_ATTR, "GetColumnName", this, new IntegerData(attr), Error.qq_Resolver.cERROR_METHODNAME_ORIGINATOR_PARAM1).getException();
    }
View Full Code Here

     * <p>
     * @param attr Type: int
     * @return Array_Of_QueryAttrMap<QueryAttrMap>
     */
    public Array_Of_QueryAttrMap<QueryAttrMap> getForeignAttrMap(int attr) {
        throw new Error(Error.BQ_ILLEGAL_ATTR, "GetForeignAttrMap", this, new IntegerData(attr), Error.qq_Resolver.cERROR_METHODNAME_ORIGINATOR_PARAM1).getException();
    }
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.