Exists
The Exists method returns a Boolean value that indicates whether the specified focus context exists in this storage unit.
ODBoolean Exists (in ODPropertyName propertyName,
in ODValueType valueType,
in ODValueIndex valueIndex);
propertyName
- The name of the property in the focus context, or
kODNULL for the currently focused property.
valueType
- The value type of the value in the focus context, or
kODNULL to ignore this parameter.
valueIndex
- The value index of the value in the focus context, or 0 to ignore this parameter.
- return value
-
kODTrue if the specified focus context exists in this storage unit, otherwise kODFalse.
DISCUSSION
You can call this method to see whether you can focus this storage unit on the specified focus context; however, this method does not change the current focus context. The parameters specify the focus context to be checked.
- To specify a property as the focus context, pass its name as the property name parameter or
kODNULL for the currently focused property. Pass kODTypeAll as the value type parameter and kODIndexAll as the value index parameter.
- To specify a value as the focus context, pass the name of the property containing the value as the property name parameter or
kODNULL for the currently focused property. You can specify the value by either its type or its index:
- To use type, pass the type of the desired value as the value type parameter and 0 as the value index parameter.
- To use index, pass
kODNULL as the value type parameter and the index of the desired value as the value index parameter.
If this method returns true, it is safe to call the Focus method with the specified focus context.
EXCEPTIONS
kODErrIllegalPropertyName
- The specified property name is improperly formed or illegal.
kODErrInvalidValueType
- The specified value type is improperly formed or illegal.
kODErrZeroRefCount
- This storage unit has a reference count of 0.
SEE ALSO
The ODPropertyName type (page 904).
The ODValueIndex type (page 904).
The ODValueType type (page 904).
The ODStorageUnit::ExistsWithCursor method (page 682).
The ODStorageUnit::Focus method (page 684).
Listing 2-41 on page 100 in OpenDoc Cookbook.
Listing 2-44 on page 105 in OpenDoc Cookbook.
Listing 2-45 on page 106 in OpenDoc Cookbook.