er.directtoweb.assignments.delayed
Class ERDDelayedSelectorInvocationAssignment
java.lang.Object
com.webobjects.directtoweb.Assignment
er.directtoweb.assignments.delayed.ERDDelayedAssignment
er.directtoweb.assignments.delayed.ERDDelayedSelectorInvocationAssignment
- All Implemented Interfaces:
- com.webobjects.eocontrol.EOKeyValueArchiving, ERDComputingAssignmentInterface, java.io.Serializable
public class ERDDelayedSelectorInvocationAssignment
- extends ERDDelayedAssignment
- implements ERDComputingAssignmentInterface
Similar in nature to a key-value assignment, but allows you to construct arbitrary method invocations to
resolve rules. As a somewhat contrived example, assume we're inferring on the componentName rule:
entity.name = 'Person' and propertyKey = 'username' -> componentName = (object, componentForKey, propertyKey)
Resolving the rule for componentName, would end up invoking the componentForKey(Object)
method on the current object
from the rule context, passing the current propertyKey through for the argument. This would boil down to
object.componentForKey("username")
.
The array in the value for this assignment must have two or more objects. The first object is a key path evaluated
on the rule context to find the target of the selector. The second object is the selector name, it is a constant
and is not evaluated on the rule context. All subsequent objects in the array are treated as key paths to resolve
on the rule context to get the arguments for the selector.
Assumptions:
- The arguments to the invoked method must all be Objects. This isn't strictly speaking necessary, but the way the
assignment is currently coded, it's required.
- 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)
|
com.webobjects.foundation.NSArray |
dependentKeys(java.lang.String keyPath)
|
java.lang.Object |
fireNow(com.webobjects.directtoweb.D2WContext c)
Implemented by subclasses. |
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 |
ERDDelayedSelectorInvocationAssignment
public ERDDelayedSelectorInvocationAssignment(com.webobjects.eocontrol.EOKeyValueUnarchiver u)
ERDDelayedSelectorInvocationAssignment
public ERDDelayedSelectorInvocationAssignment(java.lang.String key,
java.lang.Object value)
decodeWithKeyValueUnarchiver
public static java.lang.Object decodeWithKeyValueUnarchiver(com.webobjects.eocontrol.EOKeyValueUnarchiver eokeyvalueunarchiver)
dependentKeys
public com.webobjects.foundation.NSArray dependentKeys(java.lang.String keyPath)
- Specified by:
dependentKeys
in interface ERDComputingAssignmentInterface
fireNow
public java.lang.Object fireNow(com.webobjects.directtoweb.D2WContext c)
- Description copied from class:
ERDDelayedAssignment
- Implemented by subclasses.
- Specified by:
fireNow
in class ERDDelayedAssignment
Copyright © 2002 – 2007 Project Wonder.