Java Doc for Connection.java in  » Database-JDBC-Connection-Pool » mysql-connector-java-5.1.3 » com » mysql » jdbc » 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 JDBC Connection Pool » mysql connector java 5.1.3 » com.mysql.jdbc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.mysql.jdbc.Connection

Connection
public interface Connection extends java.sql.Connection,ConnectionProperties(Code)
This interface contains methods that are considered the "vendor extension" to the JDBC API for MySQL's implementation of java.sql.Connection. For those looking further into the driver implementation, it is not an API that is used for plugability of implementations inside our driver (which is why there are still references to ConnectionImpl throughout the code).
version:
   $Id: $




Method Summary
abstract public  voidchangeUser(String userName, String newPassword)
     Changes the user on this connection by performing a re-authentication.
abstract public  voidclearHasTriedMaster()
    
abstract public  PreparedStatementclientPrepareStatement(String sql)
     Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
abstract public  java.sql.PreparedStatementclientPrepareStatement(String sql, int autoGenKeyIndex)
     Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
abstract public  PreparedStatementclientPrepareStatement(String sql, int resultSetType, int resultSetConcurrency)
     Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
abstract public  java.sql.PreparedStatementclientPrepareStatement(String sql, int[] autoGenKeyIndexes)
     Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
abstract public  java.sql.PreparedStatementclientPrepareStatement(String sql, String[] autoGenKeyColNames)
     Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
abstract public  intgetActiveStatementCount()
     Returns the number of statements active on this connection, which haven't been .close()d.
abstract public  longgetIdleFor()
     Reports how long this connection has been idle.
abstract public  LoggetLog()
     Returns the log mechanism that should be used to log information from/for this Connection.
abstract public  StringgetServerCharacterEncoding()
    
abstract public  TimeZonegetServerTimezoneTZ()
     Returns the TimeZone that represents the configured timezone for the server.
abstract public  StringgetStatementComment()
     Returns the comment that will be prepended to all statements sent to the server.
abstract public  booleanhasTriedMaster()
     Has this connection tried to execute a query on the "master" server (first host in a multiple host list).
abstract public  booleanisInGlobalTx()
    
abstract public  booleanisMasterConnection()
    
abstract public  booleanisNoBackslashEscapesSet()
    
abstract public  booleanlowerCaseTableNames()
    
abstract public  booleanparserKnowsUnicode()
    
abstract public  voidping()
     Detect if the connection is still good by sending a ping command to the server.
abstract public  voidresetServerState()
     Resets the server-side state of this connection.
abstract public  ServerPreparedStatementserverPrepareStatement(String sql)
     Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
abstract public  java.sql.PreparedStatementserverPrepareStatement(String sql, int autoGenKeyIndex)
     Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
abstract public  java.sql.PreparedStatementserverPrepareStatement(String sql, int resultSetType, int resultSetConcurrency)
     Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
abstract public  java.sql.PreparedStatementserverPrepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
     Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
abstract public  java.sql.PreparedStatementserverPrepareStatement(String sql, int[] autoGenKeyIndexes)
     Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
abstract public  java.sql.PreparedStatementserverPrepareStatement(String sql, String[] autoGenKeyColNames)
     Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
abstract public  voidsetFailedOver(boolean flag)
    
abstract public  voidsetPreferSlaveDuringFailover(boolean flag)
    
abstract public  voidsetStatementComment(String comment)
     Sets the comment that will be prepended to all statements sent to the server.
abstract public  voidshutdownServer()
    
abstract public  booleansupportsIsolationLevel()
    
abstract public  booleansupportsQuotedIdentifiers()
    
abstract public  booleansupportsTransactions()
    
abstract public  booleanversionMeetsMinimum(int major, int minor, int subminor)
    



Method Detail
changeUser
abstract public void changeUser(String userName, String newPassword) throws SQLException(Code)
Changes the user on this connection by performing a re-authentication. If authentication fails, the connection will remain under the context of the current user.
Parameters:
  userName - the username to authenticate with
Parameters:
  newPassword - the password to authenticate with
throws:
  SQLException - if authentication fails, or some other error occurs whileperforming the command.



clearHasTriedMaster
abstract public void clearHasTriedMaster()(Code)



clientPrepareStatement
abstract public PreparedStatement clientPrepareStatement(String sql) throws SQLException(Code)
Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
See Also:   java.sql.Connection.prepareStatement(String)



clientPrepareStatement
abstract public java.sql.PreparedStatement clientPrepareStatement(String sql, int autoGenKeyIndex) throws SQLException(Code)
Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
See Also:   java.sql.Connection.prepareStatement(Stringint)



clientPrepareStatement
abstract public PreparedStatement clientPrepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException(Code)
Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
See Also:   java.sql.Connection.prepareStatement(Stringintint)



clientPrepareStatement
abstract public java.sql.PreparedStatement clientPrepareStatement(String sql, int[] autoGenKeyIndexes) throws SQLException(Code)
Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
See Also:   java.sql.Connection.prepareStatement(Stringint[])



clientPrepareStatement
abstract public java.sql.PreparedStatement clientPrepareStatement(String sql, String[] autoGenKeyColNames) throws SQLException(Code)
Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
See Also:   java.sql.Connection.prepareStatement(StringString[])



