de.janrufmonitor.repository
Class AbstractDatabaseCallManager

java.lang.Object
  extended by de.janrufmonitor.repository.AbstractConfigurableCallManager
      extended by de.janrufmonitor.repository.AbstractDatabaseCallManager
All Implemented Interfaces:
IConfigurable, IManager, IRepositoryManager, ICallManager, IReadCallRepository, IWriteCallRepository

public abstract class AbstractDatabaseCallManager
extends AbstractConfigurableCallManager
implements IReadCallRepository, IWriteCallRepository


Field Summary
protected  ICallDatabaseHandler m_dbh
           
 
Fields inherited from class de.janrufmonitor.repository.AbstractConfigurableCallManager
CFG_ENABLED, CFG_PRIO, m_configuration, m_externalID, m_logger
 
Constructor Summary
AbstractDatabaseCallManager()
           
 
Method Summary
 int getCallCount(IFilter[] filters)
          Gets the number of call entries in the repository for a specific filter object.
 ICallList getCalls(IFilter filter)
          Gets a list with all calls of a repository filtered by the specified filter implementation.
 ICallList getCalls(IFilter[] filters)
          Gets a list with all calls of a repository filtered by the specified filter array.
 ICallList getCalls(IFilter[] filters, int count, int offset)
          Gets a list with all calls of a repository filtered by the specified filter array.
protected abstract  ICallDatabaseHandler getDatabaseHandler()
          Creates a new instance of a specific database handler.
 boolean isSupported(Class c)
          Returns wether a repository type (de.janrufmonitor.repository.types.*) is suppored by a repository manager implementation.
 void removeCall(ICall call)
          Removes a certain call from a repository.
 void removeCalls(ICallList callList)
          Removes a list of calls objects from a repository.
 void setCall(ICall call)
          Sets a call object to a repository.
 void setCalls(ICallList list)
          Sets a list of call objects to a repository.
 void shutdown()
          This method is called on shutdown time by the runtime object.
 void updateCall(ICall call)
          Updates a call with the new data.
 void updateCalls(ICallList list)
          Updates a call list with the new data.
 
Methods inherited from class de.janrufmonitor.repository.AbstractConfigurableCallManager
getConfigurableID, getID, getManagerID, getPriority, getRuntime, isActive, restart, setConfiguration, setManagerID, startup, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.janrufmonitor.framework.configuration.IConfigurable
getNamespace
 

Field Detail

m_dbh

protected ICallDatabaseHandler m_dbh
Constructor Detail

AbstractDatabaseCallManager

public AbstractDatabaseCallManager()
Method Detail

isSupported

public boolean isSupported(Class c)
Description copied from interface: IRepositoryManager
Returns wether a repository type (de.janrufmonitor.repository.types.*) is suppored by a repository manager implementation.

Specified by:
isSupported in interface IRepositoryManager
Parameters:
c - Interface to be supported.
Returns:
true is interface is supported, otherwise false.

setCall

public void setCall(ICall call)
Description copied from interface: IWriteCallRepository
Sets a call object to a repository.

Specified by:
setCall in interface IWriteCallRepository
Parameters:
call - call to be set

setCalls

public void setCalls(ICallList list)
Description copied from interface: IWriteCallRepository
Sets a list of call objects to a repository.

Specified by:
setCalls in interface IWriteCallRepository
Parameters:
list - call list to be set

updateCall

public void updateCall(ICall call)
Description copied from interface: IWriteCallRepository
Updates a call with the new data. The call to be updated has to be detremined through its UUID.

Specified by:
updateCall in interface IWriteCallRepository
Parameters:
call - call to be updated

updateCalls

public void updateCalls(ICallList list)
Description copied from interface: IWriteCallRepository
Updates a call list with the new data. The calls to be updated have to be detremined through its UUID.

Specified by:
updateCalls in interface IWriteCallRepository
Parameters:
list - call list to be updated

removeCall

public void removeCall(ICall call)
Description copied from interface: IWriteCallRepository
Removes a certain call from a repository.

Specified by:
removeCall in interface IWriteCallRepository
Parameters:
call - call to be removed

removeCalls

public void removeCalls(ICallList callList)
Description copied from interface: IWriteCallRepository
Removes a list of calls objects from a repository.

Specified by:
removeCalls in interface IWriteCallRepository
Parameters:
callList - list of calls to be removed.

shutdown

public void shutdown()
Description copied from interface: IManager
This method is called on shutdown time by the runtime object.

Specified by:
shutdown in interface IManager
Overrides:
shutdown in class AbstractConfigurableCallManager

getCalls

public ICallList getCalls(IFilter filter)
Description copied from interface: IReadCallRepository
Gets a list with all calls of a repository filtered by the specified filter implementation.

Specified by:
getCalls in interface IReadCallRepository
Returns:
list with calls

getCalls

public ICallList getCalls(IFilter[] filters)
Description copied from interface: IReadCallRepository
Gets a list with all calls of a repository filtered by the specified filter array. The order of the filtering is done by the order of the array object.

Specified by:
getCalls in interface IReadCallRepository
Returns:
list with calls

getCalls

public ICallList getCalls(IFilter[] filters,
                          int count,
                          int offset)
Description copied from interface: IReadCallRepository
Gets a list with all calls of a repository filtered by the specified filter array. The order of the filtering is done by the order of the array object.

Specified by:
getCalls in interface IReadCallRepository
count - number off entries from repository
offset - starting point in repository
Returns:
list with calls

getDatabaseHandler

protected abstract ICallDatabaseHandler getDatabaseHandler()
Creates a new instance of a specific database handler.

Returns:
a valid database handler, must not be null.

getCallCount

public int getCallCount(IFilter[] filters)
Description copied from interface: IReadCallRepository
Gets the number of call entries in the repository for a specific filter object.

Specified by:
getCallCount in interface IReadCallRepository
Returns:
number of calls applied on this filter


Copyright © 2010 by Thilo Brandt. All Rights Reserved.