Enterprise Information Portal APIs

com.ibm.mm.beans
Class CMBSTCriterion

java.lang.Object
  |
  +--com.ibm.mm.beans.CMBSTCriterion
All Implemented Interfaces:
java.io.Serializable

public class CMBSTCriterion
extends java.lang.Object
implements java.io.Serializable

This is a helper class for CMBSearchTemplate bean. It represents information for a particular search criterion.

Since:
6.1
See Also:
CMBSearchTemplate, Serialized Form

Field Summary
static int CMB_CRIT_TYPE_PARAMETRIC
          Search criterion type: parametric
static int CMB_CRIT_TYPE_TEXT
          Search criterion type: text
 
Constructor Summary
CMBSTCriterion()
          Construct a new default search criterion object
 
Method Summary
 void clearSearchData()
          Clears current search value and operator for this criterion.
 java.lang.String getAttrName()
          Gets the associated attribute name
 short getAttrType()
          Gets the associated attribute type
 short getCriteriaPosition()
          Gets the order of this search criterion to be displayed in the search template.
 short getDefaultOperator()
          Gets the default search operator.
 java.lang.String[] getDefaultValue()
          Gets the default search value
 java.lang.String getDefaultValue(int index)
          Gets the default search value
 java.lang.String getDisplayName()
          Gets the search criterion display name
 short getDisplayPosition()
          Gets the column display order within the search results.
 short getDisplayWidth()
          Gets the display column initial width
 java.lang.String getEntityName()
          Gets the associated entity name
 java.lang.String getName()
          Gets the name of this search criterion
 short getOperator()
          Gets the search operator for this criterion
 java.lang.String[] getPredefinedValues()
          Gets the list of predefined values
 java.lang.String getPredefinedValues(int index)
          Gets the predefined value for a given index
 java.lang.String getTemplateName()
          Gets the search template name
 int getType()
          Gets search criterion type
 short[] getValidOperators()
          Gets the list of valid search operators
 java.lang.String getValue()
          Gets the search value for this search criterion
 java.lang.String[] getValues()
          Gets the list of search values for this search criterion
 java.lang.String getValues(int index)
          Gets the search value for a given index
 boolean isDisplayable()
          Checks whether this criterion is displayable in the result set
 boolean isQueryable()
          Checks whether this criterion is queryable
 void setAttrName(java.lang.String attrName)
          Sets the associated attribute name
 void setAttrType(short attrType)
          Sets the associated attribute type
 void setCriteriaPosition(short order)
          Sets the order of this search criterion to be displayed in the search template.
 void setDefaultOperator(short op)
          Sets the default search operator
 void setDefaultValue(java.lang.String[] value)
          Sets the default search value for this criteria
 void setDisplayable(boolean displayable)
          Sets whether this criterion is displayable in the result set
 void setDisplayName(java.lang.String dispName)
          Sets display name in result list for this search criterion
 void setDisplayPosition(short order)
          Sets the column display order within the search results.
 void setDisplayWidth(short width)
          Sets the display column initial width
 void setName(java.lang.String name)
          Sets the name of this search criterion
 void setOperator(short op)
          Set the search operator for this criterion
 void setQueryable(boolean queryable)
          Sets whether this criterion is queryable
 void setTemplateName(java.lang.String stName)
          Sets the search template name for this search criterion
 void setType(int type)
          Sets search criterion type
 void setValidOperators(short[] ops)
          Sets the valid set of search operators for this criterion
 void setValue(java.lang.String value)
          Sets the search value for this search criterion
 void setValues(java.lang.String[] values)
          Sets the search values for this criterion
 java.lang.String toString()
          Return a meaningful string representation of the object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CMB_CRIT_TYPE_PARAMETRIC

public static final int CMB_CRIT_TYPE_PARAMETRIC
Search criterion type: parametric

CMB_CRIT_TYPE_TEXT

public static final int CMB_CRIT_TYPE_TEXT
Search criterion type: text
Constructor Detail

CMBSTCriterion

public CMBSTCriterion()
Construct a new default search criterion object
Method Detail

getName

public java.lang.String getName()
Gets the name of this search criterion
Returns:
search criterion name

setName

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

getAttrName

public java.lang.String getAttrName()
Gets the associated attribute name
Returns:
attribute name

setAttrName

public void setAttrName(java.lang.String attrName)
Sets the associated attribute name
Parameters:
attrName - attribute name

getAttrType

public short getAttrType()
Gets the associated attribute type
Returns:
attribute type

setAttrType

public void setAttrType(short attrType)
Sets the associated attribute type
Parameters:
attrName - attribute type

getEntityName

public java.lang.String getEntityName()
Gets the associated entity name
Returns:
entity name

getType

public int getType()
Gets search criterion type
Returns:
either CMB_CRIT_TYPE_PARAMETRIC or CMB_CRIT_TYPE_TEXT

