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.utils.database
Class SQLDatabaseConnection

    java.lang.Object
      fr.gouv.culture.sdx.utils.AbstractSdxObject
          fr.gouv.culture.sdx.utils.database.SQLDatabaseConnection

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

Direct Known Subclasses:
  JDBCDatabaseConnection

public class SQLDatabaseConnection
extends AbstractSdxObject
implements DatabaseConnection

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.utils.database.DatabaseConnection
`CLASS_NAME_SUFFIX`

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

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.
`protected java.lang.String` | `getClassNameSuffix()` Sub classes should element this method to return their class name suffix for SAX output
`java.sql.Connection` | `getConnection()` Returns the SQL connection to the datasource component
`protected boolean` | `initToSax()` Init the LinkedHashMap _xmlizable_objects with the objects in order to describ them in XML
`protected void` | `initVolatileObjectsToSax()` Init the LinkedHashMap _xmlizable_volatile_objects with the objects in order to describ them in XML Some objects need to be refresh each time a toSAX is called
`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.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 fr.gouv.culture.sdx.utils.SdxObject
`getLog`

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

Methods inherited from interface org.apache.avalon.framework.context.Contextualizable
`contextualize`

Methods inherited from interface org.apache.avalon.framework.service.Serviceable
`service`

Methods inherited from interface org.apache.avalon.framework.configuration.Configurable
`configure`

Methods inherited from interface fr.gouv.culture.sdx.utils.Identifiable
`getId, setId`

Methods inherited from interface fr.gouv.culture.sdx.utils.Describable
`getDescription, setDescription`

Methods inherited from interface fr.gouv.culture.sdx.utils.Encodable
`getEncoding, setEncoding`

Methods inherited from interface fr.gouv.culture.sdx.utils.Localizable
`getLocale, getXmlLang, setLocale, setXmlLang`

Methods inherited from interface org.apache.excalibur.xml.sax.XMLizable
`toSAX`

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`

### getClassNameSuffix

    protected java.lang.String getClassNameSuffix()

  Description copied from class: `AbstractSdxObject`
  Sub classes should element this method to return their class name suffix for SAX output

  Specified by:
    `getClassNameSuffix` in class `AbstractSdxObject`

### initToSax

    protected boolean initToSax()

  Description copied from class: `AbstractSdxObject`
  Init the LinkedHashMap _xmlizable_objects with the objects in order to describ them in XML

  Specified by:
    `initToSax` in class `AbstractSdxObject`

### initVolatileObjectsToSax

    protected void initVolatileObjectsToSax()

  Init the LinkedHashMap _xmlizable_volatile_objects with the objects in order to describ them in XML Some objects need to be refresh each time a toSAX is called

  Specified by:
    `initVolatileObjectsToSax` in class `AbstractSdxObject`

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.