Drawback of that approach is if user navigates to the create t screen and doesn't click on apply button then the sequence value will elapse and wasted.To avoid this ,follow the approach below to simulate the Forms Style Generation of the unique Number.
In your entity object EOImpl.java write the below code.
Previous Approach :
public void create(AttributeList attributeList) {
super.create(attributeList);
OADBTransaction transaction = getOADBTransaction();
Number seqNo = transaction.getSequenceValue("FWK_TBX_EMPLOYEES_S");
setFileId(seqNo);
}
New Approach : Write the code in the setter method in EO.
public void setFileId(Number value) {
if (value == null) {
OADBTransaction transaction = getOADBTransaction();
value = transaction.getSequenceValue("FWK_TBX_EMPLOYEES_S");
}
setAttributeInternal(FILEID, value);
}