All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Query |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

*** This interface is subject to change. ***

## com.sas.iquery.dataretrieval
Interface QueryConnectorInterface

All Superinterfaces:
  com.sas.iquery.intelligentquery.QueryConnectionInterface

All Known Implementing Classes:
  QueryConnector

    public interface QueryConnectorInterface

extends com.sas.iquery.intelligentquery.QueryConnectionInterface

Specifies methods that are used to execute queries.

Method Summary
`void` | `closeResources(com.sas.services.session.SessionContextInterface sessionContext, int options)` Closes resources as specified by the options.
`void` | `closeResult(ResultSetInterface result)` Closes a single result set.
`java.util.Locale` | `getComputationalLocale()` Returns the `Locale` to override query computations or `null` if the computation locale of the query is not to be overridden.
`RetrievalPolicy` | `getRetrievalPolicy()` Returns the default retrieval policy.
`java.util.Map<java.lang.String,ResultSetInterface>` | `retrieveQueryResultMap(java.util.List queries, RetrievalPolicy retrievalPolicy)` Creates a map of query results, based on a list of input business queries.
`void` | `setComputationalLocale(java.util.Locale overrideComputationalLocale)` Sets the `Locale` to override query computations or if the computation locale of the query is not to be overridden then use `null`.
`void` | `setRetrievalPolicy(RetrievalPolicy policy)` Sets the default retrieval policy to use.

Method Detail

### retrieveQueryResultMap

    @NonNull
    java.util.Map<java.lang.String,ResultSetInterface> retrieveQueryResultMap(java.util.List queries,
                                                                                      RetrievalPolicy retrievalPolicy)
                                                                              throws com.sas.iquery.intelligentquery.IntelligentQueryException

  Creates a map of query results, based on a list of input business queries.

  The keys of the resulting map are the id of the input business queries. Use the `IntelligentQueryInterface.getID()`method to determine the id. The input list must fulfill the following requirements:

  - It cannot be null
  - It contains only instances of `BusinessQuery`, for example `DataSelection`
  - The business queries must have a unique ID within the List

  Parameters:
    `queries` - a list of business queries to execute
    `retrievalPolicy` - the retrieval policy to use for executing
  Returns:
    A map whose keys are ID's of the executed BusinessQueries and values are the `ResultSetInterface` results.
  Throws:
    `com.sas.iquery.intelligentquery.IntelligentQueryException`
  See Also:
    `QueryConnectionInterface.retrieveQueryResultMap(List)`

### getRetrievalPolicy

    RetrievalPolicy getRetrievalPolicy()

  Returns the default retrieval policy.

  See Also:
    `RetrievalPolicy`

### setRetrievalPolicy

    void setRetrievalPolicy(RetrievalPolicy policy)

  Sets the default retrieval policy to use.

  See Also:
    `RetrievalPolicy`

### closeResources

    void closeResources(com.sas.services.session.SessionContextInterface sessionContext,
                        int options)
                        throws DataRetrievalException,
                               ExecutionException

  Closes resources as specified by the options. This method allows selective closing of resources managed by the QueryConnector. May close result sets as well as connections. If the CloseOptions.SCOPE_SESSION options bit is set, the call will close result sets retrieved using the given session, irrespective of which QueryConnector instance was used. If the CloseOptions.SCOPE_SESSION options bit is not set (the default), result set closing will only affect those retrieved using this particular query connector.

  Parameters:
    `sessionContext` - the user's session
    `options` - option bits from `QueryConnector.CloseOptions`
  Throws:
    `DataRetrievalException`
    `ExecutionException`

### closeResult

    void closeResult(ResultSetInterface result)
                     throws DataRetrievalException

  Closes a single result set. If it was previously retrieved through this query connector, it is also removed from the collection of managed result sets.

  Parameters:
    `result` - the result set to close and stop managing
  Throws:
    `DataRetrievalException`
  See Also:
    `closeResources(SessionContextInterface, int)`

### getComputationalLocale

    java.util.Locale getComputationalLocale()

  Returns the `Locale` to override query computations or `null` if the computation locale of the query is not to be overridden.

  Returns:
    Overriding Locale (or null)
  See Also:
    `BusinessModel.getComputationalLocale()`

### setComputationalLocale

    void setComputationalLocale(java.util.Locale overrideComputationalLocale)

  Sets the `Locale` to override query computations or if the computation locale of the query is not to be overridden then use `null`.

  Parameters:
    `computationLocale` - Locale to override query computation locale or `null` to not override.
  See Also:
    `BusinessModel.setComputationalLocale(Locale)`

*** This interface is subject to change. ***

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Query |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.