Class FromAdapter
- java.lang.Object
-
- com.ibm.fhir.database.utils.query.FromAdapter
-
public class FromAdapter extends Object
Adapter for building the FROM clause of a SELECT statement
-
-
Constructor Summary
Constructors Constructor Description FromAdapter(Select select)Model the "from" part of the select statement
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Selectbuild()FromAdapterfrom(String tableName)Add a table to the from clause returning thisFromAdapterready for the next itemFromAdapterfrom(String tableName, Alias alias)Add a table with an alias (tab AS foo) to the from clause returning thisFromAdapterready for the next itemGroupByAdaptergroupBy(String... expressions)OrderByAdapterorderBy(String... expressions)FromSubQueryAdaptersubStart()Start building a sub-query.WhereAdapterwhere(String predicate)Start building the "WHERE" clause for the statement
-
-
-
Constructor Detail
-
FromAdapter
public FromAdapter(Select select)
Model the "from" part of the select statement- Parameters:
select-
-
-
Method Detail
-
from
public FromAdapter from(String tableName)
Add a table to the from clause returning thisFromAdapterready for the next item- Parameters:
tableName-- Returns:
-
from
public FromAdapter from(String tableName, Alias alias)
Add a table with an alias (tab AS foo) to the from clause returning thisFromAdapterready for the next item- Parameters:
tableName-alias-- Returns:
-
where
public WhereAdapter where(String predicate)
Start building the "WHERE" clause for the statement- Parameters:
predicate-- Returns:
-
subStart
public FromSubQueryAdapter subStart()
Start building a sub-query. This isn't added to the from untilFromSubQueryAdapter.subEnd(String)is called- Returns:
-
build
public Select build()
-
groupBy
public GroupByAdapter groupBy(String... expressions)
-
orderBy
public OrderByAdapter orderBy(String... expressions)
-
-