Package lumis.util.query.jdbc
Class GenericQueryAdapterJdbc
- java.lang.Object
-
- lumis.util.query.jdbc.GenericQueryAdapterJdbc
-
- All Implemented Interfaces:
IQueryAdapter
- Direct Known Subclasses:
QueryAdapterHibernate
public class GenericQueryAdapterJdbc extends java.lang.Object implements IQueryAdapter
Generic query adapter, that generates ANSI 92 compatible SQLs for queries structures.- Since:
- 4.0.0
- Version:
- $Revision: 23897 $ $Date: 2020-06-10 17:11:17 -0300 (Wed, 10 Jun 2020) $
- See Also:
QuerySelect
,QueryDelete
,QueryUpdate
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
GenericQueryAdapterJdbc.Parameter
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<GenericQueryAdapterJdbc.Parameter>
parameters
-
Constructor Summary
Constructors Constructor Description GenericQueryAdapterJdbc()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addQuerySqlFilter(java.lang.StringBuilder sql, IQueryFilter filter)
protected void
addQuerySqlFilters(java.lang.StringBuilder sql, java.util.List<IQueryFilter> filters)
protected void
addQuerySqlFilters(java.lang.StringBuilder sql, QueryBase query)
protected void
addQuerySqlFiltersByTable(java.lang.StringBuilder sql, QueryTable queryTable, QueryBase query)
protected void
addQuerySqlGroupBy(java.lang.StringBuilder sql, QuerySelect querySelect)
Inserts the group by clause.protected void
addQuerySqlOrderBy(java.lang.StringBuilder sql, QuerySelect query)
protected void
addSelectSqlFields(java.lang.StringBuilder sql, QuerySelect query)
protected void
addSelectSqlTables(java.lang.StringBuilder sql, QuerySelect query)
protected IQueryStatement
generateQueryStatementFromSQL(QueryBase queryBase, java.lang.String sql, java.lang.String sqlWithoutOrderBy, boolean resultSetScrollable, ITransaction transaction)
java.lang.String
getCreateTableScript(QueryCreateTable queryCreateTable, ITransaction transaction)
IQueryStatement
getDeleteStatement(QueryDelete queryDelete, ITransaction transaction)
protected java.lang.String
getField(QueryField queryField)
IQueryStatement
getInsertStatement(QueryInsert queryInsert, ITransaction transaction)
IQueryStatement
getSelectCountStatement(QuerySelect query, ITransaction transaction)
IQueryStatement
getSelectStatement(QuerySelect query, ITransaction transaction)
IQueryStatement
getUpdateStatement(QueryUpdate queryUpdate, ITransaction transaction)
protected java.lang.String
getValue(IQueryValue queryValue, IQueryValue field)
protected java.lang.String
getValue(IQueryValue queryValue, IQueryValue field, boolean convertText)
protected java.lang.String
getValue(IQueryValue queryValue, QueryField field, boolean convertText)
-
-
-
Field Detail
-
parameters
protected java.util.List<GenericQueryAdapterJdbc.Parameter> parameters
-
-
Method Detail
-
generateQueryStatementFromSQL
protected IQueryStatement generateQueryStatementFromSQL(QueryBase queryBase, java.lang.String sql, java.lang.String sqlWithoutOrderBy, boolean resultSetScrollable, ITransaction transaction) throws PortalException
- Throws:
PortalException
-
getSelectStatement
public IQueryStatement getSelectStatement(QuerySelect query, ITransaction transaction) throws DaoException, PortalException
- Specified by:
getSelectStatement
in interfaceIQueryAdapter
- Throws:
DaoException
PortalException
-
getInsertStatement
public IQueryStatement getInsertStatement(QueryInsert queryInsert, ITransaction transaction) throws DaoException, PortalException
- Specified by:
getInsertStatement
in interfaceIQueryAdapter
- Throws:
DaoException
PortalException
-
getUpdateStatement
public IQueryStatement getUpdateStatement(QueryUpdate queryUpdate, ITransaction transaction) throws DaoException, PortalException
- Specified by:
getUpdateStatement
in interfaceIQueryAdapter
- Throws:
DaoException
PortalException
-
getDeleteStatement
public IQueryStatement getDeleteStatement(QueryDelete queryDelete, ITransaction transaction) throws DaoException, PortalException
- Specified by:
getDeleteStatement
in interfaceIQueryAdapter
- Throws:
DaoException
PortalException
-
getCreateTableScript
public java.lang.String getCreateTableScript(QueryCreateTable queryCreateTable, ITransaction transaction) throws DaoException, PortalException
- Specified by:
getCreateTableScript
in interfaceIQueryAdapter
- Throws:
DaoException
PortalException
-
addSelectSqlFields
protected void addSelectSqlFields(java.lang.StringBuilder sql, QuerySelect query)
-
addSelectSqlTables
protected void addSelectSqlTables(java.lang.StringBuilder sql, QuerySelect query)
-
addQuerySqlFiltersByTable
protected void addQuerySqlFiltersByTable(java.lang.StringBuilder sql, QueryTable queryTable, QueryBase query)
-
addQuerySqlFilters
protected void addQuerySqlFilters(java.lang.StringBuilder sql, QueryBase query)
-
addQuerySqlFilters
protected void addQuerySqlFilters(java.lang.StringBuilder sql, java.util.List<IQueryFilter> filters)
-
addQuerySqlFilter
protected void addQuerySqlFilter(java.lang.StringBuilder sql, IQueryFilter filter)
-
getValue
protected java.lang.String getValue(IQueryValue queryValue, IQueryValue field, boolean convertText)
-
getValue
protected java.lang.String getValue(IQueryValue queryValue, IQueryValue field)
-
getValue
protected java.lang.String getValue(IQueryValue queryValue, QueryField field, boolean convertText)
-
getField
protected java.lang.String getField(QueryField queryField)
-
getSelectCountStatement
public IQueryStatement getSelectCountStatement(QuerySelect query, ITransaction transaction) throws DaoException, PortalException
- Specified by:
getSelectCountStatement
in interfaceIQueryAdapter
- Throws:
DaoException
PortalException
-
addQuerySqlOrderBy
protected void addQuerySqlOrderBy(java.lang.StringBuilder sql, QuerySelect query)
-
addQuerySqlGroupBy
protected void addQuerySqlGroupBy(java.lang.StringBuilder sql, QuerySelect querySelect)
Inserts the group by clause.- Parameters:
sql
- the query string.querySelect
- the query select.- Since:
- 7.0.0
-
-