JDAPI provides methods in the JdapiObject
class for managing the
individual properties of a subclassed object:
public boolean hasOverriddenProperty(int propertyTypeId)
public Boolean hasInheritedProperty(int propertyTypeId)
public Boolean hasDefaultedProperty(int propertyTypeId)
public int getPropertyState(int propertyTypeId)
public void inheritProperty(int propertyTypeId)
Object properties can have four possible states: defaulted, set, inherited or overridden. The current state can be inspected using the methods above.
To set or override an object property use the appropriate set
accessor (or the generic one). To remove the override, call inheritProperty()
,
which will either return the property to its defaulted value, or in the case
of subclassed objects, to its inherited value.
The method getPropertyState()
returns an integer representing
each of the four possible states, as described in the JDAPI Javadoc: