com.sag.osami.contextstore.storage
Interface DBConstants

All Known Subinterfaces:
IJDBCDialect
All Known Implementing Classes:
AndroidStorage, DerbyDialect, GenericJDBCDialect, JDBCStorage, MysqlDialect, PostgresqlDialect, SqliteDialect

public interface DBConstants

This interface defines table name and column name constants for a database-backed ContextStore storage implementation. Storage implementation classes should use this constants so that e.g. query writers know how to refer to columns etc.

A context store table based on the constants defined in this interface would look like this:

"contextstore"
Column name Example value
"id" auto incremented
"originID" COM/SAG/OSAMI/temp1
"type" TEMP_C
"dataClass" java.lang.Long
"data" (serialized payload data, e.g. JSON-encoded)
"contextStoreOriginID" the-hostname
"timestamp" 2011-12-24 00:00:01.984


Field Summary
static java.lang.String COL_CTXSTORE_ID
           
static java.lang.String COL_DATA
           
static java.lang.String COL_DATA_CLASS
           
static java.lang.String COL_ID
           
static java.lang.String COL_ORIGINID
           
static java.lang.String COL_TIMESTAMP
           
static java.lang.String COL_TYPE
           
static java.util.List<java.lang.String> COLS
          An unmodifiable list containing the column names of the ContextStore table.
static java.util.List<java.lang.String> TABLE_AND_COLS
          An unmodifiable list containing the table name and colum names of the ContextStore table.
static java.lang.String TABLE_NAME
           
 

Field Detail

TABLE_NAME

static final java.lang.String TABLE_NAME
See Also:
Constant Field Values

COL_ID

static final java.lang.String COL_ID
See Also:
Constant Field Values

COL_ORIGINID

static final java.lang.String COL_ORIGINID
See Also:
Constant Field Values

COL_TYPE

static final java.lang.String COL_TYPE
See Also:
Constant Field Values

COL_DATA

static final java.lang.String COL_DATA
See Also:
Constant Field Values

COL_DATA_CLASS

static final java.lang.String COL_DATA_CLASS
See Also:
Constant Field Values

COL_CTXSTORE_ID

static final java.lang.String COL_CTXSTORE_ID
See Also:
Constant Field Values

COL_TIMESTAMP

static final java.lang.String COL_TIMESTAMP
See Also:
Constant Field Values

COLS

static final java.util.List<java.lang.String> COLS
An unmodifiable list containing the column names of the ContextStore table. This is a convenience constant. The order of the columns is:
  1. id
  2. originID
  3. type
  4. dataClass
  5. data
  6. contextStoreOriginID
  7. timestamp


TABLE_AND_COLS

static final java.util.List<java.lang.String> TABLE_AND_COLS
An unmodifiable list containing the table name and colum names of the ContextStore table. This is a convenience constant. The order is:
  1. contextstore [table name]
  2. id
  3. originID
  4. type
  5. dataClass
  6. data
  7. contextStoreOriginID
  8. timestamp