setType

public void setType(int type)
Sets search criterion type
Parameters:
type - either CMB_CRIT_TYPE_PARAMETRIC or CMB_CRIT_TYPE_TEXT

getDisplayName

public java.lang.String getDisplayName()
Gets the search criterion display name
Returns:
column display name in result list

setDisplayName

public void setDisplayName(java.lang.String dispName)
Sets display name in result list for this search criterion
Parameters:
dispName - search criterion display name

getDisplayWidth

public short getDisplayWidth()
Gets the display column initial width
Returns:
display width

setDisplayWidth

public void setDisplayWidth(short width)
Sets the display column initial width
Parameters:
display - width

getTemplateName

public java.lang.String getTemplateName()
Gets the search template name
Returns:
search template name

setTemplateName

public void setTemplateName(java.lang.String stName)
Sets the search template name for this search criterion
Parameters:
stName - search template name

getDefaultValue

public java.lang.String[] getDefaultValue()
Gets the default search value
Returns:
default value for this search criteria

getDefaultValue

public java.lang.String getDefaultValue(int index)
                                 throws java.lang.ArrayIndexOutOfBoundsException
Gets the default search value
Returns:
default value for this search criteria

setDefaultValue

public void setDefaultValue(java.lang.String[] value)
Sets the default search value for this criteria
Parameters:
value - new default search value
Throws:
if - new value is null or invalid

getPredefinedValues

public java.lang.String[] getPredefinedValues()
Gets the list of predefined values
Returns:
an array of predefined values

getPredefinedValues

public java.lang.String getPredefinedValues(int index)
Gets the predefined value for a given index
Parameters:
index - predefined value index
Returns:
predefined value
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index is out of bound

getDefaultOperator

public short getDefaultOperator()
Gets the default search operator. This is the default display operator on the client.
Returns:
default search operator

setDefaultOperator

public void setDefaultOperator(short op)
Sets the default search operator
Parameters:
op - default search operator

getValidOperators

public short[] getValidOperators()
Gets the list of valid search operators
Returns:
an array of valid search operators

setValidOperators

public void setValidOperators(short[] ops)
Sets the valid set of search operators for this criterion
Parameters:
ops - an array of valid search operators

getOperator

public short getOperator()
Gets the search operator for this criterion
Returns:
search operator

setOperator

public void setOperator(short op)
Set the search operator for this criterion
Parameters:
op - search operator

getValue

public java.lang.String getValue()
Gets the search value for this search criterion
Parameters:
search - value

setValue

public void setValue(java.lang.String value)
              throws java.lang.IllegalArgumentException
Sets the search value for this search criterion
Parameters:
value - new search value
Throws:
java.lang.IllegalArgumentException - if value is null.

getValues

public java.lang.String[] getValues()
Gets the list of search values for this search criterion
Returns:
an array of search values

getValues

public java.lang.String getValues(int index)
Gets the search value for a given index
Parameters:
index - search value index
Returns:
search value
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index is out of bound

setValues

public void setValues(java.lang.String[] values)
               throws java.lang.IllegalArgumentException
Sets the search values for this criterion
Parameters:
values - search values
Throws:
java.lang.IllegalArgumentException - if values is null or empty array.

setQueryable

public void setQueryable(boolean queryable)
Sets whether this criterion is queryable
Parameters:
queryable - true if this criterion will be participate in the formulation of the query, false otherwise

isQueryable

public boolean isQueryable()
Checks whether this criterion is queryable
Returns:
true if this criterion will be participate in the formulation of the query, false otherwise

setDisplayable

public void setDisplayable(boolean displayable)
Sets whether this criterion is displayable in the result set
Parameters:
displayable - true if column for display, false otherwise

isDisplayable

public boolean isDisplayable()
Checks whether this criterion is displayable in the result set
Returns:
true if this criterion will be displayed as column in result set, false otherwise.

getCriteriaPosition

public short getCriteriaPosition()
Gets the order of this search criterion to be displayed in the search template. This display order also will be used to formulate the query order of this criterion.
Returns:
display order within search template

setCriteriaPosition

public void setCriteriaPosition(short order)
Sets the order of this search criterion to be displayed in the search template. This display order also will be used to formulate the query order of this criterion.
Parameters:
order - display order within search template

getDisplayPosition

public short getDisplayPosition()
Gets the column display order within the search results.
Returns:
order display order, 0 based

setDisplayPosition

public void setDisplayPosition(short order)
Sets the column display order within the search results.
Parameters:
order - display order, 0 based

clearSearchData

public void clearSearchData()
Clears current search value and operator for this criterion.

toString

public java.lang.String toString()
Return a meaningful string representation of the object
Overrides:
toString in class java.lang.Object

EIP JavaBeans

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