|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.query.CompositeWhereExpression
This class represents a number of WHERE expressions connected using a
logical operator (i.e. AND/OR).
Supported API: true
Extendable: false
Field Summary | |
private boolean |
advancedQueryEnabled
|
private static String |
CLASSNAME
|
private Vector |
components
|
static boolean |
DEBUG
|
private Vector |
expressions
|
static long |
EXTERNALIZATION_VERSION_UID
|
private static DebugWriter |
LOG
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private LogicalOperator |
operator
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
Fields inherited from interface wt.query.WhereExpression |
ADVANCED_QUERY, ADVANCED_QUERY_ENABLED, BIND_PARAMETER, CORRELATED_CLASS_ATTRIBUTES, FROM_COUNT, FROM_INDICIES |
Constructor Summary | |
CompositeWhereExpression()
Supported API: false |
|
CompositeWhereExpression(LogicalOperator a_logicalOperator)
Constructs a CompositeWhereExpression. |
Method Summary | |
void |
append(WhereExpression a_whereExpression)
Appends the specified expression. |
void |
append(WhereExpression a_whereExpression,
int[] a_fromIndicies)
Appends the specified expression. |
void |
clear()
|
Object |
getBindParameter()
Gets the value of the attribute: bindParameter; Returns a bind parameter for this expression (if supported). |
Object |
getBindParameterFrom(Vector a_singleBindParameter)
Supported API: false |
List |
getClassAttributes()
Supported API: false |
WhereExpression |
getComponentAt(int a_index)
|
int |
getComponentCount()
|
protected Vector |
getComponents()
|
List |
getCorrelatedClassAttributes()
Gets the value of the attribute: correlatedClassAttributes. |
String |
getExpression(boolean a_useBind,
Vector a_tableInfos,
Vector a_aliases)
Return string representation of this expression. |
Vector |
getExpressions()
Gets the object for the association that plays role: expressions. |
int |
getFromCount()
Gets the value of the attribute: fromCount; Number of FromClause TableExpressions/Aliases that this expression requires. |
int[] |
getFromIndicies()
Gets the value of the attribute: fromIndicies; Indicies for all current expressions relative to a FromClause that will be used for validating and setting aliases when this compostie expression is appended to a statement. |
WhereExpression |
getJoinConditions(JoinIndex a_joinIndex)
This method is to return the join search condition. |
WhereExpression |
getJoinConditions(Set a_joinIndexSet)
This method is to return the join search condition. |
WhereExpression |
getJoinConditions(String a_alias)
This method is to return the join search condition. |
WhereExpression |
getJoinConditions(String a_alias,
boolean a_removed)
This method is to return the join search condition. |
WhereExpression |
getJoinConditions(String a_alias,
int a_outerNonJoinFromIndex,
boolean a_removed)
This method is to return the join search condition. |
Set |
getJoinIndex()
Supported API: false |
LogicalOperator |
getOperator()
Gets the object for the association that plays role: operator. |
void |
handleCorrelatedAttributes(Vector a_tableInfos,
Vector a_aliases)
Supported API: false |
boolean |
isAdvancedQuery()
Gets the value of the attribute: advancedQuery; Indicates if the expression uses advanced query capabilities. |
boolean |
isAdvancedQueryEnabled()
Gets the value of the attribute: advancedQueryEnabled; Indicates if advanced query capabilities are enabled. |
boolean |
isAllJoinConditions(JoinIndex a_joinIndex)
Supported API: false |
boolean |
isAllJoinConditions(Set a_joinIndexSet)
Supported API: false |
boolean |
isAllJoinConditions(String a_alias)
Supported API: false |
boolean |
isAllJoinConditions(String a_alias,
boolean a_removed)
Supported API: false |
boolean |
isAllOuterNonJoinConditions()
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(CompositeWhereExpression thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
void |
removeComponentAt(int a_index)
|
void |
setAdvancedQueryEnabled(boolean a_AdvancedQueryEnabled)
Sets the value of the attribute: advancedQueryEnabled; Indicates if advanced query capabilities are enabled. |
int |
setAliases(String[] a_aliases,
int a_offset)
This method sets the aliases for components of the expression. |
void |
setAliases(Vector a_aliases)
|
static void |
setAliases(WhereExpression a_where,
Vector a_aliases)
|
int |
setBindParameterIndicies(int a_offset)
Supported API: false |
int |
setFromIndicies(int[] a_fromIndicies,
int a_offset)
This method sets the From clause indicies for components of the expression. |
void |
setOperator(LogicalOperator a_Operator)
Sets the object for the association that plays role: operator. |
String |
toString()
|
int |
validate(TableExpression[] a_fromTables,
int a_offset)
This method validates the expression against the FROM clause. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private Vector expressions
private LogicalOperator operator
private transient boolean advancedQueryEnabled
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
private transient Vector components
public static final boolean DEBUG
private static final DebugWriter LOG
Constructor Detail |
public CompositeWhereExpression()
public CompositeWhereExpression(LogicalOperator a_logicalOperator)
a_logicalOperator
- Logical operator used to connect expressionsMethod Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(CompositeWhereExpression thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public Vector getExpressions()
public LogicalOperator getOperator()
public void setOperator(LogicalOperator a_Operator)
a_Operator
- public void append(WhereExpression a_whereExpression, int[] a_fromIndicies)
a_whereExpression
- WhereExpression instance to appenda_fromIndicies
- Indicies relative to a FromClause that will be used for validating and setting aliases when this expression is appended to a statementpublic void append(WhereExpression a_whereExpression)
a_whereExpression
- WhereExpression instance to appendpublic Object getBindParameter() throws WTException
getBindParameter
in interface WhereExpression
WTException
public int getFromCount()
getFromCount
in interface WhereExpression
public int[] getFromIndicies()
getFromIndicies
in interface WhereExpression
public boolean isAdvancedQuery() throws WTException
isAdvancedQuery
in interface WhereExpression
WTException
public List getCorrelatedClassAttributes()
getCorrelatedClassAttributes
in interface WhereExpression
public boolean isAdvancedQueryEnabled()
isAdvancedQueryEnabled
in interface WhereExpression
public void setAdvancedQueryEnabled(boolean a_AdvancedQueryEnabled)
setAdvancedQueryEnabled
in interface WhereExpression
a_AdvancedQueryEnabled
- public int validate(TableExpression[] a_fromTables, int a_offset) throws QueryException
validate
in interface WhereExpression
a_fromTables
- TableExpressions to validate against.a_offset
- Offset index into the TableExpression array for the next valid TableExpression
QueryException
public int setAliases(String[] a_aliases, int a_offset) throws QueryException
setAliases
in interface WhereExpression
a_aliases
- Aliases to set.a_offset
- Offset index into the alias array for the next valid alias
QueryException
public String getExpression(boolean a_useBind, Vector a_tableInfos, Vector a_aliases) throws QueryException
getExpression
in interface WhereExpression
a_useBind
- Indicates if bind parameters should be used.a_tableInfos
- a_aliases
-
QueryException
public int setFromIndicies(int[] a_fromIndicies, int a_offset)
setFromIndicies
in interface WhereExpression
a_fromIndicies
- From indicies to set.a_offset
- Offset index into the From indicies array for the next valid From index
public List getClassAttributes()
getClassAttributes
in interface WhereExpression
public WhereExpression getJoinConditions(String a_alias) throws QueryException
getJoinConditions
in interface WhereExpression
a_alias
-
QueryException
public boolean isAllJoinConditions(String a_alias) throws QueryException
isAllJoinConditions
in interface WhereExpression
a_alias
-
QueryException
public Set getJoinIndex()
getJoinIndex
in interface WhereExpression
public WhereExpression getJoinConditions(JoinIndex a_joinIndex)
getJoinConditions
in interface WhereExpression
a_joinIndex
-
public boolean isAllOuterNonJoinConditions()
isAllOuterNonJoinConditions
in interface WhereExpression
public Object getBindParameterFrom(Vector a_singleBindParameter)
getBindParameterFrom
in interface WhereExpression
a_singleBindParameter
-
public int setBindParameterIndicies(int a_offset)
setBindParameterIndicies
in interface WhereExpression
a_offset
-
public WhereExpression getJoinConditions(Set a_joinIndexSet)
getJoinConditions
in interface WhereExpression
a_joinIndexSet
-
public boolean isAllJoinConditions(Set a_joinIndexSet)
isAllJoinConditions
in interface WhereExpression
a_joinIndexSet
-
public boolean isAllJoinConditions(JoinIndex a_joinIndex)
isAllJoinConditions
in interface WhereExpression
a_joinIndex
-
public WhereExpression getJoinConditions(String a_alias, boolean a_removed) throws QueryException
getJoinConditions
in interface WhereExpression
a_alias
- a_removed
-
QueryException
public boolean isAllJoinConditions(String a_alias, boolean a_removed) throws QueryException
isAllJoinConditions
in interface WhereExpression
a_alias
- a_removed
-
QueryException
public WhereExpression getJoinConditions(String a_alias, int a_outerNonJoinFromIndex, boolean a_removed) throws QueryException
getJoinConditions
in interface WhereExpression
a_alias
- a_outerNonJoinFromIndex
- a_removed
-
QueryException
public void handleCorrelatedAttributes(Vector a_tableInfos, Vector a_aliases)
handleCorrelatedAttributes
in interface WhereExpression
a_tableInfos
- a_aliases
- public String toString()
public static void setAliases(WhereExpression a_where, Vector a_aliases) throws WTException
WTException
public void setAliases(Vector a_aliases) throws WTException
WTException
protected Vector getComponents()
public WhereExpression getComponentAt(int a_index)
public void removeComponentAt(int a_index)
public int getComponentCount()
public void clear()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |