wt.epm.structure
Class NavigateToMasterQuery

java.lang.Object
  extended bywt.epm.util.PLSQLQuery
      extended bywt.epm.structure.NavigateToMasterQuery

public class NavigateToMasterQuery
extends PLSQLQuery

NavigateToMasterQuery describes a simple SQL query used to navigate links to the other-side objects using PL/SQL stored procedures. The other-side object must be an Iterated object. When executed, it will return a LinkProxy object for each link found that matches the search criteria specified in the query and the object identifier of the master of the other-side object.

Supported API: false

Extendable: false


Nested Class Summary
 
Nested classes inherited from class wt.epm.util.PLSQLQuery
PLSQLQuery.Operator, PLSQLQuery.WhereExpression
 
Field Summary
private  long[] databaseIds
           
private  LinkProxy.Role otherSideRole
           
 
Fields inherited from class wt.epm.util.PLSQLQuery
EQUAL, IS_FALSE, IS_TRUE, LIKE, NOT_EQUAL
 
Constructor Summary
NavigateToMasterQuery(long[] databaseIds, Class linkClass, LinkProxy.Role otherSideRole)
          Constructs a NavigateToMasterQuery used to navigate a link class to the other-side object.
 
Method Summary
protected  String buildFromClause()
          Builds FROM clause.
protected  Object buildResult(Object[] rawData)
          Builds a result using the raw data returned by the stored procedure.
protected  String buildSelectStatement()
          Builds SELECT statement.
protected  String buildWhereClause()
          Builds WHERE clause.
private static Class getOtherSideClass(Class linkClass, LinkProxy.Role otherSideRole)
           
protected  String getSQLFunctionName()
          Returns the name of the stored procedure to call.
protected  StatementParameter[] getSQLFunctionParameters()
          Returns an array of parameters to pass to the stored procedure.
protected  StatementParameter getSQLFunctionReturnType()
          Returns the type of parameter the stored procedure is expected to return.
 
Methods inherited from class wt.epm.util.PLSQLQuery
appendAnd, appendCloseParen, appendOpenParen, appendOr, appendWhere, appendWhere, appendWhere, appendWhere, appendWhere, appendWhere, buildObjectId, buildResults, buildSQLStatement, getAlias, getColumnName, getColumnName, getConditionCount, getTableClass, getTableNames, getTableNames, setIncludeDescendants, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

databaseIds

private long[] databaseIds

otherSideRole

private LinkProxy.Role otherSideRole
Constructor Detail

NavigateToMasterQuery

public NavigateToMasterQuery(long[] databaseIds,
                             Class linkClass,
                             LinkProxy.Role otherSideRole)
                      throws WTException
Constructs a NavigateToMasterQuery used to navigate a link class to the other-side object. The other-side object must be an Iterated object. Foreign Key links are not supported. When executed, the query will return a LinkProxy object for each link found and the object identifier of the master of the other-side object. Since NavigateToMasterQuery extends PLSQLQuery, you may add additional criteria to further restrict which links are returned. Call PLSQLNavigator.navigateIterationToMaster() to execute the query.

Supported API: false

Method Detail

buildSelectStatement

protected String buildSelectStatement()
                               throws WTException
Description copied from class: PLSQLQuery
Builds SELECT statement.

Specified by:
buildSelectStatement in class PLSQLQuery
Throws:
WTException

buildFromClause

protected String buildFromClause()
                          throws WTException
Description copied from class: PLSQLQuery
Builds FROM clause.

Specified by:
buildFromClause in class PLSQLQuery
Throws:
WTException

buildWhereClause

protected String buildWhereClause()
                           throws WTException
Description copied from class: PLSQLQuery
Builds WHERE clause.

Specified by:
buildWhereClause in class PLSQLQuery
Throws:
WTException

buildResult

protected Object buildResult(Object[] rawData)
                      throws WTException
Description copied from class: PLSQLQuery
Builds a result using the raw data returned by the stored procedure.

Specified by:
buildResult in class PLSQLQuery
Throws:
WTException

getSQLFunctionName

protected String getSQLFunctionName()
Description copied from class: PLSQLQuery
Returns the name of the stored procedure to call.

Specified by:
getSQLFunctionName in class PLSQLQuery

getSQLFunctionParameters

protected StatementParameter[] getSQLFunctionParameters()
                                                 throws WTException
Description copied from class: PLSQLQuery
Returns an array of parameters to pass to the stored procedure.

Specified by:
getSQLFunctionParameters in class PLSQLQuery
Throws:
WTException

getSQLFunctionReturnType

protected StatementParameter getSQLFunctionReturnType()
                                               throws WTException
Description copied from class: PLSQLQuery
Returns the type of parameter the stored procedure is expected to return.

Specified by:
getSQLFunctionReturnType in class PLSQLQuery
Throws:
WTException

getOtherSideClass

private static Class getOtherSideClass(Class linkClass,
                                       LinkProxy.Role otherSideRole)
                                throws WTException
Throws:
WTException