jet.formula
Class ParamDesc

java.lang.Object
  extended by jet.formula.ParamDesc

public class ParamDesc
extends java.lang.Object


Field Summary
static int ADOPT_DIRECTLY
           
static int AUTO
           
static int dateStyle
          The default date format of the Date type and DateTime type parameter..
static java.util.Locale defaultLocale
          the default locale.
static int GROUPSORT
          This type indicates that the current parameter is used with Dynamic Group/Sort feature.
static int IMPORT
           
 java.lang.String inValue
          The default value of parameter despite of the locale and format.
 boolean isStringNull
           
 java.lang.String name
          The name of parameter.
static int NORMAL
          This type indicates that the current parameter does not associate with a column list.
 java.lang.String promptText
          The prompt of parameter.
static int PSEUDO
          This type indicates that the current parameter is used with BindParameter feature.
static int SORTORDER
          This type indicates that the current parameter is used with SortOrderByParameter feature.
 java.lang.String stringFormat
           
static int timeStyle
          The default time format of the Time type and DateTime type parameter.
 java.lang.String type
          The type of parameter.
static java.lang.String TYPE_BOOLEAN
          The constant of boolean type of parameter
static java.lang.String TYPE_CURRENCY
          The constant of currency type of parameter
static java.lang.String TYPE_DATE
          The constant of date type of parameter
static java.lang.String TYPE_DATETIME
          The constant of DateTime type of parameter
static java.lang.String TYPE_INTEGER
          The constant of integer type of parameter
static java.lang.String TYPE_NUMBER
          The constant of number type of parameter
static java.lang.String TYPE_PARAMETER
          The constant of Parameter type of parameter, support to nested parameter
static java.lang.String TYPE_PARAMETER_SEPARATOR1
           
static java.lang.String TYPE_PARAMETER_SEPARATOR2
           
static java.lang.String TYPE_STRING
          The constant of string type of parameter
static java.lang.String TYPE_TIME
          The constant of time type of parameter
static int USE_DEFAULT
           
 java.lang.String value
          The default value of parameter, care of display's locale and format.
static int WARN
           
 
Constructor Summary
ParamDesc()
           
ParamDesc(java.lang.String name, java.lang.String type, java.lang.String prompt, java.util.Vector vStrLimit, java.util.Vector vStrValue, java.lang.String strFormat, int operator, int index)
          Treate a parameter
ParamDesc(java.lang.String name, java.lang.String type, java.lang.String prompt, java.util.Vector vStrLimit, java.util.Vector vStrValue, java.lang.String strFormat, int operator, int index, boolean isMultipleValue)
          Treate a parameter
ParamDesc(java.lang.String strName, java.lang.String strType, java.lang.String prompt, java.util.Vector vStrLimit, java.util.Vector vStrValue, java.lang.String strFormat, int operator, int intdex, int isColumn)
          Construct a ParamDesc which not be parsed.
ParamDesc(java.lang.String strName, java.lang.String strType, java.lang.String prompt, java.util.Vector vStrLimit, java.util.Vector vStrValue, java.lang.String strFormat, int operator, int intdex, int isColumn, boolean isMultipleValue)
          Construct a ParamDesc which not be parsed.
ParamDesc(java.lang.String strName, java.lang.String strType, java.lang.String prompt, java.util.Vector vStrLimit, java.util.Vector vStrValue, java.lang.String strFormat, int operator, int intdex, int isColumn, java.lang.String column, java.util.Vector columns, java.util.Vector vShowValue, java.lang.String binding)
          Construct a ParamDesc which not be parsed.
ParamDesc(java.lang.String strName, java.lang.String strType, java.lang.String prompt, java.util.Vector vStrLimit, java.util.Vector vStrValue, java.lang.String strFormat, int operator, int intdex, int isColumn, java.lang.String column, java.util.Vector columns, java.util.Vector vShowValue, java.lang.String binding, boolean isMultipleValue)
          Construct a ParamDesc which not be parsed.
ParamDesc(java.lang.String strName, java.lang.String strType, java.lang.String prompt, java.util.Vector vStrLimit, java.util.Vector vStrValue, java.lang.String strFormat, int operator, int intdex, int isColumn, java.lang.String column, java.util.Vector columns, java.util.Vector vShowValue, java.lang.String binding, boolean isDis, boolean isReq)
          Construcing column, t a ParamDesc which not be parsed.
ParamDesc(java.lang.String strName, java.lang.String strType, java.lang.String prompt, java.util.Vector vStrLimit, java.util.Vector vStrValue, java.lang.String strFormat, int operator, int intdex, int isColumn, java.lang.String column, java.util.Vector columns, java.util.Vector vShowValue, java.lang.String binding, boolean isDis, boolean isReq, boolean isMultipleValue)
          Construcing column, t a ParamDesc which not be parsed.
