Below is my Interface -
public interface IDBClient {
public String read(ClientInput input);
}
This is my Implementation of the Interfa
As Long
is wrapper class privimitive type long
and Long
is a class, which indicate its instance could be null. In my perspective use wrapper class is better than primitive type because there could have null
state in it, which could tells us more information.
In addition, wrapper class will automatically initialized with 0, it is good for lazy using.
For data validation, I think you'd better do it in controller
rather than DAO
, then have a good method to handle this or alert user to modify them!