wt.query
Class SubSelectExpression

java.lang.Object
  extended bywt.query.AbstractSubSelectTableExpression
      extended bywt.query.SubSelectExpression
All Implemented Interfaces:
Cloneable, Expression, Externalizable, RelationalExpression, Serializable, TableExpression

public class SubSelectExpression
extends AbstractSubSelectTableExpression
implements RelationalExpression, Externalizable

This class represents a subselect which can be used in a SQL statement. The subselect is specifed via a StatementSpec attribute.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static boolean DEBUG
           
static long EXTERNALIZATION_VERSION_UID
           
private static DebugWriter LOG
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
 
Fields inherited from class wt.query.AbstractSubSelectTableExpression
 
Fields inherited from interface wt.query.RelationalExpression
BIND_PARAMETER
 
Fields inherited from interface wt.query.Expression
FROM_COUNT
 
Fields inherited from interface wt.query.TableExpression
ACCESS_CONTROL_REQUIRED, ADVANCED_QUERY, ADVANCED_QUERY_ENABLED, BIND_PARAMETER, DESCENDANTS_INCLUDED, TABLE_CLASS
 
Constructor Summary
SubSelectExpression()
          

Supported API: false
SubSelectExpression(StatementSpec a_subSelect)
          

Supported API: true
 
Method Summary
 Object getBindParameter()
          Gets the value of the attribute: bindParameter; Returns a bind parameter for this expression (if supported).
 List getClassAttributes()
          

Supported API: false
 List getCorrelatedClassAttributes()
          Gets the value of the attribute: correlatedClassAttributes.
 String getExpression(boolean a_useBind, Vector a_tableInfos, Vector a_aliases, boolean a_outerJoin)
          Return string representation of this expression.
 int getFromCount()
          Gets the value of the attribute: fromCount; Number of from index values that this expression requires

Supported API: false
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(SubSelectExpression thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 int setFromAlias(String[] a_aliases, int a_offset)
          This method sets the FROM clause alias for this expression.
 int validate(TableExpression[] a_tableExpressions, int a_offset)
          This method validates this expression against the specified table expression.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class wt.query.AbstractSubSelectTableExpression
appendClassAttribute, clone, columnsReset, getColumnAccessItemBuilder, getDMLGenerator, getExpression, getJoinCondition, getJoinCondition, getSubSelect, getTableClass, getTables, getValidClasses, isAccessControlled, isAccessControlRequired, isAdvancedQuery, isAdvancedQueryEnabled, isAutoNavigate, isDescendantsIncluded, isUseViewTableAlias, readVersion, setAccessControlRequired, setAdvancedQueryEnabled, setDescendantsIncluded, setSubSelect, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

DEBUG

public static final boolean DEBUG

LOG

private static final DebugWriter LOG
Constructor Detail

SubSelectExpression

public SubSelectExpression()


Supported API: false


SubSelectExpression

public SubSelectExpression(StatementSpec a_subSelect)


Supported API: true

Parameters:
a_subSelect - Specifies the StatementSpec instance for this sub-select.
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class AbstractSubSelectTableExpression
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class AbstractSubSelectTableExpression
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(SubSelectExpression thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getCorrelatedClassAttributes

public List getCorrelatedClassAttributes()
Gets the value of the attribute: correlatedClassAttributes.

Supported API: false

Returns:
List

getBindParameter

public Object getBindParameter()
                        throws WTException
Gets the value of the attribute: bindParameter; Returns a bind parameter for this expression (if supported).

Supported API: false

Specified by:
getBindParameter in interface RelationalExpression
Overrides:
getBindParameter in class AbstractSubSelectTableExpression
Returns:
Object
Throws:
WTException

getExpression

public String getExpression(boolean a_useBind,
                            Vector a_tableInfos,
                            Vector a_aliases,
                            boolean a_outerJoin)
                     throws QueryException
Return string representation of this expression.

Supported API: false

Specified by:
getExpression in interface RelationalExpression
Parameters:
a_useBind - Indicates that bind variables should be used for this expression.
a_tableInfos -
a_aliases -
a_outerJoin - Indicates that outer join syntax should be used for this expression.
Returns:
String
Throws:
QueryException

getClassAttributes

public List getClassAttributes()


Supported API: false

Specified by:
getClassAttributes in interface RelationalExpression
Returns:
List

getFromCount

public int getFromCount()
Gets the value of the attribute: fromCount; Number of from index values that this expression requires

Supported API: false

Specified by:
getFromCount in interface Expression
Returns:
int

validate

public int validate(TableExpression[] a_tableExpressions,
                    int a_offset)
             throws QueryException
This method validates this expression against the specified table expression. A QueryException is thrown if this expression is not valid.

Supported API: false

Specified by:
validate in interface Expression
Parameters:
a_tableExpressions - Table expression to validate against.
a_offset - Offset index into the TableExpression array for the next valid TableExpression
Returns:
number of TableExpressions validated
Throws:
QueryException

setFromAlias

public int setFromAlias(String[] a_aliases,
                        int a_offset)
This method sets the FROM clause alias for this expression. This alias is used in this Expression in place of the corresponding TableExpression.

Supported API: false

Specified by:
setFromAlias in interface Expression
Parameters:
a_aliases - Array of aliases for expressions
a_offset - Offset index into the alias array for the next valid alias
Returns:
number of aliases used