ERD2WQueryPage Class Reference

Inherits er::directtoweb::pages::ERD2WPage, and er::directtoweb::interfaces::ERDQueryPageInterface.

Inherited by ERD2WQueryPageWithFetchSpecification, ERD2WQueryPageTemplate, ERD2WQueryPageWithFetchSpecificationTemplate, ERDIVQueryPage, ERLITQueryPage, and ERNEUQueryPage.

Collaboration diagram for ERD2WQueryPage:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void appendToResponse (WOResponse response, WOContext context)
void awake ()
WOComponent cancelAction ()
boolean canQueryCurrentPropertyForNullValue ()
WOComponent clearAction ()
EODataSource defaultQueryDataSource ()
WODisplayGroup displayGroup ()
 ERD2WQueryPage (WOContext context)
int fetchLimit ()
EOFetchSpecification fetchSpecification ()
String fetchSpecificationName ()
String headerTemplate ()
boolean isDeep ()
boolean isNullQueryCheckedForCurrentProperty ()
NSArray nullablePropertyKeys ()
NSArray prefetchingRelationshipKeyPaths ()
EOQualifier qualifier ()
WOComponent queryAction ()
NSDictionary queryBindings ()
EODataSource queryDataSource ()
ERDQueryDataSourceDelegateInterface queryDataSourceDelegate ()
EOFetchSpecification queryFetchSpecification ()
ERDQueryValidationDelegate queryValidationDelegate ()
boolean refreshRefetchedObjects ()
WOComponent returnAction ()
void setCancelDelegate (NextPageDelegate cancelDelegate)
void setFetchSpecification (EOFetchSpecification value)
void setFetchSpecificationName (String value)
void setIsNullQueryCheckedForCurrentProperty (boolean value)
void setQueryBindings (NSDictionary dictionary)
void setQueryDataSource (EODataSource datasource)
void setQueryDataSourceDelegate (ERDQueryDataSourceDelegateInterface delegate)
void setQueryMatchForKey (Object value, String operator, String key)
void setQueryValidationDelegate (ERDQueryValidationDelegate delegate)
void setShowResults (boolean value)
boolean showCancel ()
boolean showResults ()
void takeValuesFromRequest (WORequest request, WOContext context)
boolean usesDistinct ()

Public Attributes

WOComponent returnPage

Protected Member Functions

void createDisplayGroup ()
void loadQueryBindings ()
void pullQueryBindingsForName (String name)
void pushQueryBindingsForName (String name)
void saveQueryBindings ()
void substituteValueForNullableQueryKeys ()

Protected Attributes

NSArray _nullablePropertyKeys
boolean didLoadQueryBindings
WODisplayGroup displayGroup
EOFetchSpecification fetchSpecification
NSMutableDictionary keysToQueryForNull = new NSMutableDictionary()
NSDictionary queryBindings
ERDQueryDataSourceDelegateInterface queryDataSourceDelegate
ERDQueryValidationDelegate queryValidationDelegate
Boolean showResults = null

Private Attributes

boolean _wasCancelled


Detailed Description

Superclass for all query pages.
In addition to the rest of the goodies of ERD2WPage, it lets you save and restore the initial query bindings by supplying a NS(Mutable)Dictionary which contains the keys "queryMin", "queryMax" etc from the respective fields of the WODisplayGroup. fetchSpecificationName enableQueryForNullValues isDeep usesDistinct refrehRefetchedObjects fetchLimit prefetchingRelationshipKeyPaths showListInSamePage listConfigurationName queryDataSourceDelegate queryValidationDelegate enableQueryForNullValues canQueryPropertyForNullValues

Constructor & Destructor Documentation

ERD2WQueryPage ( WOContext  context  ) 


Member Function Documentation

void appendToResponse ( WOResponse  response,
WOContext  context 
)

Overridden from the parent for better logging. Reports exceptions in the console for easier debugging.

Reimplemented from ERD2WPage.

Reimplemented in ERDIVQueryPage.

void awake (  ) 

Overridden to lock the page's editingContext, if there is any present.

Reimplemented from ERD2WPage.

WOComponent cancelAction (  ) 

boolean canQueryCurrentPropertyForNullValue (  ) 

Determines if the null query checkbox can be shown for the current D2W property key should be checked.

Returns:
true if the checkbox should be checked

WOComponent clearAction (  ) 

void createDisplayGroup (  )  [protected]

