Package com.gigaspaces.datasource
Class DataSourceIdQueryImpl
java.lang.Object
com.gigaspaces.datasource.DataSourceIdQueryImpl
- All Implemented Interfaces:
DataSourceIdQuery,DataSourceQuery
- Since:
- 9.1.1
- Author:
- Idan Moyal
-
Constructor Summary
ConstructorsConstructorDescriptionDataSourceIdQueryImpl(ITypeDesc typeDescriptor, IEntryPacket entryPacket, SQLQueryBuilder queryBuilder, Class<?> dataClass, EntryAdapter entryAdapter) -
Method Summary
Modifier and TypeMethodDescriptionGets the prepared SQL representation of this query.
DataSourceQuery.supportsAsSQLQuery()return value should be checked before calling this method otherwise anUnsupportedOperationExceptionwill be thrown if the operation is not supported.intThe value returned from this method can serve as a hint for the data source implementation which indicates the batch size to be used inSpaceDataSource.getDataIterator(DataSourceQuery)method implementation (if such data source supports batching).getId()Gets aSpaceDocumentrepresentation of this query.
DataSourceQuery.supportsTemplateAsDocument()return value should be checked before calling this method otherwise anUnsupportedOperationExceptionwill be thrown if the operation is not supported.Gets an object representation of this query.
DataSourceQuery.supportsTemplateAsObject()return value should be checked before calling this method otherwise anUnsupportedOperationExceptionwill be thrown if the operation is not supported.intbooleanbooleanbooleantoString()
-
Constructor Details
-
DataSourceIdQueryImpl
public DataSourceIdQueryImpl(ITypeDesc typeDescriptor, IEntryPacket entryPacket, SQLQueryBuilder queryBuilder, Class<?> dataClass, EntryAdapter entryAdapter)
-
-
Method Details
-
getTypeDescriptor
- Specified by:
getTypeDescriptorin interfaceDataSourceIdQuery- Specified by:
getTypeDescriptorin interfaceDataSourceQuery- Returns:
- The
SpaceTypeDescriptorrepresenting the type this query is for.
-
getId
- Specified by:
getIdin interfaceDataSourceIdQuery- Returns:
- The ID of the entry to get.
-
getVersion
public int getVersion()- Specified by:
getVersionin interfaceDataSourceIdQuery- Returns:
- The version of the entry to get.
-
toString
-
getAsSQLQuery
Description copied from interface:DataSourceQueryGets the prepared SQL representation of this query.
DataSourceQuery.supportsAsSQLQuery()return value should be checked before calling this method otherwise anUnsupportedOperationExceptionwill be thrown if the operation is not supported.- Specified by:
getAsSQLQueryin interfaceDataSourceQuery- Returns:
- Prepared SQL representation this query.
-
getTemplateAsObject
Description copied from interface:DataSourceQueryGets an object representation of this query.
DataSourceQuery.supportsTemplateAsObject()return value should be checked before calling this method otherwise anUnsupportedOperationExceptionwill be thrown if the operation is not supported.- Specified by:
getTemplateAsObjectin interfaceDataSourceQuery- Returns:
- Object representation of this query.
-
getTemplateAsDocument
Description copied from interface:DataSourceQueryGets aSpaceDocumentrepresentation of this query.
DataSourceQuery.supportsTemplateAsDocument()return value should be checked before calling this method otherwise anUnsupportedOperationExceptionwill be thrown if the operation is not supported.- Specified by:
getTemplateAsDocumentin interfaceDataSourceQuery- Returns:
SpaceDocumentrepresentation of this query.
-
supportsAsSQLQuery
public boolean supportsAsSQLQuery()- Specified by:
supportsAsSQLQueryin interfaceDataSourceQuery- Returns:
- Whether this query has an SQL query representation.
-
supportsTemplateAsObject
public boolean supportsTemplateAsObject()- Specified by:
supportsTemplateAsObjectin interfaceDataSourceQuery- Returns:
- Whether this query has an Object representation.
-
supportsTemplateAsDocument
public boolean supportsTemplateAsDocument()- Specified by:
supportsTemplateAsDocumentin interfaceDataSourceQuery- Returns:
- Whether this query has a
SpaceDocumentrepresentation.
-
getBatchSize
public int getBatchSize()Description copied from interface:DataSourceQueryThe value returned from this method can serve as a hint for the data source implementation which indicates the batch size to be used inSpaceDataSource.getDataIterator(DataSourceQuery)method implementation (if such data source supports batching). One should use this value with care since it might returnInteger.MAX_VALUEif the batch operation executed had a request for unlimited results.- Specified by:
getBatchSizein interfaceDataSourceQuery- Returns:
- Batch size hint.
-