Find the modified attributes

   protected void doDML(int i, TransactionEvent transactionEvent) {
        byte state = this.getEntityState();
        if (state == this.STATUS_MODIFIED) {
            System.out.println(this.getEmployeeId().toString() +
                               " Has been Modified ");
            //Object[] modifiedAttributes =this.getAttributeNames();
            if (this.isAttributeChanged("FirstName")) {
                System.out.println(" FirstName Modified");
            }
            if (this.isAttributeChanged("LastName")) {
                System.out.println(" FirstName Modified");
            }


        }
        super.doDML(i, transactionEvent);
    }

Comments

Popular posts from this blog

setDomainEnv file in weblogic

Another user has changed the row with primary key oracle.jbo.Key[12 ].

Detail entity with row key null cannot find or invalidate its owning entity.