DOFQueryBuilder ClassOpenDOF Object Access Library
Builder is used to build DOFQueries.
Inheritance Hierarchy

SystemObject
  org.opendof.core.oalDOFQueryBuilder

Namespace: org.opendof.core.oal
Assembly: dof-oal (in dof-oal.dll) Version: 7.0.1.2
Syntax

C#
public sealed class Builder

The DOFQueryBuilder type exposes the following members.

Constructors

  NameDescription
Public methodDOFQueryBuilder
Construct a DOFQuery.Builder.
Public methodDOFQueryBuilder(DOFQuery)
Construct a DOFQuery.Builder based on another DOFQuery.
Top
Methods

  NameDescription
Public methodaddFilter(DOFInterfaceID)
Add a filter for specific DOFObjects that currently provide the Object Interface specified.
Public methodaddFilter(ICollectionDOFInterfaceID)
Add a filter for specific objects that currently provide all of the interfaces specified.
Public methodaddFilter(DOFObjectID)
Add filter for a specific Device Object, as specified by a Device Object identifier, regardless of interfaces provided.
Public methodaddFilter(DOFObjectID, DOFInterfaceID)
Add a filter for a specific Device Object that provides the specified interface.
Public methodaddFilter(DOFObjectID, ICollectionDOFInterfaceID)
Add a filter for a specific Device Object as specified by a Device Object identifier.
Public methodaddFilter(ICollectionDOFObjectID, ICollectionDOFInterfaceID)
Add a filter for specific Device Objects by providing a List of DOFObjectIDs.
Public methodaddRestriction(DOFInterfaceID)
Restrict filter notification to a set of interface identifiers.
Public methodaddRestriction(ICollectionDOFInterfaceID)
Restrict filter notification to a set of interface identifiers.
Public methodbuild
Construct a new DOFQuery based on the builder's current filter list, restriction list, and style.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodsetMatchStyle
Set the matching style to use in processing this query.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

Builder is used to build DOFQueries. Since DOFQuery is immutable, it has no methods for adding filters. Use Builder to add all the filter blocks and then "build()" the DOFQuery.

For details on how DOFQueries are matched see DOFQuery .

Builder supports a fluent style of programming -- code like the following is encouraged:

DOFQuery query = new DOFQuery.Builder()
.addFilter(...)
.addFilter(...)
.build();
See Also

Reference