Index

DKQSubExpr

Purpose:

A sub-query DKQSubExpr expression consists of entity names, a display list, a query term, an option list, and an optional parameter list. A query expression DKQExpr may contain one or more sub-expressions, each sub-expression essentially defines a sub-query. When the query is executed, each sub-query will be executed and the results will be OR-ed together to form a result for the whole query. The Content Manager datastore supports sub-queries as described above, but not all datastores support sub-queries. In such a case, there will be only one sub-query.

Class summary:

class DKQSubExpr
{
  public:
    DKQSubExpr();
    virtual ~DKQSubExpr();
 
    virtual DKString getEntityName();
    virtual void setEntityName(const char* name);
    virtual DKString* getEntityNames(long& arraySize);
    virtual void setEntityNames(const DKString* names, long arraySize);
    virtual DKString getMappingName();
    virtual void setMappingName(const char* mappingName);
    virtual int  getMappingType();
    virtual void setMappingType(int mappingType);
    virtual DKBoolean isTranslation();
    virtual void setTranslation(DKBoolean translation);
    virtual DKString* getDisplayList(long& arraySize);
    virtual void setDisplayList(const DKString* names, long arraySize);
    virtual DKQTerm* getQueryTerm();
    virtual void setQueryTerm(DKQTerm* qTerm);
 
    virtual long optionCount();
    virtual DKNVPair* getOptionList(long& arraySize);
    virtual void setOptionList(const DKNVPair* optionList, long arraySize);
    virtual DKNVPair* getOption(long position);
    virtual DKNVPair* getOption(const char* name);
    virtual void setOption(long position, const DKNVPair& optionPair);
    virtual void setOption(const char* name, const DKAny& value);
    virtual void removeOption(long position);
    virtual void removeOption(const char* name);
 
    virtual long parameterCount();
    virtual DKNVPair* getParameterList(long& arraySize);
    virtual void setParameterList(const DKNVPair* parameterList, long arraySize);
    virtual DKNVPair* getParameter(long position);
    virtual DKNVPair* getParameter(const char* name);
    virtual void setParameter(long position, const DKNVPair& parmPair);
    virtual void setParameter(const char* name, const DKAny& value);
    virtual void removeParameter(long position);
    virtual void removeParameter(const char* name);
};

Members:

Constructors and destructor
    DKQSubExpr();
    virtual ~DKQSubExpr();
 

Member functions

getEntityName
Gets the entity name specified in this query. Assumes that there is only one entity involved.
virtual DKString getEntityName();

setEntityName
Sets the entity name in this query. Assumes that there is only one entity involved in this query.
virtual void setEntityName(const char* name);

getEntityNames
Gets the entity names in this query. (There are more entity names than one.) For example, a text query may have more than one entity or search-indices specified.
virtual DKString* getEntityNames(long& arraySize);

setEntityNames
Sets the entity names in this query. (There are more entity names than one.)
virtual void setEntityNames(const DKString* names, long arraySize);

getMappingName
Gets the optional schema mapping name for executing this query. The default value is null (A null means that mapping is not required.
virtual DKString getMappingName();

setMappingName
Sets the optional schema mapping name for executing this query.
virtual void setMappingName(const char* mappingName);

getMappingType
Gets the optional schema-mapping name for executing this query. The default value is null. (A null means that mapping is not required.)
virtual int  getMappingType();

setMappingType
Sets the optional schema mapping name for executing this query.
virtual void setMappingType(int mappingType);

isTranslation
Checks if this query requires schema translation (using schema mapping).
virtual DKBoolean isTranslation();

setTranslation
Sets the requirement for schema translation for this query. A schema mapping name must by provided by way of the setMappingName method.
virtual void setTranslation(DKBoolean translation);

getDisplayList
Gets the display list in this query. The display list is a list of search-attribute names to be displayed in the results of this query. If it is not specified, all attributes will be selected.
virtual DKString* getDisplayList(long& arraySize);

setDisplayList
Sets the display list in this query.
virtual void setDisplayList(const DKString* names, long arraySize);

getQueryTerm
Gets the query term or condition part of this query.
virtual DKQTerm* getQueryTerm();

setQueryTerm
Sets the query term or condition part in this query.
virtual void setQueryTerm(DKQTerm* qTerm);

optionCount
Gets the number of defined options.
virtual long optionCount();

getOptionList
Gets a list of options in this query.
virtual DKNVPair* getOptionList(long& arraySize);

setOptionList
Sets the option list in this query.
virtual void setOptionList(const DKNVPair* optionList, long arraySize);

getOption
The first form gets an option at the given position. The first form throws an IndexOutOfBoundsException if the position is invalid. The second form gets an option with a given name.
virtual DKNVPair* getOption(long position);
virtual DKNVPair* getOption(const char* name);
 

setOption
The first form sets the option at the given position. This form also throws an IndexOutOfBoundsException if the position is invalid. The second form sets the option with the given name. The option will be added, if it does not exist yet.
virtual void setOption(long position, const DKNVPair& optionPair);
virtual void setOption(const char* name, const DKAny& value);

removeOption
The first form removes the option at the given position. The second form removes the option with the given name.
virtual void removeOption(long position);
virtual void removeOption(const char* name);

parameterCount
Gets the number of defined parameters.
virtual long parameterCount();

getParameterList
Gets the parameter list.
virtual DKNVPair* getParameterList(long& arraySize);

setParameterList
Sets the parameter list.
virtual void setParameterList(const DKNVPair* parameterList, long arraySize);

getParameter
The first form gets a parameter at a given position. The second form gets a parameter with a given name.
virtual DKNVPair* getParameter(long position);
virtual DKNVPair* getParameter(const char* name);

setParameter
The first form sets the parameter at the given position. The second form sets a parameter with a given name. The parameter will be added if it does not exist.
virtual void setParameter(long position, const DKNVPair& parmPair);
virtual void setParameter(const char* name, const DKAny& value);

removeParameter
The first form removes the parameter at the given position. The second form removes the parameter with the given name. Both forms throw an IndexOutOfBoundsException if the position is invalid.
virtual void removeParameter(long position);
virtual void removeParameter(const char* name);
 

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