Package com.gigaspaces.datasource
Class DataSourceQueryImpl
java.lang.Object
com.gigaspaces.datasource.DataSourceQueryImpl
- All Implemented Interfaces:
DataSourceQuery
- Since:
- 9.5
- Author:
- Idan Moyal
-
Constructor Summary
ConstructorsConstructorDescriptionDataSourceQueryImpl(ITemplateHolder template, ITypeDesc typeDescriptor, Class<?> dataClass, SQLQueryBuilder queryBuilder, EntryAdapter entryAdapter, int batchSize) -
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).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.booleanbooleanbooleantoString()
-
Constructor Details
-
DataSourceQueryImpl
public DataSourceQueryImpl(ITemplateHolder template, ITypeDesc typeDescriptor, Class<?> dataClass, SQLQueryBuilder queryBuilder, EntryAdapter entryAdapter, int batchSize)
-
-
Method Details
-
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.
-
getTypeDescriptor
- Specified by:
getTypeDescriptorin interfaceDataSourceQuery- Returns:
- The
SpaceTypeDescriptorrepresenting the type this query is for.
-
toString
-