Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKFolderOD

java.lang.Object
  |
  +--com.ibm.mm.sdk.common.dkAbstractEntityDef
        |
        +--com.ibm.mm.sdk.common.DKFolderOD
All Implemented Interfaces:
DKConstant, DKConstantOD, dkEntityDef, DKMessageId, DKMessageIdOD, dkSearchTemplate, java.io.Serializable

public class DKFolderOD
extends dkAbstractEntityDef
implements dkSearchTemplate, DKConstantOD, DKMessageIdOD, java.io.Serializable

See Also:
Serialized Form

Fields inherited from interface com.ibm.mm.sdk.common.DKConstantOD
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKConstant
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageIdOD
DK_OD_MSG_INIT_FAILED, DK_OD_MSG_INVALID_API, DK_OD_MSG_INVALID_CHOICE, DK_OD_MSG_INVALID_DATE, DK_OD_MSG_INVALID_DECIMAL, DK_OD_MSG_INVALID_INTEGER, DK_OD_MSG_INVALID_OPERATOR, DK_OD_MSG_INVALID_RANGE, DK_OD_MSG_INVALID_SEARCH, DK_OD_MSG_INVALID_SEGMENT_NUM, DK_OD_MSG_MSGID_NOT_FOUND, DK_OD_MSG_NO_VALUES_SPECIFIED, DK_OD_MSG_ONLY_ONE_VALUE_GIVEN, DK_OD_MSG_SERVER_TIMEOUT, DK_OD_MSG_UNDEFINED, DK_OD_MSG_UNKNOWN_ERROR, DK_OD_MSG_VALUE_NOT_SPECIFIED
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
DKFolderOD(java.lang.String name, java.lang.String desc)
           
 
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
 dkAttrDef createAttr()
          Creates new dkAttrDef and returns it to caller.
 dkQuery createQuery()
          Creates a query object.
 DKCQExpr createQueryExpr()
          Creates compound query expression objects, ready for execution by the datastore execute method.
 java.lang.String critName(short fldId)
          Gets the search criteria name from persistent datastore
 void del()
          Deletes this query from the datastore.
 void del(java.lang.String name)
          Remove a search criteria from this query.
 dkAttrDef getAttr(java.lang.String attrName)
          Retrieves an attribute object from a given attribute name
 DKSearchCriteria getCriteria(int critNum)
           
 DKSearchCriteria getCriteria(java.lang.String critName)
          Retrieves a search criteria from a given name.
 DKSearchCriteria[] getCritInfo()
          Gets the list of OD folder search criteria from persistent datastore Gets the list of search criteria order arrary from persistent datastore Gets the list of criteria display order arrary from persistent datastore Gets the list of criteria sort order arrary from persistent datastore
 java.lang.String getDescription()
          Gets the search template description
 int[] getDisplayOrder()
          Gets the display order array from persistent datastore
 java.lang.String getEntityName()
          Gets the entity name associated with this query
 com.ibm.mm.sdk.internal.PFieldStructOD[] getFieldInfo()
          Gets the OD folder field information from persistent datastore
 long getFolderId()
           
 short getId()
          Gets search template id
 java.lang.String getName()
          Gets the name of this query
 short getNumCrit()
          Gets the number of search criteria from persistent datastore
 short getNumDisplayCrit()
          Gets the number of display criteria from persistent datastore
 int getNumFields()
           
 short getNumQueryCrit()
          Gets the number of queryable search criteria from persistent datastore
 short getNumSortCrit()
          Gets the number of sort criteria from persistent datastore
 short getParametricOp()
          Gets the parametric operator from persistent datastore
 DKSearchCriteria getQueryCriteria(int queryCritNum)
           
 int[] getQueryOrder()
          Gets the query order array from persistent datastore
 int[] getSortOrders()
          Gets the sort order array from persistent datastore
 java.lang.String[] listAttrNames()
          Gets a list of attributes
 dkCollection listAttrs()
          Gets a list of attributes
 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
 java.lang.String name()
           
 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 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 setFolderId(long id)
           
 void setId(short id)
          Sets search template id
 void setName(java.lang.String newName)
          Sets the name of this query
 void setParametricOp(short critOp)
          Sets the parametric operator to persistent datastore
 void setSortOrders(int[] sortOrders)
          Sets the sort order array to persistent datastore
 void update()
          Updates this query in the datastore.
 void update(DKSearchCriteria crit)
          Update this criteria
 void updateCriteria(DKSearchCriteria crit)
          Update this criteria.
 
