I have a table of Date and
String value. Each date column and string values represents specific logic such as unfinished transactions so each must be represented by a null value. (Not an empty string)
Now I am having a problem mapping everything in my
JDBC.
Timestamp dteEndTrans = rs.getTimestamp("dteEndTrans");
if (rs.wasnull()){
//set DTO object to empty string("")
}
Is there an elegant way of handling such things rather than calling wasnull in every column?
I have another option which is in the Database Query itself wherein it will return an empty string for every null value, but I wanted the application to handle this.
Any advice please?