diff options
Diffstat (limited to 'projects/net.wotonomy.persistence/src/main/java/net')
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); + } + +} |