Methods inherited from class com.ibm.mm.sdk.common.dkAbstractEntityDef
add, add, addAttr, addSubEntity, createSubEntity, datastoreName, datastoreType, del, del, deleteAttr, deleteSubEntity, getDatastore, getParentEntityName, getSubEntity, getType, hasSubEntities, isSearchable, isTextSearchable, listSubEntities, listSubEntityNames, removeAttr, removeSubEntity, retrieveAttr, retrieveSubEntity, setDatastore, setParentEntityName, setTextSearchable, setType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.mm.sdk.common.dkSearchTemplate
getDatastore, setDatastore
 

Constructor Detail

DKFolderOD

public DKFolderOD(java.lang.String name,
                  java.lang.String desc)
Method Detail

name

public java.lang.String name()

getName

public java.lang.String getName()
Description copied from interface: dkSearchTemplate
Gets the name of this query
Specified by:
getName in interface dkSearchTemplate
Overrides:
getName in class dkAbstractEntityDef
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Returns:
name of this query object

setName

public void setName(java.lang.String newName)
Description copied from interface: dkSearchTemplate
Sets the name of this query
Specified by:
setName in interface dkSearchTemplate
Overrides:
setName in class dkAbstractEntityDef
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Parameters:
name - name of this query

getDescription

public java.lang.String getDescription()
Description copied from interface: dkSearchTemplate
Gets the search template description
Specified by:
getDescription in interface dkSearchTemplate
Overrides:
getDescription in class dkAbstractEntityDef
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Returns:
template description

setDescription

public void setDescription(java.lang.String desc)
Description copied from interface: dkSearchTemplate
Sets the description for this search template
Specified by:
setDescription in interface dkSearchTemplate
Overrides:
setDescription in class dkAbstractEntityDef
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Parameters:
desc - template description

getId

public short getId()
Description copied from interface: dkSearchTemplate
Gets search template id
Specified by:
getId in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Returns:
search template id

setId

public void setId(short id)
Description copied from interface: dkSearchTemplate
Sets search template id
Specified by:
setId in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Parameters:
search - template id

getFolderId

public long getFolderId()

setFolderId

public void setFolderId(long id)

getEntityName

public java.lang.String getEntityName()
Description copied from interface: dkSearchTemplate
Gets the entity name associated with this query
Specified by:
getEntityName in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Returns:
name of entity name

setEntityName

public void setEntityName(java.lang.String entityName)
Description copied from interface: dkSearchTemplate
Sets the entity name associated with this query
Specified by:
setEntityName in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Parameters:
entityName - entity name

createQuery

public dkQuery createQuery()
                    throws DKException,
                           java.lang.Exception
Description copied from interface: dkSearchTemplate
Creates a query object.
Specified by:
createQuery in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Returns:
a query object

add

public void add()
         throws DKException
Description copied from interface: dkSearchTemplate
Adds this query to the datastore, i.e. make this query persistent.
Specified by:
add in interface dkSearchTemplate
Overrides:
add in class dkAbstractEntityDef
Following copied from class: com.ibm.mm.sdk.common.dkAbstractEntityDef
Throws:
DKException - when the subclass does not implement this method

del

public void del()
         throws DKException
Description copied from interface: dkSearchTemplate
Deletes this query from the datastore. The in-memory copy is not affected.
Specified by:
del in interface dkSearchTemplate
Overrides:
del in class dkAbstractEntityDef
Following copied from class: com.ibm.mm.sdk.common.dkAbstractEntityDef
Throws:
DKException - when the subclass does not implement this method

update

public void update()
            throws DKException
Description copied from interface: dkSearchTemplate
Updates this query in the datastore.
Specified by:
update in interface dkSearchTemplate

retrieve

public void retrieve()
              throws DKException
Description copied from interface: dkSearchTemplate
Retrieves this query from the datastore. You need to set the query name before calling this method.
Specified by:
retrieve in interface dkSearchTemplate

add

public void add(DKSearchCriteria newCrit)
         throws DKException
Description copied from interface: dkSearchTemplate
Adds a new search criteria to this query
Specified by:
add in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Parameters:
newCrit - new search criteria to be added.
Throws:
DKException - if error occurs in the server

update

public void update(DKSearchCriteria crit)
            throws DKException
Description copied from interface: dkSearchTemplate
Update this criteria
Specified by:
update in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Parameters:
crit - new search criteria values
Throws:
DKException - if error occurs in the server

del

public void del(java.lang.String name)
         throws DKException
Description copied from interface: dkSearchTemplate
Remove a search criteria from this query.
Specified by:
del in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
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
Description copied from interface: dkSearchTemplate
Retrieves a search criteria from a given name.
Specified by:
retrieve in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Parameters:
critName - search criteria name to be retrieved
Returns:
the retrieved search criteria object
Throws:
DKException - if error occurs in the server

