Project Wonder 5.0

com.webobjects.directtoweb
Class ERD2WContext

java.lang.Object
  extended by com.webobjects.directtoweb.D2WContext
      extended by com.webobjects.directtoweb.ERD2WContext
All Implemented Interfaces:
EOKeyValueCoding, EOKeyValueCodingAdditions, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions

public class ERD2WContext
extends com.webobjects.directtoweb.D2WContext

Optimizes custom attribute handling and fixes a problem when a context can't find its task or entity even though it is given in the rules.

Author:
david caching, ak factory, thread safety, fix

Nested Class Summary
static class ERD2WContext.Factory
          Factory to create D2WContext's.
 
Nested classes/interfaces inherited from interface com.webobjects.eocontrol.EOKeyValueCodingAdditions
EOKeyValueCodingAdditions.DefaultImplementation, EOKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.eocontrol.EOKeyValueCoding
EOKeyValueCoding._BestBindingCreation, EOKeyValueCoding._KeyBindingCreation, EOKeyValueCoding._StoredForwardingBinding
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.ValueAccessor
 
Field Summary
 
Fields inherited from class com.webobjects.directtoweb.D2WContext
_derivedValuesComputed, _localValues, _model, NULL_VALUE, VALUE_TO_BE_DERIVED
 
Fields inherited from interface com.webobjects.eocontrol.EOKeyValueCodingAdditions
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_KeyPathSeparatorChar, KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Constructor Summary
ERD2WContext()
           
ERD2WContext(com.webobjects.directtoweb.D2WContext session)
           
ERD2WContext(WOSession session)
           
 
Method Summary
static com.webobjects.directtoweb.D2WContext newContext()
           
static com.webobjects.directtoweb.D2WContext newContext(com.webobjects.directtoweb.D2WContext context)
           
static com.webobjects.directtoweb.D2WContext newContext(WOSession session)
           
 void setDynamicPage(String page)
          Overrridden because when a page config is set, task and entity are cleared, but not re-set when you just call task() or entity().
static void setFactory(ERD2WContext.Factory factory)
           
 
Methods inherited from class com.webobjects.directtoweb.D2WContext
_localValues, _setModel, _setResolveAttributesAndRelationshipsFromObjectsBeforeModel, attribute, attribute, attributeForProperty, clearDerivedValues, componentClassPresentInRuntime, componentName, componentsAvailable, computeDerivedValues, displayNameForProperty, distantAttribute, distantRelationship, dynamicPage, entity, frame, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, inferAllPossibleValuesForKey, inferSystemValueForKey, inferValueForKey, isGenerating, keyWhenRelationship, model, nullOutDerivedValues, pageName, pagesAvailable, propertyKey, propertyKeyIsKeyPath, propertyType, propertyTypeForUnknownKeyPath, rawPageName, rawSystemPageName, relationship, relationship, relationshipForProperty, sessionDidTimeOut, setEntity, setPropertyKey, setTask, startupEntityName, startupTask, storedValueForKey, takeStoredValueForKey, takeValueForInferrableKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, takeValuesFromDictionaryWithMapping, task, toString, unableToSetNullForKey, valueForKey, valueForKeyNoInference, valueForKeyPath, valueForKeyPathNoInference, valuesForKeys, valuesForKeysWithMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ERD2WContext

public ERD2WContext()

ERD2WContext

public ERD2WContext(WOSession session)

ERD2WContext

public ERD2WContext(com.webobjects.directtoweb.D2WContext session)
Method Detail

newContext

public static com.webobjects.directtoweb.D2WContext newContext()

newContext

public static com.webobjects.directtoweb.D2WContext newContext(WOSession session)

newContext

public static com.webobjects.directtoweb.D2WContext newContext(com.webobjects.directtoweb.D2WContext context)

setFactory

public static void setFactory(ERD2WContext.Factory factory)

setDynamicPage

public void setDynamicPage(String page)
Overrridden because when a page config is set, task and entity are cleared, but not re-set when you just call task() or entity(). This leads to NPEs, errors that a pageName can't be found and others. Setting it here fixes it.

Overrides:
setDynamicPage in class com.webobjects.directtoweb.D2WContext

Last updated: Wed, Feb 22, 2012 • 07:00 AM EST

Copyright © 2002 – 2011 Project Wonder.