org.fosstrak.llrp.client.repository.sql
Class DerbyRepository
java.lang.Object
org.fosstrak.llrp.client.repository.sql.AbstractSQLRepository
org.fosstrak.llrp.client.repository.sql.DerbyRepository
- All Implemented Interfaces:
- Repository
public class DerbyRepository
- extends AbstractSQLRepository
The LLRP message repository implementation based on Sun JavaDB.
Please make sure the derby.jar in the build path before you can
start the database.
- Version:
- 1.0
- Author:
- Haoning Zhang, sawielan
Fields inherited from class org.fosstrak.llrp.client.repository.sql.AbstractSQLRepository |
args, conn, connectURL, DB_DRIVER, DB_NAME, isHealth, logROAccess, NUM_TABLE_COLUMNS, password, SELECTOR_ADAPTOR, SELECTOR_COMMENT, SELECTOR_CONTENT, SELECTOR_ID, SELECTOR_MARK, SELECTOR_MESSAGE_TYPE, SELECTOR_READER, SELECTOR_STATUS, SELECTOR_TIMESTAMP, TABLE_LLRP_REPOSITORY, username, wipe, wipeROAccess |
Methods inherited from class org.fosstrak.llrp.client.repository.sql.AbstractSQLRepository |
clearAdapter, clearAll, clearReader, close, count, createTable, dropTable, existsTable, get, get, getArgs, getDBConnection, getDBDriver, isHealth, loadDriver, put, sqlCreateTable, sqlDropTable, sqlInsertMessage, sqlRemoveAllAdapterMessages, sqlRemoveAllMessages, sqlRemoveAllReaderMessages, sqlSelectByAdapterAndReaderWithContent, sqlSelectByAdapterAndReaderWithoutContent, sqlSelectByAdapterWithContent, sqlSelectByAdapterWithoutContent, sqlSelectMessageByID, sqlSelectMessagesWithContent, sqlSelectMessagesWithoutContent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
repoROAccessReports
protected DerbyROAccessReportsRepository repoROAccessReports
ARG_REPO_LOCATION
public static final java.lang.String ARG_REPO_LOCATION
- the name of the property for the repository location in the args map.
- See Also:
- Constant Field Values
DerbyRepository
public DerbyRepository()
- construct a new java DB repository.
initialize
public void initialize(java.util.Map<java.lang.String,java.lang.String> args)
throws LLRPRuntimeException
- Description copied from interface:
Repository
- Initializer method for the repository. The method will be called directly
after instantiation.
- Specified by:
initialize
in interface Repository
- Overrides:
initialize
in class AbstractSQLRepository
- Parameters:
args
- hash-map with the parameters.
- Throws:
LLRPRuntimeException
openConnection
protected java.sql.Connection openConnection()
throws java.lang.Exception
- Description copied from class:
AbstractSQLRepository
- Opens the JDBC connection to the database.
- Specified by:
openConnection
in class AbstractSQLRepository
- Returns:
- a handle to the Connection item.
- Throws:
java.lang.Exception
- whenever the connection could not be established.
getROAccessRepository
public ROAccessReportsRepository getROAccessRepository()
- Description copied from interface:
Repository
- The
ROAccessReportsRepository
is implemented via the strategy
pattern. Depending on the type of the repository, you will get a
different implementation of this handle at runtime. The respective
implementation will setup the data-structures used to log
RO_ACCESS_REPORTS and ease the access to the stored information.
- Returns:
- a handle to the RO_ACCESS_REPORTS repository. if the
implementation of the repository does not implement this functionality,
it shall return
null
.
Copyright © 2009. All Rights Reserved.