T
- the type of objects this fetch spec will returnpublic class ERXFetchSpecification<T extends com.webobjects.eocontrol.EOEnterpriseObject>
extends com.webobjects.eocontrol.EOFetchSpecification
com.webobjects.foundation.NSCoding._BigDecimalSupport, com.webobjects.foundation.NSCoding._BigIntegerSupport, com.webobjects.foundation.NSCoding._BooleanSupport, com.webobjects.foundation.NSCoding._ByteSupport, com.webobjects.foundation.NSCoding._CharacterSupport, com.webobjects.foundation.NSCoding._DateSupport, com.webobjects.foundation.NSCoding._DoubleSupport, com.webobjects.foundation.NSCoding._FloatSupport, com.webobjects.foundation.NSCoding._IntegerSupport, com.webobjects.foundation.NSCoding._LongSupport, com.webobjects.foundation.NSCoding._NumberSupport, com.webobjects.foundation.NSCoding._ShortSupport, com.webobjects.foundation.NSCoding._StringSupport, com.webobjects.foundation.NSCoding.Support
com.webobjects.eocontrol.EOKeyValueArchiving._NullValueSupport, com.webobjects.eocontrol.EOKeyValueArchiving._NumberSupport, com.webobjects.eocontrol.EOKeyValueArchiving._TimestampSupport, com.webobjects.eocontrol.EOKeyValueArchiving.Awaking, com.webobjects.eocontrol.EOKeyValueArchiving.FinishInitialization, com.webobjects.eocontrol.EOKeyValueArchiving.Support
Constructor and Description |
---|
ERXFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification spec) |
ERXFetchSpecification(ERXFetchSpecification<T> spec) |
ERXFetchSpecification(String entityName)
Constructs a new fetch specification for the given entity with isDeep = true.
|
ERXFetchSpecification(String entityName,
com.webobjects.eocontrol.EOQualifier qualifier,
NSArray<com.webobjects.eocontrol.EOSortOrdering> sortOrderings) |
ERXFetchSpecification(String entityName,
com.webobjects.eocontrol.EOQualifier qualifier,
NSArray<com.webobjects.eocontrol.EOSortOrdering> sortOrderings,
boolean usesDistinct,
boolean isDeep,
NSDictionary hints) |
Modifier and Type | Method and Description |
---|---|
protected String |
additionalIdentifierInfo() |
Object |
clone() |
NSArray<T> |
fetchObjects(com.webobjects.eocontrol.EOEditingContext ec)
Type-safe method to fetch objects for this fetch spec.
|
com.webobjects.foundation.NSRange |
fetchRange() |
NSArray<NSDictionary<String,Object>> |
fetchRawRows(com.webobjects.eocontrol.EOEditingContext ec)
Type-safe method to fetch raw rows.
|
static <T extends com.webobjects.eocontrol.EOEnterpriseObject> |
fetchSpec(com.webobjects.eocontrol.EOFetchSpecification fs)
Converts a normal fetch spec to an ERX one.
|
static <T extends com.webobjects.eocontrol.EOEnterpriseObject> |
fetchSpec(com.webobjects.eocontrol.EOFetchSpecification fs,
Class<T> clazz)
Converts a normal fetch spec to an ERX one that returns instances of T.
|
static com.webobjects.eocontrol.EOFetchSpecification |
fetchSpec(String entityName,
com.webobjects.eocontrol.EOQualifier qualifier,
NSArray<com.webobjects.eocontrol.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(com.webobjects.eocontrol.EOFetchSpecification fs)
Builds an identifier for the given fetch spec which is suitable for caching.
|
protected static String |
identifierForQualifier(com.webobjects.eocontrol.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(com.webobjects.eocontrol.EOQualifier qualifier)
Sets the qualifier on this fetch specification and returns "this" for chaining.
|
void |
setFetchRange(com.webobjects.foundation.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(com.webobjects.eocontrol.EOSortOrdering sortOrdering)
Sets the sort orderings on this fetch specification and returns "this" for chaining.
|
ERXFetchSpecification<T> |
sort(NSArray<com.webobjects.eocontrol.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, com.webobjects.eocontrol.EOQualifier qualifier, NSArray<com.webobjects.eocontrol.EOSortOrdering> sortOrderings, boolean usesDistinct, boolean isDeep, NSDictionary hints)
public ERXFetchSpecification(String entityName, com.webobjects.eocontrol.EOQualifier qualifier, NSArray<com.webobjects.eocontrol.EOSortOrdering> sortOrderings)
public ERXFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification spec)
public ERXFetchSpecification(ERXFetchSpecification<T> spec)
public ERXFetchSpecification(String entityName)
entityName
- the name of the entitypublic static com.webobjects.eocontrol.EOFetchSpecification fetchSpec(String entityName, com.webobjects.eocontrol.EOQualifier qualifier, NSArray<com.webobjects.eocontrol.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 com.webobjects.foundation.NSRange fetchRange()
public void setFetchRange(com.webobjects.foundation.NSRange range)
range
- public NSArray<T> fetchObjects(com.webobjects.eocontrol.EOEditingContext ec)
ec
- public NSArray<NSDictionary<String,Object>> fetchRawRows(com.webobjects.eocontrol.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 com.webobjects.eocontrol.EOFetchSpecification
public ERXFetchSpecification<T> qualify(com.webobjects.eocontrol.EOQualifier qualifier)
qualifier
- the qualifier to setpublic ERXFetchSpecification<T> sort(NSArray<com.webobjects.eocontrol.EOSortOrdering> sortOrderings)
sortOrderings
- the sort orderings to setpublic ERXFetchSpecification<T> sort(com.webobjects.eocontrol.EOSortOrdering sortOrdering)
sortOrdering
- the sort ordering to setpublic static <T extends com.webobjects.eocontrol.EOEnterpriseObject> ERXFetchSpecification<T> fetchSpec(com.webobjects.eocontrol.EOFetchSpecification fs, Class<T> clazz)
T
- fs
- clazz
- public static <T extends com.webobjects.eocontrol.EOEnterpriseObject> ERXFetchSpecification<T> fetchSpec(com.webobjects.eocontrol.EOFetchSpecification fs)
T
- fs
- protected static String identifierForQualifier(com.webobjects.eocontrol.EOQualifier qualifier)
qualifier
- public static String identifierForFetchSpec(com.webobjects.eocontrol.EOFetchSpecification fs)
fs
- Copyright © 2002 – 2020 Project Wonder.