org.openrdf.sail.rdbms.algebra
Class SqlCase

java.lang.Object
  extended by org.openrdf.query.algebra.QueryModelNodeBase
      extended by org.openrdf.sail.rdbms.algebra.base.RdbmsQueryModelNodeBase
          extended by org.openrdf.sail.rdbms.algebra.SqlCase
All Implemented Interfaces:
Cloneable, QueryModelNode, SqlExpr

public class SqlCase
extends RdbmsQueryModelNodeBase
implements SqlExpr

The SQL CASE WHEN THEN END expression.

Author:
James Leigh

Nested Class Summary
 class SqlCase.Entry
           
 
Constructor Summary
SqlCase()
           
 
Method Summary
 SqlCase clone()
          Returns a (deep) clone of this query model node.
 boolean equals(Object obj)
           
 List<SqlCase.Entry> getEntries()
           
 int hashCode()
           
 void removeEntry(SqlCase.Entry e)
           
 void replaceChildNode(QueryModelNode current, QueryModelNode replacement)
          Default implementation of QueryModelNode.replaceChildNode(QueryModelNode, QueryModelNode) that throws an IllegalArgumentException indicating that current is not a child node of this node.
 void truncateEntries(SqlCase.Entry e)
           
<X extends Exception>
void
visit(RdbmsQueryModelVisitorBase<X> visitor)
           
<X extends Exception>
void
visitChildren(QueryModelVisitor<X> visitor)
          Dummy implementation of QueryModelNode.visitChildren(org.openrdf.query.algebra.QueryModelVisitor) that does nothing.
 void when(SqlExpr condition, SqlExpr expr)
           
 
Methods inherited from class org.openrdf.sail.rdbms.algebra.base.RdbmsQueryModelNodeBase
visit
 
Methods inherited from class org.openrdf.query.algebra.QueryModelNodeBase
getParentNode, getSignature, replaceWith, setParentNode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openrdf.query.algebra.QueryModelNode
getParentNode, getSignature, replaceWith, setParentNode, toString, visit
 

Constructor Detail

SqlCase

public SqlCase()
Method Detail

when

public void when(SqlExpr condition,
                 SqlExpr expr)

getEntries

public List<SqlCase.Entry> getEntries()

visitChildren

public <X extends Exception> void visitChildren(QueryModelVisitor<X> visitor)
                   throws X extends Exception
Description copied from class: QueryModelNodeBase
Dummy implementation of QueryModelNode.visitChildren(org.openrdf.query.algebra.QueryModelVisitor) that does nothing. Subclasses should override this method when they have child nodes.

Specified by:
visitChildren in interface QueryModelNode
Overrides:
visitChildren in class QueryModelNodeBase
Throws:
X extends Exception

replaceChildNode

public void replaceChildNode(QueryModelNode current,
                             QueryModelNode replacement)
Description copied from class: QueryModelNodeBase
Default implementation of QueryModelNode.replaceChildNode(QueryModelNode, QueryModelNode) that throws an IllegalArgumentException indicating that current is not a child node of this node.

Specified by:
replaceChildNode in interface QueryModelNode
Overrides:
replaceChildNode in class QueryModelNodeBase
Parameters:
current - The current child node.
replacement - The new child node.

clone

public SqlCase clone()
Description copied from interface: QueryModelNode
Returns a (deep) clone of this query model node. This method recursively clones the entire node tree, starting from this nodes.

Specified by:
clone in interface QueryModelNode
Specified by:
clone in interface SqlExpr
Overrides:
clone in class QueryModelNodeBase
Returns:
A deep clone of this query model node.

visit

public <X extends Exception> void visit(RdbmsQueryModelVisitorBase<X> visitor)
           throws X extends Exception
Specified by:
visit in class RdbmsQueryModelNodeBase
Throws:
X extends Exception

removeEntry

public void removeEntry(SqlCase.Entry e)

truncateEntries

public void truncateEntries(SqlCase.Entry e)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2001-2008 Aduna. All Rights Reserved.