nxt.db

## Class ValuesDbTable<T,V>

- java.lang.Object
- - nxt.db.Table
  - - nxt.db.DerivedDbTable
    - - nxt.db.ValuesDbTable<T,V>

- Direct Known Subclasses:
    VersionedValuesDbTable

      public abstract class ValuesDbTable<T,V>
      extends DerivedDbTable

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected DbKey.Factory<T>` | `dbKeyFactory`

    - ### Fields inherited from class nxt.db.Table

      `db, schema, schemaTable, table`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ValuesDbTable(java.lang.String schemaTable, DbKey.Factory<T> dbKeyFactory)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `clearCache()`
    `java.util.List<V>` | `get(DbKey dbKey)`
    `int` | `getCount()`
    `int` | `getCount(DbClause dbClause)`
    `void` | `insert(T t, java.util.List<V> values)`
    `protected abstract V` | `load(java.sql.Connection con, java.sql.ResultSet rs)`
    `void` | `popOffTo(int height)`
    `protected abstract void` | `save(java.sql.Connection con, T t, V v)`
    `void` | `trim(int height)`

    - ### Methods inherited from class nxt.db.DerivedDbTable

      `createSearchIndex, isPersistent, rollback, truncate`

    - ### Methods inherited from class nxt.db.Table

      `getConnection, getCount, getRowCount, getSchemaTable, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### dbKeyFactory

          protected final DbKey.Factory<T> dbKeyFactory

  - ### Constructor Detail

    - #### ValuesDbTable

          protected ValuesDbTable(java.lang.String schemaTable,
                                  DbKey.Factory<T> dbKeyFactory)

  - ### Method Detail

    - #### load

          protected abstract V load(java.sql.Connection con,
                                    java.sql.ResultSet rs)
                             throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### save

          protected abstract void save(java.sql.Connection con,
                                       T t,
                                       V v)
                                throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### clearCache

          protected void clearCache()

    - #### get

          public final java.util.List<V> get(DbKey dbKey)

    - #### getCount

          public final int getCount()

      Overrides:
        `getCount` in class `Table`

    - #### getCount

          public final int getCount(DbClause dbClause)

      Overrides:
        `getCount` in class `Table`

    - #### insert

          public final void insert(T t,
                                   java.util.List<V> values)

    - #### popOffTo

          public final void popOffTo(int height)

      Overrides:
        `popOffTo` in class `DerivedDbTable`

    - #### trim

          public final void trim(int height)

      Overrides:
        `trim` in class `DerivedDbTable`