Package es.ipsa.atril.doc.user

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


        if (oVal instanceof String) {
          oAttr = oDoc.attribute(sKey);
          oAttr.set((String) oVal);
        } else if (oVal instanceof Date) {
          oAttr = oDoc.attribute(sKey);
          if (oAttr.type().getDataType().equals(DataType.DATE))
            oAttr.set((Date) (oVal));
          else if (oAttr.type().getDataType().equals(DataType.DATE_TIME))
            oAttr.set((long) DateConversions.getIPSATimeFromDate((Date) (oVal)));
          else
            throw new ClassCastException("Cannot bind Java "+oVal.getClass().getName()+" into "+sKey+" "+oAttr.type().getDataType().name());
View Full Code Here


          oAttr.set((String) oVal);
        } else if (oVal instanceof Date) {
          oAttr = oDoc.attribute(sKey);
          if (oAttr.type().getDataType().equals(DataType.DATE))
            oAttr.set((Date) (oVal));
          else if (oAttr.type().getDataType().equals(DataType.DATE_TIME))
            oAttr.set((long) DateConversions.getIPSATimeFromDate((Date) (oVal)));
          else
            throw new ClassCastException("Cannot bind Java "+oVal.getClass().getName()+" into "+sKey+" "+oAttr.type().getDataType().name());
        } else if (oVal instanceof BigDecimal) {
          oAttr = oDoc.attribute(sKey);
View Full Code Here

          if (oAttr.type().getDataType().equals(DataType.DATE))
            oAttr.set((Date) (oVal));
          else if (oAttr.type().getDataType().equals(DataType.DATE_TIME))
            oAttr.set((long) DateConversions.getIPSATimeFromDate((Date) (oVal)));
          else
            throw new ClassCastException("Cannot bind Java "+oVal.getClass().getName()+" into "+sKey+" "+oAttr.type().getDataType().name());
        } else if (oVal instanceof BigDecimal) {
          oAttr = oDoc.attribute(sKey);
          BigDecimal oDec = (BigDecimal) oVal;
          try {
            BigInteger oBig = oDec.toBigIntegerExact();
View Full Code Here

          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
View Full Code Here

            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
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.