diff options
| author | Benjamin Culkin <scorpress@gmail.com> | 2025-03-12 20:31:40 -0400 |
|---|---|---|
| committer | Benjamin Culkin <scorpress@gmail.com> | 2025-03-12 20:31:40 -0400 |
| commit | 39dc3aa7db0341457c438693af5ba9bb1cfdf560 (patch) | |
| tree | c3514435d82c34e0443a339dec2ae1ee91cb2215 /projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control | |
| parent | be03e4adfe97561553c9ed2c10561c49d35c06d9 (diff) | |
General updateworking
It's been a bit too long for me to recall what all I was doing here and
what it should've been doing.
Just looking at the files, I was attempting to figure out how the EO
stuff works. Think I had some basic results, but just mostly added a
tracing store to help w/ debugging
Diffstat (limited to 'projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control')
2 files changed, 88 insertions, 2 deletions
diff --git a/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOVectorKeyGlobalID.java b/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOVectorKeyGlobalID.java index 5fc500d..b5c14c3 100644 --- a/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOVectorKeyGlobalID.java +++ b/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOVectorKeyGlobalID.java @@ -27,14 +27,13 @@ public class EOVectorKeyGlobalID extends EOKeyGlobalID { protected Object[] _keyValues; - public EOVectorKeyGlobalID(String entityName, Object[] values) { + public EOVectorKeyGlobalID(String entityName, Object... values) { super(entityName, 0); _keyValues = new Object[values.length]; for (int i = 0; i < values.length; i++) { _keyValues[i] = values[i]; } } - /* * (non-Javadoc) * diff --git a/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/TracingObjectStore.java b/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/TracingObjectStore.java new file mode 100644 index 0000000..a047486 --- /dev/null +++ b/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/TracingObjectStore.java @@ -0,0 +1,87 @@ +package net.wotonomy.control; + +import java.util.List; +import java.util.Map; + +import net.wotonomy.foundation.NSArray; + +/** + * A implementation of EOObjectStore that just delegates to a child store. + * + * The reason for creating this is so that I can add tracing to see where the various calls are going; + * since I'm still unsure on what needs to be done to build a compliant and working implementation + * of EOObjectStore, and to what degree AbstractObjectStore helps with that. + * + * @author bjculkin + * + */ +public class TracingObjectStore extends EOObjectStore { + private EOObjectStore delegate; + + public TracingObjectStore(EOObjectStore store) { + this.delegate = store; + } + + @Override + public NSArray<?> arrayFaultWithSourceGlobalID(EOGlobalID aGlobalID, String aRelationship, + EOEditingContext aContext) { + return delegate.arrayFaultWithSourceGlobalID(aGlobalID, aRelationship, aContext); + } + + @Override + public Object faultForGlobalID(EOGlobalID aGlobalID, EOEditingContext aContext) { + return delegate.faultForGlobalID(aGlobalID, aContext); + } + + @Override + public Object faultForRawRow(Map aDictionary, String anEntityName, EOEditingContext aContext) { + return delegate.faultForRawRow(aDictionary, anEntityName, aContext); + } + + @Override + public void initializeObject(Object eo, EOGlobalID aGlobalID, EOEditingContext aContext) { + delegate.initializeObject(eo, aGlobalID, aContext); + + } + + @Override + public void invalidateAllObjects() { + delegate.invalidateAllObjects(); + } + + @Override + public void invalidateObjectsWithGlobalIDs(List aList) { + delegate.invalidateObjectsWithGlobalIDs(aList); + } + + @Override + public boolean isObjectLockedWithGlobalID(EOGlobalID aGlobalID, EOEditingContext aContext) { + return delegate.isObjectLockedWithGlobalID(aGlobalID, aContext); + } + + @Override + public void lockObjectWithGlobalID(EOGlobalID aGlobalID, EOEditingContext aContext) { + delegate.lockObjectWithGlobalID(aGlobalID, aContext); + } + + @Override + public NSArray objectsForSourceGlobalID(EOGlobalID aGlobalID, String aRelationship, EOEditingContext aContext) { + return delegate.objectsForSourceGlobalID(aGlobalID, aRelationship, aContext); + } + + @Override + public NSArray objectsWithFetchSpecification(EOFetchSpecification aFetchSpec, EOEditingContext aContext) { + return delegate.objectsWithFetchSpecification(aFetchSpec, aContext); + } + + @Override + public void refaultObject(Object anObject, EOGlobalID aGlobalID, EOEditingContext aContext) { + delegate.refaultObject(anObject, aGlobalID, aContext); + } + + @Override + public void saveChangesInEditingContext(EOEditingContext aContext) { + delegate.saveChangesInEditingContext(aContext); + } + +} |
