Package es.ipsa.atril.doc.user.exceptions

Examples of es.ipsa.atril.doc.user.exceptions.AttributeTypeHasValuesException


          oAttr = oDoc.attribute(sKey);
          oAttr.set(((Double) oVal).doubleValue());
        } else if (oVal instanceof String[]) {
          String[] aStrs = (String[]) oVal;
          oAttr = oDoc.attribute(sKey);
          if (!oAttr.type().isMultivaluable()) throw new AttributeTypeHasValuesException("Cannot set multiple values for attribute "+sKey);
          int nVals = oAttr.count();
          for (int c=0; c<aStrs.length; c++) {
            if (c<nVals)
              oAttr.get(c).set(aStrs[c]);
            else
              oAttr.add().set(aStrs[c]);           
          } // next
        } else if (oVal instanceof BigDecimal[]) {
          oAttr = oDoc.attribute(sKey);
          if (!oAttr.type().isMultivaluable()) throw new AttributeTypeHasValuesException("Cannot set multiple values for attribute "+sKey);
          int nVals = oAttr.count();
          BigDecimal[] aDecs = (BigDecimal[]) oVal;
          for (int c=0; c<aDecs.length; c++) {
            try {
              BigInteger oBig = aDecs[c].toBigIntegerExact();
View Full Code Here

TOP

Related Classes of es.ipsa.atril.doc.user.exceptions.AttributeTypeHasValuesException

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.