public class ERDDefaultModelAssignment extends ERDAssignment
smartAttribute
smartRelationship
smartDefaultRows
smartDefaultAttributeWidth
entity
dummyEntity
destinationEntity
entityForControllerName
entityForPageConfiguration
sortKeyForList
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
Modifier and Type | Field and Description |
---|---|
protected static NSDictionary |
keys
holds the array of keys this assignment depends upon
|
D2WContextClassArray, log
Constructor and Description |
---|
ERDDefaultModelAssignment(com.webobjects.eocontrol.EOKeyValueUnarchiver u)
Public constructor
|
ERDDefaultModelAssignment(String key,
Object value)
Public constructor
|
Modifier and Type | Method and Description |
---|---|
Object |
attributeConstants(com.webobjects.directtoweb.D2WContext c)
Returns the default value for the entity based on the controllerName.
|
protected int |
attributeWidthAsInt(com.webobjects.directtoweb.D2WContext c) |
static Object |
decodeWithKeyValueUnarchiver(com.webobjects.eocontrol.EOKeyValueUnarchiver eokeyvalueunarchiver)
Static constructor required by the EOKeyValueUnarchiver
interface.
|
Object |
defaultSortOrdering(com.webobjects.directtoweb.D2WContext context)
Called when firing this assignment with the key-path:
defaultSortOrdering.
|
NSArray |
dependentKeys(String keyPath)
Implementation of the
ERDComputingAssignmentInterface . |
Object |
destinationEntity(com.webobjects.directtoweb.D2WContext c)
Returns the default value for the destination entity.
|
protected com.webobjects.eoaccess.EOEntity |
dummyEntity()
Utility to create a fake entity that can be used for tasks such as error/confirm.
|
Object |
dummyEntity(com.webobjects.directtoweb.D2WContext c)
Returns a fake entity that can be used for tasks such as error/confirm.
|
Object |
entity(com.webobjects.directtoweb.D2WContext c)
Returns a fake entity that can be used for tasks such as error/confirm.
|
Object |
entityForControllerName(com.webobjects.directtoweb.D2WContext c)
Returns the default value for the entity based on the controllerName.
|
protected Object |
entityForKey(com.webobjects.directtoweb.D2WContext c,
String key) |
Object |
entityForPageConfiguration(com.webobjects.directtoweb.D2WContext c)
Returns the default value for the entity based on the pageConfiguration.
|
protected boolean |
isTaskWithoutEntity(String task) |
Object |
smartAttribute(com.webobjects.directtoweb.D2WContext c)
Resolves the
EOAttribute in a smarter manner using
the current object from the context as well as the propertyKey
to determine the current attribute. |
Object |
smartDefaultAttributeWidth(com.webobjects.directtoweb.D2WContext c) |
protected int |
smartDefaultAttributeWidthAsInt(com.webobjects.directtoweb.D2WContext c) |
Object |
smartDefaultRows(com.webobjects.directtoweb.D2WContext c) |
Object |
smartRelationship(com.webobjects.directtoweb.D2WContext c)
Resolves the
EORelationship in a smarter manner using
the current object from the context as well as the propertyKey
to determine the current relationship. |
Object |
sortKeyForList(com.webobjects.directtoweb.D2WContext context)
Called when firing this assignment with the key-path:
sortKeyForList.
|
booleanContextValueForKey, fire, keyForMethodLookup, localizedTemplateStringForKeyInContext, localizedValueForKeyInContext, localizedValueForKeyWithDefaultInContext, localizerForContext, logDeprecatedMessage
protected static final NSDictionary keys
public ERDDefaultModelAssignment(com.webobjects.eocontrol.EOKeyValueUnarchiver u)
u
- key-value unarchiver used when unarchiving
from rule files.public NSArray dependentKeys(String keyPath)
ERDComputingAssignmentInterface
. This array
of keys is used when constructing the
significant keys for the passed in keyPath.keyPath
- to compute significant keys for.public static Object decodeWithKeyValueUnarchiver(com.webobjects.eocontrol.EOKeyValueUnarchiver eokeyvalueunarchiver)
eokeyvalueunarchiver
- to be unarchivedprotected int attributeWidthAsInt(com.webobjects.directtoweb.D2WContext c)
protected int smartDefaultAttributeWidthAsInt(com.webobjects.directtoweb.D2WContext c)
public Object smartDefaultAttributeWidth(com.webobjects.directtoweb.D2WContext c)
public Object smartDefaultRows(com.webobjects.directtoweb.D2WContext c)
public Object smartAttribute(com.webobjects.directtoweb.D2WContext c)
EOAttribute
in a smarter manner using
the current object from the context as well as the propertyKey
to determine the current attribute. Works even with inheritance.
Works around the following problem:
An entity A has a relationship b to an entity B, which has a
subentity B1. B1 has an attribute k, which B does not have.
If in an inspect page for entity A, you use b.k as a display
key, then the D2W rules which are based on d2wContext.attribute
will not fire properly. This is because attribute is null, instead
of containing <EOAttribute entity=B1 name=k>. The reason D2W does
not find it is that it uses the Model to find out the EOAttribute
and starts from A. Following the relationship b, gives a B, and
asking B for an attribute named k returns nil and you lose.c
- current D2W contextpublic Object smartRelationship(com.webobjects.directtoweb.D2WContext c)
EORelationship
in a smarter manner using
the current object from the context as well as the propertyKey
to determine the current relationship. Works even with inheritance.
Works around the following problem:c
- current D2W contextprotected com.webobjects.eoaccess.EOEntity dummyEntity()
public Object dummyEntity(com.webobjects.directtoweb.D2WContext c)
c
- current D2W contextpublic Object entity(com.webobjects.directtoweb.D2WContext c)
c
- current D2W contextprotected boolean isTaskWithoutEntity(String task)
public Object entityForControllerName(com.webobjects.directtoweb.D2WContext c)
c
- current D2W contextpublic Object attributeConstants(com.webobjects.directtoweb.D2WContext c)
c
- current D2W contextpublic Object entityForPageConfiguration(com.webobjects.directtoweb.D2WContext c)
c
- current D2W contextpublic Object destinationEntity(com.webobjects.directtoweb.D2WContext c)
c
- current D2W contextpublic Object sortKeyForList(com.webobjects.directtoweb.D2WContext context)
public Object defaultSortOrdering(com.webobjects.directtoweb.D2WContext context)
Copyright © 2002 – 2020 Project Wonder.