Package com.gigaspaces.query
Class IdQuery<T>
java.lang.Object
com.gigaspaces.query.IdQuery<T>
- All Implemented Interfaces:
ISpaceQuery<T>
Class to encapsulate information of a query based on a Space ID.
An ID query is composed of a type (provided either as a java class or as a string which contains
the type name) and an ID value, and optionally a routing value an a query result type indicator.
- Since:
- 8.0
- Author:
- Niv Ingberg
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an IdQuery using the specified type and id.IdQuery(Class<T> type, Object id, QueryResultType queryResultType) Creates an IdQuery using the specified type, id and query result type.Creates an IdQuery using the specified type, id and routing.Creates an IdQuery using the specified type, id and routing.Creates an IdQuery using the specified type, id, routing and query result type.Creates an IdQuery using the specified type, id, routing and query result type.Creates an IdQuery using the specified type and id.IdQuery(String typeName, Object id, QueryResultType queryResultType) Creates an IdQuery using the specified type, id and query result type.Creates an IdQuery using the specified type, id and routing.Creates an IdQuery using the specified type, id and routing.IdQuery(String typeName, Object id, Object routing, QueryResultType queryResultType) Creates an IdQuery using the specified type, id, routing and query result type.IdQuery(String typeName, Object id, Object routing, QueryResultType queryResultType, int version) Creates an IdQuery using the specified type, id, routing and query result type. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetId()Returns the id to match.String[]Returns the projections set on this query, null means no projection is used and all the properties should be returned.Returns the type of result.Returns the routing value used to determine the partition to query.Returns the name of type to query.intReturns the version.setProjections(String... properties) Sets projection properties which specifies that a result for an operation using this query should contain data for the specified projection properties.
-
Constructor Details
-
IdQuery
Creates an IdQuery using the specified type and id.- Parameters:
type- Type to query.id- Id to match.
-
IdQuery
Creates an IdQuery using the specified type, id and routing.- Parameters:
type- Type to query.id- Id to match.routing- Routing value to determine which partition to query.
-
IdQuery
Creates an IdQuery using the specified type, id and routing.- Parameters:
type- Type to query.id- Id to match.routing- Routing value to determine which partition to query.version- to consider when performing a modifying operation (take/clear/change), 0 version means no version check should be made.
-
IdQuery
Creates an IdQuery using the specified type, id and query result type.- Parameters:
type- Type to query.id- Id to match.queryResultType- Type of result.
-
IdQuery
Creates an IdQuery using the specified type, id, routing and query result type.- Parameters:
type- Type to query.id- Id to match.routing- Routing value to determine which partition to query.queryResultType- Type of result.
-
IdQuery
public IdQuery(Class<T> type, Object id, Object routing, QueryResultType queryResultType, int version) Creates an IdQuery using the specified type, id, routing and query result type.- Parameters:
type- Type to query.id- Id to match.routing- Routing value to determine which partition to query.queryResultType- Type of result.version- to consider when performing a modifying operation (take/clear/change), 0 version means no version check should be made.
-
IdQuery
Creates an IdQuery using the specified type and id.- Parameters:
typeName- Type to query.id- Id to match.
-
IdQuery
Creates an IdQuery using the specified type, id and routing.- Parameters:
typeName- Type to query.id- Id to match.routing- Routing value to determine which partition to query.
-
IdQuery
Creates an IdQuery using the specified type, id and routing.- Parameters:
typeName- Type to query.id- Id to match.routing- Routing value to determine which partition to query.version- to consider when performing a modifying operation (take/clear/change), 0 version means no version check should be made.
-
IdQuery
Creates an IdQuery using the specified type, id and query result type.- Parameters:
typeName- Type to query.id- Id to match.queryResultType- Type of result.
-
IdQuery
Creates an IdQuery using the specified type, id, routing and query result type.- Parameters:
typeName- Type to query.id- Id to match.routing- Routing value to determine which partition to query.queryResultType- Type of result.
-
IdQuery
public IdQuery(String typeName, Object id, Object routing, QueryResultType queryResultType, int version) Creates an IdQuery using the specified type, id, routing and query result type.- Parameters:
typeName- Type to query.id- Id to match.routing- Routing value to determine which partition to query.queryResultType- Type of result.version- to consider when performing a modifying operation (take/clear/change), 0 version means no version check should be made.
-
-
Method Details
-
getTypeName
Returns the name of type to query. -
getId
Returns the id to match. -
getRouting
Returns the routing value used to determine the partition to query. -
getQueryResultType
Returns the type of result. -
getVersion
public int getVersion()Returns the version. -
setProjections
Sets projection properties which specifies that a result for an operation using this query should contain data for the specified projection properties. Other properties which were not specifies as a projection will not contain data. By default, if no projection was added, all the properties are returned with full data. -
getProjections
Returns the projections set on this query, null means no projection is used and all the properties should be returned. -
equals
-