T - the type of objects this fetch spec will returnpublic class ERXFetchSpecification<T extends EOEnterpriseObject> extends EOFetchSpecification
NSCoding._BigDecimalSupport, NSCoding._BigIntegerSupport, NSCoding._BooleanSupport, NSCoding._ByteSupport, NSCoding._CharacterSupport, NSCoding._DateSupport, NSCoding._DoubleSupport, NSCoding._FloatSupport, NSCoding._IntegerSupport, NSCoding._LongSupport, NSCoding._NumberSupport, NSCoding._ShortSupport, NSCoding._StringSupport, NSCoding.SupportEOKeyValueArchiving._NullValueSupport, EOKeyValueArchiving._NumberSupport, EOKeyValueArchiving._TimestampSupport, EOKeyValueArchiving.Awaking, EOKeyValueArchiving.FinishInitialization, EOKeyValueArchiving.Support_CLASS| Constructor and Description |
|---|
ERXFetchSpecification(EOFetchSpecification spec) |
ERXFetchSpecification(ERXFetchSpecification<T> spec) |
ERXFetchSpecification(java.lang.String entityName)
Constructs a new fetch specification for the given entity with isDeep = true.
|
ERXFetchSpecification(java.lang.String entityName,
EOQualifier qualifier,
NSArray<EOSortOrdering> sortOrderings) |
ERXFetchSpecification(java.lang.String entityName,
EOQualifier qualifier,
NSArray<EOSortOrdering> sortOrderings,
boolean usesDistinct,
boolean isDeep,
NSDictionary hints) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
additionalIdentifierInfo() |
java.lang.Object |
clone() |
NSArray<T> |
fetchObjects(EOEditingContext ec)
Type-safe method to fetch objects for this fetch spec.
|
NSRange |
fetchRange() |
NSArray<NSDictionary<java.lang.String,java.lang.Object>> |
fetchRawRows(EOEditingContext ec)
Type-safe method to fetch raw rows.
|
static <T extends EOEnterpriseObject> |
fetchSpec(EOFetchSpecification fs)
Converts a normal fetch spec to an ERX one.
|
static <T extends EOEnterpriseObject> |
fetchSpec(EOFetchSpecification fs,
java.lang.Class<T> clazz)
Converts a normal fetch spec to an ERX one that returns instances of T.
|
static EOFetchSpecification |
fetchSpec(java.lang.String entityName,
EOQualifier qualifier,
NSArray<EOSortOrdering> sortOrderings,
boolean usesDistinct,
boolean isDeep,
NSDictionary hints) |
java.lang.String |
identifier()
Collects all relevant attributes and the bindings and returns a key suitable for caching.
|
static java.lang.String |
identifierForFetchSpec(EOFetchSpecification fs)
Builds an identifier for the given fetch spec which is suitable for caching.
|
protected static java.lang.String |
identifierForQualifier(EOQualifier qualifier)
Helper to create a string from a qualifier.
|
boolean |
includeEditingContextChanges()
Returns whether or not to include editing context changes.
|
java.lang.Object |
objectForKey(java.lang.String key)
Gets an arbitrary value.
|
ERXFetchSpecification<T> |
qualify(EOQualifier qualifier)
Sets the qualifier on this fetch specification and returns "this" for chaining.
|
void |
setFetchRange(NSRange range)
Defines a batch range that should be applied to the SQL statement.
|
void |
setIncludeEditingContextChanges(boolean includeEditingContextChanges)
When true, objectsWithFetchSpecification will include newly inserted objects, newly removed objects, and newly updated
objects in your fetch results (@see ERXEOControlUtilities.objectsWithQualifier).
|
void |
setObjectForKey(java.lang.Object value,
java.lang.String key)
Sets a arbitrary value.
|
void |
setPrefetchingRelationshipKeyPaths(ERXKey<?>... prefetchingRelationshipKeyPaths)
Sets the relationships to prefetch along with the main fetch.
|
void |
setRawRowKeyPaths(java.lang.String keyPath,
java.lang.String... keyPaths)
Sets a list of attribute keys to be fetched as raw data.
|
ERXFetchSpecification<T> |
sort(EOSortOrdering sortOrdering)
Sets the sort orderings on this fetch specification and returns "this" for chaining.
|
ERXFetchSpecification<T> |
sort(NSArray<EOSortOrdering> sortOrderings)
Sets the sort orderings on this fetch specification and returns "this" for chaining.
|
NSDictionary |
userInfo()
Gets the user info.
|
_decodeWithKeyValueUnarchiver, classForCoder, decodeObject, decodeWithKeyValueUnarchiver, encodeWithCoder, encodeWithKeyValueArchiver, entityName, fetchesRawRows, fetchLimit, fetchSpecificationNamed, fetchSpecificationWithQualifierBindings, hints, isDeep, locksObjects, prefetchingRelationshipKeyPaths, promptsAfterFetchLimit, qualifier, rawRowKeyPaths, refreshesRefetchedObjects, requiresAllQualifierBindingVariables, setEntityName, setFetchesRawRows, setFetchLimit, setHints, setIsDeep, setLocksObjects, setPrefetchingRelationshipKeyPaths, setPromptsAfterFetchLimit, setQualifier, setRawRowKeyPaths, setRefreshesRefetchedObjects, setRequiresAllQualifierBindingVariables, setSortOrderings, setUsesDistinct, sortOrderings, toString, usesDistinctpublic ERXFetchSpecification(java.lang.String entityName,
EOQualifier qualifier,
NSArray<EOSortOrdering> sortOrderings,
boolean usesDistinct,
boolean isDeep,
NSDictionary hints)
public ERXFetchSpecification(java.lang.String entityName,
EOQualifier qualifier,
NSArray<EOSortOrdering> sortOrderings)
public ERXFetchSpecification(EOFetchSpecification spec)
public ERXFetchSpecification(ERXFetchSpecification<T> spec)
public ERXFetchSpecification(java.lang.String entityName)
entityName - the name of the entitypublic static EOFetchSpecification fetchSpec(java.lang.String entityName, EOQualifier qualifier, NSArray<EOSortOrdering> sortOrderings, boolean usesDistinct, boolean isDeep, NSDictionary hints)
public void setIncludeEditingContextChanges(boolean includeEditingContextChanges)
includeEditingContextChanges - whether or not to include editing context changespublic boolean includeEditingContextChanges()
public void setObjectForKey(java.lang.Object value,
java.lang.String key)
value - key - public java.lang.Object objectForKey(java.lang.String key)
key - public NSDictionary userInfo()
public NSRange fetchRange()
public void setFetchRange(NSRange range)
range - public NSArray<T> fetchObjects(EOEditingContext ec)
ec - public NSArray<NSDictionary<java.lang.String,java.lang.Object>> fetchRawRows(EOEditingContext ec)
ec - public void setRawRowKeyPaths(java.lang.String keyPath,
java.lang.String... keyPaths)
setRawRowKeyPaths(null) would be ambiguous otherwise.keyPath - keyPaths - list of attribute keysEOFetchSpecification.setRawRowKeyPaths(NSArray)public void setPrefetchingRelationshipKeyPaths(ERXKey<?>... prefetchingRelationshipKeyPaths)
prefetchingRelationshipKeyPaths - list of keys to prefetchEOFetchSpecification.setPrefetchingRelationshipKeyPaths(NSArray)public java.lang.String identifier()
protected java.lang.String additionalIdentifierInfo()
public java.lang.Object clone()
clone in class EOFetchSpecificationpublic ERXFetchSpecification<T> qualify(EOQualifier qualifier)
qualifier - the qualifier to setpublic ERXFetchSpecification<T> sort(NSArray<EOSortOrdering> sortOrderings)
sortOrderings - the sort orderings to setpublic ERXFetchSpecification<T> sort(EOSortOrdering sortOrdering)
sortOrdering - the sort ordering to setpublic static <T extends EOEnterpriseObject> ERXFetchSpecification<T> fetchSpec(EOFetchSpecification fs, java.lang.Class<T> clazz)
T - fs - clazz - public static <T extends EOEnterpriseObject> ERXFetchSpecification<T> fetchSpec(EOFetchSpecification fs)
T - fs - protected static java.lang.String identifierForQualifier(EOQualifier qualifier)
qualifier - public static java.lang.String identifierForFetchSpec(EOFetchSpecification fs)
fs - Copyright © 2002 – 2022 Project Wonder.