de.janrufmonitor.repository.db.hsqldb
Class HsqldbCallDatabaseHandler

java.lang.Object
  extended by de.janrufmonitor.repository.db.AbstractDatabaseHandler
      extended by de.janrufmonitor.repository.db.AbstractCallDatabaseHandler
          extended by de.janrufmonitor.repository.db.hsqldb.HsqldbCallDatabaseHandler
All Implemented Interfaces:
ICallDatabaseHandler, IDatabaseHandler

public abstract class HsqldbCallDatabaseHandler
extends AbstractCallDatabaseHandler


Field Summary
 
Fields inherited from class de.janrufmonitor.repository.db.AbstractDatabaseHandler
commit_count, m_con, m_logger, m_preparedStatements
 
Constructor Summary
HsqldbCallDatabaseHandler(String driver, String connection, String user, String password, boolean initialize)
           
 
Method Summary
protected  int buildCallCount(IFilter[] filters)
          Counts the calls withe a proper database query.
protected  ICallList buildCallList(IFilter[] filters)
          Create the call list from a query of the database.
protected  ICallList buildCallList(IFilter[] filters, int count, int offset)
          Create the call list from a query of the database.
 void commit()
          Commits the changed data to the database.
protected  void createTables()
          Creates the database table.
 void disconnect()
          Disconnects the current db and shuts it down.
 void setInitializing(boolean init)
          Sets the initinal attribute of the database.
 
Methods inherited from class de.janrufmonitor.repository.db.AbstractCallDatabaseHandler
addPreparedStatements, deleteCallList, getCallCount, getCallList, getCallList, setCallList, updateCallList
 
Methods inherited from class de.janrufmonitor.repository.db.AbstractDatabaseHandler
connect, createAttributes, deleteAttributes, getRuntime, getStatement, isConnected, isInitializing, isKeepAlive, rollback, setCommitCount, setKeepAlive, updateAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.janrufmonitor.repository.db.IDatabaseHandler
connect, isConnected, isKeepAlive, rollback, setCommitCount, setKeepAlive
 

Constructor Detail

HsqldbCallDatabaseHandler

public HsqldbCallDatabaseHandler(String driver,
                                 String connection,
                                 String user,
                                 String password,
                                 boolean initialize)
Method Detail

disconnect

public void disconnect()
                throws SQLException
Description copied from class: AbstractDatabaseHandler
Disconnects the current db and shuts it down. The connection is set to null.

Specified by:
disconnect in interface IDatabaseHandler
Overrides:
disconnect in class AbstractDatabaseHandler
Throws:
SQLException

commit

public void commit()
            throws SQLException
Description copied from class: AbstractDatabaseHandler
Commits the changed data to the database.

Specified by:
commit in interface IDatabaseHandler
Overrides:
commit in class AbstractDatabaseHandler
Throws:
SQLException

createTables

protected void createTables()
                     throws SQLException
Description copied from class: AbstractDatabaseHandler
Creates the database table.

Overrides:
createTables in class AbstractCallDatabaseHandler
Throws:
SQLException

buildCallList

protected ICallList buildCallList(IFilter[] filters)
                           throws SQLException
Description copied from class: AbstractCallDatabaseHandler
Create the call list from a query of the database. This abstract method must be implemented by all CallDatabaseHandler.

Specified by:
buildCallList in class AbstractCallDatabaseHandler
Parameters:
filters - filters applied to the result
Returns:
Throws:
SQLException

buildCallList

protected ICallList buildCallList(IFilter[] filters,
                                  int count,
                                  int offset)
                           throws SQLException
Description copied from class: AbstractCallDatabaseHandler
Create the call list from a query of the database. This abstract method must be implemented by all CallDatabaseHandler.

Specified by:
buildCallList in class AbstractCallDatabaseHandler
Parameters:
filters - filters applied to the result
Returns:
Throws:
SQLException

buildCallCount

protected int buildCallCount(IFilter[] filters)
                      throws SQLException
Description copied from class: AbstractCallDatabaseHandler
Counts the calls withe a proper database query.

Specified by:
buildCallCount in class AbstractCallDatabaseHandler
Parameters:
filters - filters applied to the result
Returns:
number of calls belonging to the filters
Throws:
SQLException

setInitializing

public void setInitializing(boolean init)
Description copied from class: AbstractDatabaseHandler
Sets the initinal attribute of the database. Required if keep-alive is disabled and multiple re-connects are expected.

Overrides:
setInitializing in class AbstractDatabaseHandler


Copyright © 2010 by Thilo Brandt. All Rights Reserved.