Index

DKSearchTemplateFed

Purpose:

DKSearchTemplateFed is a federated datastore search template definition class.

Heirarchy:

       DKSearchTemplate
          DKSearchTemplateFed

Class summary:

class DKSearchTemplateFed : public dkSearchTemplate
{
  public:
    DKSearchTemplateFed(); 
    DKSearchTemplateFed(dkDatastore* ds);
    virtual ~DKSearchTemplateFed();
 
    virtual void add();
    virtual void del(); 
    virtual void update();
    virtual void retrieve();
    virtual void add(DKSearchCriteria* newCriteria);
    virtual void del(const char* criteriaName);
    virtual void update(DKSearchCriteria* criteria);
    virtual DKSearchCriteria*  retrieve(const char* criteriaName);
    virtual void addCriteria(DKSearchCriteria* newCriteria); 
    virtual void removeCriteria(const char* criteriaName);
    virtual void updateCriteria(DKSearchCriteria* criteria);
    virtual DKSearchCriteria* getCriteria(const char* criteriaName);
    virtual dkCollection*  listCriteria();
    virtual DKString* listCriteriaNames(long& arraySize);
    virtual DKString* listTextCriteriaNames(long& arraySize);
    virtual DKString* listParmCriteriaNames(long& arraySize);
    virtual DKString* listQBICCriteriaNames(long& arraySize);
    virtual DKString* listAttrDisplayNames(long& arraySize);
    virtual DKString* listAllAttrDisplayNames(long& arraySize);
    virtual DKString* listDisplayNames(long& arraySize);
    virtual DKString* listSearchableCriteriaNames(long& arraySize);
    virtual void      setParametricOp(short allOp); 
    virtual short     getParametricOp(); 
    virtual long*     getSortOrders(long& arraySize); 
    virtual void      setSortOrders(long* sortOrders, long arraySize); 
    virtual void      addUser(const char* userName, short access);
    virtual void      addGroup(const char* groupName, short access);
    virtual void      removeUser(const char* userName);
    virtual void      removeGroup(const char* groupName);
    virtual DKString* listUsers(long& arraySize);
    virtual DKString* listGroups(long& arraySize);
    virtual DKCQExpr* createQueryExpr(); 
    virtual DKCQExpr** createQueryExpr(const char* serverName, long& arraySize);
    virtual DKString getAssocFedEntity(const char* fedTextEntityName); 
    virtual DKString getAssocFedTextEntity(const char* fedParmEntityName); 
    DKString  getFolderName();
    void      setFolderName(const char* folderName);
    short     getServerParticipation(); // return _serverControl
    void      setServerParticipation(short serverP);
    short     getGlobalOp();
    void      setGlobalOp(short op);
    DKString  getTextSingleCharWildcard();
    void      setTextSingleCharWildcard(const char* wildcard);
    
    DKString  getTextMultiCharWildcard();
    void      setTextMultiCharWildcard(const char* wildcard);
    DKString  getParmWildcard();
    void      setParmWildcard(const char* wildcard);
    long       optionCount();
    DKNVPair* getOptionList(long& arraySize);
    void      setOptionList(const DKNVPair* optionList, long arraySize);
    DKNVPair* getOption(long position);
    DKNVPair* getOption(const char* name);
    void      setOption(long position, const DKNVPair& optionPair);
    long      setOption(const char* name, const DKAny& value);
    void      removeOption(long position);
    void      removeOption(const char* name); 
}; 

Members:

Constructors and destructor
The first constructor creates a new instance of DKSearchTempleteFed object with default values. The second constructor creates a new instance of DKSearchTempleteFed object associated with the given datastore object.
    DKSearchTemplateFed(); 
    DKSearchTemplateFed(dkDatastore* ds);
    virtual ~DKSearchTemplateFed();
 

Member functions

add
The first form adds this query template to the datastore and makes this query persistent. The second form adds a new search criteria to this query template.
    virtual void add();
    virtual void add(DKSearchCriteria* newCriteria);

del
The first form deletes this query template from the datastore. The in-memory copy is not affected. The second form removes a search criteria from this query.
    virtual void del(); 
    virtual void del(const char* criteriaName);

update
The first form updates this query template in the datastore. The in-memory copy is not affected. The second form updates this criteria.
    virtual void update();
    virtual void update(DKSearchCriteria* criteria);

retrieve
The first form retrieves this query template from the datastore. (The query name must be set before calling this function.) The second form retrieves a search criteria from a given name.
    virtual void retrieve();
    virtual DKSearchCriteria*  retrieve(const char* criteriaName);

addCriteria
Adds a new search criteria to this query. (This is a memory only function.)
virtual void addCriteria(DKSearchCriteria* newCriteria);

removeCriteria
Removes a search criteria from this query. (This is a memory only function.)
virtual void removeCriteria(const char* criteriaName);

updateCriteria
Updates this criteria. (This is a memory only function.)
virtual void updateCriteria(DKSearchCriteria* criteria);

getCriteria
Retrieves a search criteria for a given criteria name (from memory only).
virtual DKSearchCriteria* getCriteria(const char* criteriaName);

