// defaults
// /////////////////////////////////////////////////////////////
@Override
public ObjectAdapter getDefault(final ObjectAdapter ownerAdapter) {
PropertyDefaultFacet propertyDefaultFacet = getFacet(PropertyDefaultFacet.class);
// if no default on the association, attempt to find a default on the
// specification (eg an int should
// default to 0).
if (propertyDefaultFacet == null || propertyDefaultFacet.isNoop()) {
propertyDefaultFacet = this.getSpecification().getFacet(PropertyDefaultFacet.class);
}
if (propertyDefaultFacet == null) {
return null;
}
return propertyDefaultFacet.getDefault(ownerAdapter);
}