|
Project Wonder 5.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webobjects.eocontrol.EOCustomObject
er.extensions.eof.ERXDummyRecord
public class ERXDummyRecord
Put POJOs into EOF (sort of). This class is mainly usefull when used with D2W, when you don't want to create components for non-persistent objects. Should be regarded as experimental :) Thing to watch out for:
public class Main extends WOComponent {
public static class Test {
public String string;
public Number number;
public Boolean flag;
public Test(String string, Number number, Boolean flag) {
this.string = string;
this.number = number;
this.flag = flag;
}
}
public Test object;
public NSArray list;
public Main(WOContext context) {
super(context);
ERXDummyRecord.registerDescriptionForClass(Test.class, null);
NSMutableArray l = new NSMutableArray();
for (int i = 0; i > 5; i++) {
Test o = new Test("Foo "+ i, new Integer(i^i % (i+1)), i % 2 == 0? Boolean.TRUE : Boolean.FALSE);
l.addObject(o);
}
object = (Test) l.lastObject();
list = l.immutableClone();
}
public WOComponent editObject() {
EOEnterpriseObject eo = ERXDummyRecord.recordForObject(session().defaultEditingContext(), object);
WOComponent result = D2W.factory().pageForTaskAndEntityNamed("edit", eo.entityName(), session());
result.takeValueForKey(eo, "object");
result.takeValueForKey(context().page(), "nextPage");
return result;
}
public WOComponent showList() {
EOArrayDataSource ds = ERXDummyRecord.dataSourceForObjects(session().defaultEditingContext(), list);
ds.setArray(objects);
WOComponent result = D2W.factory().pageForTaskAndEntityNamed("list", ds.classDescriptionForObjects().entityName(), session());
result.takeValueForKey(ds, "dataSource");
result.takeValueForKey(context().page(), "nextPage");
return result;
}
}
Nested Class Summary | |
---|---|
static class |
ERXDummyRecord.GlobalID
|
static class |
ERXDummyRecord.ProxyBinding
|
Nested classes/interfaces inherited from class com.webobjects.eocontrol.EOCustomObject |
---|
com.webobjects.eocontrol.EOCustomObject._BooleanFieldBinding, com.webobjects.eocontrol.EOCustomObject._FieldBinding, com.webobjects.eocontrol.EOCustomObject._LazyFieldBinding, com.webobjects.eocontrol.EOCustomObject._NumberFieldBinding |
Nested classes/interfaces inherited from interface com.webobjects.eocontrol.EOKeyValueCodingAdditions |
---|
com.webobjects.eocontrol.EOKeyValueCodingAdditions.DefaultImplementation, com.webobjects.eocontrol.EOKeyValueCodingAdditions.Utility |
Nested classes/interfaces inherited from interface com.webobjects.eocontrol.EOKeyValueCoding |
---|
com.webobjects.eocontrol.EOKeyValueCoding._BestBindingCreation, com.webobjects.eocontrol.EOKeyValueCoding._KeyBindingCreation, com.webobjects.eocontrol.EOKeyValueCoding._StoredForwardingBinding |
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding |
---|
com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.Null, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor |
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation |
---|
com.webobjects.foundation.NSValidation._MethodBinding, com.webobjects.foundation.NSValidation._ValidationBinding, com.webobjects.foundation.NSValidation.ValidationException |
Nested classes/interfaces inherited from interface com.webobjects.eocontrol._EOPrivateMemento |
---|
com.webobjects.eocontrol._EOPrivateMemento.DefaultImplementation |
Field Summary |
---|
Fields inherited from class com.webobjects.eocontrol.EOCustomObject |
---|
_CLASS |
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions |
---|
_KeyPathSeparatorChar, KeyPathSeparator |
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding |
---|
NullValue |
Constructor Summary | |
---|---|
protected |
ERXDummyRecord(java.lang.Object o)
|
Method Summary | |
---|---|
com.webobjects.foundation.NSKeyValueCoding._KeyBinding |
_otherStorageBinding(java.lang.String key)
|
static com.webobjects.eocontrol.EOClassDescription |
classDescriptionForObject(java.lang.Object object)
|
static com.webobjects.eocontrol.EOArrayDataSource |
dataSourceForObjects(com.webobjects.eocontrol.EOEditingContext ec,
com.webobjects.foundation.NSArray list)
|
java.lang.Object |
object()
|
static com.webobjects.eocontrol.EOEnterpriseObject |
recordForObject(com.webobjects.eocontrol.EOEditingContext ec,
java.lang.Object o)
|
static void |
registerDescriptionForClass(java.lang.Class clazz,
com.webobjects.foundation.NSArray keys)
|
Methods inherited from class com.webobjects.eocontrol.EOCustomObject |
---|
__classDescription, __clearPendingChanges, __editingContext, __globalID, __hasAuxillaryObservers, __hasPendingChanges, __hasPendingUpdate, __isInitialized, __isPendingDeletion, __isPendingInsertion, __isShared, __lastSnapshot, __originalSnapshot, __retainCount, __setAuxillaryObservers, __setClassDescription, __setEditingContext, __setGlobalID, __setInitialized, __setLastSnapshot, __setOriginalSnapshot, __setPendingDeletion, __setPendingInsertion, __setPendingUpdate, __setRetainCount, __setShared, _createKeyGetBindingForKey, _createKeySetBindingForKey, _createStoredKeyGetBindingForKey, _createStoredKeySetBindingForKey, _fieldKeyBinding, _forwardingBindingNeededForClass, _keyGetBindingForKey, _keySetBindingForKey, _methodKeyGetBinding, _methodKeySetBinding, _storedKeyGetBindingForKey, _storedKeySetBindingForKey, addObjectToBothSidesOfRelationshipWithKey, addObjectToPropertyWithKey, allPropertyKeys, attributeKeys, awakeFromClientUpdate, awakeFromFetch, awakeFromInsertion, canAccessFieldsDirectly, changesFromSnapshot, classDescription, classDescriptionForDestinationKey, clearFault, clearProperties, deleteRuleForRelationshipKey, editingContext, entityName, eoDescription, eoShallowDescription, equals, excludeObjectFromPropertyWithKey, faultHandler, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hashCode, includeObjectIntoPropertyWithKey, inverseForRelationshipKey, invokeRemoteMethod, isFault, isToManyKey, opaqueState, ownsDestinationObjectsForRelationshipKey, prepareValuesForClient, propagateDeleteWithEditingContext, readResolve, reapplyChangesFromDictionary, removeObjectFromBothSidesOfRelationshipWithKey, removeObjectFromPropertyWithKey, shouldUseStoredAccessors, snapshot, storedValueForKey, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, takeValuesFromDictionaryWithMapping, toManyRelationshipKeys, toOneRelationshipKeys, toString, turnIntoFault, unableToSetNullForKey, updateFromSnapshot, userPresentableDescription, usesDeferredFaultCreation, validateClientUpdate, validateForDelete, validateForInsert, validateForSave, validateForUpdate, validateTakeValueForKeyPath, validateValueForKey, valueForKey, valueForKeyPath, valuesForKeys, valuesForKeysWithMapping, willChange, willRead, willReadRelationship |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected ERXDummyRecord(java.lang.Object o)
Method Detail |
---|
public java.lang.Object object()
public com.webobjects.foundation.NSKeyValueCoding._KeyBinding _otherStorageBinding(java.lang.String key)
_otherStorageBinding
in interface com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation.Callback
_otherStorageBinding
in class com.webobjects.eocontrol.EOCustomObject
public static com.webobjects.eocontrol.EOClassDescription classDescriptionForObject(java.lang.Object object)
public static void registerDescriptionForClass(java.lang.Class clazz, com.webobjects.foundation.NSArray keys)
public static com.webobjects.eocontrol.EOArrayDataSource dataSourceForObjects(com.webobjects.eocontrol.EOEditingContext ec, com.webobjects.foundation.NSArray list)
public static com.webobjects.eocontrol.EOEnterpriseObject recordForObject(com.webobjects.eocontrol.EOEditingContext ec, java.lang.Object o)
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |