com.samskivert.jdbc.depot.operator
Class SQLOperator.BinaryOperator

java.lang.Object
  extended by com.samskivert.jdbc.depot.operator.SQLOperator.BinaryOperator
All Implemented Interfaces:
SQLExpression, SQLOperator
Direct Known Subclasses:
Arithmetic.Add, Arithmetic.BitAnd, Arithmetic.BitOr, Arithmetic.Div, Arithmetic.Mul, Arithmetic.Sub, Conditionals.Equals, Conditionals.GreaterThan, Conditionals.GreaterThanEquals, Conditionals.LessThan, Conditionals.LessThanEquals, Conditionals.Like, Conditionals.NotEquals
Enclosing interface:
SQLOperator

public abstract static class SQLOperator.BinaryOperator
extends Object
implements SQLOperator

Does the real work for simple binary operators such as Equals.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.samskivert.jdbc.depot.operator.SQLOperator
SQLOperator.BinaryOperator, SQLOperator.MultiOperator
 
Field Summary
protected  SQLExpression _lhs
           
protected  SQLExpression _rhs
           
 
Constructor Summary
SQLOperator.BinaryOperator(SQLExpression lhs, Comparable<?> rhs)
           
SQLOperator.BinaryOperator(SQLExpression lhs, SQLExpression rhs)
           
 
Method Summary
 void accept(ExpressionVisitor builder)
          Most uses of this class have been implemented with a visitor pattern.
 void addClasses(Collection<Class<? extends PersistentRecord>> classSet)
          Adds all persistent classes that are brought into the SQL context by this clause: FROM clauses, JOINs, UPDATEs, anything that could create a new table abbreviation.
 SQLExpression getLeftHandSide()
           
 SQLExpression getRightHandSide()
           
abstract  String operator()
          Returns the string representation of the operator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_lhs

protected SQLExpression _lhs

_rhs

protected SQLExpression _rhs
Constructor Detail

SQLOperator.BinaryOperator

public SQLOperator.BinaryOperator(SQLExpression lhs,
                                  SQLExpression rhs)

SQLOperator.BinaryOperator

public SQLOperator.BinaryOperator(SQLExpression lhs,
                                  Comparable<?> rhs)
Method Detail

accept

public void accept(ExpressionVisitor builder)
            throws Exception
Description copied from interface: SQLExpression
Most uses of this class have been implemented with a visitor pattern. Create your own ExpressionVisitor and call this method with it.

Specified by:
accept in interface SQLExpression
Throws:
Exception
See Also:
SQLBuilder

addClasses

public void addClasses(Collection<Class<? extends PersistentRecord>> classSet)
Description copied from interface: SQLExpression
Adds all persistent classes that are brought into the SQL context by this clause: FROM clauses, JOINs, UPDATEs, anything that could create a new table abbreviation. This method should recurse into any subordinate state that may in turn bring in new classes so that sub-queries work correctly.

Specified by:
addClasses in interface SQLExpression

operator

public abstract String operator()
Returns the string representation of the operator.


getLeftHandSide

public SQLExpression getLeftHandSide()

getRightHandSide

public SQLExpression getRightHandSide()


Copyright © 2000-2008 Michael Bayne. All Rights Reserved.