Package nxt.db
Class ValuesDbTable<T,V>
- java.lang.Object
-
- 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 Description protected DbKey.Factory<T>
dbKeyFactory
-
Fields inherited from class nxt.db.DerivedDbTable
db, table
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ValuesDbTable(java.lang.String table, DbKey.Factory<T> dbKeyFactory)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
clearCache()
java.util.List<V>
get(DbKey dbKey)
void
insert(T t, java.util.List<V> values)
protected abstract V
load(java.sql.Connection con, java.sql.ResultSet rs)
void
rollback(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, toString, truncate
-
-
-
-
Field Detail
-
dbKeyFactory
protected final DbKey.Factory<T> dbKeyFactory
-
-
Constructor Detail
-
ValuesDbTable
protected ValuesDbTable(java.lang.String table, 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()
-
rollback
public final void rollback(int height)
- Overrides:
rollback
in classDerivedDbTable
-
trim
public final void trim(int height)
- Overrides:
trim
in classDerivedDbTable
-
-