ERXExistsQualifier Class Reference

Inherits com::webobjects::eocontrol::EOQualifier.

Collaboration diagram for ERXExistsQualifier:

Collaboration graph
[legend]

List of all members.

Classes

class  ExistsQualifierSQLGenerationSupport

Public Member Functions

void addQualifierKeysToSet (NSMutableSet aSet)
String baseKeyPath ()
Object clone ()
 ERXExistsQualifier (EOQualifier subqualifier, String baseKeyPath)
 ERXExistsQualifier (EOQualifier subqualifier)
EOQualifier qualifierWithBindings (NSDictionary someBindings, boolean requiresAll)
EOQualifier subqualifier ()
String toString ()
void validateKeysWithRootClassDescription (EOClassDescription aClassDescription)

Static Public Attributes

static final Logger log = Logger.getLogger(ERXExistsQualifier.class)

Protected Attributes

String baseKeyPath
EOQualifier subqualifier

Static Package Functions

 [static initializer]


Detailed Description

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)

Author:
Travis Cripps

Constructor & Destructor Documentation

ERXExistsQualifier ( EOQualifier  subqualifier  ) 

Public single argument constructor. Use this constructor for sub-qualification on the same table.

Parameters:
subqualifier sub-qualifier

ERXExistsQualifier ( EOQualifier  subqualifier,
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.


Member Function Documentation

[static initializer] (  )  [static, package]

Register SQL generation support for the qualifier.

void addQualifierKeysToSet ( NSMutableSet  aSet  ) 

Only used with qualifier keys which are not supported in this qualifier at this time. Does nothing.

Parameters:
aSet of qualifier keys

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

Object clone (  ) 

Implementation of the Clonable interface. Clones the current qualifier.

Returns:
cloned qualifier

EOQualifier qualifierWithBindings ( 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.

Parameters:
someBindings some bindings
requiresAll tells if the qualifier requires all bindings
Returns:
clone of the current qualifier.

EOQualifier subqualifier (  ) 

Gets the subqualifier that will be applied in the exists clause.

Returns:
the subqualifier

String toString (  ) 

Description of the qualifier.

Returns:
human readable description of the qualifier

void validateKeysWithRootClassDescription ( EOClassDescription  aClassDescription  ) 

This qualifier does not perform validation. This is a no-op method.

Parameters:
aClassDescription to validation the qualifier keys against.


Member Data Documentation

String baseKeyPath [protected]

Holds the key path from the base entity to the entity to which the exists clause (and qualifier) will be applied.

final Logger log = Logger.getLogger(ERXExistsQualifier.class) [static]

EOQualifier subqualifier [protected]

Holds the subqualifier that will be applied in the exists clause.


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:11 2012 for Project Wonder by  doxygen 1.5.8