* Helper method that updates domain properties. If a value equals to default, null
* value is used instead.
*/
protected void setDomainProperty(String property, String value, String defaultValue) {
DataDomain domain = projectController.getCurrentDataDomain();
if (domain == null) {
return;
}
// no empty strings
if ("".equals(value)) {
value = null;
}
// use NULL for defaults
if (value != null && value.equals(defaultValue)) {
value = null;
}
Map properties = domain.getProperties();
Object oldValue = properties.get(property);
if (!Util.nullSafeEquals(value, oldValue)) {
properties.put(property, value);
DomainEvent e = new DomainEvent(this, domain);