org.openanzo.sqlscribe
Interface Constraint

All Known Implementing Classes:
InMatch, Join, LogicalOperator, Match, ValueMatch, VariableMatch

public interface Constraint

Common interface for all constraint types used in a SQL query.

Author:
Joe Betz
See Also:
Match

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.util.Set<ITable> listTables()
          Get the set of tables to which this constraint is based
 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
 

Method Detail

listTables

java.util.Set<ITable> listTables()
Get the set of tables to which this constraint is based

Returns:
the set of tables to which this constraint is based

getConstraint

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

Parameters:
unboundVariables - set of variables that can be used within constraints
Returns:
the SQL text for this constraint, using any variables from the provided list

writeConstraint

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

Parameters:
buf - StringBuffer to which the SQL text for this constraint is appended
unboundVariables - set of variables that can be used within constraints


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.