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 class is subject to change. ***

## com.sas.iquery.dataretrieval
Class QueryConnector

    com.sas.iquery.dataretrieval.QueryConnector

All Implemented Interfaces:
  QueryConnectorInterface, com.sas.iquery.execution.OverrideLocaleInterface, com.sas.iquery.execution.OverrideStpNamesInterface, com.sas.iquery.intelligentquery.QueryConnectionInterface

    public class QueryConnector

implements QueryConnectorInterface

Retrieves result sets by executing business queries.

The query connector allows users to execute business queries to retrieve result sets which provide access to data. It internally manages server connections and previously retrieved result sets. The behaviour of the query connector is controlled by retrieval policies.
The specifics of retrieving result sets for a query is determined by different strategies as specified by the individual business query.

See the package-level documentation for `com.sas.iquery.dataretrieval` for examples of how to use the query connector.

See Also:
  `SimpleQueryConnector`, `RetrievalPolicy`

Nested Class Summary
`static class` | `QueryConnector.CloseOptions` Contains bit values that are used to close specific resources that are managed by the `QueryConnector`.

Constructor Summary
`QueryConnector()` Creates a new query connector to use for executing business queries.

Method Summary
`void` | `close(com.sas.services.session.SessionContextInterface sessionContext)` Closes all connections and result sets associated with the SessionContext specified.
`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.

Methods inherited from class com.sas.iquery.dataretrieval.SimpleQueryConnector
`getComputationalLocale, getPhysicalQuery, getResultSetStructure, getRetrievalPolicy, getStpNames, retrieveQueryResult, retrieveQueryResultMap, retrieveQueryResultMap, setComputationalLocale, setRetrievalPolicy, setStpNames`

Methods inherited from interface com.sas.iquery.dataretrieval.QueryConnectorInterface
`getComputationalLocale, getRetrievalPolicy, retrieveQueryResultMap, setComputationalLocale, setRetrievalPolicy`

Constructor Detail

### QueryConnector

    public QueryConnector()

  Creates a new query connector to use for executing business queries.

Method Detail

### closeResources

    public 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 `QueryConnector.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 `QueryConnector.CloseOptions.SCOPE_SESSION` options bit is not set (the default), result set closing will only affect those retrieved using this particular query connector.

  Specified by:
    `closeResources` in interface `QueryConnectorInterface`
  Parameters:
    `sessionContext` - The user's session
    `options` - option-bits from `QueryConnector.CloseOptions`
  Throws:
    `DataRetrievalException`
    `ExecutionException`

### closeResult

    public 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.

  Specified by:
    `closeResult` in interface `QueryConnectorInterface`
  Parameters:
    `result` - The result set to close and stop managing.
  Throws:
    `DataRetrievalException`
  See Also:
    `closeResources(SessionContextInterface, int)`

### close

    public void close(com.sas.services.session.SessionContextInterface sessionContext)
               throws DataRetrievalException

  Closes all connections and result sets associated with the SessionContext specified.

  Parameters:
    `sessionContext` - Context of the user whose connections and ResultSets should be closed
  Throws:
    `DataRetrievalException`
  See Also:
    `closeResources(SessionContextInterface, int)`

*** This class 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.