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 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 List<GenericQueryAdapterJdbc.Parameter>
parameters
-
Constructor Summary
Constructors Constructor Description GenericQueryAdapterJdbc()
-
Method Summary
-
-
-
Field Detail
-
parameters
protected List<GenericQueryAdapterJdbc.Parameter> parameters
-
-
Method Detail
-
generateQueryStatementFromSQL
protected IQueryStatement generateQueryStatementFromSQL(QueryBase queryBase, String sql, 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 String getCreateTableScript(QueryCreateTable queryCreateTable, ITransaction transaction) throws DaoException, PortalException
- Specified by:
getCreateTableScript
in interfaceIQueryAdapter
- Throws:
DaoException
PortalException
-
addSelectSqlFields
protected void addSelectSqlFields(StringBuilder sql, QuerySelect query)
-
addSelectSqlTables
protected void addSelectSqlTables(StringBuilder sql, QuerySelect query)
-
addQuerySqlFiltersByTable
protected void addQuerySqlFiltersByTable(StringBuilder sql, QueryTable queryTable, QueryBase query)
-
addQuerySqlFilters
protected void addQuerySqlFilters(StringBuilder sql, QueryBase query)
-
addQuerySqlFilters
protected void addQuerySqlFilters(StringBuilder sql, List<IQueryFilter> filters)
-
addQuerySqlFilter
protected void addQuerySqlFilter(StringBuilder sql, IQueryFilter filter)
-
getValue
protected String getValue(IQueryValue queryValue, IQueryValue field, boolean convertText)
-
getValue
protected String getValue(IQueryValue queryValue, IQueryValue field)
-
getValue
protected String getValue(IQueryValue queryValue, QueryField field, boolean convertText)
-
getField
protected 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(StringBuilder sql, QuerySelect query)
-
addQuerySqlGroupBy
protected void addQuerySqlGroupBy(StringBuilder sql, QuerySelect querySelect)
Inserts the group by clause.- Parameters:
sql
- the query string.querySelect
- the query select.- Since:
- 7.0.0
-
-