dods.servers.sql
Class SqlRelOpClause

java.lang.Object
  extended bydods.dap.Server.AbstractClause
      extended bydods.dap.Server.RelOpClause
          extended bydods.servers.sql.SqlRelOpClause
All Implemented Interfaces:
Clause, TopLevelClause

public class SqlRelOpClause
extends RelOpClause
implements TopLevelClause

A specialized case of a RelOpClause that can return an SQL representation of its self.

Author:
ndp
See Also:
Operator, RelOpClause

Field Summary
 
Fields inherited from class dods.dap.Server.RelOpClause
lhs, operator, rhs, value
 
Fields inherited from class dods.dap.Server.AbstractClause
children, constant, defined
 
Constructor Summary
protected SqlRelOpClause(int op, SubClause lhs, java.util.List rhs)
          Creates a new SqlRelOpClause.
 
Method Summary
 java.lang.String getSqlRepresentation(boolean useDatasetName, sqlDDS dds)
          Supplies the (best effort) representation of this SqlRelOpClause as an SQL syntax for inclusion in the WHERE clause in an SQL SELECT query.
 
Methods inherited from class dods.dap.Server.RelOpClause
evaluate, getLHS, getOperator, getRHS, getValue, toString
 
Methods inherited from class dods.dap.Server.AbstractClause
getChildren, isConstant, isDefined
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface dods.dap.Server.TopLevelClause
evaluate, getValue
 
Methods inherited from interface dods.dap.Server.Clause
getChildren, isConstant, isDefined
 

Constructor Detail

SqlRelOpClause

protected SqlRelOpClause(int op,
                         SubClause lhs,
                         java.util.List rhs)
                  throws SDODSException
Creates a new SqlRelOpClause. If the lhs and all the elements of the rhs are constant, the SqlRelOpClause will be flagged as constant, and evaluated immediately.

Parameters:
op - The operator invoked by the clause
lhs - The left-hand side of the comparison.
rhs - A list of SubClauses representing the right-hand side of the comparison.
Throws:
SDODSException - Thrown if the clause is constant, but the attempt to evaluate it fails.
Method Detail

getSqlRepresentation

public java.lang.String getSqlRepresentation(boolean useDatasetName,
                                             sqlDDS dds)
                                      throws InvalidOperatorException
Supplies the (best effort) representation of this SqlRelOpClause as an SQL syntax for inclusion in the WHERE clause in an SQL SELECT query.

Returns:
String representation of this Clause as a snipet of SQL.
Throws:
InvalidOperatorException