wt.query
Class ClassViewExpression

java.lang.Object
  extended bywt.query.AbstractClassTableExpression
      extended bywt.query.ClassViewExpression
All Implemented Interfaces:
Cloneable, Externalizable, PageableTableExpression, Serializable, TableExpression

public class ClassViewExpression
extends AbstractClassTableExpression
implements Externalizable

This class represents a class specification of a table which can be used in a SQL FROM clause. The SQL table is a combined "view" of the class and all sub-classes.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private  Vector classInfos
           
private static String CLASSNAME
           
private  CriteriaDescriptor[] criterion
           
static boolean DEBUG
           
private static DMLGenerator dmlGenerator
           
static long EXTERNALIZATION_VERSION_UID
           
private  JoinClause joinClause
           
private static DebugWriter LOG
           
private  HashMap map
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private  String[] tableAliases
           
private  DatabaseViewInfo viewInfo
           
private  WhereExpression where
           
 
Fields inherited from class wt.query.AbstractClassTableExpression
 
Fields inherited from interface wt.query.TableExpression
ACCESS_CONTROL_REQUIRED, ADVANCED_QUERY, ADVANCED_QUERY_ENABLED, BIND_PARAMETER, DESCENDANTS_INCLUDED, TABLE_CLASS
 
Constructor Summary
ClassViewExpression()
          

Supported API: false
ClassViewExpression(Class a_class)
          This constructor initializes this instance.
 
Method Summary
 void appendClassAttribute(ClassAttribute a_classAttribute)
          

Supported API: false
 Object getAppendedJoinConditionsBindParamter(String a_alias, Vector a_singleBindParameter, int a_outerNonJoinFromIndex, boolean a_fullPersistable)
          

Supported API: false
 ItemBuilder getColumnAccessItemBuilder(Class a_class, int a_fromIndex)
          

Supported API: false
private  DMLGenerator getDMLGenerator()
           
 String getExpression(AttributeMapInfo a_attributeMapInfo, AccessControllerProcessor a_accessControllerProcessor, String a_alias, int a_outerJoinType, boolean a_fullPersistableTable, boolean a_useBind)
          Return string representation of this expression.
 JoinClause getJoinCondition(String a_alias, boolean a_fullPersistable, Class a_tableClass)
          

Supported API: false
 String getJoinCondition(String a_alias, Class a_tableClass, boolean a_fullPersistable)
          

Supported API: false
 int getReferencedViewClassCount()
          

Supported API: false
 Vector getTables()
          Returns a Vector of TableExpressions corresponding to this TableExpression.
 WhereExpression getWhere()
          Gets the value of the attribute: where.
 boolean isAutoNavigate()
          

