GigaSpaces XAP 9.0 API

com.gigaspaces.query
Class IdQuery<T>

java.lang.Object
  extended by com.gigaspaces.query.IdQuery<T>
All Implemented Interfaces:
ISpaceQuery<T>

public class IdQuery<T>
extends Object
implements 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:
QueryResultType, IdsQuery

Constructor Summary
IdQuery(Class<T> type, Object id)
          Creates an IdQuery using the specified type and id.
IdQuery(Class<T> type, Object id, Object routing)
          Creates an IdQuery using the specified type, id and routing.
IdQuery(Class<T> type, Object id, Object routing, QueryResultType queryResultType)
          Creates an IdQuery using the specified type, id, routing and query result type.
IdQuery(Class<T> type, Object id, QueryResultType queryResultType)
          Creates an IdQuery using the specified type, id and query result type.
IdQuery(String typeName, Object id)
          Creates an IdQuery using the specified type and id.
IdQuery(String typeName, Object id, Object 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, QueryResultType queryResultType)
          Creates an IdQuery using the specified type, id and query result type.
 
Method Summary
 Object getId()
          Returns the id to match.
 QueryResultType getQueryResultType()
          Returns the type of result.
 Object getRouting()
          Returns the routing value used to determine the partition to query.
 String getTypeName()
          Returns the name of type to query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdQuery

public IdQuery(Class<T> type,
               Object id)
Creates an IdQuery using the specified type and id.

Parameters:
type - Type to query.
id - Id to match.

IdQuery

public IdQuery(Class<T> type,
               Object id,
               Object routing)
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

public IdQuery(Class<T> type,
               Object id,
               QueryResultType queryResultType)
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

public IdQuery(Class<T> type,
               Object id,
               Object routing,
               QueryResultType queryResultType)
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(String typeName,
               Object id)
Creates an IdQuery using the specified type and id.

Parameters:
typeName - Type to query.
id - Id to match.

IdQuery

public IdQuery(String typeName,
               Object id,
               Object routing)
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

public IdQuery(String typeName,
               Object id,
               QueryResultType queryResultType)
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

public IdQuery(String typeName,
               Object id,
               Object routing,
               QueryResultType queryResultType)
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.
Method Detail

getTypeName

public String getTypeName()
Returns the name of type to query.


getId

public Object getId()
Returns the id to match.


getRouting

public Object getRouting()
Returns the routing value used to determine the partition to query.


getQueryResultType

public QueryResultType getQueryResultType()
Returns the type of result.


GigaSpaces XAP 9.0 API

Copyright © GigaSpaces.