Package com.gigaspaces.datasource
Interface DataSourceQuery
- All Known Implementing Classes:
DataSourceIdQueryImpl,DataSourceQueryImpl
public interface DataSourceQuery
Represents a query executed against a
SpaceDataSource implementation.- Since:
- 9.1.1
- Author:
- eitany, Idan Moyal
-
Method Summary
Modifier and TypeMethodDescriptionGets the prepared SQL representation of this query.
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.
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.
supportsTemplateAsObject()return value should be checked before calling this method otherwise anUnsupportedOperationExceptionwill be thrown if the operation is not supported.booleanbooleanboolean
-
Method Details
-
getAsSQLQuery
DataSourceSQLQuery getAsSQLQuery()Gets the prepared SQL representation of this query.
supportsAsSQLQuery()return value should be checked before calling this method otherwise anUnsupportedOperationExceptionwill be thrown if the operation is not supported.- Returns:
- Prepared SQL representation this query.
-
getTemplateAsObject
Object getTemplateAsObject()Gets an object representation of this query.
supportsTemplateAsObject()return value should be checked before calling this method otherwise anUnsupportedOperationExceptionwill be thrown if the operation is not supported.- Returns:
- Object representation of this query.
-
getTemplateAsDocument
SpaceDocument getTemplateAsDocument()Gets aSpaceDocumentrepresentation of this query.
supportsTemplateAsDocument()return value should be checked before calling this method otherwise anUnsupportedOperationExceptionwill be thrown if the operation is not supported.- Returns:
SpaceDocumentrepresentation of this query.
-
supportsAsSQLQuery
boolean supportsAsSQLQuery()- Returns:
- Whether this query has an SQL query representation.
-
supportsTemplateAsObject
boolean supportsTemplateAsObject()- Returns:
- Whether this query has an Object representation.
-
supportsTemplateAsDocument
boolean supportsTemplateAsDocument()- Returns:
- Whether this query has a
SpaceDocumentrepresentation.
-
getTypeDescriptor
SpaceTypeDescriptor getTypeDescriptor()- Returns:
- The
SpaceTypeDescriptorrepresenting the type this query is for.
-
getBatchSize
int getBatchSize()The 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.- Returns:
- Batch size hint.
-