Java Doc for SQLJDBC.java in  » Database-Client » SQLMinus » isql » 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 » Database Client » SQLMinus » isql 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   isql.SQLJDBC

SQLJDBC
public class SQLJDBC (Code)


Field Summary
final public static  StringP
    
final  StringSPACES
    
 String_databaseProductName
    
 SQLForm_sqlForm
    
 Stringcatalog
    
 StringcolSep
    
public  Connectionconn
    
 DatabaseMetaDatadma
    
 booleandriverNotCapable
    
 longlastProcessedRowCount
    
 Stringuid
    

Constructor Summary
public  SQLJDBC(String dsn, String UID, String PWD, SQLForm tempForm, String driver)
    
public  SQLJDBC()
    

Method Summary
public  ListSQLGetCatalogs()
    
public  ListSQLGetColumns(String tableName)
    
public  ListSQLGetExportedKeys(String tableName)
    
public  ListSQLGetImportedKeys(String tableName)
    
public  ListSQLGetIndexInfo(String tableName)
    
public  ListSQLGetPrimaryKeys(String tableName)
    
public  ListSQLGetSchemas()
    
public  ListSQLGetTables()
    
public  voidcloseConnection()
    
public  voidcreateCreateScript(String tname, String fname)
     generate a create script for a table.
public  intcreateInsertScript(String tname, String fname, long startrow, long endrow)
     creates an insert script based on data in table, and writes into given file (appending).
public static  StringformatDatatype(int java_sql_Types, String typename, int isize, int idec)
    
public  StringformatDates(String SQLString)
     format dates given in #x# and ##x## pattern.
public  List[]getColumnInfo(String tableName)
     returns columninfo for a given table in a Vector array which can then be displayed as output text or converted to TableMap and put in table depending on how you want to display.
public  ListgetColumnNames(String tableName)
    
public  DatabaseMetaDatagetDma()
     return metadata.
public  StringgetErrorString()
     returns exceptions if any.
public  StringgetFormattedDatatypeFor(String table, String column)
     given a table and column name get the user friendly datatype name for it.
public  List[]getIndexInfo(String tableName)
    
public  longgetLastRowCount()
    
public  List[]getPrimaryKeyInfo(String tableName)
    
public  PrimaryKeyInfogetPrimaryKeyInfoX(String tableName)
    
public static  ListgetRememberedValues(SQLForm _form, String column)
     retrieve remembered values for a column.
public  ListgetTableNames()
    
public  ListgetTableNames(String patt)
     returns a list of table for a given pattern, used while cacheing column names for tab completion.
public  StringgetWarningString()
    
public static  voidmain(String args)
    
public  StringprocessVariables(SQLForm _form, String SQLString)
     prompts the user for variables in sql in the form of ${VAR}.
public  ObjectreflectInvoke(String str)
    
public  StringrefreshDatabase()
    
public  int[]runBatch(String[] batch)
    
public  StringrunSQL(String SQLString)
     This method is first called to run an SQL and return a string.
public  StringrunSQL(String SQLString, long startrow, long endrow)
     runSQL - this is the method that executes the SQL string and puts it into a String for caller. If caller is appending the entire output to some textarea ( as is the case here!) then returning the entire result in the existing StringBuffer would involve less work.
public  ObjectrunSelect(String SQLString)
     This method is called when you want to run an sql and get a Tablemodel in return for displaying in JTable.
public  ObjectrunSelect(String SQLString, long startrow, long endrow)
     this returns a Model object to be used with JTables, and is only for select statement.
public  voidsetColSep(String sColSep)
    
public  voidsetConn(Connection newConn)
    
public  voidsetDma(DatabaseMetaData newDma)
    
public static  voidsetRememberedValue(SQLForm _form, String column, String value)
     Add a value to remembered values.
public  voidsetVendorSpecificConfigurations(String databaseProductName)
     set vendor specific varaibles.

Field Detail
P
final public static String P(Code)



SPACES
final String SPACES(Code)



_databaseProductName
String _databaseProductName(Code)



_sqlForm
SQLForm _sqlForm(Code)



catalog
String catalog(Code)



colSep
String colSep(Code)



conn
public Connection conn(Code)



dma
DatabaseMetaData dma(Code)



driverNotCapable
boolean driverNotCapable(Code)



lastProcessedRowCount
long lastProcessedRowCount(Code)



uid
String uid(Code)




Constructor Detail
SQLJDBC
public SQLJDBC(String dsn, String UID, String PWD, SQLForm tempForm, String driver) throws SQLException, ClassNotFoundException(Code)



SQLJDBC
public SQLJDBC() throws SQLException, ClassNotFoundException(Code)




Method Detail
SQLGetCatalogs
public List SQLGetCatalogs()(Code)



SQLGetColumns
public List SQLGetColumns(String tableName)(Code)



