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.Support
EOKeyValueArchiving._NullValueSupport, EOKeyValueArchiving._NumberSupport, EOKeyValueArchiving._TimestampSupport, EOKeyValueArchiving.Awaking, EOKeyValueArchiving.FinishInitialization, EOKeyValueArchiving.Support
_CLASS
Constructor and Description |
---|
ERXFetchSpecification(EOFetchSpecification spec) |
ERXFetchSpecification(ERXFetchSpecification<T> spec) |
ERXFetchSpecification(String entityName)
Constructs a new fetch specification for the given entity with isDeep = true.
|
ERXFetchSpecification(String entityName,
EOQualifier qualifier,
NSArray<EOSortOrdering> sortOrderings) |
ERXFetchSpecification(String entityName,
EOQualifier qualifier,
NSArray<EOSortOrdering> sortOrderings,
boolean usesDistinct,
boolean isDeep,
NSDictionary hints) |
Modifier and Type | Method and Description |
---|---|
protected String |
additionalIdentifierInfo() |
Object |
clone() |
NSArray<T> |
fetchObjects(EOEditingContext ec)
Type-safe method to fetch objects for this fetch spec.
|
NSRange |
fetchRange() |
NSArray<NSDictionary<String,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,
Class<T> clazz)
Converts a normal fetch spec to an ERX one that returns instances of T.
|
static EOFetchSpecification |
fetchSpec(String entityName,
EOQualifier qualifier,
NSArray<EOSortOrdering> sortOrderings,
boolean usesDistinct,
boolean isDeep,
NSDictionary hints) |
String |
identifier()
Collects all relevant attributes and the bindings and returns a key suitable for caching.
|
static String |
identifierForFetchSpec(EOFetchSpecification fs)
Builds an identifier for the given fetch spec which is suitable for caching.
|
protected static String |
identifierForQualifier(EOQualifier qualifier)
Helper to create a string from a qualifier.
|
boolean |
includeEditingContextChanges()
Returns whether or not to include editing context changes.
|
Object |
objectForKey(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(Object value,
String key)
Sets a arbitrary value.
|
void |
setPrefetchingRelationshipKeyPaths(ERXKey<?>... prefetchingRelationshipKeyPaths)
Sets the relationships to prefetch along with the main fetch.
|
void |
setRawRowKeyPaths(String keyPath,
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, usesDistinct
public ERXFetchSpecification(String entityName, EOQualifier qualifier, NSArray<EOSortOrdering> sortOrderings, boolean usesDistinct, boolean isDeep, NSDictionary hints)
public ERXFetchSpecification(String entityName, EOQualifier qualifier, NSArray<EOSortOrdering> sortOrderings)
public ERXFetchSpecification(EOFetchSpecification spec)
public ERXFetchSpecification(ERXFetchSpecification<T> spec)
public ERXFetchSpecification(String entityName)
entityName
- the name of the entitypublic static EOFetchSpecification fetchSpec(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(Object value, String key)
value
- key
- public Object objectForKey(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<String,Object>> fetchRawRows(EOEditingContext ec)
ec
- public void setRawRowKeyPaths(String keyPath, 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 String identifier()
protected String additionalIdentifierInfo()
public Object clone()
clone
in class EOFetchSpecification
public 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, Class<T> clazz)
T
- fs
- clazz
- public static <T extends EOEnterpriseObject> ERXFetchSpecification<T> fetchSpec(EOFetchSpecification fs)
T
- fs
- protected static String identifierForQualifier(EOQualifier qualifier)
qualifier
- public static String identifierForFetchSpec(EOFetchSpecification fs)
fs
- Copyright © 2002 – 2024 Project Wonder.