EODataSource defaultQueryDataSource (  ) 

Default implementation of which assembles the data source for the search results page, configured for the current query.

Returns:
the prepared data source

WODisplayGroup displayGroup (  ) 

Gets the display group.

Returns:
the display group

int fetchLimit (  ) 

EOFetchSpecification fetchSpecification (  ) 

String fetchSpecificationName (  ) 

String headerTemplate (  ) 

boolean isDeep (  ) 

boolean isNullQueryCheckedForCurrentProperty (  ) 

Determines if the null query checkbox for the current D2W property key should be checked.

Returns:
true if the checkbox should be checked

void loadQueryBindings (  )  [protected]

NSArray nullablePropertyKeys (  ) 

Discovers the property keys that can be queried for a NULL value.

Returns:
the array of nullable and/or non-mandatory property keys

NSArray prefetchingRelationshipKeyPaths (  ) 

void pullQueryBindingsForName ( String  name  )  [protected]

void pushQueryBindingsForName ( String  name  )  [protected]

EOQualifier qualifier (  ) 

WOComponent queryAction (  ) 

Reimplemented in ERMODQueryPage.

NSDictionary queryBindings (  ) 

EODataSource queryDataSource (  ) 

Assembles the data source for the search results page, configured for the current query. If a queryDataSourceDelegate() is defined, the delegate's implementation is invoked. Otherwise, the defaultQueryDataSource() is returned.

Returns:
the prepared data source

Implements ERDQueryPageInterface.

Gets the query data source delegate.

Returns:
the query data source delegate

EOFetchSpecification queryFetchSpecification (  ) 

Gets the query validation delegate.

Returns:
the query validation delegate

boolean refreshRefetchedObjects (  ) 

WOComponent returnAction (  ) 

Reimplemented in ERMODQueryPage.

void saveQueryBindings (  )  [protected]

void setCancelDelegate ( NextPageDelegate  cancelDelegate  ) 

Implements ERDQueryPageInterface.

void setFetchSpecification ( EOFetchSpecification  value  ) 

void setFetchSpecificationName ( String  value  ) 

void setIsNullQueryCheckedForCurrentProperty ( boolean  value  ) 

Sets the flag denoting a property key is being queried for a null value.

Parameters:
value of the checkbox' checked attribute

void setQueryBindings ( NSDictionary  dictionary  ) 

void setQueryDataSource ( EODataSource  datasource  ) 

Sets the query data source.

Parameters:
datasource to be used as the query data source

void setQueryDataSourceDelegate ( ERDQueryDataSourceDelegateInterface  delegate  ) 

Sets the query data source delegate.

Parameters:
delegate to use as the query data source delegate

void setQueryMatchForKey ( Object  value,
String  operator,
String  key 
)

Set a search value for the display group query match. When the value is null is gets removed from the dict, when the operator is null and the value isn't, "=" is chosen. When operator is "<" is uses queryMatch(), if it is ">" is uses queryMin(), so you can use it with the various date range components.

Parameters:
value to assign to the queryMatch dictionary for the given key
operator used for comparing the value
key to use

Implements ERDQueryPageInterface.

void setQueryValidationDelegate ( ERDQueryValidationDelegate  delegate  ) 

Sets the query validation delegate.

Parameters:
delegate to use as the query validation delegate

void setShowResults ( boolean  value  ) 

boolean showCancel (  ) 

Reimplemented from ERD2WPage.

Reimplemented in ERMODQueryPage.

boolean showResults (  ) 

void substituteValueForNullableQueryKeys (  )  [protected]

When querying for properties with a null value, and the null value checkbox for a property key is checked, this method substitutes NSKeyValueCoding.NullValue into the display group's query dictionaries for that property key.

void takeValuesFromRequest ( WORequest  r,
WOContext  c 
)

Overridden from the parent for better logging. Also clears validation errors

Reimplemented from ERD2WPage.

boolean usesDistinct (  ) 


Member Data Documentation

NSArray _nullablePropertyKeys [protected]

boolean _wasCancelled [private]

boolean didLoadQueryBindings [protected]

WODisplayGroup displayGroup [protected]

EOFetchSpecification fetchSpecification [protected]

NSDictionary queryBindings [protected]

WOComponent returnPage

Boolean showResults = null [protected]


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

Generated on Sat May 26 06:42:58 2012 for Project Wonder by  doxygen 1.5.8