|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.db.sql.SQLFragmentUtils
public final class SQLFragmentUtils
Utilities for dealing with SQLFragments.
Method Summary | |
---|---|
static java.util.List<SelectObject> |
expandStarColumns(SQLQuery query) Gets an expanded list of SelectObjects for the given query that has any wildcard * columns expanded to the underlying table columns. |
static SelectObject[] |
getSelectObjects(SQLQuery query) Gets the SelectObjects for this query. |
static Relation |
getTable(FromObject from) |
static java.lang.String |
getTableName(FromObjectUsage usage) Gets the table name used by the given FromObjectUsage (could be an alias rather than an actual table's name). |
static boolean |
hasPKCols(java.util.Collection<java.lang.String> colNames, FromObject from) Tests whether the list of columns contains a PK column for the table referenced by the given given FromObject |
static java.util.Collection<java.lang.String> |
listColumnNames(SQLFragment expression) Lists the columns available from the given SQLFragment. |
static java.util.Collection<Column> |
listColumns(SQLFragment expression) Lists the columns available from the given SQLFragment. |
static java.util.Collection<ColumnUsage> |
listColumnUsages(SQLFragment expression) Lists the columns available from the given SQLFragment. |
static java.util.Collection<java.lang.String> |
listCommonColumns(FromObject left, FromObject right) Lists the names of columns common to both FromObjects. |
static java.util.Collection<java.lang.String> |
listCommonColumns(JoinObject join) List the names of columns common to both the left and right side of the given join. |
static java.util.Set<java.lang.String> |
listFromObjectNames(SQLQuery query) Lists the names of the FromObjects that are defined in the given query (does not include subqueries, just the namespace available in the current query). |
static void |
replaceStarColumns(SQLQuery query) Alters the given SQLQuery so that any asterisk columns are expanded into multiple select objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static SelectObject[] getSelectObjects(SQLQuery query)
It is only expected that this is useful for logic that determines the "columns" to match a given query.
query
- the query to get a list of SelectObjects forpublic static void replaceStarColumns(SQLQuery query)
query
- the query to expand.public static java.util.List<SelectObject> expandStarColumns(SQLQuery query)
public static Relation getTable(FromObject from)
public static java.lang.String getTableName(FromObjectUsage usage)
usage
- the FromObjectUsage to get the table name/alias forpublic static java.util.Set<java.lang.String> listFromObjectNames(SQLQuery query)
public static java.util.Collection<java.lang.String> listCommonColumns(JoinObject join)
public static java.util.Collection<java.lang.String> listCommonColumns(FromObject left, FromObject right)
public static java.util.Collection<Column> listColumns(SQLFragment expression)
expression
- the expression to querypublic static java.util.Collection<ColumnUsage> listColumnUsages(SQLFragment expression)
expression
- the expression to querypublic static java.util.Collection<java.lang.String> listColumnNames(SQLFragment expression)
expression
- the expression to querypublic static boolean hasPKCols(java.util.Collection<java.lang.String> colNames, FromObject from)
colNames
- the name of the columns from the used tablefrom
- the FromObject (from which the table is found)
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |