public abstract class EntityDbTable<T> extends DerivedDbTable
Modifier and Type | Field and Description |
---|---|
protected DbKey.Factory<T> |
dbKeyFactory |
db, table
Modifier | Constructor and Description |
---|---|
protected |
EntityDbTable(java.lang.String table,
DbKey.Factory<T> dbKeyFactory) |
protected |
EntityDbTable(java.lang.String table,
DbKey.Factory<T> dbKeyFactory,
java.lang.String fullTextSearchColumns) |
Modifier and Type | Method and Description |
---|---|
void |
checkAvailable(int height) |
protected void |
clearCache() |
void |
createSearchIndex(java.sql.Connection con) |
protected java.lang.String |
defaultSort() |
T |
get(DbKey dbKey) |
T |
get(DbKey dbKey,
boolean cache) |
T |
get(DbKey dbKey,
int height) |
DbIterator<T> |
getAll() |
DbIterator<T> |
getAll(int from,
int to) |
DbIterator<T> |
getAll(int height,
int from,
int to) |
DbIterator<T> |
getAll(int height,
int from,
int to,
java.lang.String sort) |
DbIterator<T> |
getAll(int from,
int to,
java.lang.String sort) |
T |
getBy(DbClause dbClause) |
T |
getBy(DbClause dbClause,
int height) |
int |
getCount() |
int |
getCount(DbClause dbClause) |
int |
getCount(DbClause dbClause,
int height) |
DbIterator<T> |
getManyBy(java.sql.Connection con,
java.sql.PreparedStatement pstmt,
boolean cache) |
DbIterator<T> |
getManyBy(DbClause dbClause1,
DbClause dbClause2,
int from,
int to) |
DbIterator<T> |
getManyBy(DbClause dbClause1,
DbClause dbClause2,
int from,
int to,
java.lang.String sort) |
DbIterator<T> |
getManyBy(DbClause dbClause,
int from,
int to) |
DbIterator<T> |
getManyBy(DbClause dbClause,
int height,
int from,
int to) |
DbIterator<T> |
getManyBy(DbClause dbClause,
int height,
int from,
int to,
java.lang.String sort) |
DbIterator<T> |
getManyBy(DbClause dbClause,
int from,
int to,
java.lang.String sort) |
int |
getRowCount() |
void |
insert(T t) |
protected abstract T |
load(java.sql.Connection con,
java.sql.ResultSet rs,
DbKey dbKey) |
T |
newEntity(DbKey dbKey) |
void |
rollback(int height) |
protected abstract void |
save(java.sql.Connection con,
T t) |
DbIterator<T> |
search(java.lang.String query,
DbClause dbClause,
int from,
int to) |
DbIterator<T> |
search(java.lang.String query,
DbClause dbClause,
int from,
int to,
java.lang.String sort) |
void |
trim(int height) |
isPersistent, toString, truncate
protected final DbKey.Factory<T> dbKeyFactory
protected EntityDbTable(java.lang.String table, DbKey.Factory<T> dbKeyFactory)
protected EntityDbTable(java.lang.String table, DbKey.Factory<T> dbKeyFactory, java.lang.String fullTextSearchColumns)
protected abstract T load(java.sql.Connection con, java.sql.ResultSet rs, DbKey dbKey) throws java.sql.SQLException
java.sql.SQLException
protected abstract void save(java.sql.Connection con, T t) throws java.sql.SQLException
java.sql.SQLException
protected java.lang.String defaultSort()
protected void clearCache()
public void checkAvailable(int height)
public final DbIterator<T> getManyBy(DbClause dbClause, int from, int to)
public final DbIterator<T> getManyBy(DbClause dbClause1, DbClause dbClause2, int from, int to)
public final DbIterator<T> getManyBy(DbClause dbClause, int from, int to, java.lang.String sort)
public final DbIterator<T> getManyBy(DbClause dbClause1, DbClause dbClause2, int from, int to, java.lang.String sort)
public final DbIterator<T> getManyBy(DbClause dbClause, int height, int from, int to)
public final DbIterator<T> getManyBy(DbClause dbClause, int height, int from, int to, java.lang.String sort)
public final DbIterator<T> getManyBy(java.sql.Connection con, java.sql.PreparedStatement pstmt, boolean cache)
public final DbIterator<T> search(java.lang.String query, DbClause dbClause, int from, int to)
public final DbIterator<T> search(java.lang.String query, DbClause dbClause, int from, int to, java.lang.String sort)
public final DbIterator<T> getAll()
public final DbIterator<T> getAll(int from, int to)
public final DbIterator<T> getAll(int from, int to, java.lang.String sort)
public final DbIterator<T> getAll(int height, int from, int to)
public final DbIterator<T> getAll(int height, int from, int to, java.lang.String sort)
public final int getCount()
public final int getCount(DbClause dbClause)
public final int getCount(DbClause dbClause, int height)
public final int getRowCount()
public final void insert(T t)
public void rollback(int height)
rollback
in class DerivedDbTable
public void trim(int height)
trim
in class DerivedDbTable
public final void createSearchIndex(java.sql.Connection con) throws java.sql.SQLException
createSearchIndex
in class DerivedDbTable
java.sql.SQLException