|
||||||||||
| 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.AbstractCallerDatabaseHandler
public abstract class AbstractCallerDatabaseHandler
This abstract class can be used as base class for a database related caller managers. It contains methods for database creation and prepared statements for caller manager handling.
| Field Summary |
|---|
| Fields inherited from class de.janrufmonitor.repository.db.AbstractDatabaseHandler |
|---|
commit_count, m_con, m_logger, m_preparedStatements |
| Constructor Summary | |
|---|---|
AbstractCallerDatabaseHandler(String driver,
String connection,
String user,
String password,
boolean initialize)
|
|
| Method Summary | |
|---|---|
protected void |
addPreparedStatements()
Add all required prepares statements to the m_preparedStatements map. |
protected abstract ICallerList |
buildCallerList(IFilter[] filters)
Create the caller list from a query of the database. |
protected void |
createTables()
Creates the database table. |
void |
deleteCallerList(ICallerList cl)
Deletes all callers of the submitted caller list. |
boolean |
existsCaller(ICaller c)
Checks if the caller with the provided UUID exists |
ICaller |
getCaller(IPhonenumber pn)
|
ICallerList |
getCallerList(IFilter[] filters)
Selects the callers by the applied filters from the database |
void |
insertOrUpdateCallerList(ICallerList cl)
Insert the callers in the list or update the callers if it already exists. |
| 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 AbstractCallerDatabaseHandler(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
AbstractDatabaseHandler
addPreparedStatements in class AbstractDatabaseHandlerSQLException
public void insertOrUpdateCallerList(ICallerList cl)
throws SQLException
insertOrUpdateCallerList in interface ICallerDatabaseHandlercl -
SQLException
public void deleteCallerList(ICallerList cl)
throws SQLException
deleteCallerList in interface ICallerDatabaseHandlercl - a list with callers, must not be null.
SQLException
public boolean existsCaller(ICaller c)
throws SQLException
existsCaller in interface ICallerDatabaseHandlerc - a valid caller object
SQLException
public ICaller getCaller(IPhonenumber pn)
throws SQLException
getCaller in interface ICallerDatabaseHandlerSQLException
public ICallerList getCallerList(IFilter[] filters)
throws SQLException
getCallerList in interface ICallerDatabaseHandlerfilters - filetrs applied to the result
SQLException
protected abstract ICallerList buildCallerList(IFilter[] filters)
throws SQLException
filters - filetrs applied to the result
SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||