fr.gouv.culture.sdx.repository
Class AbstractRepositoryConnection

java.lang.Object
  extended byfr.gouv.culture.sdx.repository.AbstractRepositoryConnection
All Implemented Interfaces:
org.apache.avalon.framework.logger.LogEnabled, RepositoryConnection
Direct Known Subclasses:
JDBCRepositoryConnection, LuceneRepositoryConnection

public abstract class AbstractRepositoryConnection
extends java.lang.Object
implements RepositoryConnection


Field Summary
protected  org.apache.avalon.framework.logger.Logger logger
          Avalon logger to write information.
 
Constructor Summary
AbstractRepositoryConnection()
           
 
Method Summary
 void commit()
          Commit all operation done with this active connection.
 void enableLogging(org.apache.avalon.framework.logger.Logger logger)
          Set's the logger for this connection.
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected org.apache.avalon.framework.logger.Logger logger
Avalon logger to write information.

Constructor Detail

AbstractRepositoryConnection

public AbstractRepositoryConnection()
Method Detail

enableLogging

public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
Set's the logger for this connection.

Specified by:
enableLogging in interface org.apache.avalon.framework.logger.LogEnabled
Parameters:
logger - The logger to use.

optimize

public void optimize()
              throws SDXException
Can do optimization of a Repository if needed

Specified by:
optimize in interface RepositoryConnection
Throws:
SDXException

setAutoCommit

public void setAutoCommit(boolean autoCommit)
                   throws SDXException
Sets this connection in autocommit mode or not.

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

rollback

public void rollback()
              throws SDXException
Undo all operations done with this connection.

Specified by:
rollback in interface RepositoryConnection
Throws:
SDXException

commit

public void commit()
            throws SDXException
Commit all operation done with this active connection.

Specified by:
commit in interface RepositoryConnection
Throws:
SDXException


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