Java Doc for tinySQLConnection.java in  » Database-DBMS » TinySQL » com » sqlmagic » tinysql » 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 DBMS » TinySQL » com.sqlmagic.tinysql 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sqlmagic.tinysql.tinySQLConnection

All known Subclasses:   com.sqlmagic.tinysql.dbfFileConnection,  com.sqlmagic.tinysql.textFileConnection,
tinySQLConnection
abstract public class tinySQLConnection implements java.sql.Connection(Code)

author:
   Thomas Morgner executetinySQL is now called with a statement
author:
   containing the SQL-Query String.


Field Summary
protected  Stringcatalog
    
static  booleandebug
    
protected  Driverdriver
    
protected  intisolation
    
protected  tinySQLtsql
    
protected  Stringurl
    
protected  Stringuser
    

Constructor Summary
public  tinySQLConnection(String user, String u, Driver d)
    

Method Summary
public  voidclearWarnings()
     Clears the non-existant warning chain.
public  voidclose()
     Close a Connection object.
public  voidcommit()
     Commits a transaction.
public  StatementcreateStatement()
     Create and return a tinySQLStatement.
public  StatementcreateStatement(int resultSetType, int resultSetConcurrency)
     JDBC 2.0 Creates a Statement object that will generate ResultSet objects with the given type and concurrency.
public  voiddisableAutoClose()
     Disables autoclosing of connections and result sets.
public  tsResultSetexecutetinySQL(tinySQLStatement sql)
    
public  tsResultSetexecutetinySQL(tinySQLPreparedStatement psql)
    
public  intexecutetinyUpdate(tinySQLStatement sql)
    
public  intexecutetinyUpdate(tinySQLPreparedStatement psql)
    
public  booleangetAutoClose()
    
public  booleangetAutoCommit()
    
public  StringgetCatalog()
     Returns the current catalog.
public  DatabaseMetaDatagetMetaData()
    
 tinySQLgetTinySqlHandle()
    
public  intgetTransactionIsolation()
     Returns the isolation level.
public  java.util.MapgetTypeMap()
     JDBC 2.0 Gets the type map object associated with this connection.
public  SQLWarninggetWarnings()
     Returns a chain of warnings for the current connection; this is not supported by tinySQL.
abstract public  tinySQLget_tinySQL()
     creates a new tinySQL object and returns it.
public  booleanisClosed()
     Returns the status of the Connection.
public  booleanisReadOnly()
     Returns true if the database is in read-only mode.
public  StringnativeSQL(String sql)
     Converts escaped SQL to tinySQL syntax.
public  CallableStatementprepareCall(String sql)
     Create and return a CallableStatement.
public  CallableStatementprepareCall(String sql, int resultSetType, int resultSetConcurrency)
     JDBC 2.0 Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.
public  PreparedStatementprepareStatement(String sql)
     Create and return a PreparedStatement.
public  PreparedStatementprepareStatement(String sql, int resultSetType, int resultSetConcurrency)
     JDBC 2.0 Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency.
public  voidrollback()
     Rolls back a transaction.
public  voidsetAutoClose(boolean l)
    
public  voidsetAutoCommit(boolean b)
     Sets autocommit mode - tinySQL has no support for transactions, so this does nothing.
public  voidsetCatalog(String str)
     Sets the current catalog within the database.
public  voidsetReadOnly(boolean b)
     Puts the database in read-only mode...
public  voidsetTransactionIsolation(int x)
     Sets the transaction isolation level, which has no meaning in tinySQL.
public  voidsetTypeMap(java.util.Map map)
     JDBC 2.0 Installs the given type map as the type map for this connection.

Field Detail
catalog
protected String catalog(Code)
the catalog - it's not used by tinySQL



debug
static boolean debug(Code)



driver
protected Driver driver(Code)
The JDBC driver



isolation
protected int isolation(Code)
Transaction isolation level - it's not used by tinySQL



tsql
protected tinySQL tsql(Code)
The tinySQL object



url
protected String url(Code)
The URL to the datasource



user
protected String user(Code)
The user name - currently unused




