Hi All,
Am using JDeveloper 12.2.1.0 version,
I Have a requirement to do i.e,
I Have written code in EOImpl like below
if (operation == AR_CUSTOMERS_M_EOImpl.DML_UPDATE) {
try {
if (this.getCustomerType().equals("P")) {
System.out.println("first_Name is :" + this.getFirstName());
System.out.println("middle_Name is :" +this.getMiddleName());
System.out.println("last_Name is :" + this.getLastName());
String Cust_Name = this.getFirstName().concat(" ").concat(this.getMiddleName().concat(" ").concat(this.getLastName()));
this.setCustomerName(Cust_Name);
System.out.println("Cust_Name is :" + this.getCustomerName());
}
} catch (Exception e1) {
// TODO: Add catch code
e1.printStackTrace();
}
String Cust_Name = this.getFirstName().concat(" ").concat(this.getMiddleName().concat(" ").concat(this.getLastName()));
this.setCustomerName(Cust_Name);
1) setCustomerName is not null column (CustomerName is a NotNull Column in Database table means mandatory)
2) while entering CustomerName on screen if it is null the we need to pass (first_name||' '||middle||' '||last_name)( Like Above am getting successfully this scenario)
3) Now when user enter First Name and not entered middle_name, last_name i want store first name only
5) while testing 4 point scenario am getting null pointer exception and CustomerName not storing in database
because i am not entered middle_name and last_name( those are not a notnull columns in database means not mandatory)
Final:can anyone help me on above issue.