org.tranql.ql
Class ConditionalAssignment

java.lang.Object
  extended byorg.tranql.ql.AbstractNode
      extended byorg.tranql.ql.ConditionalAssignment
All Implemented Interfaces:
Node, java.io.Serializable

public class ConditionalAssignment
extends AbstractNode

This class represents a conditional assignment in an update statement. This is used to update an entity where all columns may not have been loaded yet. This node expects three children, column to set, a boolean flag, and a value. This style of update statement is more effieient because the database can cache the prepared statement plan. It also allows us to have a single style of update statement which makes replacement with a stored procedure easier. column = CASE WHEN flag THEN value ELSE column

Version:
$Revision: 138 $ $Date: 2004-10-21 05:52:45 +0200 (Thu, 21 Oct 2004) $
See Also:
Serialized Form

Constructor Summary
ConditionalAssignment()
           
 
Method Summary
 java.lang.Object visit(QueryVisitor visitor, java.lang.Object param)
           
 
Methods inherited from class org.tranql.ql.AbstractNode
addChild, getChild, getSibling, isOnlyChild, setSibling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConditionalAssignment

public ConditionalAssignment()
Method Detail

visit

public java.lang.Object visit(QueryVisitor visitor,
                              java.lang.Object param)
                       throws QueryException
Throws:
QueryException


Copyright © -2006 The Codehaus. All Rights Reserved.