|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.sqlscribe.LogicalOperator
public class LogicalOperator
Simple logical operators to be applied on constraints to build more complex constraints.
| Constructor Summary | |
|---|---|
LogicalOperator(java.lang.String operation)
Create a new logical constraint |
|
LogicalOperator(java.lang.String operation,
Constraint... constraints)
Create a new logical constraint |
|
LogicalOperator(java.lang.String operation,
java.util.List<Constraint> operands)
Create a new logical constraint between list of operands |
|
| Method Summary | |
|---|---|
void |
addOperand(Constraint constraint)
Add a constraint to the list of constraints to logically join |
static LogicalOperator |
and(Constraint... constraints)
Create a new AND logical constraint |
java.lang.String |
getConstraint(java.util.List<java.lang.String> unboundVariables)
Get the SQL text for this constraint, using any variables from the provided list |
java.util.List<Constraint> |
getOperands()
Get the set of operands |
java.util.Set<ITable> |
listTables()
Get the set of tables to which this constraint is based |
static LogicalOperator |
or(Constraint... constraints)
Create a new OR logical constraint |
void |
writeConstraint(java.lang.StringBuffer buf,
java.util.List<java.lang.String> unboundVariables)
Write the SQL text for this constraint to the provided buffer, using any variables from the provided list |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LogicalOperator(java.lang.String operation,
Constraint... constraints)
operation - Operation text used to logically join to constraintsconstraints - array of constraints
public LogicalOperator(java.lang.String operation,
java.util.List<Constraint> operands)
operation - Operation text used to logically join to constraintsoperands - list of constraints to logically joinpublic LogicalOperator(java.lang.String operation)
operation - Operation text used to logically join to constraints| Method Detail |
|---|
public static LogicalOperator and(Constraint... constraints)
constraints - array of constraints
public static LogicalOperator or(Constraint... constraints)
constraints - array of constraints
public void addOperand(Constraint constraint)
constraint - to add to operandspublic java.util.List<Constraint> getOperands()
public java.lang.String getConstraint(java.util.List<java.lang.String> unboundVariables)
Constraint
getConstraint in interface ConstraintunboundVariables - set of variables that can be used within constraints
public void writeConstraint(java.lang.StringBuffer buf,
java.util.List<java.lang.String> unboundVariables)
Constraint
writeConstraint in interface Constraintbuf - StringBuffer to which the SQL text for this constraint is appendedunboundVariables - set of variables that can be used within constraintspublic java.util.Set<ITable> listTables()
Constraint
listTables in interface Constraint
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||