Posts

Showing posts with the label Java JSP

Soft delete with ADF entities

Say that you have a table created with this script, create table users(user_name varchar2(20) primary key, name varchar2(100),active_yn varchar2(1) default 'Y') And you want to set the active_yn to N when a delete occurs instead of doing a hard delete. I found this solution working, I am still not sure whether it is the best way or not.. I created my entity by using the wizard . Then edit the entity and on the Java tab select the below check boxes to generate the required Java classes. 1-Generate entity object class 2-Remove method 3-Data manipulation methods Then in the generated Java file change the remove and doDml methods as below /**Add entity remove logic in this method. */ public void remove() { setActiveYn("N"); super.remove(); } /**Custom DML update/insert/delete logic here. */ protected void doDML(int operation, TransactionEvent e) { if (operation != DML_DELETE) super.doDML(operation, e); ...

JDeveloper 11G TP4

I started to work with the IDE 3 weeks ago. My company decided to migrate our existing forms application to ADF. My first impression with IDE was not so positive but it is still a preview release so I hope it will be better once released. I decided to write my experiences with this tool from now on..Lets see how it will be .. Wait me JDeveloper , I am coming to explore you !!