|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gusdb.wdk.model.Query
org.gusdb.wdk.model.BooleanQuery
public class BooleanQuery
BooleanQuery.java A Query representing the pairing of two other Queries (known as 'boolean operands') in a boolean operation (Union, Intersect, Subtract, etc.). The expected use of a BooleanQuery is as the ID Query for a Question and thus a BooleanQuery is fundamentally tied to other Questions and their Answers. A BooleanQuery has three parameters. Two are AnswerParams, representing Answers to Questions whose Queries are the boolean operands. The Questions must have the same RecordClasses in order to be operands. The third is the operation to be performed which is a StringParam. BooleanQueries are recursive, and thus the operand Queries can themselves be BooleanQueries. BooleanQueries are used like any other Query by making BooleanQueryInstances; the result is the result of the two operand Queries joined by the operation. BooleanQueries differ from other Queries in that a different one should be used every time a BooleanQuery is run (rather than the normal use of one Query providing many QueryInstances). Queries need to declare their columns, so a BooleanQuery provides this, but only when a BooleanQueryInstance has been created and its AnswerParameters have been set. The columns of the BooleanQuery then become the Columns of the ID Queries in the Answer's Question. The two Query operands in a BooleanQuery must have the same declared columns. It is the responsibility of whoever creates a BooleanQuery to set its RDBMSPlatform and ResultFactory (this differs from other Queries whose resources are set by the WdkModel upon instantiation). Created: Fri May 21 1821:30 EDT 2004
| Field Summary | |
|---|---|
static java.lang.String |
BOOLEAN_PARAM_SET_NAME
ParamSet for all boolean parameters. |
static java.lang.String |
FIRST_ANSWER_PARAM_NAME
Name of the AnswerParam whose value is the first Answer operand in the BooleanQuery. |
static java.lang.String |
OPERATION_PARAM_NAME
Name of the StringParam whose value is the operation in this BooleanQuery. |
static java.lang.String |
SECOND_ANSWER_PARAM_NAME
Name of the AnswerParam whose value is the second Answer operand in the BooleanQuery. |
| Constructor Summary | |
|---|---|
BooleanQuery()
Normal constructor for a BooleanQuery; handles parameter creation. |
|
| Method Summary | |
|---|---|
RDBMSPlatformI |
getRDBMSPlatform()
|
ResultFactory |
getResultFactory()
|
QueryInstance |
makeInstance()
|
| Methods inherited from class org.gusdb.wdk.model.Query |
|---|
addColumn, addParamRef, getColumn, getColumnMap, getColumns, getDescription, getDisplayName, getFullName, getHelp, getInternalParamValues, getIsCacheable, getName, getParams, setDescription, setDisplayName, setHelp, setIsCacheable, setName, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String FIRST_ANSWER_PARAM_NAME
public static final java.lang.String SECOND_ANSWER_PARAM_NAME
public static final java.lang.String OPERATION_PARAM_NAME
public static final java.lang.String BOOLEAN_PARAM_SET_NAME
| Constructor Detail |
|---|
public BooleanQuery()
| Method Detail |
|---|
public RDBMSPlatformI getRDBMSPlatform()
public ResultFactory getResultFactory()
getResultFactory in class Querypublic QueryInstance makeInstance()
makeInstance in class Query
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||