Content Manager OnDemand V7 WEK APIs

com.ibm.edms.od
Class ODCriteria

java.lang.Object
  |
  +--com.ibm.edms.od.ODCriteria
All Implemented Interfaces:
java.io.Serializable

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

A class representing a OnDemand folder criteria. The criteria class contains methods to set a search operator and search values.

(c) Copyright IBM Corp. 1993, 2003. All Rights Reserved

See Also:
Serialized Form

Constructor Summary
protected ODCriteria(java.lang.String name)
           
 
Method Summary
 boolean getAscending()
          Get the search type of the current criteria.
 java.lang.String[] getDBFields(java.lang.String agName)
          Get the database field name(s) for this folder criteria.
 java.lang.String getDefaultFmt()
          Get the default format for this criteria.
 char getDefaultFmtQual()
          Get the default format qualifier for this criteria.
 java.lang.String getDisplayFmt()
          Get the display format for this criteria.
 char getDisplayFmtQual()
          Get the display format qualifier for this criteria.
 char getFieldQualifier()
          Get the criteria qualifier.
 java.lang.String[] getFixedValues()
          Get the valid search values for this criteria.
 int getMaxDisplayChars()
          Get the maximum display characters.
 int getMaxEntryChars()
          Get the maximum entry characters.
 java.lang.String getName()
          Get the name of the criteria.
 int getOperand()
          Get the current search operand.
 java.lang.String[] getSearchValues()
          Get the current search values.
 int getSortOrder()
          Get the search sort value for the current criteria.
 char getSubType()
          Get the subtype of the criteria.
 char getType()
          Get the type of criteria.
 int[] getValidOperands()
          Get the valid operands.
 java.util.Vector getValidValues()
          Deprecated.  
 java.util.Vector getValues()
          Get the current search values.
 boolean isDefaultValueAvailable()
          Determine whether a default value is available for this criteria.
 boolean isDefaultValueFixed()
          Determine whether the default value for this criteria is fixed (cannot be changed).
 boolean isRequired()
          Determine whether a value is required for this criteria when searching the folder.
 void setAscending(boolean value)
          Set the search type for the current criteria.
 void setOperand(int op)
          Set the current search operand.
 void setSearchValue(java.lang.String v)
          Set this criteria's search value.
 void setSearchValues(java.lang.String v1, java.lang.String v2)
          Set this criteria's search values.
 void setSortOrder(int value)
          Set the search sort value for the current criteria.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ODCriteria

protected ODCriteria(java.lang.String name)
              throws java.lang.Exception
Method Detail

setSortOrder

public void setSortOrder(int value)
Set the search sort value for the current criteria. Integer values between 0 and 32, 0 being disabled, don't sort with this value, and 1 to 32 being the order you want to sort with in regard to this current criteria.

Returns:
void

getSortOrder

public int getSortOrder()
Get the search sort value for the current criteria. Values returned are integers between 0 and 32.

Returns:
integer.

setAscending

public void setAscending(boolean value)
Set the search type for the current criteria. Value is true for ascending or false for descending.

Returns:
void

getAscending

public boolean getAscending()
Get the search type of the current criteria. Value returned is true or false, true being ascending, false being descending.

Returns:
true or false.

getName

public java.lang.String getName()
Get the name of the criteria.

Returns:
The criteria name.

getType

public char getType()
Get the type of criteria. All of the criteria types are represented in ODConstant.

Returns:
The criteria type.
See Also:
ODConstant.InputTypeNormal, ODConstant.InputTypeChoice, ODConstant.InputTypeSegment, ODConstant.InputTypeTextSearch, ODConstant.InputTypeNoteTextSearch, ODConstant.InputTypeNoteColor

getSubType

public char getSubType()
Get the subtype of the criteria. All of the criteria subtypes are represented in ODConstant.

Returns:
The criteria subtype.
See Also:
ODConstant.OD_FLD_ANN_TEXT_SEARCH, ODConstant.OD_FLD_BIGINT, ODConstant.OD_FLD_ANN_COLOR_SEARCH, ODConstant.OD_FLD_DECIMAL, ODConstant.OD_FLD_APPLGRP, ODConstant.OD_FLD_INTEGER, ODConstant.OD_FLD_SMALLINT, ODConstant.OD_FLD_SEGMENT, ODConstant.OD_FLD_STRING, ODConstant.OD_FLD_TEXT_SEARCH, ODConstant.OD_FLD_VOID

getFieldQualifier

public char getFieldQualifier()
Get the criteria qualifier. All of the criteria qualifiers are represented in ODConstant.

Returns:
The criteria qualifier.
See Also:
ODConstant.OD_FLDQ_BASE, ODConstant.OD_FLDQ_DATETIME, ODConstant.OD_FLDQ_DATE, ODConstant.OD_FLDQ_TIME, ODConstant.OD_FLDQ_TZ_DATETIME

getValidOperands

public int[] getValidOperands()
Get the valid operands. All of the operand types are represented in ODConstant.

