lumis.util.query.jdbc
Class GenericQueryAdapterJdbc

Package class diagram package GenericQueryAdapterJdbc
java.lang.Object
  extended by 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
See Also:
QuerySelect, QueryDelete, QueryUpdate

Nested Class Summary
protected static class GenericQueryAdapterJdbc.Parameter
           
 
Field Summary
protected  List<GenericQueryAdapterJdbc.Parameter> parameters
           
 
Constructor Summary
GenericQueryAdapterJdbc()
           
 
Method Summary
protected  void addQuerySqlFilter(StringBuilder sql, IQueryFilter filter)
           
protected  void addQuerySqlFilters(StringBuilder sql, List<IQueryFilter> filters)
           
protected  void addQuerySqlFilters(StringBuilder sql, QueryBase query)
           
protected  void addQuerySqlFiltersByTable(StringBuilder sql, QueryTable queryTable, QueryBase query)
           
protected  void addQuerySqlOrderBy(StringBuilder sql, List<QuerySortOrder> orders)
           
protected  void addSelectSqlFields(StringBuilder sql, QuerySelect query)
           
protected  void addSelectSqlTables(StringBuilder sql, QuerySelect query)
           
protected  IQueryStatement generateQueryStatementFromSQL(QueryBase queryBase, String sql, boolean resultSetScrollable, ITransaction transaction)
           
 String getCreateTableScript(QueryCreateTable queryCreateTable, ITransaction transaction)
           
 IQueryStatement getDeleteStatement(QueryDelete queryDelete, ITransaction transaction)
           
protected  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  String getValue(IQueryValue queryValue, IQueryValue field)
           
protected  String getValue(IQueryValue queryValue, QueryField field)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parameters

protected List<GenericQueryAdapterJdbc.Parameter> parameters
Constructor Detail

GenericQueryAdapterJdbc

public GenericQueryAdapterJdbc()
Method Detail

generateQueryStatementFromSQL

protected IQueryStatement generateQueryStatementFromSQL(QueryBase queryBase,
                                                        String sql,
                                                        boolean resultSetScrollable,
                                                        ITransaction transaction)
                                                 throws PortalException
Throws:
PortalException

getSelectStatement

public IQueryStatement getSelectStatement(QuerySelect query,
                                          ITransaction transaction)
                                   throws DaoException,
                                          PortalException
Specified by:
getSelectStatement in interface IQueryAdapter
Throws:
DaoException
PortalException

getInsertStatement

public IQueryStatement getInsertStatement(QueryInsert queryInsert,
                                          ITransaction transaction)
                                   throws DaoException,
                                          PortalException
Specified by:
getInsertStatement in interface IQueryAdapter
Throws:
DaoException
PortalException

getUpdateStatement

public IQueryStatement getUpdateStatement(QueryUpdate queryUpdate,
                                          ITransaction transaction)
                                   throws DaoException,
                                          PortalException
Specified by:
getUpdateStatement in interface IQueryAdapter
Throws:
DaoException
PortalException

getDeleteStatement

public IQueryStatement getDeleteStatement(QueryDelete queryDelete,
                                          ITransaction transaction)
                                   throws DaoException,
                                          PortalException
Specified by:
getDeleteStatement in interface IQueryAdapter
Throws:
DaoException
PortalException

getCreateTableScript

public String getCreateTableScript(QueryCreateTable queryCreateTable,
                                   ITransaction transaction)
                            throws DaoException,
                                   PortalException
Specified by:
getCreateTableScript in interface IQueryAdapter
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)

getValue

protected String getValue(IQueryValue queryValue,
                          QueryField field)

getField

protected String getField(QueryField queryField)

getSelectCountStatement

public IQueryStatement getSelectCountStatement(QuerySelect query,
                                               ITransaction transaction)
                                        throws DaoException,
                                               PortalException
Specified by:
getSelectCountStatement in interface IQueryAdapter
Throws:
DaoException
PortalException

addQuerySqlOrderBy

protected void addQuerySqlOrderBy(StringBuilder sql,
                                  List<QuerySortOrder> orders)


Lumisportal  4.1.0.071221 - Copyright © 2001-2007, Lumis. All Rights Reserved.