@Deprecated public class TableQuery extends AbstractTransactionalQuery implements QueryDelegate, QueryDelegate.RowIdChangeNotifier
| Modifier and Type | Class and Description |
|---|---|
static class |
TableQuery.RowIdChangeEvent
Deprecated.
|
QueryDelegate.RowIdChangeListener, QueryDelegate.RowIdChangeNotifier| Modifier | Constructor and Description |
|---|---|
|
TableQuery(String tableName,
JDBCConnectionPool connectionPool)
Deprecated.
Creates a new TableQuery using the given connection pool and table name
to fetch the data from.
|
|
TableQuery(String tableName,
JDBCConnectionPool connectionPool,
SQLGenerator sqlGenerator)
Deprecated.
Creates a new TableQuery using the given connection pool, SQL generator
and table name to fetch the data from.
|
|
TableQuery(String catalogName,
String schemaName,
String tableName,
JDBCConnectionPool connectionPool,
SQLGenerator sqlGenerator)
Deprecated.
Creates a new TableQuery using the given connection pool, SQL generator
and table name to fetch the data from.
|
protected |
TableQuery(String catalogName,
String schemaName,
String tableName,
JDBCConnectionPool connectionPool,
SQLGenerator sqlGenerator,
boolean escapeNames)
Deprecated.
Creates a new TableQuery using the given connection pool, SQL generator
and table name to fetch the data from.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(QueryDelegate.RowIdChangeListener listener)
Deprecated.
As of 7.0, replaced by
addRowIdChangeListener(QueryDelegate.RowIdChangeListener) |
void |
addRowIdChangeListener(QueryDelegate.RowIdChangeListener listener)
Deprecated.
Adds RowIdChangeListener to this query.
|
void |
beginTransaction()
Deprecated.
Reserves a connection with auto-commit off if no transaction is in
progress.
|
void |
commit()
Deprecated.
Commits (if not in auto-commit mode) and releases the active connection.
|
boolean |
containsRowWithKey(Object... keys)
Deprecated.
Performs a query to find out whether the SQL table contains a row with
the given set of primary keys.
|
String |
getCatalogName()
Deprecated.
Returns the catalog name for the query.
|
int |
getCount()
Deprecated.
Generates and executes a query to determine the current row count from
the DB.
|
protected String |
getFullTableName()
Deprecated.
Returns the complete table name obtained by concatenation of the catalog
and schema names (if any) and the table name.
|
List<String> |
getPrimaryKeyColumns()
Deprecated.
Returns a list of primary key column names.
|
ResultSet |
getResults(int offset,
int pagelength)
Deprecated.
Executes a paged SQL query and returns the ResultSet.
|
String |
getSchemaName()
Deprecated.
Returns the catalog name for the query.
|
SQLGenerator |
getSqlGenerator()
Deprecated.
|
String |
getTableName()
Deprecated.
Returns the table name for the query without catalog and schema
information.
|
String |
getVersionColumn()
Deprecated.
|
boolean |
implementationRespectsPagingLimits()
Deprecated.
Allows the SQLContainer implementation to check whether the QueryDelegate
implementation implements paging in the getResults method.
|
void |
removeListener(QueryDelegate.RowIdChangeListener listener)
Deprecated.
As of 7.0, replaced by
removeRowIdChangeListener(QueryDelegate.RowIdChangeListener) |
boolean |
removeRow(RowItem row)
Deprecated.
Removes the given RowItem from the database.
|
void |
removeRowIdChangeListener(QueryDelegate.RowIdChangeListener listener)
Deprecated.
Removes the given RowIdChangeListener from this query.
|
void |
rollback()
Deprecated.
Rolls back and releases the active connection.
|
void |
setFilters(List<Container.Filter> filters)
Deprecated.
Sets the filters to apply when performing the SQL query.
|
void |
setOrderBy(List<OrderBy> orderBys)
Deprecated.
Sets the order in which to retrieve rows from the database.
|
void |
setVersionColumn(String column)
Deprecated.
|
int |
storeRow(RowItem row)
Deprecated.
Stores a row in the database.
|
RowId |
storeRowImmediately(RowItem row)
Deprecated.
Inserts the given row in the database table immediately.
|
ensureTransaction, getConnection, isInTransaction, releaseConnectionpublic TableQuery(String tableName, JDBCConnectionPool connectionPool, SQLGenerator sqlGenerator)
TableQuery(String, String, String, JDBCConnectionPool, SQLGenerator)
.tableName - Name of the database table to connect toconnectionPool - Connection pool for accessing the databasesqlGenerator - SQL query generator implementationpublic TableQuery(String catalogName, String schemaName, String tableName, JDBCConnectionPool connectionPool, SQLGenerator sqlGenerator)
catalogName - Name of the database catalog (can be null)schemaName - Name of the database schema (can be null)tableName - Name of the database table to connect toconnectionPool - Connection pool for accessing the databasesqlGenerator - SQL query generator implementationpublic TableQuery(String tableName, JDBCConnectionPool connectionPool)
TableQuery(String, String, String, JDBCConnectionPool, SQLGenerator)
.tableName - Name of the database table to connect toconnectionPool - Connection pool for accessing the databaseprotected TableQuery(String catalogName, String schemaName, String tableName, JDBCConnectionPool connectionPool, SQLGenerator sqlGenerator, boolean escapeNames)
catalogName - Name of the database catalog (can be null)schemaName - Name of the database schema (can be null)tableName - Name of the database table to connect toconnectionPool - Connection pool for accessing the databasesqlGenerator - SQL query generator implementationescapeNames - true to escape special characters in catalog, schema and table
names, false to use the names as-ispublic int getCount()
throws SQLException
QueryDelegategetCount in interface QueryDelegateSQLExceptionpublic ResultSet getResults(int offset, int pagelength) throws SQLException
QueryDelegategetResults in interface QueryDelegateoffset - the first item of the page to loadpagelength - the length of the page to loadSQLException - if the database access fails.public boolean implementationRespectsPagingLimits()
QueryDelegateimplementationRespectsPagingLimits in interface QueryDelegateQueryDelegate.getResults(int, int)public int storeRow(RowItem row) throws UnsupportedOperationException, SQLException
QueryDelegatestoreRow in interface QueryDelegaterow - The row to be stored or updated.UnsupportedOperationException - if the implementation is read only.SQLExceptionpublic RowId storeRowImmediately(RowItem row) throws SQLException
row - RowItem to add to the databaseSQLExceptionpublic void setFilters(List<Container.Filter> filters) throws UnsupportedOperationException
QueryDelegatesetFilters in interface QueryDelegatefilters - The filters to apply.UnsupportedOperationException - if the implementation doesn't support filtering.public void setOrderBy(List<OrderBy> orderBys) throws UnsupportedOperationException
QueryDelegatesetOrderBy in interface QueryDelegateorderBys - A list of the OrderBy conditions.UnsupportedOperationException - if the implementation doesn't support ordering.public void beginTransaction()
throws UnsupportedOperationException,
SQLException
AbstractTransactionalQuerybeginTransaction in interface QueryDelegatebeginTransaction in class AbstractTransactionalQuerySQLException - if a connection could not be obtained or configuredUnsupportedOperationExceptionpublic void commit()
throws UnsupportedOperationException,
SQLException
AbstractTransactionalQuerycommit in interface QueryDelegatecommit in class AbstractTransactionalQuerySQLException - if not in a transaction managed by this queryUnsupportedOperationExceptionpublic void rollback()
throws UnsupportedOperationException,
SQLException
AbstractTransactionalQueryrollback in interface QueryDelegaterollback in class AbstractTransactionalQuerySQLException - if not in a transaction managed by this queryUnsupportedOperationExceptionpublic List<String> getPrimaryKeyColumns()
QueryDelegategetPrimaryKeyColumns in interface QueryDelegatepublic String getVersionColumn()
public void setVersionColumn(String column)
public String getTableName()
public String getCatalogName()
public String getSchemaName()
protected String getFullTableName()
public SQLGenerator getSqlGenerator()
public boolean removeRow(RowItem row) throws UnsupportedOperationException, SQLException
QueryDelegateremoveRow in interface QueryDelegaterow - RowItem to be removedUnsupportedOperationExceptionSQLExceptionpublic boolean containsRowWithKey(Object... keys) throws SQLException
QueryDelegatecontainsRowWithKey in interface QueryDelegatekeys - the primary keysSQLExceptionpublic void addRowIdChangeListener(QueryDelegate.RowIdChangeListener listener)
addRowIdChangeListener in interface QueryDelegate.RowIdChangeNotifierlistener - listener to be added@Deprecated public void addListener(QueryDelegate.RowIdChangeListener listener)
addRowIdChangeListener(QueryDelegate.RowIdChangeListener)addListener in interface QueryDelegate.RowIdChangeNotifierpublic void removeRowIdChangeListener(QueryDelegate.RowIdChangeListener listener)
removeRowIdChangeListener in interface QueryDelegate.RowIdChangeNotifierlistener - listener to be removed@Deprecated public void removeListener(QueryDelegate.RowIdChangeListener listener)
removeRowIdChangeListener(QueryDelegate.RowIdChangeListener)removeListener in interface QueryDelegate.RowIdChangeNotifierCopyright © 2019 Vaadin Ltd. All rights reserved.