I am confused that which method Signature
should I use for same purpose? Both are working fine for me.
1.
public <T, J> T findUniqueByCondition(String tableName,
String key,
J value,
Class<T> targetObject);
2.
public <T> T findUniqueByCondition(String tableName,
String key,
Object value,
Class<T> targetObject);
Which is best practice to use from above? I am really confused and can't find any advantage or dis-advantage of anyone? Is there any? If yes, please explain.