Class WhereAdapter
- java.lang.Object
-
- com.ibm.fhir.database.utils.query.BaseWhereAdapter<WhereAdapter>
-
- com.ibm.fhir.database.utils.query.WhereAdapter
-
public class WhereAdapter extends BaseWhereAdapter<WhereAdapter>
Adapter to help build the WHERE clause expression. To allow a fluent style, we construct an expression tree
-
-
Constructor Summary
Constructors Constructor Description WhereAdapter(Select select, WhereClause whereClause)Public constructor to start the WHERE clause in a select statementWhereAdapter(Select select, WhereClause whereClause, ExpNode predicate)WhereAdapter(Select select, WhereClause whereClause, String predicate)Public constructorWhereAdapter(Select select, WhereClause whereClause, String tableAlias, String columnName)Convenience for when the statement is written like .where("lr", "current_resource_id").eq("r", "resource_id")
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Selectbuild()Get the select statement wrapped by this adapterprotected WhereAdaptergetThis()Returns the sub-class type-specific instance of the class.GroupByAdaptergroupBy(String... expressions)Start building the GROUP BY clauseOrderByAdapterorderBy(String... expressions)Start building the ORDER BY clause-
Methods inherited from class com.ibm.fhir.database.utils.query.BaseWhereAdapter
acos, acos, add, and, and, and, and, and, bind, bind, bind, bind, bind, bind, coalesce, col, col, cos, cos, div, eq, eq, eq, eq, eq, eq, eq, eq, escape, escape, escape, escape, escape, exists, filter, getExpression, getPredicateParser, gt, gt, gt, gt, gt, gt, gte, gte, gte, gte, gte, gte, in, in, in, inLiteral, inLiteralLong, isNotNull, isNull, leftParen, like, like, like, like, like, literal, literal, literal, lt, lt, lt, lt, lt, lt, lte, lte, lte, lte, lte, lte, mult, neq, neq, neq, neq, neq, neq, neq, not, notExists, operator, or, or, or, or, or, radians, radians, rightParen, sin, sin, sub, where, where
-
-
-
-
Constructor Detail
-
WhereAdapter
public WhereAdapter(Select select, WhereClause whereClause)
Public constructor to start the WHERE clause in a select statement- Parameters:
select-whereClause-
-
WhereAdapter
public WhereAdapter(Select select, WhereClause whereClause, String predicate)
Public constructor- Parameters:
select-whereClause-predicate-
-
WhereAdapter
public WhereAdapter(Select select, WhereClause whereClause, String tableAlias, String columnName)
Convenience for when the statement is written like .where("lr", "current_resource_id").eq("r", "resource_id")- Parameters:
select-whereClause-tableAlias-columnName-
-
WhereAdapter
public WhereAdapter(Select select, WhereClause whereClause, ExpNode predicate)
-
-
Method Detail
-
groupBy
public GroupByAdapter groupBy(String... expressions)
Start building the GROUP BY clause- Parameters:
expressions-- Returns:
-
orderBy
public OrderByAdapter orderBy(String... expressions)
Start building the ORDER BY clause- Parameters:
expressions-- Returns:
-
build
public Select build()
Get the select statement wrapped by this adapter- Returns:
-
getThis
protected WhereAdapter getThis()
Description copied from class:BaseWhereAdapterReturns the sub-class type-specific instance of the class. Used as the return value in fluent methods.- Specified by:
getThisin classBaseWhereAdapter<WhereAdapter>- Returns:
-
-