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 protectedValuesDbTable(java.lang.String table, DbKey.Factory<T> dbKeyFactory)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidclearCache()java.util.List<V>get(DbKey dbKey)voidinsert(T t, java.util.List<V> values)protected abstract Vload(java.sql.Connection con, java.sql.ResultSet rs)voidrollback(int height)protected abstract voidsave(java.sql.Connection con, T t, V v)voidtrim(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:
rollbackin classDerivedDbTable
-
trim
public final void trim(int height)
- Overrides:
trimin classDerivedDbTable
-
-