org.fosstrak.llrp.client.repository.sql.roaccess
Class DerbyROAccessReportsRepository
java.lang.Object
org.fosstrak.llrp.client.repository.sql.roaccess.AbstractSQLROAccessReportsRepository
org.fosstrak.llrp.client.repository.sql.roaccess.DerbyROAccessReportsRepository
- All Implemented Interfaces:
- MessageHandler, ROAccessReportsRepository
public class DerbyROAccessReportsRepository
- extends AbstractSQLROAccessReportsRepository
Derby and MySQL implementation for the RO_ACCESS_REPORTS repository (table).
Currently this implementation is used from two Repository
- namely
DerbyRepository
and MySQLRepository
.
- Author:
- sawielan
Field Summary |
static java.lang.String[][] |
COLUMN_NAMES_AND_TYPES
the columns of the RO_ACCESS_REPORTS table and the data types used in the
database to store the values from the LLRP message. |
Fields inherited from class org.fosstrak.llrp.client.repository.sql.roaccess.AbstractSQLROAccessReportsRepository |
CINDEX_AccessSpecID, CINDEX_ADAPTER, CINDEX_AntennaID, CINDEX_C1G2_CRC, CINDEX_C1G2_PC, CINDEX_ChannelIndex, CINDEX_EPC, CINDEX_FirstSeenTimestampUptime, CINDEX_FirstSeenTimestampUTC, CINDEX_InventoryParameterSpecID, CINDEX_LastSeenTimestampUptime, CINDEX_LastSeenTimestampUTC, CINDEX_LOGTIME, CINDEX_PeakRSSI, CINDEX_READER, CINDEX_ROSpecID, CINDEX_SpecIndex, CINDEX_TagSeenCount, initialized, NUM_COLUMNS, repository, TABLE_RO_ACCESS_REPORTS, wipe |
Methods inherited from class org.fosstrak.llrp.client.repository.sql.roaccess.AbstractSQLROAccessReportsRepository |
checkIfTableOk, clear, createTable, dropTable, extractTimestamp, getAll, handle, handleROAccessReport, initialize, isTableOK, setRepository |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COLUMN_NAMES_AND_TYPES
public static final java.lang.String[][] COLUMN_NAMES_AND_TYPES
- the columns of the RO_ACCESS_REPORTS table and the data types used in the
database to store the values from the LLRP message. The first entry
in the two dimensional array encodes the name of the db column, the
second entry reflects the data type chosen.
NOTICE: As java and MySQL both do not support unsigned
values, we need to allocate extra large signed data types to store the
unsigned ones. the allocation mapping is given below:
- unsigned integer -> long -> BIGINT (8Byte value in derby)
- unsigned short -> integer -> INTEGER (4Byte value in derby)
- byte -> byte -> SMALLINT (2Byte value in derby)
DerbyROAccessReportsRepository
public DerbyROAccessReportsRepository()
sqlCreateTable
protected java.lang.String sqlCreateTable()
- Specified by:
sqlCreateTable
in class AbstractSQLROAccessReportsRepository
- Returns:
- a SQL creating the necessary table.
sqlInsert
protected java.lang.String sqlInsert()
- Specified by:
sqlInsert
in class AbstractSQLROAccessReportsRepository
- Returns:
- a SQL allowing to insert a new log item.
sqlDropTable
protected java.lang.String sqlDropTable()
- Specified by:
sqlDropTable
in class AbstractSQLROAccessReportsRepository
- Returns:
- a SQL dropping the table.
Copyright © 2009. All Rights Reserved.