Supported API: false
 boolean isUseViewTableAlias()
          

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(ClassViewExpression thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setAppendedJoinConditions(WhereClause a_whereClause, WhereExpression a_whereExpression)
          

Supported API: false
 Object setAppendedJoinConditions(WhereClause a_whereClause, WhereExpression a_whereExpression, String a_alias, Vector a_singleBindParameter, int a_outerNonJoinFromIndex, boolean a_fullPersistable, boolean a_useBind)
          

Supported API: false
 void setWhere(WhereExpression a_Where)
          Sets the value of the attribute: where.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class wt.query.AbstractClassTableExpression
appendSnapshotSelectId, appendSnapshotSelectName, buildJoinCondition, buildJoinCondition, clone, columnsReset, filterEmptyTables, getAccessControlRequired, getAutoNaviTableOrder, getBindParameter, getClassAccessControlRequired, getClassInfos, getColumns, getExcludedDescendants, getOrderAttributeList, getTableClass, getTableReferenceMap, getValidClasses, isAccessControlled, isAccessControlRequired, isAdvancedQuery, isAdvancedQueryEnabled, isDescendantsIncluded, isEmptyTableOptimzationEnabled, isOuterJoin, readVersion, setAccessControlRequired, setAdvancedQueryEnabled, setColumns, setDescendantsIncluded, setEmptyTableOptimzationEnabled, setExcludedDescendants, setIncludedInterfaces, setOrderAttributeList, setOuterJoin, 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

where

private WhereExpression where

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

classInfos

private transient Vector classInfos

viewInfo

private transient DatabaseViewInfo viewInfo

criterion

private transient CriteriaDescriptor[] criterion

map

private transient HashMap map

joinClause

private transient JoinClause joinClause

tableAliases

private transient String[] tableAliases

dmlGenerator

private static DMLGenerator dmlGenerator

DEBUG

public static final boolean DEBUG

LOG

private static final DebugWriter LOG
Constructor Detail

ClassViewExpression

public ClassViewExpression()


Supported API: false


ClassViewExpression

public ClassViewExpression(Class a_class)
This constructor initializes this instance.

Supported API: true

Parameters:
a_class - Class to use as source of the TableExpression.
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 AbstractClassTableExpression
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 AbstractClassTableExpression
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(ClassViewExpression 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

getWhere

public WhereExpression getWhere()
Gets the value of the attribute: where.

Supported API: false

Returns:
WhereExpression

setWhere

public void setWhere(WhereExpression a_Where)
              throws WTPropertyVetoException
Sets the value of the attribute: where.

Supported API: false

Parameters:
a_Where -
Throws:
WTPropertyVetoException

getTables

public Vector getTables()
                 throws QueryException
Returns a Vector of TableExpressions corresponding to this TableExpression.

Supported API: false

Specified by:
getTables in interface TableExpression
Specified by:
getTables in class AbstractClassTableExpression
Returns:
Vector
Throws:
QueryException

getExpression

public String getExpression(AttributeMapInfo a_attributeMapInfo,
                            AccessControllerProcessor a_accessControllerProcessor,
                            String a_alias,
                            int a_outerJoinType,
                            boolean a_fullPersistableTable,
                            boolean a_useBind)
                     throws WTException
Return string representation of this expression.

Supported API: false

Specified by:
getExpression in interface TableExpression
Specified by:
getExpression in class AbstractClassTableExpression
Parameters:
a_attributeMapInfo - Attribute information to use for building the expression
a_accessControllerProcessor - AccessContoller to use for building the expression
a_alias -
a_outerJoinType -
a_fullPersistableTable -
a_useBind -
Returns:
String
Throws:
WTException

isAutoNavigate

public boolean isAutoNavigate()
                       throws WTException


Supported API: false

Specified by:
isAutoNavigate in interface TableExpression
Specified by:
isAutoNavigate in class AbstractClassTableExpression
Returns:
boolean
Throws:
WTException

getColumnAccessItemBuilder

public ItemBuilder getColumnAccessItemBuilder(Class a_class,
                                              int a_fromIndex)
                                       throws PersistenceException


Supported API: false

Specified by:
getColumnAccessItemBuilder in interface TableExpression
Specified by:
getColumnAccessItemBuilder in class AbstractClassTableExpression
Parameters:
a_class -
a_fromIndex -
Returns:
ItemBuilder
Throws:
PersistenceException

appendClassAttribute

public void appendClassAttribute(ClassAttribute a_classAttribute)


Supported API: false

Specified by:
appendClassAttribute in interface TableExpression
Specified by:
appendClassAttribute in class AbstractClassTableExpression
Parameters:
a_classAttribute -

getJoinCondition

public JoinClause getJoinCondition(String a_alias,
                                   boolean a_fullPersistable,
                                   Class a_tableClass)
                            throws WTException


Supported API: false

Specified by:
getJoinCondition in interface TableExpression
Specified by:
getJoinCondition in class AbstractClassTableExpression
Parameters:
a_alias -
a_fullPersistable -
a_tableClass -
Returns:
JoinClause
Throws:
WTException

getJoinCondition

public String getJoinCondition(String a_alias,
                               Class a_tableClass,
                               boolean a_fullPersistable)
                        throws WTException


Supported API: false

Specified by:
getJoinCondition in interface TableExpression
Specified by:
getJoinCondition in class AbstractClassTableExpression
Parameters:
a_alias -
a_tableClass -
a_fullPersistable -
Returns:
String
Throws:
WTException

setAppendedJoinConditions

public void setAppendedJoinConditions(WhereClause a_whereClause,
                                      WhereExpression a_whereExpression)


Supported API: false

Specified by:
setAppendedJoinConditions in class AbstractClassTableExpression
Parameters:
a_whereClause -
a_whereExpression -

getAppendedJoinConditionsBindParamter

public Object getAppendedJoinConditionsBindParamter(String a_alias,
                                                    Vector a_singleBindParameter,
                                                    int a_outerNonJoinFromIndex,
                                                    boolean a_fullPersistable)
                                             throws QueryException


Supported API: false

Specified by:
getAppendedJoinConditionsBindParamter in class AbstractClassTableExpression
Parameters:
a_alias -
a_singleBindParameter -
a_outerNonJoinFromIndex -
a_fullPersistable -
Returns:
Object
Throws:
QueryException

getReferencedViewClassCount

public int getReferencedViewClassCount()


Supported API: false

Specified by:
getReferencedViewClassCount in class AbstractClassTableExpression
Returns:
int

setAppendedJoinConditions

public Object setAppendedJoinConditions(WhereClause a_whereClause,
                                        WhereExpression a_whereExpression,
                                        String a_alias,
                                        Vector a_singleBindParameter,
                                        int a_outerNonJoinFromIndex,
                                        boolean a_fullPersistable,
                                        boolean a_useBind)
                                 throws QueryException


Supported API: false

Specified by:
setAppendedJoinConditions in class AbstractClassTableExpression
Parameters:
a_whereClause -
a_whereExpression -
a_alias -
a_singleBindParameter -
a_outerNonJoinFromIndex -
a_fullPersistable -
a_useBind -
Returns:
Object
Throws:
QueryException

isUseViewTableAlias

public boolean isUseViewTableAlias()


Supported API: false

Specified by:
isUseViewTableAlias in interface TableExpression
Specified by:
isUseViewTableAlias in class AbstractClassTableExpression
Returns:
boolean

getDMLGenerator

private DMLGenerator getDMLGenerator()