/** * 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); } }
/** * setAttrInvokeAccessor: generated method. Do not modify. * * @param index the index identifying the attribute * @param value the value to assign to the attribute * @param attrDef the attribute * @throws Exception */ protected void setAttrInvokeAccessor(int index, Object value, AttributeDefImpl attrDef) throws Exception { if ((index >= AttributesEnum.firstIndex()) && (index < AttributesEnum.count())) { AttributesEnum.staticValues()[index - AttributesEnum.firstIndex()].put(this, value); return; } super.setAttrInvokeAccessor(index, value, attrDef); }
/** * Custom DML update/insert/delete logic here. * * @param i the operation type * @param e the transaction event */ protected void doDML(int i, TransactionEvent e) { if (i == DML_INSERT) { SequenceImpl si = new SequenceImpl("SEQ_BK_BARCODE_HISTORY_ID", getDBTransaction()); setArtId(new DBSequence(si.getSequenceNumber())); } super.doDML(i, e); }
/** * Custom DML update/insert/delete logic here. * * @param operation the operation type * @param e the transaction event */ protected void doDML(int operation, TransactionEvent e) { super.doDML(operation, e); }
/** Add locking logic here. */ public void lock() { super.lock(); }
/** Add entity remove logic in this method. */ public void remove() { super.remove(); }
/** * 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); }