Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Interface dkSearchTemplate

All Known Implementing Classes:
DKFolderOD, DKSearchTemplateFed

public interface dkSearchTemplate


Method Summary
 void add()
          Adds this query to the datastore, i.e.
 void add(DKSearchCriteria newCrit)
          Adds a new search criteria to this query
 void addCriteria(DKSearchCriteria newCrit)
          Adds a new search criteria to this query.
 void addGroup(java.lang.String name, short access)
          Adds a new group name who can access this search template
 void addUser(java.lang.String name, short access)
          Adds a new user name who can access this search template
 void clearCache()
          Clear datastore cache
 dkQuery createQuery()
          Creates a query object.
 DKCQExpr createQueryExpr()
          Creates compound query expression objects, ready for execution by the datastore execute method.
 void del()
          Deletes this query from the datastore.
 void del(java.lang.String name)
          Remove a search criteria from this query.
 DKSearchCriteria getCriteria(java.lang.String critName)
          Retrieves a search criteria from a given name.
 dkDatastore getDatastore()
          Gets the reference to the owner datastore object
 java.lang.String getDescription()
          Gets the search template description
 java.lang.String getEntityName()
          Gets the entity name associated with this query
 short getId()
          Gets search template id
 java.lang.String getName()
          Gets the name of this query
 short getParametricOp()
          Gets the current defined operator between search criteria.
 int[] getSortOrders()
          Gets the list of sorting orders.
 dkCollection listCriteria()
          Gets a list of search criteria in this query
 java.lang.String[] listCriteriaNames()
          Gets a list of search criteria names
 java.lang.String[] listDisplayNames()
          Gets a list of search results column names
 java.lang.String[] listGroups()
          Gets a list of groups that have access to this search template
 java.lang.String[] listSearchableCriteriaNames()
          Gets a list of searchable criteria names
 java.lang.String[] listUsers()
          Gets a list of userids that have access to this search template
 void removeCriteria(java.lang.String critName)
          Remove a search criteria from this query.
 void removeGroup(java.lang.String name)
          Removes a group name from the access list of this search template
 void removeUser(java.lang.String name)
          Removes a user name from the access list of this search template
 void retrieve()
          Retrieves this query from the datastore.
 DKSearchCriteria retrieve(java.lang.String critName)
          Retrieves a search criteria from a given name.
 void setDatastore(dkDatastore ds)
          Sets the reference to the datastore object
 void setDescription(java.lang.String desc)
          Sets the description for this search template
 void setEntityName(java.lang.String entityName)
          Sets the entity name associated with this query
 void setId(short id)
          Sets search template id
 void setName(java.lang.String newName)
          Sets the name of this query
 void setParametricOp(short allOp)
          Sets the operator between search criteria.
 void setSortOrders(int[] sortOrders)
          Sets the list of sorting orders for query.
 void update()
          Updates this query in the datastore.
 void update(DKSearchCriteria crit)
          Update this criteria
 void updateCriteria(DKSearchCriteria crit)
          Update this criteria.
 

Method Detail

getName

public java.lang.String getName()
Gets the name of this query
Returns:
name of this query object

setName

public void setName(java.lang.String newName)
Sets the name of this query
Parameters:
name - name of this query

getDescription

public java.lang.String getDescription()
Gets the search template description
Returns:
template description

setDescription

public void setDescription(java.lang.String desc)
Sets the description for this search template
Parameters:
desc - template description

getId

public short getId()
Gets search template id
Returns:
search template id

setId

public void setId(short id)
Sets search template id
Parameters:
search - template id

getEntityName

public java.lang.String getEntityName()
Gets the entity name associated with this query
Returns:
name of entity name

setEntityName

public void setEntityName(java.lang.String entityName)
Sets the entity name associated with this query
Parameters:
entityName - entity name

createQuery

public dkQuery createQuery()
                    throws DKException,
                           java.lang.Exception
Creates a query object.
Returns:
a query object

add

public void add()
         throws DKException,
                java.lang.Exception
Adds this query to the datastore, i.e. make this query persistent.

del

public void del()
         throws DKException,
                java.lang.Exception
Deletes this query from the datastore. The in-memory copy is not affected.

update

public void update()
            throws DKException,
                   java.lang.Exception
Updates this query in the datastore.

retrieve

public void retrieve()
              throws DKException,
                     java.lang.Exception
Retrieves this query from the datastore. You need to set the query name before calling this method.

add

public void add(DKSearchCriteria newCrit)
         throws DKException
Adds a new search criteria to this query
Parameters:
newCrit - new search criteria to be added.
Throws:
DKException - if error occurs in the server

