More About isValid()
The example in
Checking Status with Class RWDBStatus showed how to use the
isValid() method of class
RWDBStatus to check the status of an object. In this section, we add some details about this important function.
The first thing to understand is that the function isValid() returning true means essentially the same as errorCode() returning RWDBStatus::ok. The major difference is that only Producer/Product classes have a status() function, while many classes, including some Producer/Product classes, have an isValid() function.
Although the DB Interface Module error model is based on
RWDBStatus, you are more likely to use
isValid() for testing the validity of objects.