/**
  * remove an existing abstractNum
  *
  * @param abstractNumID
  * @return true if abstractNum with abstractNumID exists in NumberingArray, false if abstractNum
  *     with abstractNumID not exists
  */
 public boolean removeAbstractNum(BigInteger abstractNumID) {
   if (abstractNumID.byteValue() < abstractNums.size()) {
     ctNumbering.removeAbstractNum(abstractNumID.byteValue());
     abstractNums.remove(abstractNumID.byteValue());
     return true;
   }
   return false;
 }
 /**
  * Increments value in each column. If the value is bounded type (e.g. short) it will cycle the
  * values.
  */
 private void generateRow() {
   List<Object> newRow = new ArrayList<Object>(types.size());
   String incrementedString = incrementString(staticStringValue, rowNumber);
   for (Class<?> type : types) {
     if (type.equals(Integer.class)) {
       newRow.add(rowNumber.intValue());
     } else if (type.equals(java.lang.Short.class)) {
       newRow.add(rowNumber.shortValue());
     } else if (type.equals(java.lang.Long.class)) {
       newRow.add(rowNumber.longValue());
     } else if (type.equals(java.lang.Float.class)) {
       newRow.add(rowNumber.floatValue() / 10);
     } else if (type.equals(java.lang.Double.class)) {
       newRow.add(rowNumber.doubleValue() / 10);
     } else if (type.equals(java.lang.Character.class)) {
       newRow.add((char) ((((rowNumber.byteValue() & 0xff) + 2) % 26) + 97));
     } else if (type.equals(java.lang.Byte.class)) {
       newRow.add(rowNumber.byteValue());
     } else if (type.equals(java.lang.Boolean.class)) {
       newRow.add(rowNumber.intValue() % 2 != 0);
     } else if (type.equals(java.math.BigInteger.class)) {
       newRow.add(rowNumber);
     } else if (type.equals(java.math.BigDecimal.class)) {
       newRow.add(new BigDecimal(rowNumber, 1));
     } else if (type.equals(java.sql.Date.class)) {
       newRow.add(new Date(DAY_SECONDS * 1000 * (rowNumber.intValue() % DATE_PERIOD)));
     } else if (type.equals(java.sql.Time.class)) {
       newRow.add(new Time((rowNumber.intValue() % DAY_SECONDS) * 1000));
     } else if (type.equals(java.sql.Timestamp.class)) {
       newRow.add(new Timestamp(rowNumber.longValue()));
     } else if (type.equals(TypeFacility.RUNTIME_TYPES.CLOB)) {
       newRow.add(
           this.config.getTypeFacility().convertToRuntimeType(incrementedString.toCharArray()));
     } else if (type.equals(TypeFacility.RUNTIME_TYPES.BLOB)
         || type.equals(TypeFacility.RUNTIME_TYPES.VARBINARY)) {
       newRow.add(
           this.config.getTypeFacility().convertToRuntimeType(incrementedString.getBytes()));
     } else {
       newRow.add(incrementedString);
     }
   }
   row = newRow;
 }
Example #3
0
 public static byte LTruncIT8(BigInteger x) {
   return x.byteValue();
 }
 @Override
 public byte byteValue() {
   return value.byteValue();
 }