SQLGetExportedKeys
public List SQLGetExportedKeys(String tableName)(Code)



SQLGetImportedKeys
public List SQLGetImportedKeys(String tableName)(Code)



SQLGetIndexInfo
public List SQLGetIndexInfo(String tableName)(Code)



SQLGetPrimaryKeys
public List SQLGetPrimaryKeys(String tableName)(Code)



SQLGetSchemas
public List SQLGetSchemas()(Code)



SQLGetTables
public List SQLGetTables()(Code)



closeConnection
public void closeConnection()(Code)



createCreateScript
public void createCreateScript(String tname, String fname)(Code)
generate a create script for a table. This doesnt create the primary key TODO using getImportedKeys. if using mysql you can use "show create table mytable"



createInsertScript
public int createInsertScript(String tname, String fname, long startrow, long endrow)(Code)
creates an insert script based on data in table, and writes into given file (appending). Also takes row to start with, and row to end with



formatDatatype
public static String formatDatatype(int java_sql_Types, String typename, int isize, int idec)(Code)
Format a datatype as VARCHAR(2) or NUMBER(2,1) or INTEGER or DATETIME



formatDates
public String formatDates(String SQLString)(Code)
format dates given in #x# and ##x## pattern. single asterisks are replaced with a single date, double are replaced with a range. ranges are used when you want a full month or year, from start to end.



getColumnInfo
public List[] getColumnInfo(String tableName)(Code)
returns columninfo for a given table in a Vector array which can then be displayed as output text or converted to TableMap and put in table depending on how you want to display.



getColumnNames
public List getColumnNames(String tableName) throws SQLException(Code)



getDma
public DatabaseMetaData getDma()(Code)
return metadata. RK added on 20040201 11:52:17



getErrorString
public String getErrorString()(Code)
returns exceptions if any. RK added on 20040104 18:54:36 returns a null if no exception.



getFormattedDatatypeFor
public String getFormattedDatatypeFor(String table, String column)(Code)
given a table and column name get the user friendly datatype name for it. this was used in substituting $dt in sqlpattern for NOT NULL cases.



getIndexInfo
public List[] getIndexInfo(String tableName)(Code)



getLastRowCount
public long getLastRowCount()(Code)



getPrimaryKeyInfo
public List[] getPrimaryKeyInfo(String tableName)(Code)



getPrimaryKeyInfoX
public PrimaryKeyInfo getPrimaryKeyInfoX(String tableName)(Code)



getRememberedValues
public static List getRememberedValues(SQLForm _form, String column)(Code)
retrieve remembered values for a column. THis should go into a class now.



getTableNames
public List getTableNames() throws SQLException(Code)
returns a list of ALL tables



getTableNames
public List getTableNames(String patt) throws SQLException(Code)
returns a list of table for a given pattern, used while cacheing column names for tab completion.



getWarningString
public String getWarningString()(Code)



main
public static void main(String args) throws SQLException, ClassNotFoundException(Code)



processVariables
public String processVariables(SQLForm _form, String SQLString)(Code)
prompts the user for variables in sql in the form of ${VAR}. RK added on 20040202 12:33:58



reflectInvoke
public Object reflectInvoke(String str)(Code)
invokes a method in DatabaseMetaDataClass



refreshDatabase
public String refreshDatabase()(Code)



runBatch
public int[] runBatch(String[] batch) throws SQLException(Code)



runSQL
public String runSQL(String SQLString)(Code)
This method is first called to run an SQL and return a string. This decides how any rows to print.



runSQL
public String runSQL(String SQLString, long startrow, long endrow)(Code)
runSQL - this is the method that executes the SQL string and puts it into a String for caller. If caller is appending the entire output to some textarea ( as is the case here!) then returning the entire result in the existing StringBuffer would involve less work.



runSelect
public Object runSelect(String SQLString) throws Exception(Code)
This method is called when you want to run an sql and get a Tablemodel in return for displaying in JTable. It checks how many rows to print.



runSelect
public Object runSelect(String SQLString, long startrow, long endrow) throws Exception(Code)
this returns a Model object to be used with JTables, and is only for select statement. runSQL is to be used for all others and for selects that should return a String. Return an Integer for other operations - number of rows affected.



setColSep
public void setColSep(String sColSep)(Code)
in case the user want to change the column separator



setConn
public void setConn(Connection newConn)(Code)
This method is called by the thread only



setDma
public void setDma(DatabaseMetaData newDma)(Code)



setRememberedValue
public static void setRememberedValue(SQLForm _form, String column, String value)(Code)
Add a value to remembered values. This should go into a class now.



setVendorSpecificConfigurations
public void setVendorSpecificConfigurations(String databaseProductName)(Code)
set vendor specific varaibles. Currently these are start and end tags for printing fields of different datatypes RK added on 20031229 14:13:04 added closing single quotes in fields.



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.