wt.epm.util
Class ObjectQuery

java.lang.Object
  extended bywt.epm.util.PLSQLQuery
      extended bywt.epm.util.ObjectQuery

public class ObjectQuery
extends PLSQLQuery

The ObjectQuery is a server-side only class that describes a simple SQL query that is executed using PL/SQL stored procedures. It finds all objects of the given class (including subclasses) whose value for a given attribute is in a given list of values.

Supported API: false

Extendable: false


Nested Class Summary
 
Nested classes inherited from class wt.epm.util.PLSQLQuery
PLSQLQuery.Operator, PLSQLQuery.WhereExpression
 
Field Summary
private  String attribute
           
private  Object values
           
 
Fields inherited from class wt.epm.util.PLSQLQuery
EQUAL, IS_FALSE, IS_TRUE, LIKE, NOT_EQUAL
 
Constructor Summary
ObjectQuery(Class objectClass, String attribute, long[] values)
          Constructs an ObjectQuery that finds all objects of the given class whose value for the given attribute is in the given list of values.
ObjectQuery(Class objectClass, String attribute, String[] values)
          Constructs an ObjectQuery that finds all objects of the given class whose value for the given attribute is in the given list of values.
 
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.
 String getSQLFunctionName()
          Returns the name of the stored procedure to call.
 StatementParameter[] getSQLFunctionParameters()
          Returns an array of parameters to pass to the stored procedure.
 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

values

private Object values

attribute

private String attribute
Constructor Detail

ObjectQuery

public ObjectQuery(Class objectClass,
                   String attribute,
                   long[] values)
            throws WTException
Constructs an ObjectQuery that finds all objects of the given class whose value for the given attribute is in the given list of values. The attribute must be of type integer or long. Call EPMQueryUtility.query() to execute the query.

Supported API: false


ObjectQuery

public ObjectQuery(Class objectClass,
                   String attribute,
                   String[] values)
            throws WTException
Constructs an ObjectQuery that finds all objects of the given class whose value for the given attribute is in the given list of values. The attribute must be of type String. Call EPMQueryUtility.query() 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

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

Specified by:
getSQLFunctionName in class PLSQLQuery

getSQLFunctionParameters

public 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

public 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