update

public void update(DKSearchCriteria crit)
            throws DKException
Update this criteria
Parameters:
crit - new search criteria values
Throws:
DKException - if error occurs in the server

del

public void del(java.lang.String name)
         throws DKException
Remove a search criteria from this query.
Parameters:
name - name of search criteria to be removed from memory copy.
Throws:
DKException - when error occurs when removing this search criterion

retrieve

public DKSearchCriteria retrieve(java.lang.String critName)
                          throws DKException
Retrieves a search criteria from a given name.
Parameters:
critName - search criteria name to be retrieved
Returns:
the retrieved search criteria object
Throws:
DKException - if error occurs in the server

getDatastore

public dkDatastore getDatastore()
Gets the reference to the owner datastore object
Returns:
the dkDatastore object

setDatastore

public void setDatastore(dkDatastore ds)
Sets the reference to the datastore object
Parameters:
ds - reference to datastore

addCriteria

public void addCriteria(DKSearchCriteria newCrit)
                 throws DKException
Adds a new search criteria to this query. Memory only function.
Parameters:
newCrit - new search criteria to be added.
Throws:
DKException - if error occurs in the server

updateCriteria

public void updateCriteria(DKSearchCriteria crit)
                    throws DKException
Update this criteria. Memory only function
Parameters:
crit - new search criteria values
Throws:
DKException - if error occurs in the server

removeCriteria

public void removeCriteria(java.lang.String critName)
                    throws DKException
Remove a search criteria from this query. Memory only function
Parameters:
critName - name of search criteria to be removed from memory copy.
Throws:
DKException - when error occurs when removing this search criterion

getCriteria

public DKSearchCriteria getCriteria(java.lang.String critName)
                             throws DKException
Retrieves a search criteria from a given name.
Parameters:
critName - search criteria name to be retrieved
Returns:
a DKSearchCriteria object representing the search criteria

listCriteria

public dkCollection listCriteria()
                          throws DKException
Gets a list of search criteria in this query
Returns:
a collection of search criteria

listCriteriaNames

public java.lang.String[] listCriteriaNames()
                                     throws DKException
Gets a list of search criteria names
Returns:
a collection of search criteria names

listSearchableCriteriaNames

public java.lang.String[] listSearchableCriteriaNames()
                                               throws DKException
Gets a list of searchable criteria names
Returns:
a collection of searchable criteria names

listDisplayNames

public java.lang.String[] listDisplayNames()
                                    throws DKException
Gets a list of search results column names
Returns:
a collection of search results column names

setParametricOp

public void setParametricOp(short allOp)
Sets the operator between search criteria. Default is DK_CM_ALL_AND
Parameters:
allOp - one the following values:
  • DK_CM_OP_ALL_ANDS
  • DK_CM_OP_ALL_ORS
  • DK_CM_OP_MIXED

getParametricOp

public short getParametricOp()
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_MIXED

getSortOrders

public int[] getSortOrders()
Gets the list of sorting orders. This method is called by the server only.
Returns:
an array of sorting orders for the query.

setSortOrders

public void setSortOrders(int[] sortOrders)
Sets the list of sorting orders for query.
Parameters:
sortOrders - an array of sorting orders for this query.

addUser

public void addUser(java.lang.String name,
                    short access)
             throws DKException
Adds a new user name who can access this search template
Parameters:
name - user name which already defined in this federated server.
access - whether it is read only, updatable, or full access

addGroup

public void addGroup(java.lang.String name,
                     short access)
              throws DKException
Adds a new group name who can access this search template
Parameters:
name - group name which already defined in this federated server.
access - whether it is read only, updatable, or full access

removeUser

public void removeUser(java.lang.String name)
                throws DKException
Removes a user name from the access list of this search template
Parameters:
name - userid name to be removed

removeGroup

public void removeGroup(java.lang.String name)
                 throws DKException
Removes a group name from the access list of this search template
Parameters:
name - group name to be removed

listUsers

public java.lang.String[] listUsers()
                             throws DKException
Gets a list of userids that have access to this search template
Returns:
an array of userids

listGroups

public java.lang.String[] listGroups()
                              throws DKException
Gets a list of groups that have access to this search template
Returns:
an array of group names

createQueryExpr

public DKCQExpr createQueryExpr()
                         throws DKException
Creates compound query expression objects, ready for execution by the datastore execute method.
Parameters:
serverName - the name of the destination server.
Returns:
an array of DKCQExpr objects, or null if destination server is unknown.

clearCache

public void clearCache()
                throws DKException,
                       java.lang.Exception
Clear datastore cache

EIP Java APIs

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