wt.query
Class FromClause

java.lang.Object
  extended bywt.query.FromClause
All Implemented Interfaces:
Cloneable, Externalizable, Serializable

public class FromClause
extends Object
implements Cloneable, Externalizable

This class represents a FROM SQL clause.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private  String aliasPrefix
           
private static String CLASSNAME
           
private static String DEFAULT_ALIAS_PREFIX
          Default prefix to use.
static long EXTERNALIZATION_VERSION_UID
           
static int NULL_INDEX
          

Supported API: true
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private  Vector tables
           
 
Constructor Summary
FromClause()
           
 
Method Summary
 void append(TableExpression a_tableExpression)
          Appends the TableExpression

Supported API: false
 Object clone()
          Returns a deep copy of this object.
 String getAliasAt(int a_index)
          Returns the specified alias.
 Vector getAliases()
          Return a Vector of aliases for the tables in the FROM clause.
 String getAliasPrefix()
          Gets the value of the attribute: aliasPrefix; Prefix string for generating alias names.
static Vector getClassInfos(Vector a_tables)
          Return a Vector of ClassInfos for the tables in the FROM clause.
 int getCount()
          Gets the value of the attribute: count.
 int getPosition(Class a_class)
          Returns the position of the specified class.
 Class getPrimaryClass()
          Gets the value of the attribute: primaryClass.
 TableExpression getTableExpressionAt(int a_index)
          Returns the specified TableExpression

Supported API: false
 Vector getTableExpressions()
           
 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(FromClause thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setAliasPrefix(String a_AliasPrefix)
          Sets the value of the attribute: aliasPrefix; Prefix string for generating alias names.
 void setTableExpressionAt(TableExpression a_tableExpression, int a_index)
          Sets the specified TableExpression at the specified index.
 String toString()
          Returns a string representation of this clause.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
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

NULL_INDEX

public static final int NULL_INDEX


Supported API: true

See Also:
Constant Field Values

aliasPrefix

private String aliasPrefix

DEFAULT_ALIAS_PREFIX

private static final String DEFAULT_ALIAS_PREFIX
Default prefix to use.

See Also:
Constant Field Values

tables

private Vector tables

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
Constructor Detail

FromClause

public FromClause()
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
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
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

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

getPrimaryClass

public Class getPrimaryClass()
Gets the value of the attribute: primaryClass.

Supported API: false

Returns:
Class

getCount

public int getCount()
Gets the value of the attribute: count.

Supported API: false

Returns:
int

getAliasPrefix

public String getAliasPrefix()
Gets the value of the attribute: aliasPrefix; Prefix string for generating alias names.

Supported API: true

Returns:
String

setAliasPrefix

public void setAliasPrefix(String a_AliasPrefix)
                    throws WTPropertyVetoException
Sets the value of the attribute: aliasPrefix; Prefix string for generating alias names.

Supported API: true

Parameters:
a_AliasPrefix -
Throws:
WTPropertyVetoException

append

public void append(TableExpression a_tableExpression)
Appends the TableExpression

Supported API: false

Parameters:
a_tableExpression - Object to append

getTableExpressionAt

public TableExpression getTableExpressionAt(int a_index)
Returns the specified TableExpression

Supported API: false

Parameters:
a_index -
Returns:
TableExpression

getAliasAt

public String getAliasAt(int a_index)
Returns the specified alias.

Supported API: true

Parameters:
a_index -
Returns:
String

getPosition

public int getPosition(Class a_class)
Returns the position of the specified class.

Supported API: false

Parameters:
a_class -
Returns:
int

getAliases

public Vector getAliases()
Return a Vector of aliases for the tables in the FROM clause.

Supported API: false

Returns:
Vector

getClassInfos

public static Vector getClassInfos(Vector a_tables)
                            throws QueryException
Return a Vector of ClassInfos for the tables in the FROM clause. If a TableExpression has no table class, then the corresponding element in the Vectro is null.

Supported API: false

Parameters:
a_tables -
Returns:
Vector
Throws:
QueryException

setTableExpressionAt

public void setTableExpressionAt(TableExpression a_tableExpression,
                                 int a_index)
Sets the specified TableExpression at the specified index.

Supported API: false

Parameters:
a_tableExpression -
a_index -

toString

public String toString()
Returns a string representation of this clause.

Returns:
String

clone

public Object clone()
Returns a deep copy of this object.

Returns:
Object

getTableExpressions

public Vector getTableExpressions()