if (data instanceof NullData) {
field.initAssociation(adapter, null);
} else {
value = ((EncodableObjectData) data).getEncodedObjectData();
final EncodableFacet encoder = field.getSpecification().getFacet(EncodableFacet.class);
final ObjectAdapter valueAdapter = encoder.fromEncodedString(value);
if (LOG.isDebugEnabled()) {
LOG.debug("setting value for field " + field.getId() + ": " + valueAdapter);
}
field.initAssociation(adapter, valueAdapter);
}