Java Doc for SymbolTable.java in  » Testing » sqlunit » net » sourceforge » sqlunit » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » sqlunit » net.sourceforge.sqlunit 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sourceforge.sqlunit.SymbolTable

SymbolTable
final public class SymbolTable (Code)
Models a HashMap as a symbol table to store temporary variables and their values that are needed for a SQLUnit test case.
author:
   Sujit Pal (spal@users.sourceforge.net)
version:
   $Revision: 1.44 $


Field Summary
final public static  StringCURRENT_COL_KEY
    
final public static  StringCURRENT_RESULTSET_KEY
    
final public static  StringCURRENT_ROW_KEY
    
final public static  StringDEBUG_LOGGER
    
final public static  StringFAILURE_MESSAGE_OBJ
    
final public static  StringFILE_HEADER
    
final public static  StringJAVA_OBJECT_SUPPORT
    
final public static  StringOUT_PARAM
    
final public static  StringREPORTER_KEY
    
final public static  StringSKIP_REASON
    
final public static  StringTEST_ELAPSED_TIME
    


Method Summary
public static  voiddump()
     Dumps the contents of the symbol table for inspection.
public static  StringgetCurrentResultKey()
     Returns the current result key as a String.
public static synchronized  ObjectgetObject(String param)
     Returns an object keyed by the param string from the symbol table.
Parameters:
  param - the key into the symbol table.
public static synchronized  IteratorgetSymbols()
     Returns an Iterator containing all the symbols in the Symbol table.
public static synchronized  StringgetValue(String param)
     Returns the value of the named variable.
public static  booleanisVariableName(String str)
     By definition, a string which matches the pattern ${var} is considered to be a variable name in SQLUnit.
Parameters:
  str - the String to check if it is a symbol.
public static synchronized  StringremoveSymbol(String param)
     Removes a symbol from the symbol table.
Parameters:
  param - the variable name to remove.
public static  voidremoveUserVariables()
     Removes the references to the user variables set in a test after all tests are completed.
public static synchronized  StringreplaceVariables(String text)
     Replaces all variables in a string from the symbol table.
Parameters:
  text - the text with replaceable variables.
public static  voidsetCurrentCol(String colId)
     Sets the current col for the test.
public static  voidsetCurrentResultSet(String resultSetId)
     Sets the current resultset for the test.
public static  voidsetCurrentRow(String rowId)
     Sets the current row for the test.
public static synchronized  voidsetObject(String param, Object obj)
     Sets an object keyed by the param string into the symbol table.
public static synchronized  voidsetSymbols(DatabaseResult target, DatabaseResult source, String namespace)
     Updates the symbol table with variables from a target resultset that are populated by a SQL or stored procedure call.
public static synchronized  voidsetValue(String param, String value)
     Updates the symbol table with the symbol's value if it exists or creates a new entry in tha table with the given value if it does not.
public static synchronized  voidupdate(DatabaseResult target, DatabaseResult source)
     Scans the source DatabaseResult and the symbol table and updates the target DatabaseResult object in place.

Field Detail
CURRENT_COL_KEY
final public static String CURRENT_COL_KEY(Code)
Keeps track of current column in row



CURRENT_RESULTSET_KEY
final public static String CURRENT_RESULTSET_KEY(Code)
Keeps track of current resultset



CURRENT_ROW_KEY
final public static String CURRENT_ROW_KEY(Code)
Keeps track of current row in resultset



DEBUG_LOGGER
final public static String DEBUG_LOGGER(Code)
Contains the debugging logger if set



FAILURE_MESSAGE_OBJ
final public static String FAILURE_MESSAGE_OBJ(Code)
Contains the failure message if available



FILE_HEADER
final public static String FILE_HEADER(Code)
Indicates that the value is a LOB file name



JAVA_OBJECT_SUPPORT
final public static String JAVA_OBJECT_SUPPORT(Code)
Indicates if Java Object Support is enabled



OUT_PARAM
final public static String OUT_PARAM(Code)
Contains outparam index mapping header



