When using Spring, is it possible to set a property only if the value passed is not null?
Example:
You can create a Utility class that will act as a Factory class for some.Type, and wrap the logic there
For Example :
public class TypeFactory {
public static Type craeteType(SomeType param){
Type t = new Type();
if(param!=null)
t.setParam(param);
}
}
and on XML configure the bean creation using this Factory method