public class ViewDdlBuilder extends Object
Modifier and Type | Field and Description |
---|---|
static String |
JOIN_FULL_OUTER
Full Outer Join type
|
static String |
JOIN_INNER
Inner Join Type
|
static String |
JOIN_LEFT_OUTER
Left Outer Join type
|
static String |
JOIN_RIGHT_OUTER
Right Outer Join type
|
Constructor and Description |
---|
ViewDdlBuilder() |
Modifier and Type | Method and Description |
---|---|
static String |
getODataViewDdl(Repository.UnitOfWork uow,
String viewName,
Table table,
List<String> columnNames)
Generated View DDL that supports the Teiid OData requirement - that views must have a Primary Key - to get auto-generated.
|
static String |
getODataViewJoinDdl(Repository.UnitOfWork uow,
String viewName,
Table lhTable,
String lhTableAlias,
List<String> lhColNames,
Table rhTable,
String rhTableAlias,
List<String> rhColNames,
String joinType,
List<ViewBuilderCriteriaPredicate> criteriaPredicates)
Generated View DDL that supports the Teiid OData requirement - that views must have a Primary Key - to get auto-generated.
|
public static final String JOIN_INNER
public static final String JOIN_LEFT_OUTER
public static final String JOIN_RIGHT_OUTER
public static final String JOIN_FULL_OUTER
public static String getODataViewDdl(Repository.UnitOfWork uow, String viewName, Table table, List<String> columnNames) throws KException
uow
- the transactionviewName
- the view nametable
- the table for generating the viewcolumnNames
- the list of table columns to include in the view (if null
or empty, all columns will be included)KException
- if problem occurspublic static String getODataViewJoinDdl(Repository.UnitOfWork uow, String viewName, Table lhTable, String lhTableAlias, List<String> lhColNames, Table rhTable, String rhTableAlias, List<String> rhColNames, String joinType, List<ViewBuilderCriteriaPredicate> criteriaPredicates) throws KException
uow
- the transactionviewName
- the view namelhTable
- the left side tablelhTableAlias
- the alias to use for the left tablelhColNames
- the left side column namesrhTable
- the right side tablerhTableAlias
- the alias to use for the right tablerhColNames
- the right side column namesjoinType
- the join typecriteriaPredicates
- the list of predicates to use for the join criteriaKException
- if problem occursCopyright © 2013–2019. All rights reserved.