getActiveStatementCount
abstract public int getActiveStatementCount()(Code)
Returns the number of statements active on this connection, which haven't been .close()d.



getIdleFor
abstract public long getIdleFor()(Code)
Reports how long this connection has been idle. This time (reported in milliseconds) is updated once a query has completed. number of ms that this connection has been idle, 0 if the driveris busy retrieving results.



getLog
abstract public Log getLog() throws SQLException(Code)
Returns the log mechanism that should be used to log information from/for this Connection. the Log instance to use for logging messages.
throws:
  SQLException - if an error occurs



getServerCharacterEncoding
abstract public String getServerCharacterEncoding()(Code)
Returns the server's character set the server's character set.



getServerTimezoneTZ
abstract public TimeZone getServerTimezoneTZ()(Code)
Returns the TimeZone that represents the configured timezone for the server.



getStatementComment
abstract public String getStatementComment()(Code)
Returns the comment that will be prepended to all statements sent to the server. the comment that will be prepended to all statementssent to the server.



hasTriedMaster
abstract public boolean hasTriedMaster()(Code)
Has this connection tried to execute a query on the "master" server (first host in a multiple host list).



isInGlobalTx
abstract public boolean isInGlobalTx()(Code)
Is this connection currently a participant in an XA transaction?



isMasterConnection
abstract public boolean isMasterConnection()(Code)
Is this connection connected to the first host in the list if there is a list of servers in the URL? true if this connection is connected to the first in the list.



isNoBackslashEscapesSet
abstract public boolean isNoBackslashEscapesSet()(Code)
Is the server in a sql_mode that doesn't allow us to use \\ to escape things? Returns the noBackslashEscapes.



lowerCaseTableNames
abstract public boolean lowerCaseTableNames()(Code)
Is the server configured to use lower-case table names only? true if lower_case_table_names is 'on'



parserKnowsUnicode
abstract public boolean parserKnowsUnicode()(Code)
Does the server this connection is connected to support unicode?



ping
abstract public void ping() throws SQLException(Code)
Detect if the connection is still good by sending a ping command to the server.
throws:
  SQLException - if the ping fails



resetServerState
abstract public void resetServerState() throws SQLException(Code)
Resets the server-side state of this connection. Doesn't work for MySQL versions older than 4.0.6 or if isParanoid() is set (it will become a no-op in these cases). Usually only used from connection pooling code.
throws:
  SQLException - if the operation fails while resetting server state.



serverPrepareStatement
abstract public ServerPreparedStatement serverPrepareStatement(String sql) throws SQLException(Code)
Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
See Also:   java.sql.Connection.prepareStatement(String)



serverPrepareStatement
abstract public java.sql.PreparedStatement serverPrepareStatement(String sql, int autoGenKeyIndex) throws SQLException(Code)
Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
See Also:   java.sql.Connection.prepareStatement(Stringint)



serverPrepareStatement
abstract public java.sql.PreparedStatement serverPrepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException(Code)
Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
See Also:   java.sql.Connection.prepareStatement(Stringintint)



serverPrepareStatement
abstract public java.sql.PreparedStatement serverPrepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException(Code)
Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
See Also:   java.sql.Connection.prepareStatement(Stringintintint)



serverPrepareStatement
abstract public java.sql.PreparedStatement serverPrepareStatement(String sql, int[] autoGenKeyIndexes) throws SQLException(Code)
Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
See Also:   java.sql.Connection.prepareStatement(Stringint[])



serverPrepareStatement
abstract public java.sql.PreparedStatement serverPrepareStatement(String sql, String[] autoGenKeyColNames) throws SQLException(Code)
Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
See Also:   java.sql.Connection.prepareStatement(StringString[])



setFailedOver
abstract public void setFailedOver(boolean flag)(Code)

Parameters:
  failedOver - The failedOver to set.



setPreferSlaveDuringFailover
abstract public void setPreferSlaveDuringFailover(boolean flag)(Code)

Parameters:
  preferSlaveDuringFailover - The preferSlaveDuringFailover to set.



setStatementComment
abstract public void setStatementComment(String comment)(Code)
Sets the comment that will be prepended to all statements sent to the server. Do not use slash-star or star-slash tokens in the comment as these will be added by the driver itself.
Parameters:
  comment - the comment that will be prepended to all statementssent to the server.



shutdownServer
abstract public void shutdownServer() throws SQLException(Code)
Used by MiniAdmin to shutdown a MySQL server
throws:
  SQLException - if the command can not be issued.



supportsIsolationLevel
abstract public boolean supportsIsolationLevel()(Code)
Does the server this connection is connected to support quoted isolation levels?



supportsQuotedIdentifiers
abstract public boolean supportsQuotedIdentifiers()(Code)
Does the server this connection is connected to support quoted identifiers?



supportsTransactions
abstract public boolean supportsTransactions()(Code)
Does the server this connection is connected to support quoted identifiers?



versionMeetsMinimum
abstract public boolean versionMeetsMinimum(int major, int minor, int subminor) throws SQLException(Code)
Does the server this connection is connected to meet or exceed the given version?



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