clearFacet.clearProperty(adapter);
return SetUpObjectResult.CLEARED;
}
// use setter facet otherwise
final PropertySetterFacet setterFacet = association.getFacet(PropertySetterFacet.class);
if (setterFacet != null) {
setterFacet.setProperty(adapter, null);
return SetUpObjectResult.CLEARED;
}
return SetUpObjectResult.CANNOT_CLEAR;
}
// non-empty, will need a setter
final PropertySetterFacet setterFacet = association.getFacet(PropertySetterFacet.class);
if (setterFacet == null) {
return SetUpObjectResult.CANNOT_SET;
}
final ObjectSpecification fieldSpecification = association.getSpecification();
final ParseableFacet parseableFacet = fieldSpecification.getFacet(ParseableFacet.class);
ObjectAdapter referencedAdapter = null;
if (parseableFacet != null) {
// handle as parseable value
try {
referencedAdapter = parseableFacet.parseTextEntry(adapter, cellText, null);
} catch (final IllegalArgumentException ex) {
return SetUpObjectResult.CANNOT_PARSE;
}
} else {
// handle as reference to known object
referencedAdapter = getAliasRegistry().getAliased(cellText);
if (referencedAdapter == null) {
return SetUpObjectResult.UNKNOWN_REFERENCE;
}
}
setterFacet.setProperty(adapter, referencedAdapter);
return SetUpObjectResult.OK;
}