com.uwyn.rife.database.queries
Class AbstractWhereQuery<QueryType extends AbstractWhereQuery>

java.lang.Object
  extended by com.uwyn.rife.database.queries.AbstractWhereQuery<QueryType>
All Implemented Interfaces:
Query, Cloneable
Direct Known Subclasses:
AbstractWhereGroup, Delete, Select, Update

public abstract class AbstractWhereQuery<QueryType extends AbstractWhereQuery>
extends Object
implements Cloneable


Field Summary
protected  Datasource mDatasource
           
protected  boolean mExcludeUnsupportedCapabilities
           
protected  String mSql
           
protected  StringBuilder mWhere
           
 
Method Summary
protected  void _fieldSubselect(Select query)
           
protected  void _tableSubselect(Select query)
           
protected  void _unionSubselect(Select query)
           
protected  void _whereSubselect(Select query)
           
protected  void addFieldParameter(String field)
           
protected  void addWhereParameter(String field)
           
 void addWhereParameters(List<String> parameters)
           
 void addWhereParameters(List<String> parameters)
           
 void clear()
           
protected  void clearGenerated()
           
protected  void clearWhereParameters()
           
 QueryType clone()
           
 Datasource getDatasource()
           
 String getLimitParameter()
           
 String getOffsetParameter()
           
 QueryParameters getParameters()
           
 String getWhere()
           
protected  List<String> getWhereParameters()
           
protected  boolean isLimitBeforeOffset()
           
 void setExcludeUnsupportedCapabilities(boolean flag)
           
protected  void setLimitParameter(String limitParameter)
           
protected  void setOffsetParameter(String offsetParameter)
           
 WhereGroup<QueryType> startWhere()
           
 WhereGroupAnd<QueryType> startWhereAnd()
           
 WhereGroupOr<QueryType> startWhereOr()
           
 String toString()
           
 QueryType where(Object bean)
           
 QueryType where(String where)
           
 QueryType where(String field, String operator, boolean value)
           
 QueryType where(String field, String operator, byte value)
           
 QueryType where(String field, String operator, char value)
           
 QueryType where(String field, String operator, double value)
           
 QueryType where(String field, String operator, float value)
           
 QueryType where(String field, String operator, int value)
           
 QueryType where(String field, String operator, long value)
           
 QueryType where(String field, String operator, Object value)
           
 QueryType where(String field, String operator, Select query)
           
 QueryType where(String field, String operator, short value)
           
 QueryType whereAnd(String where)
           
 QueryType whereAnd(String field, String operator, boolean value)
           
 QueryType whereAnd(String field, String operator, byte value)
           
 QueryType whereAnd(String field, String operator, char value)
           
 QueryType whereAnd(String field, String operator, double value)
           
 QueryType whereAnd(String field, String operator, float value)
           
 QueryType whereAnd(String field, String operator, int value)
           
 QueryType whereAnd(String field, String operator, long value)
           
 QueryType whereAnd(String field, String operator, Object value)
           
 QueryType whereAnd(String field, String operator, Select query)
           
 QueryType whereAnd(String field, String operator, short value)
           
 QueryType whereExcluded(Object bean, String[] excludedFields)
           
 QueryType whereFiltered(Object bean, String[] includedFields, String[] excludedFields)
           
 QueryType whereIncluded(Object bean, String[] includedFields)
           
 QueryType whereOr(String where)
           
 QueryType whereOr(String field, String operator, boolean value)
           
 QueryType whereOr(String field, String operator, byte value)
           
 QueryType whereOr(String field, String operator, char value)
           
 QueryType whereOr(String field, String operator, double value)
           
 QueryType whereOr(String field, String operator, float value)
           
 QueryType whereOr(String field, String operator, int value)
           
 QueryType whereOr(String field, String operator, long value)
           
 QueryType whereOr(String field, String operator, Object value)
           
 QueryType whereOr(String field, String operator, Select query)
           
 QueryType whereOr(String field, String operator, short value)
           
 QueryType whereParameter(String field, String operator)
           
 QueryType whereParameter(String field, String alias, String operator)
           
 QueryType whereParameterAnd(String field, String operator)
           
 QueryType whereParameterAnd(String field, String alias, String operator)
           
 QueryType whereParameterOr(String field, String operator)
           
 QueryType whereParameterOr(String field, String alias, String operator)
           
 QueryType whereParameters(Class beanClass)
           
 QueryType whereParametersExcluded(Class beanClass, String[] excludedFields)
           
 QueryType whereSubselect(Select query)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.uwyn.rife.database.queries.Query
getCapabilities, getSql, setExcludeUnsupportedCapabilities
 

Field Detail

mWhere

protected StringBuilder mWhere

mDatasource

protected Datasource mDatasource

mSql

protected String mSql

mExcludeUnsupportedCapabilities

protected boolean mExcludeUnsupportedCapabilities
Method Detail

clear

public void clear()
Specified by:
clear in interface Query

getWhere

public String getWhere()

whereSubselect

public QueryType whereSubselect(Select query)

where

public QueryType where(String where)

startWhere

public WhereGroup<QueryType> startWhere()

whereAnd

public QueryType whereAnd(String where)

startWhereAnd

public WhereGroupAnd<QueryType> startWhereAnd()

