to.etc.webapp.query
Class QExistsSubquery<T>

java.lang.Object
  extended by to.etc.webapp.query.QNodeBase
      extended by to.etc.webapp.query.QOperatorNode
          extended by to.etc.webapp.query.QExistsSubquery<T>
Type Parameters:
T - The type of the child record persistent class, so the T from the List getChildList() in this subquery's parent.

public class QExistsSubquery<T>
extends QOperatorNode

Represents an "exists" subquery on some child relation of a record. This is always defined as a subquery on a parent record's child-record-set, and it adds requirements on the existence of children having certain restrictions. This should be rendered as a joined-subquery, like:

  [[select xxx from parent_table p where ...]] - rendered above this
  exists (select 1 from child_table a where a.pk = p.fk and [[conditions in this node]]).
 

Author:
Frits Jalvingh Created on Dec 22, 2009

Constructor Summary
QExistsSubquery(QRestrictor<?> parent, java.lang.Class<T> baseClass, java.lang.String property)
           
 
Method Summary
 java.lang.Class<?> getBaseClass()
           
 java.lang.String getParentProperty()
           
 QRestrictor<?> getParentQuery()
           
 QOperatorNode getRestrictions()
           
 void setRestrictions(QOperatorNode restrictions)
           
 void visit(QNodeVisitor v)
           
 
Methods inherited from class to.etc.webapp.query.QOperatorNode
getOperation
 
Methods inherited from class to.etc.webapp.query.QNodeBase
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QExistsSubquery

public QExistsSubquery(QRestrictor<?> parent,
                       java.lang.Class<T> baseClass,
                       java.lang.String property)
Method Detail

getParentQuery

public QRestrictor<?> getParentQuery()

getBaseClass

public java.lang.Class<?> getBaseClass()

getParentProperty

public java.lang.String getParentProperty()

getRestrictions

public QOperatorNode getRestrictions()

setRestrictions

public void setRestrictions(QOperatorNode restrictions)

visit

public void visit(QNodeVisitor v)
           throws java.lang.Exception
Specified by:
visit in class QNodeBase
Throws:
java.lang.Exception