addCriteria

public void addCriteria(DKSearchCriteria newCrit)
                 throws DKException
Description copied from interface: dkSearchTemplate
Adds a new search criteria to this query. Memory only function.
Specified by:
addCriteria in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Parameters:
newCrit - new search criteria to be added.
Throws:
DKException - if error occurs in the server

updateCriteria

public void updateCriteria(DKSearchCriteria crit)
                    throws DKException
Description copied from interface: dkSearchTemplate
Update this criteria. Memory only function
Specified by:
updateCriteria in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Parameters:
crit - new search criteria values
Throws:
DKException - if error occurs in the server

removeCriteria

public void removeCriteria(java.lang.String critName)
                    throws DKException
Description copied from interface: dkSearchTemplate
Remove a search criteria from this query. Memory only function
Specified by:
removeCriteria in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
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
Description copied from interface: dkSearchTemplate
Retrieves a search criteria from a given name.
Specified by:
getCriteria in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Parameters:
critName - search criteria name to be retrieved
Returns:
a DKSearchCriteria object representing the search criteria

getCriteria

public DKSearchCriteria getCriteria(int critNum)
                             throws DKException

getQueryCriteria

public DKSearchCriteria getQueryCriteria(int queryCritNum)
                                  throws DKException

listCriteria

public dkCollection listCriteria()
                          throws DKException
Description copied from interface: dkSearchTemplate
Gets a list of search criteria in this query
Specified by:
listCriteria in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Returns:
a collection of search criteria

listCriteriaNames

public java.lang.String[] listCriteriaNames()
                                     throws DKException
Description copied from interface: dkSearchTemplate
Gets a list of search criteria names
Specified by:
listCriteriaNames in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Returns:
a collection of search criteria names

listSearchableCriteriaNames

public java.lang.String[] listSearchableCriteriaNames()
                                               throws DKException
Description copied from interface: dkSearchTemplate
Gets a list of searchable criteria names
Specified by:
listSearchableCriteriaNames in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Returns:
a collection of searchable criteria names

listDisplayNames

public java.lang.String[] listDisplayNames()
                                    throws DKException
Description copied from interface: dkSearchTemplate
Gets a list of search results column names
Specified by:
listDisplayNames in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Returns:
a collection of search results column names

getParametricOp

public short getParametricOp()
Gets the parametric operator from persistent datastore
Specified by:
getParametricOp in interface dkSearchTemplate
Parameters:
entityName - name of entity
Returns:
the operator
Throws:
DKException - if error occurs

setParametricOp

public void setParametricOp(short critOp)
Sets the parametric operator to persistent datastore
Specified by:
setParametricOp in interface dkSearchTemplate
Parameters:
entityName - name of entity
critOp - the operator
Throws:
DKException - if error occurs

getSortOrders

public int[] getSortOrders()
Gets the sort order array from persistent datastore
Specified by:
getSortOrders in interface dkSearchTemplate
Returns:
the sort order array
Throws:
DKException - if error occurs

setSortOrders

public void setSortOrders(int[] sortOrders)
Sets the sort order array to persistent datastore
Specified by:
setSortOrders in interface dkSearchTemplate
Parameters:
the - sort order array
Throws:
DKException - if error occurs

addUser

public void addUser(java.lang.String name,
                    short access)
             throws DKException
Description copied from interface: dkSearchTemplate
Adds a new user name who can access this search template
Specified by:
addUser in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
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
Description copied from interface: dkSearchTemplate
Adds a new group name who can access this search template
Specified by:
addGroup in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
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
Description copied from interface: dkSearchTemplate
Removes a user name from the access list of this search template
Specified by:
removeUser in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Parameters:
name - userid name to be removed

removeGroup

public void removeGroup(java.lang.String name)
                 throws DKException
Description copied from interface: dkSearchTemplate
Removes a group name from the access list of this search template
Specified by:
removeGroup in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Parameters:
name - group name to be removed

listUsers

public java.lang.String[] listUsers()
                             throws DKException
Description copied from interface: dkSearchTemplate
Gets a list of userids that have access to this search template
Specified by:
listUsers in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Returns:
an array of userids

listGroups

public java.lang.String[] listGroups()
                              throws DKException
Description copied from interface: dkSearchTemplate
Gets a list of groups that have access to this search template
Specified by:
listGroups in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Returns:
an array of group names

createQueryExpr

public DKCQExpr createQueryExpr()
                         throws DKException
Description copied from interface: dkSearchTemplate
Creates compound query expression objects, ready for execution by the datastore execute method.
Specified by:
createQueryExpr in interface dkSearchTemplate
Following copied from interface: com.ibm.mm.sdk.common.dkSearchTemplate
Parameters:
serverName - the name of the destination server.
Returns:
an array of DKCQExpr objects, or null if destination server is unknown.

