wt.pds
Class NavigateStatementBuilder

java.lang.Object
  extended bywt.pds.BasicStatementBuilder
      extended bywt.pds.SelectStatementBuilder
          extended bywt.pds.QuerySpecStatementBuilder
              extended bywt.pds.NavigateStatementBuilder
All Implemented Interfaces:
Cloneable, Externalizable, Serializable, StatementBuilder

public class NavigateStatementBuilder
extends QuerySpecStatementBuilder
implements Externalizable

This class implements statement building for navigate operations.

Supported API: false

Extendable: false

See Also:
Serialized Form

Nested Class Summary
(package private)  class NavigateStatementBuilder.ForeignKeyLinkTableExpression
           
 
Field Summary
private static String CLASSNAME
           
static boolean DEBUG
           
static long EXTERNALIZATION_VERSION_UID
           
static int LINK_INDEX
           
private static DebugWriter LOG
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
private  String role
           
(package private) static long serialVersionUID
           
private  Object source
           
static int TARGET_INDEX
           
 
Fields inherited from class wt.pds.QuerySpecStatementBuilder
OLD_SERIAL_VERSION_UID
 
Fields inherited from class wt.pds.SelectStatementBuilder
chunkCount, LARGE_IN_LIST_WARNING
 
Fields inherited from class wt.pds.BasicStatementBuilder
DMLGENERATOR
 
Fields inherited from interface wt.pds.StatementBuilder
CHUNKING_ENABLED, FETCH_SIZE, SQL_STATEMENTS, STATEMENT_COUNT
 
Constructor Summary
NavigateStatementBuilder()
          

Supported API: false
NavigateStatementBuilder(QuerySpec a_querySpec, String a_role, Object a_source, Vector a_bindParameters)
          

Supported API: false
 
Method Summary
private  ClassInfo[] getForeignKeyClassInfos(ClassInfo alinkInfo)
          Return the RoleDescriptor for the specified link, role, and object.
(package private)  ClassAttribute getLinkClassNameClassAttribute(LinkInfo a_linkInfo, String a_alias)
           
(package private)  WhereExpression getLinkWhereExpression(LinkInfo a_linkInfo, int a_linkFromIndex, Vector a_aliases)
           
private  RoleDescriptor getOtherRole(ClassInfo classInfo)
          Return the RoleDescriptor for the specified link, role, and object.
private  String getOtherRole(Class a_linkClass, String a_role)
          Return the other side role for the specified link and role.
private  String getOtherRole(LinkInfo a_linkInfo, String a_role)
           
protected  String getRole()
          Gets the value of the attribute: role; Role to navigate

Supported API: false
 Object getSource()
          Gets the value of the attribute: source; Object source to navigate from.
 StatementFilter getStatementFilter(Vector[] a_fromArray)
          StatementBuilder used to generate SQL for the depth threshold query.
 Vector[] getTables()
          This method returns an array of Vectors.