ParamDesc(java.lang.String strName, java.lang.String strType, java.lang.String prompt, java.util.Vector vStrLimit, java.util.Vector vStrValue, java.lang.String strFormat, int operator, int intdex, java.lang.String binding)
          Construct a ParamDesc which not be parsed.
ParamDesc(java.lang.String strName, java.lang.String strType, java.lang.String prompt, java.util.Vector vStrLimit, java.util.Vector vStrValue, java.lang.String strFormat, int operator, int intdex, java.lang.String binding, boolean isMultipleValue)
          Construct a ParamDesc which not be parsed.
 
Method Summary
 void addReferParamToVsortParams(java.util.Hashtable allParam, java.util.Hashtable curParamDescs, java.util.Vector sortParam)
           
 boolean allowUseExpression()
           
static java.util.Vector changedHashToVector(java.util.Hashtable hash)
           
static java.util.Hashtable changedVectorToHash(java.util.Vector v)
           
 void check(java.lang.String value, java.util.Locale locale)
          Check the value validation.
 void clearMem()
           
 void clearReferedBy()
           
 java.lang.Object clone()
           
 java.lang.String[] detectInvalidValues(java.lang.String[] target)
           
 boolean equals(ParamDesc param)
          Does not compare name, just compare other properties.
static void getAllRelatedParamByValue(java.util.Hashtable allPara, java.util.Vector referPara, ParamDesc param, java.lang.Object value)
          if parameter's type is parameters, according to value get all related parameter
 int getBeColumn()
           
 java.lang.String getBinding()
          This method is associated with DynamicSortOrder feature, it returns a parameter name, and there are only two values in this parameter 'Ascending' and 'Descending'.
 java.lang.String[][] getBooleanLiteral()
           
 java.lang.String getChainID()
           
 DbColDesc getColDesc()
           
 java.lang.String getColumn()
          This method is associated with BindParameter feature, it returns the bind column.
 java.util.Vector getColumns()
          This method is associated with BindParameter feature, it returns the display column.
 java.lang.String getDataSource()
           
 java.lang.String getDefaultDateFormat(java.util.Locale loc)
          This method can only be called when no user format defined.
 int getDefaultIndex()
          Returns the index of the current value in the default values vector.
 java.lang.String getDefaultValue()
          Gets the current default value, not care of the format and locale.
 java.util.Vector getDefaultValues()
          Gets all the defaule values string which take no care of format and locale.
 java.util.Vector getDisplayLimit(java.util.Locale locale)
          Returns the limiit values, care of format
 java.lang.String getDisplayValue(DbValue paramvalue, java.util.Locale locale)
          Gets the display string base locale of the string saved in catalog.
 java.util.Vector getDisplayValues(java.util.Locale locale)
          Returns all the display String which the parameter's value base the locale
 java.lang.String getDynamicTemplate()
           
 DbValue getDynamicValue(long dynamicValue, java.util.Locale local)
          get a dynamic value[Date, Time, DateTime] base on dynamic template and input long time, local If the parameter is not dynamic, return null value, else if the parameter data type is Date, the return value is a DbDate instance, else if the parameter data type is Time, the return value is a DbTime instance, else if the parameter data type is DateTime, the return value is a DbTimestamp instance.
static void getFirstLevelParam(java.util.Hashtable allPara)
           
static java.util.Vector getFirstLevelRelatedParamByValue(java.util.Hashtable allPara, ParamDesc param, java.lang.Object value)
          this meyhod is for server, according to parameter's value get the related paramDesc , only one level
static void getFirstShowParamDescs(java.util.Hashtable allPara, java.util.Vector referPara, ParamDesc param, java.lang.Object value)
          If parameter's type is parameters, if this value corresponding parameters'type is parameter ,get this parameter default value corresponding parameter.
 java.lang.String getFormat()
          Returns the format.
 java.util.Vector getImportParams()
           
 java.lang.String getImportSql()
           
 SymbolInfo getInfo()
           
 java.util.Vector getLimit()
          Returns the limit values, not care of the format.
 java.lang.String[] getMultiDisplayValue(fArray paramvalue, java.util.Locale locale)
           
 java.lang.String[] getMultiStrValue()
           
 java.lang.String getName()
          Returns the parameter name
 java.lang.String getNextLevel()
           
 int getOperation()
          Returns the operation of used in limitation.
 java.lang.String getPreviousLevel()
           
 java.lang.String getPrompt()
          Returns the prompt of the parameter
 java.util.Vector getReferedBy()
           
static java.util.Vector getReferPara(java.util.Hashtable allPara)
          get all parameters which is reference by other parameters.
static void getRelatedParamDescsByParam(java.util.Hashtable allPara, java.util.Vector referPara, ParamDesc param)
          If parameter's type is Parameters, used this method get all raleted parameter desc.
 java.lang.String getSecurityEntry()
           
 java.util.Vector getSelectedValues()
           
 java.util.Vector getShowValues()
          Gets the value list of bind type parameter.
 java.lang.String getStrValue()
           
 java.lang.String getType()
          Gets the parameter type
 DbValue getValue()
           
 java.lang.String getValueMeaning()
          Gets the current string value meaning of the parameter based on current locale and format.
 java.util.Vector getValues()
          Gets all the values not care of the format.
 int getWhenOutOfRange()
           
static boolean hasImportParam(java.util.Vector allPara)
          if parameter has import SQL and used other parameter return true ,else retrun false
static boolean hasNestedPara(java.util.Hashtable allPara)
          this method whether have parameter's type is parameters or not in all parameters.
 void initParam(java.util.Locale locale)
          Inits the defalut value, and parse it.
 boolean isAllowAll()
           
 boolean isAllowTypeIn()
           
 boolean isAllSelected()
           
 boolean isCascading()
          This flag must be set by calling setBeColumn(ParamDesc.CASCADING).
 boolean isColumn()
          Whether the parameter is bind with a column.
 boolean isColumnCal()
           
 boolean isDistinct()
           
 boolean isHideParameterWhenSingleValueReturn()
           
static boolean isImportByPara(ParamDesc param, ParamDesc curParam, java.util.Vector paramDescs)
           
 boolean isMultipleValue()
           
 boolean IsParameters()
           
 boolean isReferedBy()
           
 boolean isReferOther()
           
 boolean isRequired()
          Whether this parameter is required or can be ignored.
 boolean isSetAsParameter()
           
 boolean isSimilar(ParamDesc param)
          Judges whether the parameter specified is similar with this one, just add some values if same.
 boolean isUseCurrentDate()
          if return true, the parameter is dynamic date parameter.
 boolean isUseCurrentDateWhenBlank()
          if return true, the parameter return current date when the parameter is blank.
 boolean isValuesNotEmpty()
           
 DbValue parseInternalValue(java.lang.String inValue)
          Checks whether the internal string (saved in catalog) is OK
 void set(DbValue v)
           
 void setAllowAll(boolean allow)
           
 void setAllowTypeIn(boolean allowTypeIn)
           
 void setAllowUseExpression(boolean allowUseExpression)
           
 void setAllSelected(boolean isAllSelected)
           
 void setBeColumn(int b)
           
 void setBinding(java.lang.String binding)
           
 void setCascadingInfo(java.lang.String chainID, java.lang.String previousLevel, java.lang.String nextLevel, boolean isSetAsParameter)
           
 void setColumn(java.lang.String column)
           
 void setColumns(java.util.Vector v)
           
 void setDataSource(java.lang.String sourceName)
           
 void setDefaultIndex(int i)
          If i is -1, or max to the size , sets to the last one.
 void setDistinct(boolean isDis)
           
 boolean setDynamicTemplate(java.lang.String dynamicTemplate)
          If the set dynamicTemplate is legal, replace previouse dynamicTemplate with current set dynamicTemplate, and return true.
 void setEncoding(java.lang.String encoding)
           
 void setFormat(java.lang.String str)
          Sets format or set encoding of string type parameter.
 void setHideParameterWhenSingleValueReturn(boolean isHideParameterWhenSingleValueReturn)
           
 void setImportParams(java.util.Vector importParams)
           
 void setImportSql(java.lang.String importSql)
           
 void setIsCascading(boolean isCascading)
           
 void setIsMultipleValue(boolean isMultipleValue)
           
 void setLimit(java.lang.String lim, java.util.Locale locale, int indexLimit)
          Sets one limination value, the indexLimit is from 0 to the vDbLimit.size() - 1
 void setLimit(java.util.Vector vStrLimit, java.util.Locale locale)
          Sets the limination, do not recheck all the value base the new limination, please call checkAllValues.
 void setPrompt(java.lang.String str)
           
 void setRequired(boolean isReq)
           
 void setSecurityEntry(java.lang.String entry)
           
 void setSelectedValues(java.util.Vector selectedValues)
           
 void setShowValues(java.util.Vector values)
           
 boolean setUseCurrentDate(boolean useCurrentDate)
          set the parameter whether or not is dynamic date parameter.
 boolean setUseCurrentDateWhenBlank(boolean useCurrentDateWhenBlank)
          set the parameter whether or not return current date when the parameter is blank.
 java.lang.String setValue(DbValue val, java.util.Locale locale)
          Sets the user input value, return the display value base the locale
 java.lang.String[] setValue(fArray val, java.util.Locale locale)
           
 java.lang.String[] setValue(java.lang.String[] inputValues, java.util.Locale locale)
           
 java.lang.String setValue(java.lang.String outVal, java.util.Locale locale)
          Sets the user input value, return the display value base the locale
 void setValueList(java.util.Vector values)
          For bind Column to set valid VAlues.
 void setValues(java.util.Vector vStrValue, java.util.Locale locale)
          Sets string to the value , if locale is null, sets internal string
 void setWhenOutOfRange(int whenOutOfRange)
           
static java.lang.String[] splitValue(java.lang.String value)
           
 java.lang.String toString()
           
 void transferValues(ParamDesc param)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_INTEGER

public static final java.lang.String TYPE_INTEGER
The constant of integer type of parameter


TYPE_NUMBER

public static final java.lang.String TYPE_NUMBER
The constant of number type of parameter


TYPE_STRING

public static final java.lang.String TYPE_STRING
The constant of string type of parameter


TYPE_CURRENCY

public static final java.lang.String TYPE_CURRENCY
The constant of currency type of parameter


TYPE_BOOLEAN

public static final java.lang.String TYPE_BOOLEAN
The constant of boolean type of parameter


TYPE_DATE

public static final java.lang.String TYPE_DATE
The constant of date type of parameter


TYPE_TIME

public static final java.lang.String TYPE_TIME
The constant of time type of parameter


TYPE_DATETIME

public static final java.lang.String TYPE_DATETIME
The constant of DateTime type of parameter


TYPE_PARAMETER

public static final java.lang.String TYPE_PARAMETER
The constant of Parameter type of parameter, support to nested parameter

See Also:
Constant Field Values

TYPE_PARAMETER_SEPARATOR1

public static final java.lang.String TYPE_PARAMETER_SEPARATOR1
See Also:
Constant Field Values

TYPE_PARAMETER_SEPARATOR2

public static final java.lang.String TYPE_PARAMETER_SEPARATOR2
See Also:
Constant Field Values

defaultLocale

public static final java.util.Locale defaultLocale
the default locale.


dateStyle

public static final int dateStyle
The default date format of the Date type and DateTime type parameter..

See Also:
java.text.DateFormat.LONG, Constant Field Values

timeStyle

public static final int timeStyle
The default time format of the Time type and DateTime type parameter.

See Also:
java.text.DateFormat.LONG, Constant Field Values

NORMAL

public static final int NORMAL
This type indicates that the current parameter does not associate with a column list.

See Also:
Constant Field Values

GROUPSORT

public static final int GROUPSORT
This type indicates that the current parameter is used with Dynamic Group/Sort feature.

See Also:
Constant Field Values

AUTO

public static final int AUTO
See Also:
Constant Field Values

IMPORT

public static final int IMPORT
See Also:
Constant Field Values

PSEUDO

public static final int PSEUDO
This type indicates that the current parameter is used with BindParameter feature.

See Also:
Constant Field Values

SORTORDER

public static final int SORTORDER
This type indicates that the current parameter is used with SortOrderByParameter feature.

See Also:
Constant Field Values

name

public java.lang.String name
The name of parameter.


type

public java.lang.String type
The type of parameter.


promptText

public java.lang.String promptText
The prompt of parameter.


value

public java.lang.String value
The default value of parameter, care of display's locale and format.


isStringNull

public boolean isStringNull

stringFormat

public java.lang.String stringFormat

inValue

public java.lang.String inValue
The default value of parameter despite of the locale and format.


ADOPT_DIRECTLY

public static final int ADOPT_DIRECTLY
See Also:
Constant Field Values

USE_DEFAULT

public static final int USE_DEFAULT
See Also:
Constant Field Values

WARN

public static final int WARN
See Also:
Constant Field Values
Constructor Detail

ParamDesc

public ParamDesc()

ParamDesc

public ParamDesc(java.lang.String name,
                 java.lang.String type,
                 java.lang.String prompt,
                 java.util.Vector vStrLimit,
                 java.util.Vector vStrValue,
                 java.lang.String strFormat,
                 int operator,
                 int index)
Treate a parameter

Parameters:
name - the name of parameter
type - the type of parameter
prompt - the prompt string of parameter
vStrLimit - the value limination vector of parameter, not care of display format.
vStrValue - the init value vector of parameter, not care of display format.
strFormat - the format which used to display parameter's value
operator - now the value is jet.api.ParameterInfo.BETWEEN or jet.api.ParameterInfo.UNKNOWN
index - the default value index in the vStrValue.

ParamDesc

public ParamDesc(java.lang.String strName,
                 java.lang.String strType,
                 java.lang.String prompt,
                 java.util.Vector vStrLimit,
                 java.util.Vector vStrValue,
                 java.lang.String strFormat,
                 int operator,
                 int intdex,
                 java.lang.String binding)
Construct a ParamDesc which not be parsed.


ParamDesc

public ParamDesc(java.lang.String strName,
                 java.lang.String strType,
                 java.lang.String prompt,
                 java.util.Vector vStrLimit,
                 java.util.Vector vStrValue,
                 java.lang.String strFormat,
                 int operator,
                 int intdex,
                 int isColumn)
Construct a ParamDesc which not be parsed.


ParamDesc

public ParamDesc(java.lang.String strName,
                 java.lang.String strType,
                 java.lang.String prompt,
                 java.util.Vector vStrLimit,
                 java.util.Vector vStrValue,
                 java.lang.String strFormat,
                 int operator,
                 int intdex,
                 int isColumn,
                 java.lang.String column,
                 java.util.Vector columns,
                 java.util.Vector vShowValue,
                 java.lang.String binding)
Construct a ParamDesc which not be parsed.


ParamDesc

public ParamDesc(java.lang.String strName,
                 java.lang.String strType,
                 java.lang.String prompt,
                 java.util.Vector vStrLimit,
                 java.util.Vector vStrValue,
                 java.lang.String strFormat,
                 int operator,
                 int intdex,
                 int isColumn,
                 java.lang.String column,
                 java.util.Vector columns,
                 java.util.Vector vShowValue,
                 java.lang.String binding,
                 boolean isDis,
                 boolean isReq)
Construcing column, t a ParamDesc which not be parsed.


ParamDesc

public ParamDesc(java.lang.String name,
                 java.lang.String type,
                 java.lang.String prompt,
                 java.util.Vector vStrLimit,
                 java.util.Vector vStrValue,
                 java.lang.String strFormat,
                 int operator,
                 int index,
                 boolean isMultipleValue)
Treate a parameter

Parameters:
name - the name of parameter
type - the type of parameter
prompt - the prompt string of parameter
vStrLimit - the value limination vector of parameter, not care of display format.
vStrValue - the init value vector of parameter, not care of display format.
strFormat - the format which used to display parameter's value
operator - now the value is jet.api.ParameterInfo.BETWEEN or jet.api.ParameterInfo.UNKNOWN
index - the default value index in the vStrValue.

ParamDesc

public ParamDesc(java.lang.String strName,
                 java.lang.String strType,
                 java.lang.String prompt,
                 java.util.Vector vStrLimit,
                 java.util.Vector vStrValue,
                 java.lang.String strFormat,
                 int operator,
                 int intdex,
                 java.lang.String binding,
                 boolean isMultipleValue)
Construct a ParamDesc which not be parsed.


ParamDesc

public ParamDesc(java.lang.String strName,
                 java.lang.String strType,
                 java.lang.String prompt,
                 java.util.Vector vStrLimit,
                 java.util.Vector vStrValue,
                 java.lang.String strFormat,
                 int operator,
                 int intdex,
                 int isColumn,
                 boolean isMultipleValue)
Construct a ParamDesc which not be parsed.


ParamDesc

public ParamDesc(java.lang.String strName,
                 java.lang.String strType,
                 java.lang.String prompt,
                 java.util.Vector vStrLimit,
                 java.util.Vector vStrValue,
                 java.lang.String strFormat,
                 int operator,
                 int intdex,
                 int isColumn,
                 java.lang.String column,
                 java.util.Vector columns,
                 java.util.Vector vShowValue,
                 java.lang.String binding,
                 boolean isMultipleValue)
Construct a ParamDesc which not be parsed.


ParamDesc

public ParamDesc(java.lang.String strName,
                 java.lang.String strType,
                 java.lang.String prompt,
                 java.util.Vector vStrLimit,
                 java.util.Vector vStrValue,
                 java.lang.String strFormat,
                 int operator,
                 int intdex,
                 int isColumn,
                 java.lang.String column,
                 java.util.Vector columns,
                 java.util.Vector vShowValue,
                 java.lang.String binding,
                 boolean isDis,
                 boolean isReq,
                 boolean isMultipleValue)
Construcing column, t a ParamDesc which not be parsed.

Method Detail

setSecurityEntry

public void setSecurityEntry(java.lang.String entry)

getSecurityEntry

public java.lang.String getSecurityEntry()

getDefaultValues

public java.util.Vector getDefaultValues()
Gets all the defaule values string which take no care of format and locale.


getInfo

public SymbolInfo getInfo()

getValue

public DbValue getValue()

getStrValue

public java.lang.String getStrValue()

set

public void set(DbValue v)

getValueMeaning

public java.lang.String getValueMeaning()
Gets the current string value meaning of the parameter based on current locale and format.

If no value return null string.


