Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## fr.gouv.culture.sdx.repository
Class JDBCRepositoryConnection

    java.lang.Object
      fr.gouv.culture.sdx.utils.AbstractSdxObject
          fr.gouv.culture.sdx.repository.AbstractRepositoryConnection
              fr.gouv.culture.sdx.repository.JDBCRepositoryConnection

All Implemented Interfaces:
  org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, Describable, Encodable, Identifiable, Localizable, org.apache.avalon.framework.logger.LogEnabled, RepositoryConnection, SdxObject, org.apache.avalon.framework.service.Serviceable, org.apache.excalibur.xml.sax.XMLizable

public class JDBCRepositoryConnection
extends AbstractRepositoryConnection

This classes represents a SQL Connection to JDBC Source

Nested Class Summary

Nested classes inherited from class fr.gouv.culture.sdx.utils.SdxObject
`SdxObject.ConfigurationNode`

Field Summary

Fields inherited from class fr.gouv.culture.sdx.utils.AbstractSdxObject
`_configuration, _context, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitialized`

Fields inherited from interface fr.gouv.culture.sdx.repository.RepositoryConnection
`CLASS_NAME_SUFFIX`

Fields inherited from interface fr.gouv.culture.sdx.utils.Encodable
`DEFAULT_ENCODING`

Constructor Summary
`JDBCRepositoryConnection(java.sql.Connection conn)`
`JDBCRepositoryConnection(org.apache.avalon.excalibur.datasource.DataSourceComponent dataSource)` Creates a connection using a standard SQL Connection.

Method Summary
`void` | `commit()` Commit all pending operations within this active connection.
`java.sql.Connection` | `getConnection()` Returns the SQL connection to the datasource component
`org.apache.avalon.excalibur.datasource.DataSourceComponent` | `getDataSource()` Returns the datasource component from which this connection was derived
`protected void` | `releaseSqlConnection()` Releases the SQL Connection to the datasource
`void` | `rollback()` Undo all pending operations within with this connection.
`void` | `setAutoCommit(boolean autoCommit)` Sets this connection in autocommit mode or not.

Methods inherited from class fr.gouv.culture.sdx.repository.AbstractRepositoryConnection
`getClassNameSuffix, initToSax, initVolatileObjectsToSax, optimize`

Methods inherited from class fr.gouv.culture.sdx.utils.AbstractSdxObject
`configure, configureDescription, contextualize, enableLogging, getBaseAttributes, getConfiguration, getContext, getDescription, getEncoding, getId, getLocale, getLog, getServiceManager, getXmlLang, service, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, toSAX, verifyConfigurationResources`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.apache.avalon.framework.logger.LogEnabled
`enableLogging`

Constructor Detail

### JDBCRepositoryConnection

    public JDBCRepositoryConnection(org.apache.avalon.excalibur.datasource.DataSourceComponent dataSource)
                             throws java.sql.SQLException

  Creates a connection using a standard SQL Connection.

Parameters:
  `dataSource` - The component from cocoon representing the database

### JDBCRepositoryConnection

    public JDBCRepositoryConnection(java.sql.Connection conn)
                             throws java.sql.SQLException

Method Detail

### commit

    public void commit()
                throws SDXException

  Commit all pending operations within this active connection.

  Specified by:
    `commit` in interface `RepositoryConnection`
  Overrides:
    `commit` in class `AbstractRepositoryConnection`
  Throws:
    `SDXException`

### rollback

    public void rollback()
                  throws SDXException

  Undo all pending operations within with this connection.

  Specified by:
    `rollback` in interface `RepositoryConnection`
  Overrides:
    `rollback` in class `AbstractRepositoryConnection`
  Throws:
    `SDXException`

### setAutoCommit

    public void setAutoCommit(boolean autoCommit)
                       throws SDXException

  Sets this connection in autocommit mode or not.

  Specified by:
    `setAutoCommit` in interface `RepositoryConnection`
  Overrides:
    `setAutoCommit` in class `AbstractRepositoryConnection`
  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

### getDataSource

    public org.apache.avalon.excalibur.datasource.DataSourceComponent getDataSource()

  Returns the datasource component from which this connection was derived

### releaseSqlConnection

    protected void releaseSqlConnection()
                                 throws SDXException

  Releases the SQL Connection to the datasource

  Throws:
    `SDXException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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