wt.query
Class ConditionsClause

java.lang.Object
  extended bywt.query.ConditionsClause
All Implemented Interfaces:
Cloneable, Externalizable, Serializable, SQLClause
Direct Known Subclasses:
WhereClause

public class ConditionsClause
extends Object
implements SQLClause, Externalizable

This class presents the conditions which can be used in SQL statemnet such as HAVING

Supported API: false

Extendable: false

See Also:
Serialized Form

Nested Class Summary
(package private)  class ConditionsClause.Item
           
static class ConditionsClause.SearchConditionInfo
           
(package private)  class ConditionsClause.StatusInfo
           
 
Field Summary
private static String CLASSNAME
           
private  boolean classViewColumnsInitialized
           
static boolean DEBUG
           
static long EXTERNALIZATION_VERSION_UID
           
private  Vector items
           
private  JoinIndex joinIndex
           
private static DebugWriter LOG
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private  StringBuffer structureBuffer
           
 
Fields inherited from interface wt.query.SQLClause
COUNT
 
Constructor Summary
ConditionsClause()
           
 
Method Summary
private  void append(char a_char)
           
protected  void append(String a_string)
          

Supported API: false
 void append(WhereExpression a_where, int a_whereIndex)
           
 Object append(WhereExpression a_whereExpression, int[] a_fromIndicies, FromClause a_fromClause)
          Appends a search condtion for the specified classes.
 Object append(WhereExpression a_whereExpression, TableExpression[] a_fromTables, String[] a_aliases, int[] a_fromIndicies)
          

Supported API: false
 void appendAnd()
          

Supported API: false
 void appendCloseParen()
          

Supported API: false
 void appendNot()
          

Supported API: false
 void appendOpenParen()
          

Supported API: false
 void appendOr()
          

Supported API: false
 void appendSpace()
          

Supported API: false
protected  void checkOuterJoin(WhereExpression a_whereExpression, TableExpression[] a_fromTables)
          

Supported API: false
 Object clone()
           
protected  Object clone(ConditionsClause a_clone)
           
 void deleteItemAt(int itemIndex)
           
 void deleteLogicalString(int start, int end)
           
 List getAllSearchConditions()
           
static List getAllSearchConditions(List a_whereExpressions, boolean a_negated)
           
static List getAllSearchConditions(WhereExpression a_whereExpression, boolean a_negated, List a_searchConditions)
           
protected  int[] getClassAttributeFromIndicies(int a_fromCount, FromClause a_fromClause, int[] a_fromIndicies)
           
 String getClause(FromClause a_fromClause, boolean a_useBind, Vector a_tableInfos, Vector a_aliases)
          String representation of the clause.
 int getCount()
          Gets the value of the attribute: count; Number of items in the clause.
protected  int[] getFromIndicies(int a_index)
          

Supported API: false
 JoinIndex getJoinIndex()
          Gets the value of the attribute: joinIndex.
 String getLogicalString(int start, int end)
           
 StringBuffer getStructureBuffer()
           
 WhereExpression getWhereExpression(int a_index)
          

