Index

DKCombinedQuery

Purpose:

DKCombinedQuery is a concrete subclass of dkQueryBase, to represent and execute a combination of parametric and text queries. Combined queries provide multiple-search capability on the specified datastore by coordinating the execution of their subqueries. The final result is an intersection between the scope and all its subquery results.

Class summary:

class DKCombinedQuery : public dkQueryBase
{
public:
   DKCombinedQuery();
   DKCombinedQuery(const DKCombinedQuery& source);
   virtual DKCombinedQuery();
 
   virtual void prepare(const DKNVPair* params);
   virtual void execute(const DKNVPair* params);
   virtual DKQueryStatus status();
   virtual DKAny result();
};

Members:

Constructors and destructor
DKCombinedQuery();
   DKCombinedQuery(const DKCombinedQuery& source);
   virtual DKCombinedQuery();

As DKCombinedQuery may not yet be associated with a particular datastore, the constructor therefore does not take a datastore as its parameter.

Member functions

prepare
Stages or prepares the parameter-specific query.
virtual> virtual void prepare(const DKNVPair* params = 0);

execute
Executes this query. The result is obtained by calling result().
virtual void execute(const DKNVPair* params = 0);

status
Gets the status of a query. The valid status is either DKQueryComplete or DKQueryIncomplete.
virtual DKQueryStatus status();

result
Returns a DKAny object, which contains a pointer to the DKResults object. The DKResults object is a collection of DKAny objects. The value of any of these DKAny objects is a pointer to a DKDDO object, which represents a document or folder.

The result is given away to the caller to manage. Unless it is executed again, a subsequent call to this method will return a null object, since the result has been consumed.

virtual DKAny result();

(c) Copyright International Business Machines Corporation 1996, 2003. IBM Corp. All rights reserved.