/** This function refereshes foreign key dependencies with newly generated primary key. */
 protected void refreshFKInNewContainees() {
   if (null != newGroupDetail) {
     Number newGroupId = getId();
     while (newGroupDetail.hasNext()) {
       SendToGroupDetailEOImpl detail = (SendToGroupDetailEOImpl) newGroupDetail.next();
       detail.setSendToGroupId(newGroupId);
     }
     super.refreshFKInNewContainees();
   }
 }
 /**
  * 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);
   }
 }