Class WhereAdapter
- java.lang.Object
-
- org.linuxforhealth.fhir.database.utils.query.BaseWhereAdapter<WhereAdapter>
-
- org.linuxforhealth.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, java.lang.String predicate)
Public constructorWhereAdapter(Select select, WhereClause whereClause, java.lang.String tableAlias, java.lang.String columnName)
Convenience for when the statement is written like .where("lr", "current_resource_id").eq("r", "resource_id")WhereAdapter(Select select, WhereClause whereClause, ExpNode predicate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Select
build()
Get the select statement wrapped by this adapterprotected WhereAdapter
getThis()
Returns the sub-class type-specific instance of the class.GroupByAdapter
groupBy(java.lang.String... expressions)
Start building the GROUP BY clauseOrderByAdapter
orderBy(java.lang.String... expressions)
Start building the ORDER BY clause-
Methods inherited from class org.linuxforhealth.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, java.lang.String predicate)
Public constructor- Parameters:
select
-whereClause
-predicate
-
-
WhereAdapter
public WhereAdapter(Select select, WhereClause whereClause, java.lang.String tableAlias, java.lang.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(java.lang.String... expressions)
Start building the GROUP BY clause- Parameters:
expressions
-- Returns:
-
orderBy
public OrderByAdapter orderBy(java.lang.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:BaseWhereAdapter
Returns the sub-class type-specific instance of the class. Used as the return value in fluent methods.- Specified by:
getThis
in classBaseWhereAdapter<WhereAdapter>
- Returns:
-
-