T - the EO class that this is a partial ofpublic class ERXPartial<T extends ERXGenericRecord> extends Object implements Serializable
package.html in
er.extensions.partials.
ERXPartial is the superclass of all partial entity implementations.
ERXPartial is not itself an EO, but is acts as a partial typesafe
wrapper around an existing base EO (which must extend
ERXPartialGenericRecord). For instance, the base entity might be
Person, but the partial may be CalendarPerson which might
expose methods like calendarPerson.scheduledEvents().
To obtain a partial, you request an instance from a base EO. Take the
Person example from above. You can access the interface of the
CalendarPerson partial in two ways:
Person person = ...;
CalendarPerson calendarPerson = person.partialForClass(CalendarPerson.class);
or
Person person = ...;
CalendarPerson calendarPerson = person.valueForKey("@CalendarPerson");
which allows easy use of the partial entities in component bindings, like
person.@CalendarPerson.scheduledEvents.| Constructor and Description |
|---|
ERXPartial() |
| Modifier and Type | Method and Description |
|---|---|
void |
addObjectToBothSidesOfRelationshipWithKey(com.webobjects.eocontrol.EORelationshipManipulation eo,
String key)
Calls
_primaryEO.addObjectToBothSidesOfRelationshipWithKey(eo, key). |
void |
awakeFromFetch(com.webobjects.eocontrol.EOEditingContext editingContext)
Delegated from the base entity.
|
void |
delete()
Delegated from the base entity.
|
void |
didDelete(com.webobjects.eocontrol.EOEditingContext ec)
Delegated from the base entity.
|
void |
didInsert()
Delegated from the base entity.
|
void |
didRevert(com.webobjects.eocontrol.EOEditingContext ec)
Delegated from the base entity.
|
void |
didUpdate()
Delegated from the base entity.
|
com.webobjects.eocontrol.EOEditingContext |
editingContext()
Returns the primary EO's
EOEditingContext. |
void |
excludeObjectFromPropertyWithKey(Object value,
String key)
Calls
_primaryEO.excludeObjectFromPropertyWithKey(value, key). |
void |
includeObjectIntoPropertyWithKey(Object value,
String key)
Calls
_primaryEO.includeObjectIntoPropertyWithKey(value, key). |
protected void |
init(com.webobjects.eocontrol.EOEditingContext editingContext)
Delegated from the base entity.
|
boolean |
isPartialKeypath(String keypath)
Tests the given keypath to see if it is a valid attribute or relationship
for this partial.
|
void |
mightDelete()
Delegated from the base entity.
|
static NSArray<String> |
partialAttributes()
When partial entities are initialized the
EOEntity is removed from the
model, making it impossible to query attributes and relationships later. |
static NSArray<String> |
partialProperties()
When partial entities are initialized the
EOEntity is removed
from the model making it impossible to query attributes and relationships
later. |
static NSArray<String> |
partialRelationships()
When partial entities are initialized the
EOEntity is removed from the
model making it impossible to query attributes and relationships later. |
T |
primaryEO()
Returns this partial's primary EO.
|
void |
removeObjectFromBothSidesOfRelationshipWithKey(com.webobjects.eocontrol.EORelationshipManipulation eo,
String key)
Calls
_primaryEO.removeObjectFromBothSidesOfRelationshipWithKey(eo, key). |
void |
setPrimaryEO(T primaryEO)
Sets this partial's primary EO.
|
Object |
storedValueForKey(String key)
Returns
_primaryEO.storedValueForKey(key). |
void |
takeStoredValueForKey(Object value,
String key)
Calls
_primaryEO.takeStoredValueForKey(value, key). |
void |
validateForInsert()
Delegated from the base entity.
|
void |
validateForSave()
Delegated from the base entity.
|
void |
validateForUpdate()
Delegated from the base entity.
|
Object |
validateTakeValueForKeyPath(Object value,
String keyPath)
Delegated from the base entity.
|
Object |
validateValueForKey(Object value,
String key)
Delegated from the base entity.
|
void |
willDelete()
Delegated from the base entity.
|
void |
willInsert()
Delegated from the base entity.
|
void |
willRevert()
Delegated from the base entity.
|
void |
willUpdate()
Delegated from the base entity.
|
public void setPrimaryEO(T primaryEO)
primaryEO - the primary EOpublic T primaryEO()
public static NSArray<String> partialAttributes()
EOEntity is removed from the
model, making it impossible to query attributes and relationships later.public static NSArray<String> partialRelationships()
EOEntity is removed from the
model making it impossible to query attributes and relationships later.public static NSArray<String> partialProperties()
EOEntity is removed
from the model making it impossible to query attributes and relationships
later.public boolean isPartialKeypath(String keypath)
keypath - a keypathtrue if keypath matches an attribute or
relationshippublic com.webobjects.eocontrol.EOEditingContext editingContext()
EOEditingContext.EOEditingContextpublic Object storedValueForKey(String key)
_primaryEO.storedValueForKey(key).key - a key_primaryEO.storedValueForKey(key)public void takeStoredValueForKey(Object value, String key)
_primaryEO.takeStoredValueForKey(value, key).value - a valuekey - a keypublic void includeObjectIntoPropertyWithKey(Object value, String key)
_primaryEO.includeObjectIntoPropertyWithKey(value, key).value - a valuekey - a keypublic void excludeObjectFromPropertyWithKey(Object value, String key)
_primaryEO.excludeObjectFromPropertyWithKey(value, key).value - a valuekey - a keypublic void addObjectToBothSidesOfRelationshipWithKey(com.webobjects.eocontrol.EORelationshipManipulation eo,
String key)
_primaryEO.addObjectToBothSidesOfRelationshipWithKey(eo, key).eo - an EORelationshipManipulationkey - a keypublic void removeObjectFromBothSidesOfRelationshipWithKey(com.webobjects.eocontrol.EORelationshipManipulation eo,
String key)
_primaryEO.removeObjectFromBothSidesOfRelationshipWithKey(eo, key).eo - an EORelationshipManipulationkey - a keypublic void awakeFromFetch(com.webobjects.eocontrol.EOEditingContext editingContext)
editingContext - this object's EOEditingContextpublic void delete()
public void mightDelete()
public void willDelete()
throws com.webobjects.foundation.NSValidation.ValidationException
NSValidation.ValidationException - in the case of a validation failurepublic void didDelete(com.webobjects.eocontrol.EOEditingContext ec)
ec - this object's EOEditingContextpublic void willInsert()
public void didInsert()
public void willUpdate()
public void didUpdate()
public void willRevert()
public void didRevert(com.webobjects.eocontrol.EOEditingContext ec)
ec - this object's EOEditingContextpublic void validateForSave()
throws com.webobjects.foundation.NSValidation.ValidationException
NSValidation.ValidationException - in the case of a validation failurepublic void validateForInsert()
throws com.webobjects.foundation.NSValidation.ValidationException
NSValidation.ValidationException - in the case of a validation failurepublic void validateForUpdate()
throws com.webobjects.foundation.NSValidation.ValidationException
NSValidation.ValidationException - in the case of a validation failurepublic Object validateTakeValueForKeyPath(Object value, String keyPath) throws com.webobjects.foundation.NSValidation.ValidationException
value - a valuekeyPath - a keypathcom.webobjects.foundation.NSValidation.ValidationException - in the case of a validation failurepublic Object validateValueForKey(Object value, String key) throws com.webobjects.foundation.NSValidation.ValidationException
value - a valuekey - a keyNSValidation.ValidationException - in the case of a validation failureprotected void init(com.webobjects.eocontrol.EOEditingContext editingContext)
init() method is called.editingContext - this object's EOEditingContextCopyright © 2002 – 2020 Project Wonder.