com.samskivert.jdbc.depot.expression
Class FunctionExp

java.lang.Object
  extended by com.samskivert.jdbc.depot.expression.FunctionExp
All Implemented Interfaces:
SQLExpression

public class FunctionExp
extends Object
implements SQLExpression

An expression for a function, e.g. FLOOR(blah).


Field Summary
protected  SQLExpression[] _arguments
          The arguments to this function
protected  String _function
          The literal name of this function, e.g.
 
Constructor Summary
FunctionExp(String function, SQLExpression... arguments)
          Create a new FunctionExp with the given function and arguments.
 
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[] getArguments()
           
 String getFunction()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_function

protected String _function
The literal name of this function, e.g. FLOOR


_arguments

protected SQLExpression[] _arguments
The arguments to this function

Constructor Detail

FunctionExp

public FunctionExp(String function,
                   SQLExpression... arguments)
Create a new FunctionExp with the given function and arguments.

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

getFunction

public String getFunction()

getArguments

public SQLExpression[] getArguments()


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