private  void processLinkInfo(ClassInfo topTargetInfo, ClassInfo targetInfo, ClassInfo linkInfo, ClassInfo linkClassInfo, Vector[] otherTables, Vector tableVector)
          Process a linkInfo to determine all possible class combinations.
 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(NavigateStatementBuilder thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class wt.pds.QuerySpecStatementBuilder
appendCondition, appendJoin, buildEmptyAggregateSQL, buildJoinIndexSet, buildSQLStatement, clone, filterArrayChunkProcessors, getArrayChunkProcessors, getFromClause, getGroupByClause, getHavingClause, getJoinClause, getJoinFromIndicies, getJoinString, getJoinWhereClause, getOrderByClause, getQuerySpec, getSingleBindParameters, getStatementBindParameters, getTables, getWhereClause, isAggregateSelect, isDistinct, isForUpdateSet, isQuerySpecSetLock, isUseBind, preBuildSQL, readVersion, resetBindParameterVectors, setForUpdateSet, setJoinClause, setQuerySpec, setSingleBindParameters
 
Methods inherited from class wt.pds.SelectStatementBuilder
buildSQL, clone, getChunkProcessorCount, getChunkProcessorCount, getDepthThreshold, getTotalCount, isQueryChunkingRequired, isQueryChunkingRequired, isQueryChunkingSupported, isUnionStatement, readVersion, setDepthThreshold
 
Methods inherited from class wt.pds.BasicStatementBuilder
appendBindParameter, buildSQL, clone, getFetchSize, getSqlStatements, getStatement, getStatementCount, insertBindParameterAt, isChunkingEnabled, readVersion, setChunkingEnabled, setFetchSize, setSqlStatements
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

role

private String role

source

private Object source

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

TARGET_INDEX

public static final int TARGET_INDEX
See Also:
Constant Field Values

LINK_INDEX

public static final int LINK_INDEX
See Also:
Constant Field Values
Constructor Detail

NavigateStatementBuilder

public NavigateStatementBuilder()


Supported API: false


NavigateStatementBuilder

public NavigateStatementBuilder(QuerySpec a_querySpec,
                                String a_role,
                                Object a_source,
                                Vector a_bindParameters)
                         throws PersistenceException


Supported API: false

Parameters:
a_querySpec -
a_role - The role to navigate.
a_source - The source to navigate from.
a_bindParameters -
Throws:
PersistenceException
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 QuerySpecStatementBuilder
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 QuerySpecStatementBuilder
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

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

getRole

protected String getRole()
Gets the value of the attribute: role; Role to navigate

Supported API: false

Returns:
String

getSource

public Object getSource()
Gets the value of the attribute: source; Object source to navigate from.

Supported API: false

Returns:
Object

getTables

public Vector[] getTables()
                   throws PersistenceException
This method returns an array of Vectors. Each element of the array corresponds to the TableExpression at the corresponding position in the FromClause. The elements are all possible combinations of concrete TableExpressions that need to be queried.

Supported API: false

Overrides:
getTables in class QuerySpecStatementBuilder
Returns:
Vector[]
Throws:
PersistenceException

getStatementFilter

public StatementFilter getStatementFilter(Vector[] a_fromArray)
                                   throws PersistenceException
StatementBuilder used to generate SQL for the depth threshold query.

Supported API: false

Overrides:
getStatementFilter in class QuerySpecStatementBuilder
Parameters:
a_fromArray - Array of Vectors containing FromExpression instances
Returns:
StatementFilter
Throws:
PersistenceException

processLinkInfo

private void processLinkInfo(ClassInfo topTargetInfo,
                             ClassInfo targetInfo,
                             ClassInfo linkInfo,
                             ClassInfo linkClassInfo,
                             Vector[] otherTables,
                             Vector tableVector)
                      throws WTIntrospectionException,
                             PersistenceException
Process a linkInfo to determine all possible class combinations.

Throws:
WTIntrospectionException
PersistenceException

getOtherRole

private RoleDescriptor getOtherRole(ClassInfo classInfo)
                             throws WTIntrospectionException
Return the RoleDescriptor for the specified link, role, and object.

Throws:
WTIntrospectionException

getOtherRole

private String getOtherRole(Class a_linkClass,
                            String a_role)
                     throws WTIntrospectionException
Return the other side role for the specified link and role.

Throws:
WTIntrospectionException

getOtherRole

private String getOtherRole(LinkInfo a_linkInfo,
                            String a_role)

getForeignKeyClassInfos

private ClassInfo[] getForeignKeyClassInfos(ClassInfo alinkInfo)
                                     throws WTIntrospectionException
Return the RoleDescriptor for the specified link, role, and object.

Throws:
WTIntrospectionException

getLinkClassNameClassAttribute

ClassAttribute getLinkClassNameClassAttribute(LinkInfo a_linkInfo,
                                              String a_alias)
                                        throws WTException
Throws:
WTException

getLinkWhereExpression

WhereExpression getLinkWhereExpression(LinkInfo a_linkInfo,
                                       int a_linkFromIndex,
                                       Vector a_aliases)
                                 throws WTException
Throws:
WTException