listCriteria
Gets a list of search criteria in this query.
virtual dkCollection*  listCriteria();

listCriteriaNames
Gets a list of search criteria names (including parametric, text and QBIC).
virtual DKString* listCriteriaNames(long& arraySize);

listTextCriteriaNames
Gets a list of text-search criteria names of this search template.
virtual DKString* listTextCriteriaNames(long& arraySize);

listParmCriteriaNames
Gets a list of parametric-search criteria names of this search template.
virtual DKString* listParmCriteriaNames(long& arraySize);

listQBICCriteriaNames
Gets a list of QBIC-search criteria names.
virtual DKString* listQBICCriteriaNames(long& arraySize);

listAttrDisplayNames
Gets the list of attributes to display in the results.
virtual DKString* listAttrDisplayNames(long& arraySize);

listAllAttrDisplayNames
Gets a list of all attribute names of parametric search in a search template.
virtual DKString* listAllAttrDisplayNames(long& arraySize);

listDisplayNames
Gets a list of search-results column names.
virtual DKString* listDisplayNames(long& arraySize);

listSearchableCriteriaNames
Gets a list of searchable criteria names (that is, the combination of searchable, parametric and text criterion).
virtual DKString* listSearchableCriteriaNames(long& arraySize);

setParametericOp
Sets the operator between search criteria. The default is DK_CM_OP_ALL_ANDS.

Parameters

allOp
One the following values:
  • DK_CM_OP_ALL_ANDS
  • DK_CM_OP_ALL_ORS
  • DK_CM_OP_ALL_MIXED

virtual void setParametricOp(short allOp);

getParametericOp
Gets the current defined operator between search criteria. Returns one of the following values:
  • DK_CM_OP_ALL_ANDS
  • DK_CM_OP_ALL_ORS
  • DK_CM_OP_ALL_MIXED

virtual short getParametricOp();

getSortOrders
Gets the list of sorting orders. This function is called by the server only.
virtual long* getSortOrders(long& arraySize);

setSortOrders
Sets the list of sorting orders for the query.
virtual void setSortOrders(long* sortOrders, long arraySize);

addUser
Adds a new user name who can access this search template.
virtual void addUser(const char* userName, short access);

addGroup
Adds a new group name who can access this search template.
virtual void addGroup(const char* groupName, short access);

removeUser
Removes a user name from the access list of this search template.
virtual void removeUser(const char* userName);

removeGroup
Removes a group name from the access list of this search template.
virtual void removeGroup(const char* groupName);

listUsers
Gets a list of user IDs that have access to this search template.
virtual DKString* listUsers(long& arraySize);

listGroups
Gets a list of groups that have access to this search template.
virtual DKString* listGroups(long& arraySize);

createQueryExpr
Creates compound query expression objects. It is made ready for execution by the datastore execute function.
virtual DKCQExpr* createQueryExpr();  virtual DKCQExpr** createQueryExpr(const char* serverName, long& arraySize);

getAssocFedEntity
Gets the associated federate entity for the federate text entity.
virtual DKString getAssocFedEntity(const char* fedTextEntityName); 

getAssocFedTextEntity
Gets the associated federate text entity for the federate entity.
virtual DKString getAssocFedTextEntity(const char* fedParmEntityName);

getFolderName
Gets the folder name for this search template.
DKString  getFolderName();

setFolderName
Sets the folder name for this search template.
void setFolderName(const char* folderName);

getServerParticipation
Gets the server participation option. The default is DK_CM_ALL_SERVERS.
short getServerParticipation();

setServerParticipation
Sets the server participation option. The default is DK_CM_ALL_SERVERS. The valid options are:

DK_CM_ALL_SERVERS
The search will not skip servers, if a server is not available it will throw an exception.

DK_CM_SOME_SERVERS
The search will skip the servers that are not available.

DK_CM_SOME_SERVERS_EXC
The search will throw an exception when any one server is not available.

void setServerParticipation(short serverP);

getTextSingleCharWildcard
Gets the single character wild card for text search.
DKString  getTextSingleCharWildcard();

setTextSingleCharWildcard
Sets the single character wild card for text search.
void setTextSingleCharWildcard(const char* wildcard);

getTextMultiCharWildcard
Gets the multiple characters wild card of text search.
DKString  getTextMultiCharWildcard();

setTextMultiCharWildcard
Sets the multiple characters wild card for text search.
void setTextMultiCharWildcard(const char* wildcard);

getParmWildcard
Gets the wild card of parametric search.
DKString  getParmWildcard();

setParmWildcard
Sets the wild card for parametric search.
void setParmWildcard(const char* wildcard);

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

getOptionList
Gets the list of defined options.
DKNVPair* getOptionList(long& arraySize);

setOptionList
Sets the list of options.
void setOptionList(const DKNVPair* optionList, long arraySize);

getOption
The first form gets an option at the given position. The second form gets an option with a given name. Returns NULL if it is not found.
DKNVPair* getOption(long position);
DKNVPair* getOption(const char* name);

setOption
The first form sets the option at the given position. The second form sets the option with the given name.
void setOption(long position, const DKNVPair& optionPair); long 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.
void removeOption(long position);
void removeOption(const char* name); 
 

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