Although these properties are defined for all resources, some resources may return null or empty values for them or provide a PROPERTY_NOT_SUPPORTED_BY_SERVER exception for them.
All properties (except the location) must be explicitly requested from the server before they are available from a proxy.
The Resource class provides generic methods for accessing the property values defined by a proxy by using the PropertyName object for each property. WVCM defines the methods Resource.getProperty(PropertyNameList.PropertyName) and Resource.setProperty(PropertyNameList.PropertyName, Object). The getProperty method throws the exception PropertyException if the proxy does not contain a valid value for the property identified by the PropertyName object.
There is also the Resource.lookupProperty() method for retrieving a property value. If the property value is defined, lookupProperty() returns the same object as getProperty. If the property value is undefined, lookupProperty() returns the exception that is thrown by the getProperty method.
The setProperty, getProperty, and lookupProperty methods do not verify that the PropertyName is defined by the proxy class. Any proxy can be used to interact with any type of resource. Such interactions fail only when they attempt to write or retrieve values for properties that are not defined for the resource addressed by the proxy; the failures occur only when the API Provider attempts to transfer such property values to or from the resource. Note, however, that when constructing a proxy for a given location, the domain of the location must match the domain of the provider from which the proxy is being requested.
The CqRecord.FieldName class is a subclass of PropertyName used for naming the resource properties that are schema-defined fields of a ClearQuest® record. Note that, as with PropertyName, the type parameter specifies the field's value type.
You can use these extensions that are specific to ClearQuest records to access fields of a record. For an example, see Nested properties