|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.sqlscribe.Match
org.openanzo.sqlscribe.VariableMatch
public class VariableMatch
Extension of a value constraint in SQL that takes advantage of JDBC prepared statement variable bindings. For example: "SELECT id WHERE type = ?" is a prepared statement with a variable binding. See the SqlQuery builder class for details on how to bind to these variables when executing a query.
| Constructor Summary | |
|---|---|
VariableMatch(Column lhs,
java.lang.String operator,
java.lang.String varName)
Create a new VariableMatch |
|
| Method Summary | |
|---|---|
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.lang.String |
getVariableName()
Get the variable name for this match |
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 org.openanzo.sqlscribe.Match |
|---|
equals, equals, getLhs, getOperator, greater, greater, in, isNotNull, isNull, less, less, listTables, varEquals, varGreater, varGreaterEquals, varLess, varLessEquals |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openanzo.sqlscribe.Constraint |
|---|
listTables |
| Constructor Detail |
|---|
public VariableMatch(Column lhs,
java.lang.String operator,
java.lang.String varName)
lhs - column to matchoperator - type of match operation to usevarName - name of variable| Method Detail |
|---|
public java.lang.String getVariableName()
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 constraints
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||