| java.lang.Object isql.TableActions
TableActions | public class TableActions (Code) | | author: Rahul Kumar $Author: rahul_kumar $ version: $Id: TableActions.java,v 1.7 2004/02/01 05:36:12 rahul_kumar Exp rahul $ version: XXX: these may bomb if selected from menubar and there is no data in version: Table mode, thus need to check exceptions. version: RK added on 20040111 19:32:42 - ignore case functionality |
Inner Class :public static class SetTableViewAction extends AbstractAction | |
Inner Class :public static class DiscoverLinksAction extends AbstractAction | |
Inner Class :public static class ReverseSortAction extends AbstractAction | |
Inner Class :public static class AskFilterAction extends AbstractAction | |
Inner Class :public static class RememberAction extends AbstractAction | |
Inner Class :public static class OverwriteRememberAction extends AbstractAction | |
Inner Class :public static class GetLinkedInfoAction extends AbstractAction | |
Inner Class :public static class ClearRememberAction extends AbstractAction | |
Inner Class :public static class ClearSelectedRememberAction extends AbstractAction | |
Inner Class :public static class NextDataAction extends AbstractAction | |
Inner Class :public static class PreviousDataAction extends AbstractAction | |
Method Summary | |
public static String | formatCharWherePortion(String f, String columnname, String currentvalue) format the where portion of a string with columnname and
int range. | public static String | formatCondition(String sql, String where, String oldwhere, boolean overwrite) adds the given where cond to the TRIVIAL sql.
It does not replace previous sqls, it keeps appending. | public static String | formatDateWherePortion(String f, String columnname, String currentvalue, Map params) format the where portion of a string with columnname and
formatted date part. | public static String | formatFilter(String s, int type, String columnname, Object currentvalue, Map params) | public static String | formatIntWherePortion(String f, String columnname, String currentvalue) format the where portion of a string with columnname and
int range. | public static Map | getActionMap(SQLForm _form, JTable jt) return a Map of keys and actions so that a user can
map the 2 automatically without changing his code for each new
mapping. | public Action[] | getActions(JTable jt) | public static int | getClosestDescriptiveColumn(String[] acols, String linkcolumn, int defaultindex, String desc_col_regex) | public static int | getClosestPossibleMatch(String[] arr, String col) finds the index of the closest field to the given one.
First checks for exact match, then partial matches. | public static String | promptForColumn(SQLForm _form, JTable jt, String message, String tablename, String possiblecolumn) | public static String | promptForFullLink(SQLForm _form, JTable jt, String oldtable, String oldcolumn) prompts user for full link which can then be saved in session
for constructSQL and other programs to use. | public static String | promptForLink(SQLForm _form, JTable jt, String oldtable, String oldcolumn) | public static String | promptForTable(SQLForm _form, JTable jt, String message, String suppress) popup for selecting a table, with given message/prompt.
The list will now show the suppressed table. | protected static void | remember(SQLForm _form, JTable jt, boolean overwrite) called by the 2 remember actions, one with overwrite true, and
one with false. | public static int | searchaction(SQLForm _form, JTable jt, String ss, int searchtype) common method to search for a string/pattern. | public static String | substituteFields(String value, SQLForm _form, int no) |
MATCHCASE | final public static int MATCHCASE(Code) | | |
MATCHWORD | final public static int MATCHWORD(Code) | | |
PAGING_COUNT | final public static int PAGING_COUNT(Code) | | how many rows shown at a time. should pick from ini
|
REGEX | final public static int REGEX(Code) | | |
askFilterAction | final public static String askFilterAction(Code) | | |
clearRememberAction | final public static String clearRememberAction(Code) | | |
clearSelectedRememberAction | final public static String clearSelectedRememberAction(Code) | | |
compiler | static PatternCompiler compiler(Code) | | |
discoverLinksAction | final public static String discoverLinksAction(Code) | | |
getLinkedInfoAction | final public static String getLinkedInfoAction(Code) | | |
matcher | static PatternMatcher matcher(Code) | | |
nextDataAction | final public static String nextDataAction(Code) | | |
overwriteRememberAction | final public static String overwriteRememberAction(Code) | | |
previousDataAction | final public static String previousDataAction(Code) | | |
rememberAction | final public static String rememberAction(Code) | | |
rememberLastAction | final public static String rememberLastAction(Code) | | |
reversesortAction | final public static String reversesortAction(Code) | | |
saveStateAction | final public static String saveStateAction(Code) | | |
searchPartialMatchAction | final public static String searchPartialMatchAction(Code) | | |
searchRegexMatchAction | final public static String searchRegexMatchAction(Code) | | |
searchRegexPartialMatchAction | final public static String searchRegexPartialMatchAction(Code) | | |
setTableViewAction | final public static String setTableViewAction(Code) | | |
TableActions | public TableActions(SQLForm form)(Code) | | constructor passing whatever is needed. Do we need to pass
SQLString or give a method or what.
|
formatCharWherePortion | public static String formatCharWherePortion(String f, String columnname, String currentvalue)(Code) | | format the where portion of a string with columnname and
int range.
Parameters: f - |
formatCondition | public static String formatCondition(String sql, String where, String oldwhere, boolean overwrite)(Code) | | adds the given where cond to the TRIVIAL sql.
It does not replace previous sqls, it keeps appending. so you
cant keep playing with it. How to address this ??
Simple implementation, it will bomb if you have a field ending
with WHERE, or the case of where is different, where doesnt have
a space or there is no WHERE, but other clauses exist.
FIXME XXX
TODO work on floats, ints etc also.
|
formatDateWherePortion | public static String formatDateWherePortion(String f, String columnname, String currentvalue, Map params)(Code) | | format the where portion of a string with columnname and
formatted date part.
Parameters: f - formatted date returned by DateResolver usually as ajdbc date or dates with a ':' defining a range. |
formatFilter | public static String formatFilter(String s, int type, String columnname, Object currentvalue, Map params)(Code) | | valid formats for date
[:]([+-](\d+)[mdyw]+)[:]($1)?
t = +0 = -0 = '=' = todays date only
M = current month
Y = current year
+1M = next month (entire month, start to end)
+1Y = next year (entire year, start to end)
+1 = eq to tomorrow
-1 = eq yesterday
+1m = eq the day one month hence
:+1m = upto next month (same date)
:-1m = upto last month (same date as today)
-1m: = from last month onwards
-1m:+1m = last month to next month
|
formatIntWherePortion | public static String formatIntWherePortion(String f, String columnname, String currentvalue)(Code) | | format the where portion of a string with columnname and
int range.
Parameters: f - |
getActionMap | public static Map getActionMap(SQLForm _form, JTable jt)(Code) | | return a Map of keys and actions so that a user can
map the 2 automatically without changing his code for each new
mapping.
|
getClosestDescriptiveColumn | public static int getClosestDescriptiveColumn(String[] acols, String linkcolumn, int defaultindex, String desc_col_regex)(Code) | | |
getClosestPossibleMatch | public static int getClosestPossibleMatch(String[] arr, String col)(Code) | | finds the index of the closest field to the given one.
First checks for exact match, then partial matches. Used during
linking tables.
|
promptForFullLink | public static String promptForFullLink(SQLForm _form, JTable jt, String oldtable, String oldcolumn)(Code) | | prompts user for full link which can then be saved in session
for constructSQL and other programs to use. This adds a
descriptive field to pick up once it has linked.
|
promptForTable | public static String promptForTable(SQLForm _form, JTable jt, String message, String suppress)(Code) | | popup for selecting a table, with given message/prompt.
The list will now show the suppressed table. No longer used,
since we often need a self-join.
|
remember | protected static void remember(SQLForm _form, JTable jt, boolean overwrite)(Code) | | called by the 2 remember actions, one with overwrite true, and
one with false.
|
searchaction | public static int searchaction(SQLForm _form, JTable jt, String ss, int searchtype)(Code) | | common method to search for a string/pattern. Based on
searchtype.
returns the number of matches, or 0 if none. if user cancels,
returns a -1.
|
substituteFields | public static String substituteFields(String value, SQLForm _form, int no)(Code) | | this will take an SQL statement with fields ($abc) and
substitute them with values from table if such rows and columns
exist
|
|
|