|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ebasetech.ufs.utility.Utility
Field Summary | |
private static java.lang.String |
COMMA
|
private static java.lang.Object |
EMPTY
|
private static char |
SINGLE_QUOTE
|
(package private) static int |
UTIL_LITERAL
|
Constructor Summary | |
Utility()
Utility constructor comment. |
Method Summary | |
static java.lang.String |
BuildMapParameterString(java.util.Map params)
Given an iterator across a collection of key/value pairs, encode those pairs as a comma separated string value |
static java.lang.String |
BuildParameterString(java.util.Iterator parameters)
Given an iterator over a collection of strings, answer a single string containing those strings in a comma-separated list |
static java.lang.String |
constructQMarkStringFor(java.lang.String attrsString)
Builds a string like "?,?,?,?" to be used in a prepared statement. |
java.lang.Object |
evalExpression(java.lang.String expression,
com.ebasetech.ufs.kernel.Form form,
java.lang.String actionScriptId,
com.ebasetech.ufs.validation.Node node,
com.ebasetech.ufs.validation.Event event)
Method : evalExpression Description : Evaluates an expression. |
static void |
ExtractMapParametersFromResultSet(java.sql.ResultSet rs,
java.lang.String columnName,
java.util.Map target)
Extract the comma separated key-value pair parameters in the named column into the supplied target list |
static void |
ExtractMapParametersFromString(java.lang.String listString,
java.util.Map target)
Extract the comma separated key-value pair parameters in the supplied string into the supplied target list |
static void |
ExtractParametersFromResultSet(java.sql.ResultSet rs,
java.lang.String columnName,
java.util.List target)
Extract the comma separated parameters in the named column into the supplied target list |
static void |
ExtractParametersFromString(java.lang.String listString,
java.util.List target)
Extract the comma separated parameters in the supplied string into the supplied target list |
java.util.HashMap |
extractParametersFromString(java.lang.String commandText,
com.ebasetech.ufs.kernel.StandaloneUFSComponent form,
boolean toUpperCase,
java.lang.String actionScriptId,
com.ebasetech.ufs.validation.Event event,
com.ebasetech.ufs.validation.Node node)
Extracts key/value parameters from a command text string and constructs a HashMap consisting of entry with key = the key and value = the value for each key/value pair For example : input string of "GOTO FORM MYFORM abc=rt4, def=iuy" will result in HashMap with 2 entries : 1. |
static java.lang.String |
FlattenParamsMap(java.util.Map paramsMap)
flatten the params map into a string of comma separated key-value pairs. |
static boolean |
getBooleanFromSqlStmt(java.lang.String val)
Answers true/false depending on the char value of the supplied value |
static java.lang.String |
GetCharacterStreamFromResultSet(java.sql.ResultSet rs,
java.lang.String columnName)
extracts a character stream from the result set for the given DB column name |
java.lang.String |
getFieldPresentationValue(java.lang.String fieldName,
com.ebasetech.ufs.kernel.StandaloneUFSComponent form,
com.ebasetech.ufs.validation.Event event,
com.ebasetech.ufs.validation.Node node)
Method : getFieldPresentationValue Description : returns the script field value for the passed field name. |
java.lang.String |
getFieldValue(java.lang.String fieldName,
com.ebasetech.ufs.kernel.StandaloneUFSComponent form,
com.ebasetech.ufs.validation.Event event,
com.ebasetech.ufs.validation.Node node)
Method : getFieldValue Description : returns the script field value for the passed field name. |
java.lang.String |
getRelativeFieldName(java.lang.String fieldName,
com.ebasetech.ufs.validation.Event event,
com.ebasetech.ufs.validation.Node node)
|
java.lang.String |
getRelativePageName(java.lang.String pageName,
com.ebasetech.ufs.validation.Event event,
com.ebasetech.ufs.validation.Node node)
|
boolean |
isCheckForNull(java.util.Vector tokens,
int posn)
Method : isCheckForNull Description : returns true if the follwoing operator is == or != and the right hand operand is NULL or Null or nuLL ... |
boolean |
isFieldDateOrNumeric(java.lang.String fieldName,
com.ebasetech.ufs.kernel.StandaloneUFSComponent form,
com.ebasetech.ufs.validation.Event event,
com.ebasetech.ufs.validation.Node node)
|
boolean |
isFormField(java.lang.String fieldName,
com.ebasetech.ufs.kernel.StandaloneUFSComponent form,
com.ebasetech.ufs.validation.Event event,
com.ebasetech.ufs.validation.Node node)
Insert the method's description here. |
boolean |
isFunction(java.lang.String functionName,
com.ebasetech.ufs.kernel.StandaloneUFSComponent form)
Insert the method's description here. |
boolean |
isPage(java.lang.String pageName,
com.ebasetech.ufs.kernel.StandaloneUFSComponent form,
com.ebasetech.ufs.validation.Event event,
com.ebasetech.ufs.validation.Node node)
Insert the method's description here. |
boolean |
isStringaDate(java.lang.String s)
Method : isStringaDate Description : returns true if the parameter looks like a date. |
static void |
main(java.lang.String[] args)
|
void |
parseExpression(java.lang.String expression,
java.util.Vector tokens,
java.util.Vector ttypes,
java.lang.String actionScriptId)
Method : parseExpression Description : Break the expression into a vector, for later analysis A StreamTokenizer is used to parse the expression; Vector tokens is populated by the tokens with no substitution except for single quotes ' are replaced by " Vector ttypes is populated (one-to-one for tokens). |
java.lang.String |
replaceString(java.lang.String inString,
java.lang.String findString,
java.lang.String replaceString)
Insert the method's description here. |
java.lang.String |
replaceStringUnlessInQuotes(java.lang.String inString,
java.lang.String findString,
java.lang.String replaceString)
Insert the method's description here. |
static void |
setBooleanInSqlStmt(java.sql.PreparedStatement stmt,
int position,
boolean value)
Sets Y/N in the string value of prepared statement at the specified position depending on the supplied boolean value |
static java.util.HashMap |
UnflattenParamsMap(java.lang.String flattenedParams)
unpacks the parameters map from the flattened form |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static final int UTIL_LITERAL
private static final char SINGLE_QUOTE
private static final java.lang.String COMMA
private static final java.lang.Object EMPTY
Constructor Detail |
public Utility()
Method Detail |
public java.lang.Object evalExpression(java.lang.String expression, com.ebasetech.ufs.kernel.Form form, java.lang.String actionScriptId, com.ebasetech.ufs.validation.Node node, com.ebasetech.ufs.validation.Event event) throws com.ebasetech.ufs.kernel.FormException
com.ebasetech.ufs.kernel.FormException
public java.util.HashMap extractParametersFromString(java.lang.String commandText, com.ebasetech.ufs.kernel.StandaloneUFSComponent form, boolean toUpperCase, java.lang.String actionScriptId, com.ebasetech.ufs.validation.Event event, com.ebasetech.ufs.validation.Node node) throws com.ebasetech.ufs.kernel.FormException
com.ebasetech.ufs.kernel.FormException
public java.lang.String getFieldPresentationValue(java.lang.String fieldName, com.ebasetech.ufs.kernel.StandaloneUFSComponent form, com.ebasetech.ufs.validation.Event event, com.ebasetech.ufs.validation.Node node) throws com.ebasetech.ufs.kernel.FormException
com.ebasetech.ufs.kernel.FormException
public java.lang.String getFieldValue(java.lang.String fieldName, com.ebasetech.ufs.kernel.StandaloneUFSComponent form, com.ebasetech.ufs.validation.Event event, com.ebasetech.ufs.validation.Node node) throws com.ebasetech.ufs.kernel.FormException
com.ebasetech.ufs.kernel.FormException
public boolean isCheckForNull(java.util.Vector tokens, int posn)
public boolean isFieldDateOrNumeric(java.lang.String fieldName, com.ebasetech.ufs.kernel.StandaloneUFSComponent form, com.ebasetech.ufs.validation.Event event, com.ebasetech.ufs.validation.Node node)
public boolean isFormField(java.lang.String fieldName, com.ebasetech.ufs.kernel.StandaloneUFSComponent form, com.ebasetech.ufs.validation.Event event, com.ebasetech.ufs.validation.Node node)
public java.lang.String getRelativeFieldName(java.lang.String fieldName, com.ebasetech.ufs.validation.Event event, com.ebasetech.ufs.validation.Node node)
public java.lang.String getRelativePageName(java.lang.String pageName, com.ebasetech.ufs.validation.Event event, com.ebasetech.ufs.validation.Node node)
public boolean isFunction(java.lang.String functionName, com.ebasetech.ufs.kernel.StandaloneUFSComponent form) throws com.ebasetech.ufs.kernel.FormException
com.ebasetech.ufs.kernel.FormException
public boolean isPage(java.lang.String pageName, com.ebasetech.ufs.kernel.StandaloneUFSComponent form, com.ebasetech.ufs.validation.Event event, com.ebasetech.ufs.validation.Node node)
public boolean isStringaDate(java.lang.String s)
public static void main(java.lang.String[] args)
public void parseExpression(java.lang.String expression, java.util.Vector tokens, java.util.Vector ttypes, java.lang.String actionScriptId) throws com.ebasetech.ufs.kernel.FormException
com.ebasetech.ufs.kernel.FormException
public java.lang.String replaceString(java.lang.String inString, java.lang.String findString, java.lang.String replaceString)
public java.lang.String replaceStringUnlessInQuotes(java.lang.String inString, java.lang.String findString, java.lang.String replaceString)
public static java.lang.String constructQMarkStringFor(java.lang.String attrsString)
attrsString
- attribute string from the prepared statement, eg. "form_id, page_id"
public static void setBooleanInSqlStmt(java.sql.PreparedStatement stmt, int position, boolean value) throws java.sql.SQLException
stmt
- position
- value
-
java.sql.SQLException
public static boolean getBooleanFromSqlStmt(java.lang.String val)
public static void ExtractParametersFromResultSet(java.sql.ResultSet rs, java.lang.String columnName, java.util.List target) throws java.sql.SQLException
java.sql.SQLException
public static void ExtractParametersFromString(java.lang.String listString, java.util.List target)
public static void ExtractMapParametersFromResultSet(java.sql.ResultSet rs, java.lang.String columnName, java.util.Map target) throws java.sql.SQLException
java.sql.SQLException
public static void ExtractMapParametersFromString(java.lang.String listString, java.util.Map target)
public static java.lang.String BuildParameterString(java.util.Iterator parameters)
public static java.lang.String BuildMapParameterString(java.util.Map params)
public static java.lang.String FlattenParamsMap(java.util.Map paramsMap)
public static java.util.HashMap UnflattenParamsMap(java.lang.String flattenedParams)
public static java.lang.String GetCharacterStreamFromResultSet(java.sql.ResultSet rs, java.lang.String columnName) throws java.io.IOException, java.sql.SQLException
java.io.IOException
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |