Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add method to set prefetching key paths with ERXKeys

  • Loading branch information...
commit 297c5b088ededcd6686983d76caf86ee4350f41d 1 parent 4ea823e
@darkv darkv authored pascalrobert committed
View
13 Frameworks/Core/ERExtensions/Sources/er/extensions/eof/ERXFetchSpecification.java
@@ -12,6 +12,7 @@
import com.webobjects.eocontrol.EOSortOrdering;
import com.webobjects.foundation.NSArray;
import com.webobjects.foundation.NSDictionary;
+import com.webobjects.foundation.NSMutableArray;
import com.webobjects.foundation.NSMutableDictionary;
import com.webobjects.foundation.NSPropertyListSerialization;
@@ -33,11 +34,11 @@
private NSMutableDictionary _userInfo;
private boolean _includeEditingContextChanges;
- public ERXFetchSpecification(String entityName, EOQualifier qualifier, NSArray sortOrderings, boolean usesDistinct, boolean isDeep, NSDictionary hints) {
+ public ERXFetchSpecification(String entityName, EOQualifier qualifier, NSArray<EOSortOrdering> sortOrderings, boolean usesDistinct, boolean isDeep, NSDictionary hints) {
super(entityName, qualifier, sortOrderings, usesDistinct, isDeep, hints);
}
- public ERXFetchSpecification(String entityName, EOQualifier qualifier, NSArray sortOrderings) {
+ public ERXFetchSpecification(String entityName, EOQualifier qualifier, NSArray<EOSortOrdering> sortOrderings) {
super(entityName, qualifier, sortOrderings);
}
@@ -156,6 +157,14 @@ public NSDictionary userInfo() {
public void setRawRowKeyPaths(String keyPath, String... keyPaths) {
super.setRawRowKeyPaths(new NSArray<String>(keyPath, keyPaths));
}
+
+ public void setPrefetchingRelationshipKeyPaths(ERXKey<?>... prefetchingRelationshipKeyPaths) {
+ NSMutableArray<String> keypaths = new NSMutableArray<String>();
+ for (ERXKey<?> key : prefetchingRelationshipKeyPaths) {
+ keypaths.addObject(key.key());
+ }
+ setPrefetchingRelationshipKeyPaths(keypaths);
+ }
/**
* Collects all relevant attributes and the bindings and returns a key suitable for caching.

0 comments on commit 297c5b0

Please sign in to comment.
Something went wrong with that request. Please try again.