Class SelectById<T>
java.lang.Object
org.apache.cayenne.query.IndirectQuery
org.apache.cayenne.query.SelectById<T>
@Deprecated(since="5.0",
forRemoval=true)
public class SelectById<T>
extends IndirectQuery
implements Select<T>
Deprecated, for removal: This API element is subject to removal in a future version.
A query to select objects by id.
- Since:
- 4.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceDeprecated, for removal: This API element is subject to removal in a future version.protected static classDeprecated, for removal: This API element is subject to removal in a future version.protected static classDeprecated, for removal: This API element is subject to removal in a future version.protected static interfaceDeprecated, for removal: This API element is subject to removal in a future version.protected static classDeprecated, for removal: This API element is subject to removal in a future version.protected static classDeprecated, for removal: This API element is subject to removal in a future version. -
Field Summary
Fields inherited from class IndirectQuery
dataMap, lastResolver, name, replacementQuery -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSelectById(SelectById.QueryRoot root, SelectById.IdSpec idSpec) Deprecated, for removal: This API element is subject to removal in a future version.protectedSelectById(SelectById.QueryRoot root, SelectById.IdSpec idSpec, boolean fetchingDataRows) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptioncacheGroup(String cacheGroup) Deprecated, for removal: This API element is subject to removal in a future version.cacheStrategy(QueryCacheStrategy strategy) Deprecated, for removal: This API element is subject to removal in a future version.cacheStrategy(QueryCacheStrategy strategy, String cacheGroup) Deprecated, for removal: This API element is subject to removal in a future version.protected QuerycreateReplacementQuery(EntityResolver resolver) Deprecated, for removal: This API element is subject to removal in a future version.Creates a substitute query.static SelectById<DataRow> dataRowQuery(Class<?> entityType, Object id) Deprecated, for removal: This API element is subject to removal in a future version.static SelectById<DataRow> dataRowQuery(Class<?> entityType, Object firstId, Object... otherIds) Deprecated, for removal: This API element is subject to removal in a future version.static SelectById<DataRow> dataRowQuery(Class<?> entityType, Map<String, ?> id) Deprecated, for removal: This API element is subject to removal in a future version.static SelectById<DataRow> Deprecated, for removal: This API element is subject to removal in a future version.static SelectById<DataRow> dataRowQuery(ObjectId id) Deprecated, for removal: This API element is subject to removal in a future version.static SelectById<DataRow> dataRowQuery(ObjectId firstId, ObjectId... otherIds) Deprecated, for removal: This API element is subject to removal in a future version.static SelectById<DataRow> dataRowQueryId(Class<?> entityType, Object id) Deprecated, for removal: This API element is subject to removal in a future version.static SelectById<DataRow> dataRowQueryIds(Class<?> entityType, Object... ids) Deprecated, for removal: This API element is subject to removal in a future version.static SelectById<DataRow> dataRowQueryIdsCollection(Class<?> entityType, Collection<Object> ids) Deprecated, for removal: This API element is subject to removal in a future version.static SelectById<DataRow> dataRowQueryMap(Class<?> entityType, Map<String, ?> id) Deprecated, for removal: This API element is subject to removal in a future version.static SelectById<DataRow> dataRowQueryMaps(Class<?> entityType, Map<String, ?>... ids) Deprecated, for removal: This API element is subject to removal in a future version.static SelectById<DataRow> dataRowQueryMapsCollection(Class<?> entityType, Collection<Map<String, ?>> ids) Deprecated, for removal: This API element is subject to removal in a future version.static SelectById<DataRow> Deprecated, for removal: This API element is subject to removal in a future version.static SelectById<DataRow> dataRowQueryObjectIds(ObjectId... ids) Deprecated, for removal: This API element is subject to removal in a future version.static SelectById<DataRow> Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Instructs Cayenne to look for query results in the "local" cache when running the query.localCache(String cacheGroup) Deprecated, for removal: This API element is subject to removal in a future version.Instructs Cayenne to look for query results in the "local" cache when running the query.Deprecated, for removal: This API element is subject to removal in a future version.Merges a prefetch path with specified semantics into the query prefetch tree.prefetch(PrefetchTreeNode prefetch) Deprecated, for removal: This API element is subject to removal in a future version.Merges prefetch into the query prefetch tree.static <T> SelectById<T> Deprecated, for removal: This API element is subject to removal in a future version.static <T> SelectById<T> Deprecated, for removal: This API element is subject to removal in a future version.static <T> SelectById<T> query(Class<T> entityType, Collection<Object> ids) Deprecated, for removal: This API element is subject to removal in a future version.static <T> SelectById<T> Deprecated, for removal: This API element is subject to removal in a future version.static <T> SelectById<T> Deprecated, for removal: This API element is subject to removal in a future version.static <T> SelectById<T> Deprecated, for removal: This API element is subject to removal in a future version.static <T> SelectById<T> Deprecated, for removal: This API element is subject to removal in a future version.static <T> SelectById<T> Deprecated, for removal: This API element is subject to removal in a future version.static <T> SelectById<T> Deprecated, for removal: This API element is subject to removal in a future version.static <T> SelectById<T> queryIdsCollection(Class<T> entityType, Collection<Object> ids) Deprecated, for removal: This API element is subject to removal in a future version.static <T> SelectById<T> Deprecated, for removal: This API element is subject to removal in a future version.static <T> SelectById<T> Deprecated, for removal: This API element is subject to removal in a future version.static <T> SelectById<T> queryMapsCollection(Class<T> entityType, Collection<Map<String, ?>> ids) Deprecated, for removal: This API element is subject to removal in a future version.static <T> SelectById<T> queryObjectId(Class<T> entityType, ObjectId id) Deprecated, for removal: This API element is subject to removal in a future version.static <T> SelectById<T> queryObjectIds(Class<T> entityType, ObjectId... ids) Deprecated, for removal: This API element is subject to removal in a future version.static <T> SelectById<T> queryObjectIdsCollection(Class<T> entityType, Collection<ObjectId> ids) Deprecated, for removal: This API element is subject to removal in a future version.selectFirst(ObjectContext context) Deprecated, for removal: This API element is subject to removal in a future version.Selects a single object using provided context.Deprecated, for removal: This API element is subject to removal in a future version.Instructs Cayenne to look for query results in the "shared" cache when running the query.sharedCache(String cacheGroup) Deprecated, for removal: This API element is subject to removal in a future version.Instructs Cayenne to look for query results in the "shared" cache when running the query.Methods inherited from class IndirectQuery
createSQLAction, getMetaData, getReplacementQuery, routeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Query
createSQLAction, getMetaData, route
-
Constructor Details
-
SelectById
Deprecated, for removal: This API element is subject to removal in a future version. -
SelectById
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
queryId
Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.0
-
queryMap
Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.0
-
queryObjectId
Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.0
-
queryIds
Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.0
-
queryIdsCollection
Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.0
-
queryMaps
Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.0
-
queryMapsCollection
public static <T> SelectById<T> queryMapsCollection(Class<T> entityType, Collection<Map<String, ?>> ids) Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.0
-
queryObjectIds
Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.0
-
queryObjectIdsCollection
public static <T> SelectById<T> queryObjectIdsCollection(Class<T> entityType, Collection<ObjectId> ids) Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.0
-
query
@Deprecated(since="5.0", forRemoval=true) public static <T> SelectById<T> query(Class<T> entityType, Object id) Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 4.2
-
query
@Deprecated(since="5.0", forRemoval=true) public static <T> SelectById<T> query(Class<T> entityType, Map<String, ?> id) Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 4.2
-
query
@Deprecated(since="5.0", forRemoval=true) public static <T> SelectById<T> query(Class<T> entityType, ObjectId id) Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 4.2
-
query
@Deprecated(since="5.0", forRemoval=true) public static <T> SelectById<T> query(Class<T> entityType, Object firstId, Object... otherIds) Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 4.2
-
query
@Deprecated(since="5.0", forRemoval=true) public static <T> SelectById<T> query(Class<T> entityType, Collection<Object> ids) Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 4.2
-
query
@Deprecated(since="5.0", forRemoval=true) @SafeVarargs public static <T> SelectById<T> query(Class<T> entityType, Map<String, ?> firstId, Map<String, ?>... otherIds) Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 4.2
-
query
@Deprecated(since="5.0", forRemoval=true) public static <T> SelectById<T> query(Class<T> entityType, ObjectId firstId, ObjectId... otherIds) Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 4.2
-
dataRowQueryId
Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.0
-
dataRowQueryMap
Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.0
-
dataRowQueryObjectId
Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.0
-
dataRowQueryIds
Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.0
-
dataRowQueryIdsCollection
public static SelectById<DataRow> dataRowQueryIdsCollection(Class<?> entityType, Collection<Object> ids) Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.0
-
dataRowQueryMaps
@SafeVarargs public static SelectById<DataRow> dataRowQueryMaps(Class<?> entityType, Map<String, ?>... ids) Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.0
-
dataRowQueryMapsCollection
public static SelectById<DataRow> dataRowQueryMapsCollection(Class<?> entityType, Collection<Map<String, ?>> ids) Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.0
-
dataRowQueryObjectIds
Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.0
-
dataRowQueryObjectIdsCollection
Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.0
-
dataRowQuery
@Deprecated(since="5.0", forRemoval=true) public static SelectById<DataRow> dataRowQuery(Class<?> entityType, Object id) Deprecated, for removal: This API element is subject to removal in a future version. -
dataRowQuery
@Deprecated(since="5.0", forRemoval=true) public static SelectById<DataRow> dataRowQuery(Class<?> entityType, Map<String, ?> id) Deprecated, for removal: This API element is subject to removal in a future version. -
dataRowQuery
@Deprecated(since="5.0", forRemoval=true) public static SelectById<DataRow> dataRowQuery(ObjectId id) Deprecated, for removal: This API element is subject to removal in a future version. -
dataRowQuery
@Deprecated(since="5.0", forRemoval=true) public static SelectById<DataRow> dataRowQuery(Class<?> entityType, Object firstId, Object... otherIds) Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 4.2
-
dataRowQuery
@Deprecated(since="5.0", forRemoval=true) @SafeVarargs public static SelectById<DataRow> dataRowQuery(Class<?> entityType, Map<String, ?> firstId, Map<String, ?>... otherIds) Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 4.2
-
dataRowQuery
@Deprecated(since="5.0", forRemoval=true) public static SelectById<DataRow> dataRowQuery(ObjectId firstId, ObjectId... otherIds) Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 4.2
-
selectFirst
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SelectSelects a single object using provided context. The query itself can match any number of objects, but will return only the first one. It returns null if no objects were matched.If it matched more than one object, the first object from the list is returned. This makes 'selectFirst' different from
Select.selectOne(ObjectContext), which would throw in this situation. 'selectFirst' is useful e.g. when the query is ordered and we only want to see the first object (e.g. "most recent news article"), etc.Selecting the first object via "Select.selectFirst(ObjectContext)" is more comprehensible than selecting via "ObjectContext.selectFirst(Select)", because implementations of "Select" set fetch size limit to one.
- Specified by:
selectFirstin interfaceSelect<T>
-
localCache
Deprecated, for removal: This API element is subject to removal in a future version.Instructs Cayenne to look for query results in the "local" cache when running the query. This is a short-hand notation for:query.cacheStrategy(QueryCacheStrategy.LOCAL_CACHE, cacheGroup);
-
localCache
Deprecated, for removal: This API element is subject to removal in a future version.Instructs Cayenne to look for query results in the "local" cache when running the query. This is a short-hand notation for:query.cacheStrategy(QueryCacheStrategy.LOCAL_CACHE);
-
getCacheStrategy
Deprecated, for removal: This API element is subject to removal in a future version. -
cacheStrategy
Deprecated, for removal: This API element is subject to removal in a future version. -
cacheStrategy
Deprecated, for removal: This API element is subject to removal in a future version. -
getCacheGroup
Deprecated, for removal: This API element is subject to removal in a future version. -
cacheGroup
Deprecated, for removal: This API element is subject to removal in a future version. -
isFetchingDataRows
public boolean isFetchingDataRows()Deprecated, for removal: This API element is subject to removal in a future version. -
prefetch
Deprecated, for removal: This API element is subject to removal in a future version.Merges prefetch into the query prefetch tree.- Returns:
- this object
-
prefetch
Deprecated, for removal: This API element is subject to removal in a future version.Merges a prefetch path with specified semantics into the query prefetch tree.- Returns:
- this object
-
getPrefetches
Deprecated, for removal: This API element is subject to removal in a future version. -
createReplacementQuery
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:IndirectQueryCreates a substitute query. An implementor is free to provide an arbitrary replacement query.- Specified by:
createReplacementQueryin classIndirectQuery
-
ObjectSelect. UseFluentSelect.byId(Object)or "byIds(..)" methods.