Examples of toBigDecimal()


Examples of es.ipsa.atril.doc.user.AttributeMultiValue.toBigDecimal()

              switch (oAttr.dataType()) {
              case STRING:
                put(aAttrs[a].name, oAttr.toString());
                break;
              case NUMBER:
                put(aAttrs[a].name, oAttr.toBigDecimal());
                break;
              case DATE:
                put(aAttrs[a].name, oAttr.toDate());
                break;
              case DATE_TIME:
View Full Code Here

Examples of org.apache.commons.jexl2.JexlArithmetic.toBigDecimal()

    public void assertExpression(String expression, Object expected) throws Exception {
        Expression exp = engine.createExpression(expression);
        Object value = exp.evaluate(context);
        if (expected instanceof BigDecimal) {
            JexlArithmetic jexla = engine.getArithmetic();
            assertTrue("expression: " + expression, ((BigDecimal) expected).compareTo(jexla.toBigDecimal(value)) == 0);
        } else {
            assertEquals("expression: " + expression, expected, value);
        }
    }
View Full Code Here

Examples of org.apache.hadoop.hive.common.type.Decimal128.toBigDecimal()

        assertEquals (key, (Long) expected, (Long) arr[0]);
      } else if (arr[0] instanceof HiveDecimalWritable) {
        HiveDecimalWritable hdw = (HiveDecimalWritable) arr[0];
        HiveDecimal hd = hdw.getHiveDecimal();
        Decimal128 d128 = (Decimal128)expected;
        assertEquals (key, d128.toBigDecimal(), hd.bigDecimalValue());
      } else if (arr[0] instanceof HiveDecimal) {
          HiveDecimal hd = (HiveDecimal) arr[0];
          Decimal128 d128 = (Decimal128)expected;
          assertEquals (key, d128.toBigDecimal(), hd.bigDecimalValue());
      } else {
View Full Code Here

Examples of org.apache.hadoop.hive.common.type.Decimal128.toBigDecimal()

        Decimal128 d128 = (Decimal128)expected;
        assertEquals (key, d128.toBigDecimal(), hd.bigDecimalValue());
      } else if (arr[0] instanceof HiveDecimal) {
          HiveDecimal hd = (HiveDecimal) arr[0];
          Decimal128 d128 = (Decimal128)expected;
          assertEquals (key, d128.toBigDecimal(), hd.bigDecimalValue());
      } else {
        Assert.fail("Unsupported result type: " + arr[0].getClass().getName());
      }
    }
  }
View Full Code Here

Examples of org.apache.hadoop.hive.common.type.Decimal128.toBigDecimal()

    }
    if (!noNulls && isNull[index]) {
      return NullWritable.get();
    } else {
      Decimal128 dec = vector[index];
      writableObj.set(HiveDecimal.create(dec.toBigDecimal()));
      return writableObj;
    }
  }

  @Override
View Full Code Here

Examples of org.exolab.castor.xml.schema.Facet.toBigDecimal()

                throw new SchemaException(
                        "It is an error for both minInclusive and minExclusive "
                        + "to be specified for the same datatype.");
            } else if (otherName.equals(Facet.MAX_INCLUSIVE)
                    && getOwningType().isNumericType()
                    && this.toBigDecimal().compareTo(other.toBigDecimal()) >= 0) {
                // Schema Component Constraint: minExclusive < maxInclusive
                throw new SchemaException(
                        "It is an error for the value specified "
                        + "for minExclusive to be greater than "
                        + "or equal to the value specified for "
View Full Code Here

Examples of org.exolab.castor.xml.schema.Facet.toBigDecimal()

                // Schema Component Constraint: minExclusive valid restriction
                //   It is an error if any of the following conditions is true:
                if (otherName.equals(Facet.MIN_EXCLUSIVE)
                        && getOwningType().isNumericType()
                        && this.toBigDecimal().compareTo(other.toBigDecimal()) < 0) {
                    // [1]
                    throw new SchemaException(
                            "It is an error if the following condition is true: "
                            + "minExclusive is among the members of {facets} of "
                            + "{base type definition} and {value} is less than "
View Full Code Here

Examples of org.exolab.castor.xml.schema.Facet.toBigDecimal()

                            + "minExclusive is among the members of {facets} of "
                            + "{base type definition} and {value} is less than "
                            + "the {value} of the parent minExclusive.");
                } else if (otherName.equals(Facet.MAX_INCLUSIVE)
                        && getOwningType().isNumericType()
                        && this.toBigDecimal().compareTo(other.toBigDecimal()) > 0) {
                    // [2]
                    throw new SchemaException(
                            "It is an error if the following condition is true: "
                            + "maxInclusive is among the members of {facets} of "
                            + "{base type definition} and {value} is greater than "
View Full Code Here

Examples of org.exolab.castor.xml.schema.Facet.toBigDecimal()

                            + "maxInclusive is among the members of {facets} of "
                            + "{base type definition} and {value} is greater than "
                            + "the {value} of the parent maxInclusive.");
                } else if (otherName.equals(Facet.MIN_INCLUSIVE)
                        && getOwningType().isNumericType()
                        && this.toBigDecimal().compareTo(other.toBigDecimal()) < 0) {
                    // [3]
                    throw new SchemaException(
                            "It is an error if the following condition is true: "
                            + "minInclusive is among the members of {facets} of "
                            + "{base type definition} and {value} is less than "
View Full Code Here

Examples of org.exolab.castor.xml.schema.Facet.toBigDecimal()

                            + "minInclusive is among the members of {facets} of "
                            + "{base type definition} and {value} is less than "
                            + "the {value} of the parent minInclusive.");
                } else if (otherName.equals(Facet.MAX_EXCLUSIVE)
                        && getOwningType().isNumericType()
                        && this.toBigDecimal().compareTo(other.toBigDecimal()) >= 0) {
                    // [4]
                    throw new SchemaException(
                            "It is an error if the following condition is true: "
                            + "maxExclusive is among the members of {facets} of "
                            + "{base type definition} and {value} is greater than "
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.