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 Select
build()
FromAdapter
from(String tableName)
Add a table to the from clause returning thisFromAdapter
ready for the next itemFromAdapter
from(String tableName, Alias alias)
Add a table with an alias (tab AS foo) to the from clause returning thisFromAdapter
ready for the next itemGroupByAdapter
groupBy(String... expressions)
OrderByAdapter
orderBy(String... expressions)
FromSubQueryAdapter
subStart()
Start building a sub-query.WhereAdapter
where(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 thisFromAdapter
ready 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 thisFromAdapter
ready 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)
-
-