Constructor Detail
tinySQLConnection
public tinySQLConnection(String user, String u, Driver d) throws SQLException(Code)
Constructs a new JDBC Connection for a tinySQL database
exception:
  SQLException - in case of an error
Parameters:
  user - the user name - currently unused
Parameters:
  u - the URL used to connect to the datasource
Parameters:
  d - the Driver that instantiated this connection




Method Detail
clearWarnings
public void clearWarnings() throws SQLException(Code)
Clears the non-existant warning chain.
See Also:   java.sql.Connection.clearWarnings



close
public void close() throws SQLException(Code)
Close a Connection object. Does nothing, really.
See Also:   java.sql.Connection.close
exception:
  SQLException - is never thrown



commit
public void commit() throws SQLException(Code)
Commits a transaction. Since all SQL statements are implicitly committed, it's save to preserve the illusion, and when this method is invoked, it does not throw an exception.
See Also:   java.sql.Connection.commit



createStatement
public Statement createStatement() throws SQLException(Code)
Create and return a tinySQLStatement.
See Also:   java.sql.Connection.createStatement
exception:
  SQLException - thrown in case of error



createStatement
public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException(Code)
JDBC 2.0 Creates a Statement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the createStatement method above, but it allows the default result set type and result set concurrency type to be overridden.
Parameters:
  resultSetType - a result set type; see ResultSet.TYPE_XXX
Parameters:
  resultSetConcurrency - a concurrency type; see ResultSet.CONCUR_XXX a new Statement object
exception:
  SQLException - if a database access error occurs



disableAutoClose
public void disableAutoClose() throws SQLException(Code)
Disables autoclosing of connections and result sets. This is not supported by tinySQL.
See Also:   java.sql.Connection.disableAutoClose



executetinySQL
public tsResultSet executetinySQL(tinySQLStatement sql) throws SQLException(Code)
Execute a tinySQL Statement
Parameters:
  sql - the statement to be executed tsResultSet containing the results of the SQL statement



executetinySQL
public tsResultSet executetinySQL(tinySQLPreparedStatement psql) throws SQLException(Code)



executetinyUpdate
public int executetinyUpdate(tinySQLStatement sql) throws SQLException(Code)
Execute a tinySQL Statement
Parameters:
  sql - the statement to be executed either the row count for INSERT, UPDATE or DELETE or 0 for SQL statements that return nothing



executetinyUpdate
public int executetinyUpdate(tinySQLPreparedStatement psql) throws SQLException(Code)



getAutoClose
public boolean getAutoClose()(Code)



getAutoCommit
public boolean getAutoCommit()(Code)



getCatalog
public String getCatalog() throws SQLException(Code)
Returns the current catalog. This has no significance in tinySQL
See Also:   java.sql.Connection.getCatalog the catalog name



getMetaData
public DatabaseMetaData getMetaData() throws SQLException(Code)
This method would like to retrieve some DatabaseMetaData, but it is presently only supported for dBase access
See Also:   java.sql.Connection.getMetData
exception:
  SQLException - is never thrown a DatabaseMetaData object - someday



getTinySqlHandle
tinySQL getTinySqlHandle()(Code)



getTransactionIsolation
public int getTransactionIsolation() throws SQLException(Code)
Returns the isolation level. This is not significant for tinySQL
See Also:   java.sql.Connection.getTransactionIsolation the transaction isolation level



getTypeMap
public java.util.Map getTypeMap() throws SQLException(Code)
JDBC 2.0 Gets the type map object associated with this connection. Unless the application has added an entry to the type map, the map returned will be empty. the java.util.Map object associated with this Connection object



getWarnings
public SQLWarning getWarnings() throws SQLException(Code)
Returns a chain of warnings for the current connection; this is not supported by tinySQL.
See Also:   java.sql.Connection.getWarnings the chain of warnings for this connection



get_tinySQL
abstract public tinySQL get_tinySQL()(Code)
creates a new tinySQL object and returns it. Well, not really, since tinySQL is an abstract class. When you subclass tinySQLConnection, you will need to include this method, and return some subclass of tinySQL.



