wt.query
Class ClassTableExpression

java.lang.Object
  extended bywt.query.AbstractClassTableExpression
      extended bywt.query.ClassTableExpression
All Implemented Interfaces:
Cloneable, Externalizable, PageableTableExpression, Serializable, TableExpression
Direct Known Subclasses:
NavigateStatementBuilder.ForeignKeyLinkTableExpression

public class ClassTableExpression
extends AbstractClassTableExpression
implements Externalizable

This class represents a class specification of a table which can be used in a SQL FROM clause. Introspection information is used to determine the associated table.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private  CriteriaDescriptor[] criterion
           
static boolean DEBUG
           
static long EXTERNALIZATION_VERSION_UID
           
private  JoinClause joinClause
           
private  WhereClause joinWhereClause
           
private  WhereExpression joinWhereExpression
           
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 static boolean VERBOSE
           
private  DatabaseViewInfo viewInfo
           
private  String viewTableAlias
           
 
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
  ClassTableExpression()
          

Supported API: false
  ClassTableExpression(Class a_class)
          This constructor initializes this instance.
(package private) ClassTableExpression(Class a_class, boolean a_accessControlRequired, String a_viewTableAlias)
           
 
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
 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.
 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(ClassTableExpression 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 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

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

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

viewTableAlias

private String viewTableAlias

joinWhereClause

private transient WhereClause joinWhereClause

joinWhereExpression

private transient WhereExpression joinWhereExpression

VERBOSE

private static boolean VERBOSE

DEBUG

public static final boolean DEBUG

LOG

private static final DebugWriter LOG
Constructor Detail

ClassTableExpression

public ClassTableExpression()


Supported API: false


ClassTableExpression

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

Supported API: true

Parameters:
a_class - The associated class for the table expression.

ClassTableExpression

ClassTableExpression(Class a_class,
                     boolean a_accessControlRequired,
                     String a_viewTableAlias)
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(ClassTableExpression 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

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