Project Wonder 2.0

er.directtoweb
Class ERDKeyValueAssignment

java.lang.Object
  extended bycom.webobjects.directtoweb.Assignment
      extended byer.directtoweb.ERDKeyValueAssignment
All Implemented Interfaces:
EOKeyValueArchiving, Serializable

public class ERDKeyValueAssignment
extends Assignment

Piece of crap. This assignment works around the fact that KeyValueAssignment isn't public (and should be). Use this assignment as a drop in replacement for KeyValueAssignment. Note that this assignment is not a delayed assignment and as such the value returned by this assignment will be cached the first time this assignment is fired. To have a key value assignment that does not cache the value returned the first time have a look at ERDDelayedKeyValueAssignment.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.webobjects.eocontrol.EOKeyValueArchiving
EOKeyValueArchiving._NullValueSupport, EOKeyValueArchiving._NumberSupport, EOKeyValueArchiving._TimestampSupport, EOKeyValueArchiving.Awaking, EOKeyValueArchiving.FinishInitialization, EOKeyValueArchiving.Support
 
Field Summary
 
Fields inherited from class com.webobjects.directtoweb.Assignment
KeyPathKey, ValueKey
 
Fields inherited from interface com.webobjects.eocontrol.EOKeyValueArchiving
_CLASS
 
Constructor Summary
ERDKeyValueAssignment(EOKeyValueUnarchiver eokeyvalueunarchiver)
          Public constructor
ERDKeyValueAssignment(String s, String s1)
          Public constructor
 
Method Summary
static Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver eokeyvalueunarchiver)
          Static constructor required by the EOKeyValueUnarchiver interface.
 Object fire(D2WContext d2wcontext)
          Fires the assignment.
 
Methods inherited from class com.webobjects.directtoweb.Assignment
encodeWithKeyValueArchiver, keyPath, toString, value, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ERDKeyValueAssignment

public ERDKeyValueAssignment(String s,
                             String s1)
Public constructor

Parameters:
s - context key
s1 - value to be invoke on the context when firing.

ERDKeyValueAssignment

public ERDKeyValueAssignment(EOKeyValueUnarchiver eokeyvalueunarchiver)
Public constructor

Method Detail

decodeWithKeyValueUnarchiver

public static Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver eokeyvalueunarchiver)
Static constructor required by the EOKeyValueUnarchiver interface. If this isn't implemented then the default behavior is to construct the first super class that does implement this method. Very lame.

Parameters:
eokeyvalueunarchiver - to be unarchived
Returns:
decoded assignment of this class

fire

public Object fire(D2WContext d2wcontext)
Fires the assignment. In this case this method calls valueForKeyPath on the passed in context using the value() as the key.

Parameters:
d2wcontext - current context
Returns:
result of resolving the key path off of the context.

Last updated: Do, Dez 9, 2004 • 12:46 PM CET

Copyright © 2002 – 2004 Project Wonder.