|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.janrufmonitor.repository.db.AbstractDatabaseHandler
de.janrufmonitor.repository.db.AbstractCallDatabaseHandler
public abstract class AbstractCallDatabaseHandler
This abstract class can be used as base class for a database related call managers. It contains methods for database creation and prepared statements for call manager handling.
| Field Summary |
|---|
| Fields inherited from class de.janrufmonitor.repository.db.AbstractDatabaseHandler |
|---|
commit_count, m_con, m_logger, m_preparedStatements |
| Constructor Summary | |
|---|---|
AbstractCallDatabaseHandler(String driver,
String connection,
String user,
String password,
boolean initialize)
|
|
| Method Summary | |
|---|---|
protected void |
addPreparedStatements()
Connects to the database specified in the constructor. |
protected abstract int |
buildCallCount(IFilter[] filters)
Counts the calls withe a proper database query. |
protected abstract ICallList |
buildCallList(IFilter[] filters)
Create the call list from a query of the database. |
protected abstract ICallList |
buildCallList(IFilter[] filters,
int count,
int offset)
Create the call list from a query of the database. |
protected void |
createTables()
Creates the database table. |
void |
deleteCallList(ICallList cl)
Deletes all calls in the submitted call list. |
int |
getCallCount(IFilter[] filters)
Counts the number of calls belonging to the filters obejct. |
ICallList |
getCallList(IFilter[] filters)
Fetches the calls by the applied filters from the database |
ICallList |
getCallList(IFilter[] filters,
int count,
int offset)
Fetches the calls by the applied filters from the database |
void |
setCallList(ICallList cl)
Sets all calls in the submitted list to the database. |
void |
updateCallList(ICallList cl)
Updates all calls in the submitted list. |
| Methods inherited from class de.janrufmonitor.repository.db.AbstractDatabaseHandler |
|---|
commit, connect, createAttributes, deleteAttributes, disconnect, getRuntime, getStatement, isConnected, isInitializing, isKeepAlive, rollback, setCommitCount, setInitializing, 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 |
|---|
commit, connect, disconnect, isConnected, isKeepAlive, rollback, setCommitCount, setKeepAlive |
| Constructor Detail |
|---|
public AbstractCallDatabaseHandler(String driver,
String connection,
String user,
String password,
boolean initialize)
| Method Detail |
|---|
protected void createTables()
throws SQLException
AbstractDatabaseHandler
createTables in class AbstractDatabaseHandlerSQLException
protected void addPreparedStatements()
throws SQLException
addPreparedStatements in class AbstractDatabaseHandlerSQLException - is thrown, if any exception on the db level occurs.
ClassNotFoundException - is thrown, if the db driver could not be loaded.
public void setCallList(ICallList cl)
throws SQLException
setCallList in interface ICallDatabaseHandlercl -
SQLException
public void updateCallList(ICallList cl)
throws SQLException
updateCallList in interface ICallDatabaseHandlercl -
SQLException
public void deleteCallList(ICallList cl)
throws SQLException
deleteCallList in interface ICallDatabaseHandlercl -
SQLException
public ICallList getCallList(IFilter[] filters)
throws SQLException
getCallList in interface ICallDatabaseHandlerfilters - filters applied to the result
SQLException
public ICallList getCallList(IFilter[] filters,
int count,
int offset)
throws SQLException
getCallList in interface ICallDatabaseHandlerfilters - filters applied to the result
SQLException
public int getCallCount(IFilter[] filters)
throws SQLException
getCallCount in interface ICallDatabaseHandlerfilters - filters applied to the result
SQLException
protected abstract int buildCallCount(IFilter[] filters)
throws SQLException
filters - filters applied to the result
SQLException
protected abstract ICallList buildCallList(IFilter[] filters)
throws SQLException
filters - filters applied to the result
SQLException
protected abstract ICallList buildCallList(IFilter[] filters,
int count,
int offset)
throws SQLException
filters - filters applied to the result
SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||