Supported API: false
 List getWhereExpressionFromIndicies()
           
 List getWhereExpressions()
           
 int getWhereIndex(int a_index)
          

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(ConditionsClause thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void resetWhereIndex(int itemStartIndex, int length)
           
 void setClassViewColumn(int a_index, FromClause a_fromClause)
          

Supported API: false
 void setJoinIndex(JoinIndex a_JoinIndex)
          Sets the value of the attribute: joinIndex.
 void setStructureBuffer(StringBuffer a_buffer)
           
 String toString()
           
 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

structureBuffer

private StringBuffer structureBuffer

items

private Vector items

joinIndex

private JoinIndex joinIndex

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

classViewColumnsInitialized

private transient boolean classViewColumnsInitialized
Constructor Detail

ConditionsClause

public ConditionsClause()
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(ConditionsClause 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

getJoinIndex

public JoinIndex getJoinIndex()
Gets the value of the attribute: joinIndex.

Supported API: false

Returns:
JoinIndex

setJoinIndex

public void setJoinIndex(JoinIndex a_JoinIndex)
Sets the value of the attribute: joinIndex.

Supported API: false

Parameters:
a_JoinIndex -

append

public Object append(WhereExpression a_whereExpression,
                     int[] a_fromIndicies,
                     FromClause a_fromClause)
              throws QueryException
Appends a search condtion for the specified classes. Returns a bind parameter, if appropriate.

Supported API: false

Parameters:
a_whereExpression -
a_fromIndicies -
a_fromClause -
Returns:
Object
Throws:
QueryException

append

protected void append(String a_string)


Supported API: false

Parameters:
a_string -

append

private void append(char a_char)
Parameters:
a_char -

setClassViewColumn

public void setClassViewColumn(int a_index,
                               FromClause a_fromClause)
                        throws QueryException


Supported API: false

Parameters:
a_index -
a_fromClause -
Throws:
QueryException

getClause

public String getClause(FromClause a_fromClause,
                        boolean a_useBind,
                        Vector a_tableInfos,
                        Vector a_aliases)
                 throws QueryException
String representation of the clause.

Supported API: false

Specified by:
getClause in interface SQLClause
Parameters:
a_fromClause -
a_useBind - Indicates if bind parameters should be used.
a_tableInfos -
a_aliases -
Returns:
String
Throws:
QueryException

append

public Object append(WhereExpression a_whereExpression,
                     TableExpression[] a_fromTables,
                     String[] a_aliases,
                     int[] a_fromIndicies)
              throws QueryException


Supported API: false

Parameters:
a_whereExpression -
a_fromTables -
a_aliases -
a_fromIndicies -
Returns:
Object
Throws:
QueryException

checkOuterJoin

protected void checkOuterJoin(WhereExpression a_whereExpression,
                              TableExpression[] a_fromTables)


Supported API: false

Parameters:
a_whereExpression -
a_fromTables -

getWhereExpression

public WhereExpression getWhereExpression(int a_index)


Supported API: false

Parameters:
a_index -
Returns:
WhereExpression

getFromIndicies

protected int[] getFromIndicies(int a_index)


Supported API: false

Parameters:
a_index -
Returns:
int[]

appendAnd

public void appendAnd()


Supported API: false


appendOr

public void appendOr()


Supported API: false


appendNot

public void appendNot()


Supported API: false


appendCloseParen

public void appendCloseParen()


Supported API: false


appendOpenParen

public void appendOpenParen()


Supported API: false


appendSpace

public void appendSpace()


Supported API: false


getWhereIndex

public int getWhereIndex(int a_index)


Supported API: false

Parameters:
a_index -
Returns:
int

getCount

public int getCount()
Gets the value of the attribute: count; Number of items in the clause.

Supported API: false

Specified by:
getCount in interface SQLClause
Returns:
int

append

public void append(WhereExpression a_where,
                   int a_whereIndex)

getStructureBuffer

public StringBuffer getStructureBuffer()

setStructureBuffer

public void setStructureBuffer(StringBuffer a_buffer)

getLogicalString

public String getLogicalString(int start,
                               int end)

deleteLogicalString

public void deleteLogicalString(int start,
                                int end)

resetWhereIndex

public void resetWhereIndex(int itemStartIndex,
                            int length)

deleteItemAt

public void deleteItemAt(int itemIndex)

getWhereExpressionFromIndicies

public List getWhereExpressionFromIndicies()

getWhereExpressions

public List getWhereExpressions()

getAllSearchConditions

public List getAllSearchConditions()

getAllSearchConditions

public static List getAllSearchConditions(List a_whereExpressions,
                                          boolean a_negated)

getAllSearchConditions

public static List getAllSearchConditions(WhereExpression a_whereExpression,
                                          boolean a_negated,
                                          List a_searchConditions)

getClassAttributeFromIndicies

protected int[] getClassAttributeFromIndicies(int a_fromCount,
                                              FromClause a_fromClause,
                                              int[] a_fromIndicies)
                                       throws QueryException
Throws:
QueryException

clone

public Object clone()

clone

protected Object clone(ConditionsClause a_clone)

toString

public String toString()