er.directtoweb.assignments.delayed
Class ERDDelayedKeyValueAssignment
java.lang.Object
com.webobjects.directtoweb.Assignment
er.directtoweb.assignments.delayed.ERDDelayedAssignment
er.directtoweb.assignments.delayed.ERDDelayedKeyValueAssignment
- All Implemented Interfaces:
- com.webobjects.eocontrol.EOKeyValueArchiving, ERDComputingAssignmentInterface, java.io.Serializable
public class ERDDelayedKeyValueAssignment
- extends ERDDelayedAssignment
- implements ERDComputingAssignmentInterface
This is an implementation of the KeyValueAssignment
implemented as a ERDDelayedAssignment
. In the
usual cache scheme key-value assignments are cached
the first time that they are used. This may not be the
intended use, i.e. you have a key value assignment with
the value "session.user.firstName", the result of this
computation would be cached the first time this rule is
fired. With a delayed key value assignment everytime
this assignment is the optimal choice from the cache
it will be fired and return that result.
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface com.webobjects.eocontrol.EOKeyValueArchiving |
com.webobjects.eocontrol.EOKeyValueArchiving._NullValueSupport, com.webobjects.eocontrol.EOKeyValueArchiving._NumberSupport, com.webobjects.eocontrol.EOKeyValueArchiving._TimestampSupport, com.webobjects.eocontrol.EOKeyValueArchiving.Awaking, com.webobjects.eocontrol.EOKeyValueArchiving.FinishInitialization, com.webobjects.eocontrol.EOKeyValueArchiving.Support |
Fields inherited from class com.webobjects.directtoweb.Assignment |
KeyPathKey, ValueKey |
Fields inherited from interface com.webobjects.eocontrol.EOKeyValueArchiving |
_CLASS |
Method Summary |
static java.lang.Object |
decodeWithKeyValueUnarchiver(com.webobjects.eocontrol.EOKeyValueUnarchiver eokeyvalueunarchiver)
Static constructor required by the EOKeyValueUnarchiver
interface. |
com.webobjects.foundation.NSArray |
dependentKeys(java.lang.String keyPath)
Implementation of the ERDComputingAssignmentInterface . |
java.lang.Object |
fireNow(com.webobjects.directtoweb.D2WContext c)
Implementation of the abstract method from
ERDDelayedAssignment . |
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 |
ERDDelayedKeyValueAssignment
public ERDDelayedKeyValueAssignment(com.webobjects.eocontrol.EOKeyValueUnarchiver u)
- Public constructor
- Parameters:
u
- key-value unarchiver used when unarchiving
from rule files.
ERDDelayedKeyValueAssignment
public ERDDelayedKeyValueAssignment(java.lang.String key,
java.lang.Object value)
- Public constructor
- Parameters:
key
- context keyvalue
- of the assignmnet
decodeWithKeyValueUnarchiver
public static java.lang.Object decodeWithKeyValueUnarchiver(com.webobjects.eocontrol.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
dependentKeys
public com.webobjects.foundation.NSArray dependentKeys(java.lang.String keyPath)
- Implementation of the
ERDComputingAssignmentInterface
. This
assignment depends upon an array composed of the value
of this assignment. This array of keys is used when constructing the
significant keys for the passed in keyPath.
- Specified by:
dependentKeys
in interface ERDComputingAssignmentInterface
- Parameters:
keyPath
- to compute significant keys for.
- Returns:
- array of context keys this assignment depends upon.
fireNow
public java.lang.Object fireNow(com.webobjects.directtoweb.D2WContext c)
- Implementation of the abstract method from
ERDDelayedAssignment
. This method is
called each time this Assignment is resolved
from the rule cache. For the delayed key value
assignment this method simply calls
valueForKeyPath
on the passed in
context using the value
of the
assignment as the key.
- Specified by:
fireNow
in class ERDDelayedAssignment
- Parameters:
c
- current D2W context
- Returns:
- result of
valueForKeyPath
called on the current context with the
value of this assignment.
Copyright © 2002 – 2007 Project Wonder.