Returns:
An integer array containing the valid operands for this criteria.
See Also:
ODConstant.OPEqual, ODConstant.OPNotEqual, ODConstant.OPLessThan, ODConstant.OPLessThanEqual, ODConstant.OPGreaterThan, ODConstant.OPGreaterThanEqual, ODConstant.OPIn, ODConstant.OPNotIn, ODConstant.OPLike, ODConstant.OPNotLike, ODConstant.OPBetween, ODConstant.OPNotBetween

getOperand

public int getOperand()
Get the current search operand. All of the operand types are represented in ODConstant.

Returns:
The current search operand.
See Also:
ODConstant.OPEqual, ODConstant.OPNotEqual, ODConstant.OPLessThan, ODConstant.OPLessThanEqual, ODConstant.OPGreaterThan, ODConstant.OPGreaterThanEqual, ODConstant.OPIn, ODConstant.OPNotIn, ODConstant.OPLike, ODConstant.OPNotLike, ODConstant.OPBetween, ODConstant.OPNotBetween

setOperand

public void setOperand(int op)
                throws ODException
Set the current search operand. All of the operand types are represented in ODConstant.

Parameters:
op - Operand to use for this criteria when performing a search.
Throws:
ODException
See Also:
ODConstant.OPEqual, ODConstant.OPNotEqual, ODConstant.OPLessThan, ODConstant.OPLessThanEqual, ODConstant.OPGreaterThan, ODConstant.OPGreaterThanEqual, ODConstant.OPIn, ODConstant.OPNotIn, ODConstant.OPLike, ODConstant.OPNotLike, ODConstant.OPBetween, ODConstant.OPNotBetween

getValues

public java.util.Vector getValues()
Get the current search values. Immediately after opening a folder this vector contains any default search values specified by the OnDemand administrator.

Returns:
Vector containing current set of search values. The vector will contain multiple values for the between and not between search operators.

getSearchValues

public java.lang.String[] getSearchValues()
Get the current search values. Immediately after opening a folder this vector contains any default search values specified by the OnDemand administrator.

Returns:
String[] containing current set of search values.

setSearchValue

public void setSearchValue(java.lang.String v)
                    throws ODException
Set this criteria's search value. This method should be used if the search operator requires one search value.

Parameters:
v - Search value.
Throws:
ODException

setSearchValues

public void setSearchValues(java.lang.String v1,
                            java.lang.String v2)
                     throws ODException
Set this criteria's search values. This method is used when the search operand requires more than one search value, i.e., the between operator.

Parameters:
v1 - Search value number one.
v2 - Search value number two.
Throws:
ODException

getValidValues

public java.util.Vector getValidValues()
Deprecated.  

Get the valid search values for this criteria. This method is only valid if this criteria has a fixed set of search values.

Returns:
Possible search values.
See Also:
getFixedValues()

getFixedValues

public java.lang.String[] getFixedValues()
Get the valid search values for this criteria. This method is only valid if this criteria has a fixed set of search values.

Returns:
String[] containing possible search values.

getDisplayFmt

public java.lang.String getDisplayFmt()
Get the display format for this criteria. For date/time fields this value represents the format the database values should be displayed in as set by the OD administrator.

Returns:
The display format.

getDisplayFmtQual

public char getDisplayFmtQual()
Get the display format qualifier for this criteria. For date/time fields this value represents the format qualifier for the display format.

Returns:
The display format qualifier.

getDefaultFmt

public java.lang.String getDefaultFmt()
Get the default format for this criteria. For date/time fields this value represents the format values should be specified in when performing searches.

Returns:
The default format.

getDefaultFmtQual

public char getDefaultFmtQual()
Get the default format qualifier for this criteria. For date/time fields this value represents the format qualifier for the default format.

Returns:
The default format qualifier.

isRequired

public boolean isRequired()
Determine whether a value is required for this criteria when searching the folder.

Returns:
true/false

isDefaultValueAvailable

public boolean isDefaultValueAvailable()
Determine whether a default value is available for this criteria.

Returns:
true/false

isDefaultValueFixed

public boolean isDefaultValueFixed()
Determine whether the default value for this criteria is fixed (cannot be changed).

Returns:
true/false

getMaxEntryChars

public int getMaxEntryChars()
Get the maximum entry characters.

Returns:
The maximum number of characters that can be used for this criteria during a search operation.

getMaxDisplayChars

public int getMaxDisplayChars()
Get the maximum display characters.

Returns:
The maximum number of characters that will be present in a display value for this criteria after a search operation.

getDBFields

public java.lang.String[] getDBFields(java.lang.String agName)
Get the database field name(s) for this folder criteria. This method will return the database field name(s) for this criteria object. Only those db field names for the specified application group will be returned. If the String[] returned contains more than one element it means that the folder field is mapped to two application group fields. If the String[] returned contains one element and that element is empty, it means that the folder field is not mapped to any application group field.

Parameters:
agName - The application group for which the db fields are required.
Returns:
String array containing the database field name(s).

CM OnDemand V7 WEK Java APIs

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