fr.gouv.culture.sdx.utils.database
Class SQLDatabaseConnection

java.lang.Object
  extended byfr.gouv.culture.sdx.utils.SdxObjectImpl
      extended byfr.gouv.culture.sdx.utils.database.SQLDatabaseConnection
All Implemented Interfaces:
DatabaseConnection, org.apache.avalon.framework.logger.LogEnabled, SdxObject
Direct Known Subclasses:
JDBCDatabaseConnection

public class SQLDatabaseConnection
extends SdxObjectImpl
implements DatabaseConnection

Created by IntelliJ IDEA. User: rpandey Date: Mar 3, 2003 Time: 2:13:01 PM To change this template use Options | File Templates.


Field Summary
 
Fields inherited from class fr.gouv.culture.sdx.utils.SdxObjectImpl
encoding, logger
 
Constructor Summary
SQLDatabaseConnection()
           
SQLDatabaseConnection(java.sql.Connection conn)
           
 
Method Summary
 void close()
          Closes the connectiokbn
 void commit()
          Commit all operation done with this active connection.
 java.sql.Connection getConnection()
          Returns the SQL connection to the datasource component
 void optimize()
          Can do optimization of a Repository if needed
 void rollback()
          Undo all operations done with this connection.
 void setAutoCommit(boolean autoCommit)
          Sets this connection in autocommit mode or not.
 
Methods inherited from class fr.gouv.culture.sdx.utils.SdxObjectImpl
enableLogging, getChildLogger, setEncoding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fr.gouv.culture.sdx.utils.SdxObject
setEncoding
 
Methods inherited from interface org.apache.avalon.framework.logger.LogEnabled
enableLogging
 

Constructor Detail

SQLDatabaseConnection

public SQLDatabaseConnection()

SQLDatabaseConnection

public SQLDatabaseConnection(java.sql.Connection conn)
Method Detail

commit

public void commit()
            throws SDXException
Description copied from interface: DatabaseConnection
Commit all operation done with this active connection.

Specified by:
commit in interface DatabaseConnection
Throws:
SDXException

rollback

public void rollback()
              throws SDXException
Description copied from interface: DatabaseConnection
Undo all operations done with this connection.

Specified by:
rollback in interface DatabaseConnection
Throws:
SDXException

setAutoCommit

public void setAutoCommit(boolean autoCommit)
                   throws SDXException
Description copied from interface: DatabaseConnection
Sets this connection in autocommit mode or not.

Specified by:
setAutoCommit in interface DatabaseConnection
Parameters:
autoCommit - true enables auto-commit ; false disables auto-commit.
Throws:
SDXException

getConnection

public java.sql.Connection getConnection()
Returns the SQL connection to the datasource component

Specified by:
getConnection in interface DatabaseConnection

close

public void close()
           throws SDXException
Description copied from interface: DatabaseConnection
Closes the connectiokbn

Specified by:
close in interface DatabaseConnection
Throws:
SDXException

optimize

public void optimize()
              throws SDXException
Description copied from interface: DatabaseConnection
Can do optimization of a Repository if needed

Specified by:
optimize in interface DatabaseConnection
Throws:
SDXException


Copyright © 2000-2004 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.