REPORTER_KEY
final public static String REPORTER_KEY(Code)
Holds a reference to the Reporter object



SKIP_REASON
final public static String SKIP_REASON(Code)
Holds a reference to the most recent skipped reason



TEST_ELAPSED_TIME
final public static String TEST_ELAPSED_TIME(Code)
Contains elapsed time for a test in milliseconds





Method Detail
dump
public static void dump()(Code)
Dumps the contents of the symbol table for inspection.



getCurrentResultKey
public static String getCurrentResultKey()(Code)
Returns the current result key as a String. The format of the String is result[resultsetId,rowId,colId]. the current result as String.



getObject
public static synchronized Object getObject(String param)(Code)
Returns an object keyed by the param string from the symbol table.
Parameters:
  param - the key into the symbol table. an Object at that position, null if none is available.



getSymbols
public static synchronized Iterator getSymbols()(Code)
Returns an Iterator containing all the symbols in the Symbol table. an Iterator.



getValue
public static synchronized String getValue(String param)(Code)
Returns the value of the named variable. The variable should look like ${varname}.
Parameters:
  param - the key into the symbol table. the value of the named variable, or null if the variabledoes not exist in the symbol table.



isVariableName
public static boolean isVariableName(String str)(Code)
By definition, a string which matches the pattern ${var} is considered to be a variable name in SQLUnit.
Parameters:
  str - the String to check if it is a symbol. true if the str is a symbol, false if not.



removeSymbol
public static synchronized String removeSymbol(String param)(Code)
Removes a symbol from the symbol table.
Parameters:
  param - the variable name to remove. the value of the variable, may be null if symbol does not exist.



removeUserVariables
public static void removeUserVariables()(Code)
Removes the references to the user variables set in a test after all tests are completed.



replaceVariables
public static synchronized String replaceVariables(String text) throws SQLUnitException(Code)
Replaces all variables in a string from the symbol table.
Parameters:
  text - the text with replaceable variables. the text with the variables replaced with the values.
exception:
  SQLUnitException - if one or more variables is not found.



setCurrentCol
public static void setCurrentCol(String colId)(Code)
Sets the current col for the test.
Parameters:
  colId - the id of the col tag.



setCurrentResultSet
public static void setCurrentResultSet(String resultSetId)(Code)
Sets the current resultset for the test.
Parameters:
  resultSetId - the id of the resultset tag.



setCurrentRow
public static void setCurrentRow(String rowId)(Code)
Sets the current row for the test.
Parameters:
  rowId - the id of the row tag.



setObject
public static synchronized void setObject(String param, Object obj)(Code)
Sets an object keyed by the param string into the symbol table.
Parameters:
  param - the key into the symbol table.
Parameters:
  obj - the object keyed by the param value.



setSymbols
public static synchronized void setSymbols(DatabaseResult target, DatabaseResult source, String namespace) throws SQLUnitException(Code)
Updates the symbol table with variables from a target resultset that are populated by a SQL or stored procedure call. The variables will be prefixed by the value of namespace.
Parameters:
  target - the target DatabaseResult containing variables.
Parameters:
  source - the source DatabaseResult generated by a SQL or storedprocedure call.
Parameters:
  namespace - the namespace in which the variables will be stored.
exception:
  SQLUnitException - if there was a problem.



setValue
public static synchronized void setValue(String param, String value)(Code)
Updates the symbol table with the symbol's value if it exists or creates a new entry in tha table with the given value if it does not.
Parameters:
  param - the variable name.
Parameters:
  value - the value of the variable.



update
public static synchronized void update(DatabaseResult target, DatabaseResult source) throws SQLUnitException(Code)
Scans the source DatabaseResult and the symbol table and updates the target DatabaseResult object in place. The client will have access to the updated target DatabaseResult since it is passed by reference. The variables to be substituted will need to be specified in the form ${variable}.
Parameters:
  source - the source DatabaseResult returned from the SQL call.
Parameters:
  target - the target DatabaseResult to update.
exception:
  SQLUnitException - if a variable does not appear in eitherthe source or the symbol table.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.