org.israfil.sqlelements.constraints
Class NaryConstraint

java.lang.Object
  extended by org.israfil.sqlelements.constraints.NaryConstraint
All Implemented Interfaces:
java.lang.Cloneable, ComplexConstraint, Constraint, SQLElement
Direct Known Subclasses:
And, Or

public abstract class NaryConstraint
extends java.lang.Object
implements ComplexConstraint

N-ary Constraint A friendly parent for constraints that can have an infinite number of operands, such as and, or, etc. i.e.: "(a=b) and (b=c) and (c=d)" is a valid SQL construction, but can be represented (logically) by: and(condition1,condition2,condition3)

Version:
$Revision: 27 $
Author:
Christian Edward Gruber , Latest: $Author: cgruber $

Field Summary
protected  Constraint[] operands
           
protected  java.lang.String operatorText
           
 
Constructor Summary
protected NaryConstraint(java.lang.String operatorText, Constraint... operands)
           
protected NaryConstraint(java.lang.String operatorText, java.util.Set<Constraint> operands)
           
 
Method Summary
protected static java.util.Set<Constraint> prepArray(Constraint[] array)
           
 java.lang.String render(SQLRenderContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

operands

protected Constraint[] operands

operatorText

protected java.lang.String operatorText
Constructor Detail

NaryConstraint

protected NaryConstraint(java.lang.String operatorText,
                         Constraint... operands)

NaryConstraint

protected NaryConstraint(java.lang.String operatorText,
                         java.util.Set<Constraint> operands)
Method Detail

prepArray

protected static java.util.Set<Constraint> prepArray(Constraint[] array)

render

public java.lang.String render(SQLRenderContext context)
Specified by:
render in interface SQLElement


Copyright 2005-2005-2006 null. All Rights Reserved.