Project Wonder 5.0

er.extensions.eof.qualifiers
Class ERXExistsQualifier

java.lang.Object
  extended by com.webobjects.eocontrol.EOQualifier
      extended by er.extensions.eof.qualifiers.ERXExistsQualifier
All Implemented Interfaces:
com.webobjects.eocontrol.EOQualifierEvaluation, java.io.Serializable, java.lang.Cloneable

public class ERXExistsQualifier
extends com.webobjects.eocontrol.EOQualifier
implements java.lang.Cloneable

A qualifier that qualifies using an EXISTS clause. It will produce an SQL clause like the following: select t0.ID, t0.ATT_1, ... t0.ATT_N from FIRST_TABLE t0 where EXISTS (select t1.ID from ANOTHER_TABLE where t1.ATT_1 = ? and t1.FIRST_TABLE_ID = t0.ID)

See Also:
Serialized Form
Author:
Travis Cripps

Nested Class Summary
static class ERXExistsQualifier.ExistsQualifierSQLGenerationSupport
          Implements the SQL generation for the exists qualifier.
 
Nested classes/interfaces inherited from class com.webobjects.eocontrol.EOQualifier
com.webobjects.eocontrol.EOQualifier.Comparison, com.webobjects.eocontrol.EOQualifier.ComparisonSupport, com.webobjects.eocontrol.EOQualifier.QualifierVariableSubstitutionException
 
Field Summary
protected  java.lang.String baseKeyPath
          Holds the key path from the base entity to the entity to which the exists clause (and qualifier) will be applied.
static org.apache.log4j.Logger log
           
protected  com.webobjects.eocontrol.EOQualifier subqualifier
          Holds the subqualifier that will be applied in the exists clause.
 
Fields inherited from class com.webobjects.eocontrol.EOQualifier
_CLASS, QualifierOperatorCaseInsensitiveLike, QualifierOperatorContains, QualifierOperatorEqual, QualifierOperatorGreaterThan, QualifierOperatorGreaterThanOrEqualTo, QualifierOperatorLessThan, QualifierOperatorLessThanOrEqualTo, QualifierOperatorLike, QualifierOperatorNotEqual
 
Constructor Summary
ERXExistsQualifier(com.webobjects.eocontrol.EOQualifier subqualifier)
          Public single argument constructor.
ERXExistsQualifier(com.webobjects.eocontrol.EOQualifier subqualifier, java.lang.String baseKeyPath)
          Public two argument constructor.
 
Method Summary
 void addQualifierKeysToSet(com.webobjects.foundation.NSMutableSet aSet)
          Only used with qualifier keys which are not supported in this qualifier at this time.
 java.lang.String baseKeyPath()
          Gets the key path from the base base entity to the entity to which the exists clause (and qualifier) will be applied.
 java.lang.Object clone()
          Implementation of the Clonable interface.
 com.webobjects.eocontrol.EOQualifier qualifierWithBindings(com.webobjects.foundation.NSDictionary someBindings, boolean requiresAll)
          Creates another qualifier after replacing the values of the bindings.
 com.webobjects.eocontrol.EOQualifier subqualifier()
          Gets the subqualifier that will be applied in the exists clause.
 java.lang.String toString()
          Description of the qualifier.
 void validateKeysWithRootClassDescription(com.webobjects.eocontrol.EOClassDescription aClassDescription)
          This qualifier does not perform validation.
 
Methods inherited from class com.webobjects.eocontrol.EOQualifier
_accept, _isEmpty, allQualifierKeys, allQualifierOperators, bindingKeys, evaluateWithObject, filterArrayWithQualifier, filteredArrayWithQualifier, keyPathForBindingKey, operatorSelectorForSelectorNamed, operatorSelectorForString, qualifierToMatchAllValues, qualifierToMatchAnyValue, qualifierWithQualifierFormat, relationalQualifierOperators, stringForOperatorSelector
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

public static final org.apache.log4j.Logger log

baseKeyPath

protected java.lang.String baseKeyPath
Holds the key path from the base entity to the entity to which the exists clause (and qualifier) will be applied.


subqualifier

protected com.webobjects.eocontrol.EOQualifier subqualifier
Holds the subqualifier that will be applied in the exists clause.

Constructor Detail

ERXExistsQualifier

public ERXExistsQualifier(com.webobjects.eocontrol.EOQualifier subqualifier)
Public single argument constructor. Use this constructor for sub-qualification on the same table.

Parameters:
subqualifier - sub-qualifier

ERXExistsQualifier

public ERXExistsQualifier(com.webobjects.eocontrol.EOQualifier subqualifier,
                          java.lang.String baseKeyPath)
Public two argument constructor. Use this constructor for for building queries based on a key path to a separate entity from the current entity.

Parameters:
subqualifier - sub qualifier
baseKeyPath - to the entity to which the subqualifier will be applied. Note that this should end in a relationship rather than an attribute, e.g., the key path from an Employee might be department.division.
Method Detail

subqualifier

public com.webobjects.eocontrol.EOQualifier subqualifier()
Gets the subqualifier that will be applied in the exists clause.

Returns:
the subqualifier

baseKeyPath

public java.lang.String baseKeyPath()
Gets the key path from the base base entity to the entity to which the exists clause (and qualifier) will be applied.

Returns:
the key path

addQualifierKeysToSet

public void addQualifierKeysToSet(com.webobjects.foundation.NSMutableSet aSet)
Only used with qualifier keys which are not supported in this qualifier at this time. Does nothing.

Specified by:
addQualifierKeysToSet in class com.webobjects.eocontrol.EOQualifier
Parameters:
aSet - of qualifier keys

qualifierWithBindings

public com.webobjects.eocontrol.EOQualifier qualifierWithBindings(com.webobjects.foundation.NSDictionary someBindings,
                                                                  boolean requiresAll)
Creates another qualifier after replacing the values of the bindings. Since this qualifier does not support qualifier binding keys a clone of the qualifier is returned.

Specified by:
qualifierWithBindings in class com.webobjects.eocontrol.EOQualifier
Parameters:
someBindings - some bindings
requiresAll - tells if the qualifier requires all bindings
Returns:
clone of the current qualifier.

validateKeysWithRootClassDescription

public void validateKeysWithRootClassDescription(com.webobjects.eocontrol.EOClassDescription aClassDescription)
This qualifier does not perform validation. This is a no-op method.

Specified by:
validateKeysWithRootClassDescription in class com.webobjects.eocontrol.EOQualifier
Parameters:
aClassDescription - to validation the qualifier keys against.

toString

public java.lang.String toString()
Description of the qualifier.

Overrides:
toString in class java.lang.Object
Returns:
human readable description of the qualifier

clone

public java.lang.Object clone()
Implementation of the Clonable interface. Clones the current qualifier.

Overrides:
clone in class com.webobjects.eocontrol.EOQualifier
Returns:
cloned qualifier

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.