isClosed
public boolean isClosed() throws SQLException(Code)
Returns the status of the Connection.
See Also:   java.sql.Connection.isClosed
exception:
  SQLException - is never thrown true if the connection is closed, false otherwise



isReadOnly
public boolean isReadOnly() throws SQLException(Code)
Returns true if the database is in read-only mode. It always returns false.
See Also:   java.sql.Connection.isReadOnly the false will be with you... always



nativeSQL
public String nativeSQL(String sql) throws SQLException(Code)
Converts escaped SQL to tinySQL syntax. This is not supported yet, but some level of it will be meaningful, when tinySQL begins to support scalar functions. For now, it just returns the original SQL.
See Also:   java.sql.Connection.nativeSQL
Parameters:
  sql - the SQL statement just what you gave it



prepareCall
public CallableStatement prepareCall(String sql) throws SQLException(Code)
Create and return a CallableStatement. tinySQL does not support stored procs, so this automatically throws an exception.
See Also:   java.sql.Connection.prepareCall
Parameters:
  sql - the SQL Statement
exception:
  SQLException - gets thrown always



prepareCall
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException(Code)
JDBC 2.0 Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the prepareCall method above, but it allows the default result set type and result set concurrency type to be overridden.
Parameters:
  resultSetType - a result set type; see ResultSet.TYPE_XXX
Parameters:
  resultSetConcurrency - a concurrency type; see ResultSet.CONCUR_XXX a new CallableStatement object containing thepre-compiled SQL statement
exception:
  SQLException - if a database access error occurs



prepareStatement
public PreparedStatement prepareStatement(String sql) throws SQLException(Code)
Create and return a PreparedStatement. tinySQL doesn't support these, so it always throws an exception.
See Also:   java.sql.Connection.prepareStatement
Parameters:
  sql - the SQL Statement
exception:
  SQLException - gets thrown if you even look at this method



prepareStatement
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException(Code)
JDBC 2.0 Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the prepareStatement method above, but it allows the default result set type and result set concurrency type to be overridden.
Parameters:
  resultSetType - a result set type; see ResultSet.TYPE_XXX
Parameters:
  resultSetConcurrency - a concurrency type; see ResultSet.CONCUR_XXX a new PreparedStatement object containing thepre-compiled SQL statement
exception:
  SQLException - if a database access error occurs



rollback
public void rollback() throws SQLException(Code)
Rolls back a transaction. tinySQL does not support transactions, so this throws an exception.
See Also:   java.sql.Connection.rollback
exception:
  SQLException - gets thrown automatically



setAutoClose
public void setAutoClose(boolean l)(Code)



setAutoCommit
public void setAutoCommit(boolean b) throws SQLException(Code)
Sets autocommit mode - tinySQL has no support for transactions, so this does nothing.
See Also:   java.sql.Connection.setAutoCommit
Parameters:
  b - this does nothing



setCatalog
public void setCatalog(String str) throws SQLException(Code)
Sets the current catalog within the database. This is not supported by tinySQL, but we'll set the catalog String anyway.
See Also:   java.sql.Connection.setCatalog
Parameters:
  str - the catalog



setReadOnly
public void setReadOnly(boolean b) throws SQLException(Code)
Puts the database in read-only mode... not! This throws an exception whenever it is called. tinySQL does not support a read-only mode, and it might be dangerous to let a program think it's in that mode.
See Also:   java.sql.Connection.setReadOnly
Parameters:
  b - meaningless



setTransactionIsolation
public void setTransactionIsolation(int x) throws SQLException(Code)
Sets the transaction isolation level, which has no meaning in tinySQL. We'll set the isolation level value anyhow, just to keep it happy.
See Also:   java.sql.Connection.setTransactionIsolation
Parameters:
  x - the isolation level



setTypeMap
public void setTypeMap(java.util.Map map) throws SQLException(Code)
JDBC 2.0 Installs the given type map as the type map for this connection. The type map will be used for the custom mapping of SQL structured types and distinct types.
Parameters:
  the - java.util.Map object to installas the replacement for this Connectionobject's default type map



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.