Index

dkSearchTemplate

Purpose:

dkSearchTemplate is the base interface for datastore specific search template classes.

Heirarchy:

       dkSearchTemplate
         DKSearchTemplateFed

Class summary:

 class dkSearchTemplate
 {
   public:
     virtual      ~dkSearchTemplate();  
     DKString     getName()       
     void         setName(const char* newName); 
     DKString     getDescription();
     void         setDescription(const char* desc);
     short        getId();
     void         setId(short id);
     DKString     getEntityName();
     void         setEntityName(const char* entityName);
     virtual dkDatastore* getDatastore();
     virtual void setDatastore(dkDatastore* ds);
     virtual void add() =0;
     virtual void del() =0;
     virtual void update() =0;
     virtual void retrieve() =0;
     virtual void add(DKSearchCriteria* newCriteria) =0;
     virtual void del(const char* criteriaName) =0;
     virtual void update(DKSearchCriteria* criteria) =0;
     virtual DKSearchCriteria*  retrieve(const char* criteriaName) =0;
     virtual void addCriteria(DKSearchCriteria* newCriteria) =0;
     virtual void removeCriteria(const char* criteriaName) =0;
     virtual void updateCriteria(DKSearchCriteria* criteria) =0;
     virtual DKSearchCriteria* getCriteria(const char* criteriaName) =0;
     virtual dkCollection*  listCriteria() =0;
     virtual DKString* listCriteriaNames(long& arraySize) =0;
     virtual DKString* listDisplayNames(long& arraySize) =0;
     virtual void      setParametricOp(short allOp) =0; 
     virtual short     getParametricOp() =0; 
     virtual long*     getSortOrders(long& arraySize) =0; 
     virtual void      setSortOrders(long* sortOrders, long arraySize); 
     virtual void      addUser(const char* userName, short access) =0;
     virtual void      addGroup(const char* groupName, short access) =0;
     virtual void      removeUser(const char* userName) =0;
     virtual void      removeGroup(const char* groupName)=0;
     virtual DKString* listUsers(long& arraySize) =0;
     virtual DKString* listGroups(long& arraySize) =0;
     virtual DKCQExpr* createQueryExpr() =0; 
 } 

Members:

Member functions

getName
Gets the search template name.
String getName();

setName
Sets the search template name.
void setName(const char* name);

getDescription
Gets the description of this search template.
String getDescription();

setDescription
Sets the description for this search template.
void setDescription(const char* desc);

getId
Gets the search template ID.
short  getId();

setId
Sets the search template ID.
void setId(short id);

getEntityName
Sets the search template ID.
DKString getEntityName();

setEntityName
Sets the search template ID.
void  setEntityName(const char* newName);

getDatastore
Gets the reference to the owner datastore object.
virtual dkDatastore* getDatastore();

setDatastore
Sets the reference to the owner datastore object.
virtual void setDatastore(dkDatastore* ds);

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

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

update
The first form updates this search template in the persistent datastore. The second form updates the search criteria in the persistent datastore.
virtual void  update(); 
virtual void update(DKSearchCriteria* criteria);

retrieve
The first form retrieves this search template from the persistent datastore. You need to set the search template name before calling this method. The second form retrieves the search criteria from the persistent datastore.
virtual void  retrieve(); 
virtual DKSearchCriteria*  retrieve(const char* criteriaName);

addCriteria
Adds a new search criteria to this search template definition in-memory.
virtual void  addCriteria(DKSearchCriteria* newCriteria);

removeCriteria
Removes the search criteria from this search template definition in-memory.
virtual void  removeCriteria(const char* criteriaName);

updateCriteria
Updates the given search criteria in this search template definition in-memory.
virtual void  updateCriteria(DKSearchCriteria* criteria);

getCriteria
Retrieves the search criteria with the given name.
virtual DKSearchCriteria* getCriteria(const char* criteriaName);

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

listCriteriaNames
Gets a list of search criteria names in this search template.
virtual DKString*  listCriteriaNames(long& arraySize);

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

setParametericOp
Sets the operator between search criteria. The default is DK_CM_OP_ALL_ANDS. Valid operators are:

DK_CM_OP_ALL_ANDS
All search criteria in this search template are AND-ed together

DK_CM_OP_ALL_ORS
All search criteria in this search template are OR-ed together

DK_CM_OP_ALL_MIXED
Operators between search criteria in this search template are a mixture of ANDs and ORs.

virtual void  setParametricOp(short allOp);

getParametericOp
Gets the current defined operator between search criteria. See the setParametricOp() method for the list of valid return values.
virtual short  getParametricOp();

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

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

addUser
Adds a new user name who can access this search template. The userName is a user name which already defined in this server. Valid access values are:

DK_FED_ST_ACCESS_READONLY
for read only access

DK_FED_ST_ACCESS_UPDATE
for update access

DK_FED_ST_ACCESS_ADMIN
for full access

virtual void  addUser(const char* userName, short access); 

addGroup
Adds a new group name who can access this search template. The groupName is a group name which already defined in this server. See the addUser() method for the list of valid access values.
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.
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 group names that have access to this search template.
virtual DKString*  listGroups(long& arraySize);

createQueryExpr
Creates a compound query expression object, ready for execution by the datastore execute method.
virtual DKCQExpr* createQueryExpr();

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