getColDesc

public DbColDesc getColDesc()

initParam

public void initParam(java.util.Locale locale)
               throws InvalidParameterException
Inits the defalut value, and parse it.

Throws:
InvalidParameterException

setBeColumn

public void setBeColumn(int b)

getBeColumn

public int getBeColumn()

isColumn

public boolean isColumn()
Whether the parameter is bind with a column.


isColumnCal

public boolean isColumnCal()

setLimit

public void setLimit(java.util.Vector vStrLimit,
                     java.util.Locale locale)
              throws InvalidParameterException
Sets the limination, do not recheck all the value base the new limination, please call checkAllValues.

Throws:
InvalidParameterException

setLimit

public void setLimit(java.lang.String lim,
                     java.util.Locale locale,
                     int indexLimit)
              throws InvalidParameterException
Sets one limination value, the indexLimit is from 0 to the vDbLimit.size() - 1

Throws:
InvalidParameterException

getBooleanLiteral

public java.lang.String[][] getBooleanLiteral()

clearMem

public void clearMem()

getDefaultValue

public java.lang.String getDefaultValue()
Gets the current default value, not care of the format and locale.

If there are more than one default value, return the default value that the index variant refers to. If no index is specified, return the last default value.

See Also:
getDefaultIndex

getDisplayValue

public java.lang.String getDisplayValue(DbValue paramvalue,
                                        java.util.Locale locale)
Gets the display string base locale of the string saved in catalog.

If no value return null string.


getDisplayValues

public java.util.Vector getDisplayValues(java.util.Locale locale)
Returns all the display String which the parameter's value base the locale


getValues

public java.util.Vector getValues()
Gets all the values not care of the format. If it is bind type parameter, the order matches getShowValues

See Also:
getShowValues

isValuesNotEmpty

public boolean isValuesNotEmpty()

getType

public java.lang.String getType()
Gets the parameter type


getName

public java.lang.String getName()
Returns the parameter name


getPrompt

public java.lang.String getPrompt()
Returns the prompt of the parameter


getLimit

public java.util.Vector getLimit()
Returns the limit values, not care of the format. changed by zhaosy,2004/12/24, fixed the bug about the number,currency parameter getlimit method have format


getDisplayLimit

public java.util.Vector getDisplayLimit(java.util.Locale locale)
Returns the limiit values, care of format


getFormat

public java.lang.String getFormat()
Returns the format.


getDefaultDateFormat

public java.lang.String getDefaultDateFormat(java.util.Locale loc)
This method can only be called when no user format defined.

Parameters:
loc -
Returns:

getDefaultIndex

public int getDefaultIndex()
Returns the index of the current value in the default values vector.


getOperation

public int getOperation()
Returns the operation of used in limitation.

See Also:
jet.api.ParameterInfo.#UNKNOWN, jet.api.ParameterInfo.#BETWEEN

setFormat

public void setFormat(java.lang.String str)
Sets format or set encoding of string type parameter.


setPrompt

public void setPrompt(java.lang.String str)

setValues

public void setValues(java.util.Vector vStrValue,
                      java.util.Locale locale)
               throws InvalidParameterException
Sets string to the value , if locale is null, sets internal string

Throws:
InvalidParameterException

setShowValues

public void setShowValues(java.util.Vector values)

getShowValues

public java.util.Vector getShowValues()
Gets the value list of bind type parameter.


clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

setDefaultIndex

public void setDefaultIndex(int i)
If i is -1, or max to the size , sets to the last one.


equals

public boolean equals(ParamDesc param)
Does not compare name, just compare other properties.


parseInternalValue

public DbValue parseInternalValue(java.lang.String inValue)
                           throws InvalidParameterException
Checks whether the internal string (saved in catalog) is OK

Throws:
InvalidParameterException

setValue

public java.lang.String setValue(java.lang.String outVal,
                                 java.util.Locale locale)
                          throws InvalidParameterException
Sets the user input value, return the display value base the locale

Throws:
InvalidParameterException

setValue

public java.lang.String setValue(DbValue val,
                                 java.util.Locale locale)
                          throws InvalidParameterException
Sets the user input value, return the display value base the locale

Throws:
InvalidParameterException

check

public void check(java.lang.String value,
                  java.util.Locale locale)
           throws InvalidParameterException
