Opens the database object associated with this ObjectId object, in the specified mode.
Returns a SmartPointer to the opened object if successful, otherwise a null SmartPointer.
openMode must be one of the following: