public class JDBCTableReader<T extends Entity> extends Object implements TableReader<T>
| Modifier and Type | Field and Description |
|---|---|
static String |
SQL_STATE_UNDEFINED_TABLE |
| Constructor and Description |
|---|
JDBCTableReader(Table specTable,
DataSource dataSource,
String tablePrefix,
EntityPopulator<T> entityPopulator) |
| Modifier and Type | Method and Description |
|---|---|
T |
get(String id)
Get a single item from this table by ID.
|
Iterable<T> |
getAll()
Get all the items from this table in an unspecified order.
|
Iterable<T> |
getAllOrdered()
Get all the items from this table in an unspecified order.
|
Iterable<T> |
getOrdered(String id)
Get all the items from this table with the given ID, in order.
|
int |
getRowCount() |
Iterable<T> |
getUnordered(String id)
Get all the items from this table with the given ID, in unspecified order.
|
Iterator<T> |
iterator()
As a convenience, the TableReader itself is iterable.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic static final String SQL_STATE_UNDEFINED_TABLE
public JDBCTableReader(Table specTable, DataSource dataSource, String tablePrefix, EntityPopulator<T> entityPopulator)
tablePrefix - must not be null, can be empty string, should include any separator character (dot)public Iterator<T> iterator()
public T get(String id)
get in interface TableReader<T extends Entity>public Iterable<T> getOrdered(String id)
getOrdered in interface TableReader<T extends Entity>public Iterable<T> getUnordered(String id)
public Iterable<T> getAll()
getAll in interface TableReader<T extends Entity>public Iterable<T> getAllOrdered()
getAllOrdered in interface TableReader<T extends Entity>public int getRowCount()
Copyright © 2019. All rights reserved.