Check the value validation. return the correct string (especial useful for date/time types.

Throws:
InvalidParameterException

isSimilar

public boolean isSimilar(ParamDesc param)
Judges whether the parameter specified is similar with this one, just add some values if same.


getBinding

public java.lang.String getBinding()
This method is associated with DynamicSortOrder feature, it returns a parameter name, and there are only two values in this parameter 'Ascending' and 'Descending'.


setBinding

public void setBinding(java.lang.String binding)

getColumn

public java.lang.String getColumn()
This method is associated with BindParameter feature, it returns the bind column.


getColumns

public java.util.Vector getColumns()
This method is associated with BindParameter feature, it returns the display column.


setColumn

public void setColumn(java.lang.String column)

setColumns

public void setColumns(java.util.Vector v)

setDistinct

public void setDistinct(boolean isDis)

isDistinct

public boolean isDistinct()

setEncoding

public void setEncoding(java.lang.String encoding)

setRequired

public void setRequired(boolean isReq)

isRequired

public boolean isRequired()
Whether this parameter is required or can be ignored.


setDataSource

public void setDataSource(java.lang.String sourceName)

getDataSource

public java.lang.String getDataSource()

getImportSql

public java.lang.String getImportSql()
Returns:
Returns the importSql.

setImportSql

public void setImportSql(java.lang.String importSql)
Parameters:
importSql - The importSql to set.

getRelatedParamDescsByParam

public static void getRelatedParamDescsByParam(java.util.Hashtable allPara,
                                               java.util.Vector referPara,
                                               ParamDesc param)
If parameter's type is Parameters, used this method get all raleted parameter desc.

Parameters:
referPara: - ParamDesc collection
para: - currently parameter desc.

getFirstLevelRelatedParamByValue

public static java.util.Vector getFirstLevelRelatedParamByValue(java.util.Hashtable allPara,
                                                                ParamDesc param,
                                                                java.lang.Object value)
this meyhod is for server, according to parameter's value get the related paramDesc , only one level

Parameters:
allPara -
param -
value -
Returns:

getFirstShowParamDescs

public static void getFirstShowParamDescs(java.util.Hashtable allPara,
                                          java.util.Vector referPara,
                                          ParamDesc param,
                                          java.lang.Object value)
If parameter's type is parameters, if this value corresponding parameters'type is parameter ,get this parameter default value corresponding parameter.

Parameters:
referPara - : paraDesc collection
para - : currently para

getFirstLevelParam

public static void getFirstLevelParam(java.util.Hashtable allPara)

getAllRelatedParamByValue

public static void getAllRelatedParamByValue(java.util.Hashtable allPara,
                                             java.util.Vector referPara,
                                             ParamDesc param,
                                             java.lang.Object value)
if parameter's type is parameters, according to value get all related parameter

Parameters:
referPara - : ParamDesc collection
param - : currently parameter
value: - currently parameter's value

hasNestedPara

public static boolean hasNestedPara(java.util.Hashtable allPara)
this method whether have parameter's type is parameters or not in all parameters.

Parameters:
allPara -
Returns:

getReferPara

public static java.util.Vector getReferPara(java.util.Hashtable allPara)
get all parameters which is reference by other parameters.

Returns:
a paramDesc collection

splitValue

public static java.lang.String[] splitValue(java.lang.String value)

IsParameters

public boolean IsParameters()

getImportParams

public java.util.Vector getImportParams()
Returns:
Returns the importParams.

setImportParams

public void setImportParams(java.util.Vector importParams)
Parameters:
importParams - The importParams to set.

hasImportParam

public static boolean hasImportParam(java.util.Vector allPara)
if parameter has import SQL and used other parameter return true ,else retrun false

Parameters:
allPara -
Returns:

isImportByPara

public static boolean isImportByPara(ParamDesc param,
                                     ParamDesc curParam,
                                     java.util.Vector paramDescs)

getReferedBy

public java.util.Vector getReferedBy()

isReferedBy

public boolean isReferedBy()

clearReferedBy

public void clearReferedBy()

isReferOther

public boolean isReferOther()

addReferParamToVsortParams

public void addReferParamToVsortParams(java.util.Hashtable allParam,
                                       java.util.Hashtable curParamDescs,
                                       java.util.Vector sortParam)

changedHashToVector

public static java.util.Vector changedHashToVector(java.util.Hashtable hash)

changedVectorToHash

public static java.util.Hashtable changedVectorToHash(java.util.Vector v)

transferValues

public void transferValues(ParamDesc param)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isUseCurrentDate

public boolean isUseCurrentDate()
if return true, the parameter is dynamic date parameter.

Returns:

setUseCurrentDate

public boolean setUseCurrentDate(boolean useCurrentDate)
set the parameter whether or not is dynamic date parameter. When the set value is true and the parameter's data type is not Date, or is not Time, or is not DateTime, the set operation will be ignore, and return false. Others, set field with set value, and return true.

Parameters:
useCurrentDate -
Returns:
boolean value

isUseCurrentDateWhenBlank

public boolean isUseCurrentDateWhenBlank()
if return true, the parameter return current date when the parameter is blank.

Returns:

setUseCurrentDateWhenBlank

public boolean setUseCurrentDateWhenBlank(boolean useCurrentDateWhenBlank)
set the parameter whether or not return current date when the parameter is blank. When the set value is true and the parameter's data type is not Date, or is not Time, or is not DateTime, the set operation will be ignore, and return false. Others, set field with set value, and return true.

Parameters:
useCurrentDateWhenBlank -
Returns:
boolean value

getDynamicValue

public DbValue getDynamicValue(long dynamicValue,
                               java.util.Locale local)
get a dynamic value[Date, Time, DateTime] base on dynamic template and input long time, local If the parameter is not dynamic, return null value, else if the parameter data type is Date, the return value is a DbDate instance, else if the parameter data type is Time, the return value is a DbTime instance, else if the parameter data type is DateTime, the return value is a DbTimestamp instance. The illegal invoke situation is: the current parameter is not dynamic or it's data type is not Date, or is not Time, is not DateTime

Parameters:
dynamicValue -
local -
Returns:
return a DbValue

setDynamicTemplate

public boolean setDynamicTemplate(java.lang.String dynamicTemplate)
If the set dynamicTemplate is legal, replace previouse dynamicTemplate with current set dynamicTemplate, and return true. If the set dynamicTemplate is illegal, do not change anything, and return false.

Parameters:
dynamicTemplate -
Returns:

getDynamicTemplate

public java.lang.String getDynamicTemplate()
Returns:

setHideParameterWhenSingleValueReturn

public void setHideParameterWhenSingleValueReturn(boolean isHideParameterWhenSingleValueReturn)
Parameters:
isHideParameterWhenSingleValueReturn - is a boolean value. If the parameter value is true, the parameter maybe be hidden when single value is returned, else don't hide the parameter.

isHideParameterWhenSingleValueReturn

public boolean isHideParameterWhenSingleValueReturn()
Returns:
is a boolean value. If the return value is true, the parameter maybe be hidden when single value is returned, else don't hide the parameter.

setIsMultipleValue

public void setIsMultipleValue(boolean isMultipleValue)
Parameters:
isMultipleValue -

isMultipleValue

public boolean isMultipleValue()
Returns:

getMultiDisplayValue

public java.lang.String[] getMultiDisplayValue(fArray paramvalue,
                                               java.util.Locale locale)
Parameters:
paramvalue -
locale -
Returns:

setValue

public java.lang.String[] setValue(java.lang.String[] inputValues,
                                   java.util.Locale locale)
                            throws InvalidParameterException
Parameters:
inputValues -
locale -
Returns:
Throws:
InvalidParameterException

setValue

public java.lang.String[] setValue(fArray val,
                                   java.util.Locale locale)
                            throws InvalidParameterException
Parameters:
val -
locale -
Returns:
Throws:
InvalidParameterException

getMultiStrValue

public java.lang.String[] getMultiStrValue()
Returns:

setSelectedValues

public void setSelectedValues(java.util.Vector selectedValues)

getSelectedValues

public java.util.Vector getSelectedValues()

isCascading

public boolean isCascading()
This flag must be set by calling setBeColumn(ParamDesc.CASCADING).

Returns:

setIsCascading

public void setIsCascading(boolean isCascading)

setCascadingInfo

public void setCascadingInfo(java.lang.String chainID,
                             java.lang.String previousLevel,
                             java.lang.String nextLevel,
                             boolean isSetAsParameter)

getChainID

public java.lang.String getChainID()

getPreviousLevel

public java.lang.String getPreviousLevel()

getNextLevel

public java.lang.String getNextLevel()

isSetAsParameter

public boolean isSetAsParameter()

setAllSelected

public void setAllSelected(boolean isAllSelected)

isAllSelected

public boolean isAllSelected()

setAllowAll

public void setAllowAll(boolean allow)

isAllowAll

public boolean isAllowAll()

setAllowTypeIn

public void setAllowTypeIn(boolean allowTypeIn)

isAllowTypeIn

public boolean isAllowTypeIn()

setWhenOutOfRange

public void setWhenOutOfRange(int whenOutOfRange)

getWhenOutOfRange

public int getWhenOutOfRange()

setValueList

public void setValueList(java.util.Vector values)
                  throws InvalidParameterException
For bind Column to set valid VAlues. Elements must be String.

Throws:
InvalidParameterException - If any element of argument is not String

detectInvalidValues

public java.lang.String[] detectInvalidValues(java.lang.String[] target)
Parameters:
target - the values to check if in the vlaue list
Returns:
An String array of invalid values. If isAllSelected() == true, a String array with 0 elements will be returned.

setAllowUseExpression

public void setAllowUseExpression(boolean allowUseExpression)

allowUseExpression

public boolean allowUseExpression()