whereOr

public QueryType whereOr(String where)

startWhereOr

public WhereGroupOr<QueryType> startWhereOr()

where

public QueryType where(String field,
                       String operator,
                       char value)

where

public QueryType where(String field,
                       String operator,
                       boolean value)

where

public QueryType where(String field,
                       String operator,
                       byte value)

where

public QueryType where(String field,
                       String operator,
                       double value)

where

public QueryType where(String field,
                       String operator,
                       float value)

where

public QueryType where(String field,
                       String operator,
                       int value)

where

public QueryType where(String field,
                       String operator,
                       long value)

where

public QueryType where(String field,
                       String operator,
                       short value)

where

public QueryType where(String field,
                       String operator,
                       Select query)

where

public QueryType where(String field,
                       String operator,
                       Object value)

whereAnd

public QueryType whereAnd(String field,
                          String operator,
                          char value)

whereAnd

public QueryType whereAnd(String field,
                          String operator,
                          boolean value)

whereAnd

public QueryType whereAnd(String field,
                          String operator,
                          byte value)

whereAnd

public QueryType whereAnd(String field,
                          String operator,
                          double value)

whereAnd

public QueryType whereAnd(String field,
                          String operator,
                          float value)

whereAnd

public QueryType whereAnd(String field,
                          String operator,
                          int value)

whereAnd

public QueryType whereAnd(String field,
                          String operator,
                          long value)

whereAnd

public QueryType whereAnd(String field,
                          String operator,
                          short value)

whereAnd

public QueryType whereAnd(String field,
                          String operator,
                          Select query)

whereAnd

public QueryType whereAnd(String field,
                          String operator,
                          Object value)

whereOr

public QueryType whereOr(String field,
                         String operator,
                         char value)

whereOr

public QueryType whereOr(String field,
                         String operator,
                         boolean value)

whereOr

public QueryType whereOr(String field,
                         String operator,
                         byte value)

whereOr

public QueryType whereOr(String field,
                         String operator,
                         double value)

whereOr

public QueryType whereOr(String field,
                         String operator,
                         float value)

whereOr

public QueryType whereOr(String field,
                         String operator,
                         int value)

whereOr

public QueryType whereOr(String field,
                         String operator,
                         long value)

whereOr

public QueryType whereOr(String field,
                         String operator,
                         short value)

whereOr

public QueryType whereOr(String field,
                         String operator,
                         Select query)

whereOr

public QueryType whereOr(String field,
                         String operator,
                         Object value)

whereParameter

public QueryType whereParameter(String field,
                                String operator)

whereParameter

public QueryType whereParameter(String field,
                                String alias,
                                String operator)

whereParameterAnd

public QueryType whereParameterAnd(String field,
                                   String operator)

whereParameterAnd

public QueryType whereParameterAnd(String field,
                                   String alias,
                                   String operator)

whereParameterOr

public QueryType whereParameterOr(String field,
                                  String operator)

whereParameterOr

public QueryType whereParameterOr(String field,
                                  String alias,
                                  String operator)

where

public QueryType where(Object bean)
                                           throws DbQueryException
Throws:
DbQueryException

whereIncluded

public QueryType whereIncluded(Object bean,
                               String[] includedFields)
                                                   throws DbQueryException
Throws:
DbQueryException

whereExcluded

public QueryType whereExcluded(Object bean,
                               String[] excludedFields)
                                                   throws DbQueryException
Throws:
DbQueryException

whereFiltered

public QueryType whereFiltered(Object bean,
                               String[] includedFields,
                               String[] excludedFields)
                                                   throws DbQueryException
Throws:
DbQueryException

whereParameters

public QueryType whereParameters(Class beanClass)
                                                     throws DbQueryException
Throws:
DbQueryException

whereParametersExcluded

public QueryType whereParametersExcluded(Class beanClass,
                                         String[] excludedFields)
                                                             throws DbQueryException
Throws:
DbQueryException

clone

public QueryType clone()

addWhereParameters

public void addWhereParameters(List<String> parameters)

_fieldSubselect

protected void _fieldSubselect(Select query)

_tableSubselect

protected void _tableSubselect(Select query)

_whereSubselect

protected void _whereSubselect(Select query)

_unionSubselect

protected void _unionSubselect(Select query)

getParameters

public QueryParameters getParameters()
Specified by:
getParameters in interface Query

addFieldParameter

protected void addFieldParameter(String field)

clearWhereParameters

protected void clearWhereParameters()

addWhereParameter

protected void addWhereParameter(String field)

getWhereParameters

protected List<String> getWhereParameters()

addWhereParameters

public void addWhereParameters(List<String> parameters)

setLimitParameter

protected void setLimitParameter(String limitParameter)

getLimitParameter

public String getLimitParameter()

setOffsetParameter

protected void setOffsetParameter(String offsetParameter)

getOffsetParameter

public String getOffsetParameter()

isLimitBeforeOffset

protected boolean isLimitBeforeOffset()

getDatasource

public Datasource getDatasource()

setExcludeUnsupportedCapabilities

public void setExcludeUnsupportedCapabilities(boolean flag)
Specified by:
setExcludeUnsupportedCapabilities in interface Query

clearGenerated

protected void clearGenerated()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.