/**
  * Add attribute defaulting logic in this method.
  *
  * @param attributeList list of attribute names/values to initialize the row
  */
 protected void create(AttributeList attributeList) {
   super.create(attributeList);
   super.create(attributeList);
   RowSet batchNoSeq = this.getBatchSeq();
   batchNoSeq.setRangeSize(-1);
   batchNoSeq.executeQuery();
   Row[] allRowsInRange = batchNoSeq.getAllRowsInRange();
   if (allRowsInRange != null && allRowsInRange.length > 0) {
     String currentValue = (String) (allRowsInRange[0].getAttribute("SEQ"));
     DecimalFormat format = new DecimalFormat("00000");
     String batchNo = format.format(new Integer(currentValue).intValue() + 1);
     String finalBatchNO = Constants.CLSRM_BATCH_PREFIX + batchNo;
     this.setBatchNo(finalBatchNO);
   }
 }
Esempio n. 2
0
 /**
  * Add attribute defaulting logic in this method.
  *
  * @param attributeList list of attribute names/values to initialize the row
  */
 protected void create(AttributeList attributeList) {
   super.create(attributeList);
 }