getNumCrit

public short getNumCrit()
                 throws DKDatastoreAccessError
Gets the number of search criteria from persistent datastore
Returns:
the number of OnDemand folder search criteria
Throws:
DKException - if error occurs

getNumFields

public int getNumFields()
                 throws DKDatastoreAccessError

getNumQueryCrit

public short getNumQueryCrit()
                      throws DKDatastoreAccessError
Gets the number of queryable search criteria from persistent datastore
Returns:
the number of OnDemand folder queryable search criteria
Throws:
DKException - if error occurs

getQueryOrder

public int[] getQueryOrder()
                    throws DKDatastoreAccessError
Gets the query order array from persistent datastore
Returns:
the query order array
Throws:
DKException - if error occurs

getNumDisplayCrit

public short getNumDisplayCrit()
                        throws DKDatastoreAccessError
Gets the number of display criteria from persistent datastore
Returns:
the number of OnDemand folder display criteria
Throws:
DKException - if error occurs

getDisplayOrder

public int[] getDisplayOrder()
                      throws DKDatastoreAccessError
Gets the display order array from persistent datastore
Returns:
the display order array
Throws:
DKException - if error occurs

getNumSortCrit

public short getNumSortCrit()
                     throws DKDatastoreAccessError
Gets the number of sort criteria from persistent datastore
Returns:
the number of OnDemand folder sort criteria
Throws:
DKException - if error occurs

critName

public java.lang.String critName(short fldId)
                          throws DKDatastoreAccessError
Gets the search criteria name from persistent datastore
Parameters:
fldId - the id of the search criteria
Returns:
the name of the search criteria
Throws:
DKException - if error occurs

getFieldInfo

public com.ibm.mm.sdk.internal.PFieldStructOD[] getFieldInfo()
                                                      throws java.lang.Exception
Gets the OD folder field information from persistent datastore
Returns:
the array of the field information for the given OD folder
Throws:
DKException - if error occurs

getCritInfo

public DKSearchCriteria[] getCritInfo()
                               throws DKDatastoreAccessError
Gets the list of OD folder search criteria from persistent datastore Gets the list of search criteria order arrary from persistent datastore Gets the list of criteria display order arrary from persistent datastore Gets the list of criteria sort order arrary from persistent datastore
Returns:
the array of search criteria for the given OD folder
Throws:
DKException - if error occurs

createAttr

public dkAttrDef createAttr()
                     throws DKException,
                            java.lang.Exception
Description copied from class: dkAbstractEntityDef
Creates new dkAttrDef and returns it to caller.

Note:DKUsageError exception thrown if method is not implemented

Overrides:
createAttr in class dkAbstractEntityDef
Following copied from class: com.ibm.mm.sdk.common.dkAbstractEntityDef
Returns:
new dkAttrDef object.
Throws:
DKException - if this entity does not have attribute

getAttr

public dkAttrDef getAttr(java.lang.String attrName)
                  throws DKException,
                         java.lang.Exception
Description copied from class: dkAbstractEntityDef
Retrieves an attribute object from a given attribute name

Note:DKUsageError exception thrown if method is not implemented

Overrides:
getAttr in class dkAbstractEntityDef
Following copied from class: com.ibm.mm.sdk.common.dkAbstractEntityDef
Parameters:
attrName - name of attribute to be retrieved
Returns:
an attribute object
Throws:
DKException - if the attribute name is not exist

listAttrs

public dkCollection listAttrs()
                       throws DKException,
                              java.lang.Exception
Description copied from class: dkAbstractEntityDef
Gets a list of attributes
Overrides:
listAttrs in class dkAbstractEntityDef
Following copied from class: com.ibm.mm.sdk.common.dkAbstractEntityDef
Returns:
a dkCollection of dkAttrDef's
Throws:
DKException - if error occurs

listAttrNames

public java.lang.String[] listAttrNames()
                                 throws DKException,
                                        java.lang.Exception
Description copied from class: dkAbstractEntityDef
Gets a list of attributes
Overrides:
listAttrNames in class dkAbstractEntityDef
Following copied from class: com.ibm.mm.sdk.common.dkAbstractEntityDef
Returns:
an array of attribute names
Throws:
DKException - if error occurs

clearCache

public void clearCache()
                throws DKException,
                       java.lang.Exception
Description copied from interface: dkSearchTemplate
Clear datastore cache
Specified by:
clearCache in interface dkSearchTemplate
Overrides:
clearCache in class dkAbstractEntityDef

EIP Java APIs

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