2.17.2: 2011-06-17

net.sf.basedb.core.query
Interface QueryElement

All Known Subinterfaces:
Expression, Join, Order, Restriction, Select
All Known Implementing Classes:
AbsExpression, AddExpression, AndRestriction, AnnotationBetweenRestriction, AnnotationInRestriction, AnnotationRestriction, AnnotationSimpleRestriction, AscOrder, BetweenRestriction, CaseExpression, CountExpression, DescOrder, DivideExpression, DynamicJoin, DynamicRestriction, EqRestriction, ExpExpression, ExpressionSelect, ExtraValueExpression, ExtraValueJoin, FloatExpression, GeometricMeanExpression, GteqRestriction, GtRestriction, HasAnnotationRestriction, HqlElementsExpression, HqlEntityExpression, HqlEntityParameterExpression, HqlExpression, HqlIndexExpression, HqlInnerJoin, HqlLeftJoin, HqlPropertyExpression, HqlRightJoin, HqlSizeExpression, InRestriction, IntegerExpression, LikeRestriction, LogExpression, LteqRestriction, LtRestriction, MaxExpression, MeanExpression, MeanRawDataPropertyExpression, MinExpression, MultiplyExpression, NegateExpression, NeqRestriction, NotRestriction, OrRestriction, ParameterExpression, PowerExpression, QuadraticMeanExpression, RawDataPropertyExpression, RealJoin, ReporterListExpression, ReporterListJoin, ReporterPropertyExpression, RlikeRestriction, SelectedExpression, SharedToRestriction, SqlColumnExpression, SqrtExpression, SubqueryExpression, SubtractExpression, SumExpression, ToDateExpression, VirtualColumnExpression, VirtualColumnExpression.WrappedExpression

public interface QueryElement

A query element is used in various places in a Query to build the structure of the query. A query element is by itself not useful, only the subtypes of this interface are.

Version:
2.0
Author:
Nicklas
Last modified
$Date: 2009-04-06 14:52:39 +0200 (Mon, 06 Apr 2009) $

Method Summary
 Collection<? extends QueryElement> getChildren()
          Get the children of this query element or null if it has no children.
 String toQl(Query query, DbControl dc)
          Create a query language string of the query element.
 

Method Detail

toQl

String toQl(Query query,
            DbControl dc)
            throws BaseException
Create a query language string of the query element. Use the Query.getQueryType() method to find out which query language is wanted in case the element requires different syntax for different languages.

Parameters:
query - The query that is about to be executed
dc - The DbControl object used to execute the query
Throws:
UnsupportedOperationException - If the requested query language is not supported by the query element
BaseException - If there is any other error

getChildren

Collection<? extends QueryElement> getChildren()
Get the children of this query element or null if it has no children. For example the AddExpression has two children, the expression beeing added.

Returns:
A collection or null

2.17.2: 2011-06-17