public class ERDDelayedKeyValueAssignment extends ERDDelayedAssignment implements ERDComputingAssignmentInterface
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.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
Constructor and Description |
---|
ERDDelayedKeyValueAssignment(com.webobjects.eocontrol.EOKeyValueUnarchiver u)
Public constructor
|
ERDDelayedKeyValueAssignment(String key,
Object value)
Public constructor
|
Modifier and Type | Method and Description |
---|---|
static Object |
decodeWithKeyValueUnarchiver(com.webobjects.eocontrol.EOKeyValueUnarchiver eokeyvalueunarchiver)
Static constructor required by the EOKeyValueUnarchiver
interface.
|
NSArray |
dependentKeys(String keyPath)
Implementation of the
ERDComputingAssignmentInterface . |
Object |
fireNow(com.webobjects.directtoweb.D2WContext c)
Implementation of the abstract method from
ERDDelayedAssignment . |
fire
public ERDDelayedKeyValueAssignment(com.webobjects.eocontrol.EOKeyValueUnarchiver u)
u
- key-value unarchiver used when unarchiving
from rule files.public static Object decodeWithKeyValueUnarchiver(com.webobjects.eocontrol.EOKeyValueUnarchiver eokeyvalueunarchiver)
eokeyvalueunarchiver
- to be unarchivedpublic NSArray dependentKeys(String keyPath)
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.dependentKeys
in interface ERDComputingAssignmentInterface
keyPath
- to compute significant keys for.public Object fireNow(com.webobjects.directtoweb.D2WContext c)
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.fireNow
in class ERDDelayedAssignment
c
- current D2W contextvalueForKeyPath
called on the current context with the
value of this assignment.Copyright © 2002 – 2020 Project Wonder.