|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mm.beans.CMBSearchTemplate
The CMBSearchTemplate bean provides template-based search functions. Instances of CMBSearchTemplate are obtained from the CMBSchemaManagement bean. Search criteria can then be filled in and a search performed using this bean.
Summary of properties and events:
imported properties traceEnabled, defaulting off, will not veto exported properties none standalone properties asynchSearch: default is on, search is asynchronous timeout: default is off, no query timeout. skipServer: default is CMB_ST_SKIP_WITH_PROMPT textSingleCharWildcard: default is "?" textMultiCharsWildcard: default is "*" parmFieldWildcard: default is "%" listener to events CMBConnectionReplyEvent - to get connection handle CMBSearchRequestEvent - to perform search functions PropertyChangeEvent - to import traceEnabled source of events CMBSearchReplyEvent - to send search results to listeners CMBExceptionEvent - to post an exception CMBTraceEvent - to add info to the trace log
CMBConnection
,
CMBSchemaManagement
, Serialized FormConstructor Summary | |
CMBSearchTemplate()
Creates a new instance of CMBSearchTemplate object with default values. |
Method Summary | |
void |
addCMBExceptionListener(CMBExceptionListener listener)
The CMBExceptionEvent registration method. |
void |
addCMBSearchReplyListener(CMBSearchReplyListener aListener)
The CMBSearchReplyEvent registration method. |
void |
addCMBTraceListener(CMBTraceListener listener)
The CMBTraceEvent registration method. |
void |
addSTCriterion(CMBSTCriterion newCrit,
boolean isQueryable,
boolean isDisplayable)
Adds new CMBSTCriterion object to this search template |
void |
cancelQuery()
Cancels the current requested query. |
void |
clearQuery()
Clears the current query values. |
java.util.Vector |
getAllCriteria()
Gets a list of all criteria, both search criteria and display criteria. |
CMBConnection |
getConnection()
Gets the connection bean reference. |
short |
getCriterionDefaultOp(java.lang.String critName)
Gets the search criterion's default search operator. |
java.lang.String[] |
getCriterionDefaultValues(java.lang.String critName)
Gets a list of default search values of a given search criterion name. |
java.lang.String[] |
getCriterionDisplayName()
Gets a list of display attribute names. |
java.lang.String |
getCriterionDisplayName(int index)
Gets the index for a criterion's display name. |
java.lang.String |
getCriterionDisplayName(java.lang.String critName)
Gets the display name for a search criterion. |
java.lang.String[] |
getCriterionName()
Gets a list of criteria names including search and display criteria. |
java.lang.String |
getCriterionName(int index)
Gets the name of search criterion at index. |
java.lang.String[] |
getCriterionPredefinedValues(java.lang.String critName)
Gets the list of predefined values. |
short[] |
getCriterionValidOps(java.lang.String critName)
Gets the list of valid search operators. |
java.util.Vector |
getDisplayCriteria()
Gets a list of ordered display criteria. |
CMBSTCriterion |
getDisplayCriterion(int index)
Gets a display criteria at index |
java.lang.String |
getEntityName()
Gets the name of the federated entity associated with this search template. |
CMBExceptionEvent |
getExceptionEvent()
To support VisualCafe 3.0 "Add Interaction..." |
java.lang.String |
getItemAttrName()
Gets the default attribute name to be use as the item name |
int |
getMaxResults()
Gets the maximum number of hits returned from each query. |
java.lang.String |
getName()
Gets the search template name. |
java.lang.String |
getParmFieldWildcard()
Gets the wildcard character for parametric search. |
java.lang.Object |
getResults()
Gets the collection of result items. |
java.util.Vector |
getSearchCriteria()
Gets a list of search criteria in order. |
CMBSTCriterion[] |
getSearchCriterion()
Gets a list of search criteria in order. |
CMBSTCriterion |
getSearchCriterion(int index)
Gets a search criteria at index. |
short |
getSearchCriterionOperator(java.lang.String critName)
Gets the search operator. |
java.lang.String[] |
getSearchCriterionValues(java.lang.String critName)
Gets the search criteria values. |
CMBSearchReplyEvent |
getSearchReplyEvent()
To support VisualCafe 3.0 "Add Interaction..." |
short |
getSkipServer()
Gets the skipServer property. |
java.lang.String |
getTextMultiCharsWildcard()
Gets the multiple characters wildcard for text search. |
java.lang.String |
getTextSingleCharWildcard()
Gets the single character wildcard for text search. |
int |
getTimeout()
Gets the search timeout. |
CMBTraceEvent |
getTraceEvent()
To support VisualCafe 3.0 "Add Interaction..." |
boolean |
isAsynchSearch()
Checks to see if the query synchronous or asynchronous. |
boolean |
isTraceEnabled()
Checks to see if trace is enabled. |
java.lang.String[] |
listSearchCriteriaNames()
Gets a list of criteria names including searchable and displayable. |
java.lang.String[] |
listServersSkipped()
Gets a list of skipped server names for the previous search. |
void |
onCMBConnectionReply(CMBConnectionReplyEvent evt)
Implementation of the connection reply service method. |
void |
onCMBSearchRequest(CMBSearchRequestEvent evt)
Implementation of the search request service method. |
void |
removeCMBExceptionListener(CMBExceptionListener listener)
The CMBExceptionEvent unregistration method. |
void |
removeCMBSearchReplyListener(CMBSearchReplyListener aListener)
The CMBSearchReplyEvent unregistration method. |
void |
removeCMBTraceListener(CMBTraceListener listener)
The CMBTraceEvent unregistration method. |
void |
removeSTCriterion(java.lang.String critName)
Removes a CMBSTCriterion object from this search template. |
void |
runQuery()
Starts a search. |
CMBSearchResults |
runQueryAndGetResults()
Starts a search - for use in a program and JSP. |
CMBResultSetCursor |
runQueryWithCursor()
Starts a search with cursor. |
void |
setAsynchSearch(boolean asynch)
Sets the query option to be either synchronous or asynchronous. |
void |
setConnection(CMBConnection connObj)
Sets the connection bean reference. |
void |
setEntityName(java.lang.String name)
Sets the federated entity associated with this search template. |
void |
setMaxResults(int max)
Sets the maximum number of hits returned from each query. |
void |
setName(java.lang.String name)
Sets the search template name. |
void |
setParmFieldWildcard(java.lang.String wildcard)
Sets the wildcard character for parametric search. |
void |
setSearchCriterion(java.lang.String critName,
short searchOp,
java.lang.String[] values)
Sets the values for the search criteria. |
void |
setSkipServer(short option)
Sets the skipServer property. |
void |
setTextMultiCharsWildcard(java.lang.String wildcard)
Sets multiple characters wildcard for text search. |
void |
setTextSingleCharWildcard(java.lang.String wildcard)
Sets single character wildcard for text search. |
void |
setTimeout(int timeout)
Sets the search timeout. |
void |
setTraceEnabled(boolean enabled)
Sets to cancel the current query. |
void |
skipServer(java.lang.String serverName)
Skips the given server and continues with the search. |
java.lang.String |
toString()
Return a meaningful string representation of the bean |
void |
vetoableChange(java.beans.PropertyChangeEvent evt)
Checks if a property allows being changed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CMBSearchTemplate()
Method Detail |
public void setConnection(CMBConnection connObj)
connObj
- the reference to the CMBConnection object.public CMBConnection getConnection()
public java.lang.String getName()
public void setName(java.lang.String name)
name
- the name of the search templatepublic void setEntityName(java.lang.String name) throws CMBException
name
- federated entity nameCMBException
- when error occurs in the serverpublic java.lang.String getEntityName() throws CMBException
CMBException
- when error occurs at the content serverpublic boolean isAsynchSearch()
public void setAsynchSearch(boolean asynch)
asynch
- if this value is true then the query will be done
asynchronously, and synchronously otherwise.public java.lang.String getTextSingleCharWildcard()
public void setTextSingleCharWildcard(java.lang.String wildcard)
wildcard
- single character wildcardDKSearchTemplateFed
public java.lang.String getTextMultiCharsWildcard()
public void setTextMultiCharsWildcard(java.lang.String wildcard)
wildcard
- multiple characters wildcardDKSearchTemplateFed
public java.lang.String getParmFieldWildcard()
public void setParmFieldWildcard(java.lang.String wildcard)
wildcard
- parametric field wildcardDKSearchTemplateFed
public boolean isTraceEnabled()
public void setTraceEnabled(boolean enabled)
cancelled
- if true, cancel the current querypublic int getTimeout()
public void setTimeout(int timeout)
timeout
- maximum search time outpublic short getSkipServer()
public void setSkipServer(short option)
option
- skip server valuepublic int getMaxResults()
public void setMaxResults(int max)
Note: if you are running your query against Extended Search servers, you must set this maximum value in order to get reasonable query performance.
max
- maximum of number hits.public void skipServer(java.lang.String serverName)
serverName
- name of the server to skippublic java.lang.String[] listServersSkipped()
public void runQuery() throws CMBConnectFailedException, CMBNoConnectionException, CMBInvalidQueryException, CMBException
CMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBConnectFailedException
- if
CMBInvalidQueryException
- if this there is a malformed search operator/values.CMBException
- if an error occurred at the server while logging on.
Call CMBException.getErrorData() to get the original exception object.public CMBResultSetCursor runQueryWithCursor() throws CMBConnectFailedException, CMBNoConnectionException, CMBInvalidQueryException, CMBException
CMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBConnectFailedException
- if
CMBInvalidQueryException
- if this there is a malformed search operator/values.CMBException
- if an error occurred at the server while logging on.
Call CMBException.getErrorData() to get the original exception object.public CMBSearchResults runQueryAndGetResults() throws CMBConnectFailedException, CMBNoConnectionException, CMBInvalidQueryException, CMBException
CMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBConnectFailedException
- if
CMBInvalidQueryException
- if this there is a malformed search operator/values.CMBException
- if an error occurred at the server while logging on.
Call CMBException.getErrorData() to get the original exception object.public void clearQuery()
public void cancelQuery() throws CMBException, CMBNoConnectionException
CMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- if an error occurred at the server while logging on.
Call CMBException.getErrorData() to get the original exception object.public java.lang.Object getResults()
CMBSearchResults
public java.lang.String[] getSearchCriterionValues(java.lang.String critName) throws CMBNoConnectionException, CMBException
critName
- name of search attributeCMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public short getSearchCriterionOperator(java.lang.String critName) throws CMBNoConnectionException, CMBException
critName
- name of search attributeCMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public void setSearchCriterion(java.lang.String critName, short searchOp, java.lang.String[] values) throws CMBNoConnectionException, CMBException, java.lang.IllegalArgumentException
critName
- name of search attributesearchOp
- search operatorvalues
- an array of one or more search valuesjava.lang.IllegalArgumentException
- if the search criterion name is invalid.CMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public java.lang.String[] getCriterionName() throws CMBNoConnectionException, CMBException
CMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public java.lang.String[] listSearchCriteriaNames() throws CMBNoConnectionException, CMBException
CMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public java.lang.String getCriterionName(int index) throws java.lang.ArrayIndexOutOfBoundsException, CMBNoConnectionException, CMBException
index
- index of search ordersCMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
java.lang.ArrayIndexOutOfBoundsException
- if index is invalidpublic java.lang.String[] getCriterionDisplayName() throws CMBNoConnectionException, CMBException
CMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public java.lang.String getCriterionDisplayName(int index) throws java.lang.ArrayIndexOutOfBoundsException, CMBNoConnectionException, CMBException
index
- index of display ordersCMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public java.lang.String getCriterionDisplayName(java.lang.String critName) throws CMBNoConnectionException, CMBException
critName
- criterion nameCMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public short getCriterionDefaultOp(java.lang.String critName) throws CMBNoConnectionException, CMBException
critName
- name of search criterionCMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public short[] getCriterionValidOps(java.lang.String critName) throws CMBNoConnectionException, CMBException
critName
- name of search criterionCMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public java.lang.String[] getCriterionDefaultValues(java.lang.String critName) throws CMBNoConnectionException, CMBException
critName
- name of search criterionCMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public java.lang.String[] getCriterionPredefinedValues(java.lang.String critName) throws CMBNoConnectionException, CMBException
critName
- name of search criterionCMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public java.util.Vector getAllCriteria() throws CMBNoConnectionException, CMBException
CMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public java.util.Vector getSearchCriteria() throws CMBNoConnectionException, CMBException
CMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public java.util.Vector getDisplayCriteria() throws CMBNoConnectionException, CMBException
CMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public CMBSTCriterion[] getSearchCriterion() throws CMBNoConnectionException, CMBException
CMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public CMBSTCriterion getSearchCriterion(int index) throws java.lang.ArrayIndexOutOfBoundsException, CMBNoConnectionException, CMBException
index
- search order index - zero-basedCMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.java.lang.ArrayIndexOutOfBoundsException
- if index i is invalidCMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public CMBSTCriterion getDisplayCriterion(int index) throws java.lang.ArrayIndexOutOfBoundsException, CMBNoConnectionException, CMBException
index
- display order indexCMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.java.lang.ArrayIndexOutOfBoundsException
- if index is invalidCMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public void addSTCriterion(CMBSTCriterion newCrit, boolean isQueryable, boolean isDisplayable) throws CMBNoConnectionException, CMBException
newCrit
- new search criterion objectCMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public void removeSTCriterion(java.lang.String critName) throws CMBNoConnectionException, CMBException
critName
- search criterion name to be removed.CMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public void onCMBConnectionReply(CMBConnectionReplyEvent evt)
onCMBConnectionReply
in interface CMBConnectionReplyListener
evt
- a CMBConnectionReplyEventpublic void onCMBSearchRequest(CMBSearchRequestEvent evt)
onCMBSearchRequest
in interface CMBSearchRequestListener
evt
- a CMBSearchRequestEventpublic void addCMBSearchReplyListener(CMBSearchReplyListener aListener)
aListener
- a CMBSearchReplyListener object to be addedpublic void removeCMBSearchReplyListener(CMBSearchReplyListener aListener)
aListener
- a listener to be unregisteredpublic void addCMBExceptionListener(CMBExceptionListener listener)
listener
- listener to be registeredpublic void removeCMBExceptionListener(CMBExceptionListener listener)
listener
- listener to be unregisteredpublic void addCMBTraceListener(CMBTraceListener listener)
listener
- listener to be registeredpublic void removeCMBTraceListener(CMBTraceListener listener)
listener
- listener to be unregisteredpublic void vetoableChange(java.beans.PropertyChangeEvent evt) throws java.beans.PropertyVetoException
vetoableChange
in interface java.beans.VetoableChangeListener
evt
- a property changed eventjava.beans.PropertyVetoException
- if property value is invalidpublic CMBSearchReplyEvent getSearchReplyEvent()
public CMBTraceEvent getTraceEvent()
public CMBExceptionEvent getExceptionEvent()
public java.lang.String getItemAttrName() throws CMBNoConnectionException, CMBException
CMBNoConnectionException
- if there is no CMBConnection bean set.
Call setConnection() before calling any methods in this bean.CMBException
- will be thrown for the following errorCode form CMBException.getErrorCode():
public java.lang.String toString()
toString
in class java.lang.Object
|
EIP JavaBeans | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |