|
Query |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.iquery.dataretrieval.RetrievalPolicy
public class RetrievalPolicy
Contains query policy settings.
The RetrievalPolicy contains settings which affect how data is retrieved using the
QueryConnector
.
None of these settings affect what data is retrieved.
The primary setting contained in this object is the policy:
The policy determines whether the query connector should attempt to retrieve
data in the fastest way possible or retrieve the freshest (most recent) data possible.
The exact mechanisms which may be employed for fresh or fast data are currently internal to the
SAS Query Services framework and may change in the future.
The default setting is FRESHEST
.
Example:
RetrievalPolicy policy = new RetrievalPolicy();
policy.setPolicy(RetrievalPolicy.FRESHEST);
Other settings are contained in the sub-objects ConnectionConfiguration
and OfflineResultSetConfiguration
.
QueryConnectorInterface
,
QueryConnector
Field Summary | |
---|---|
static int |
FASTEST
Attempt to use the fastest data available. |
static int |
FRESHEST
Attempt to use the most recent data available. |
Constructor Summary | |
---|---|
RetrievalPolicy()
Creates a RetrievalPolicy that controls how data is retrieved
using a QueryConnector . |
|
RetrievalPolicy(RetrievalPolicy retrievalPolicy)
Creates a new retrieval policy with the same settings as the argument. |
Method Summary | |
---|---|
ConnectionConfiguration |
getConnectionConfiguration()
Returns the connection configuration associated with this retrieval policy object. |
OfflineResultSetConfiguration |
getOfflineResultSetConfiguration()
Returns the offline configuration associated with this retrieval policy. |
int |
getPolicyValue()
Get the retrieval policy to be used when executing a query. |
void |
setConnectionConfiguration(ConnectionConfiguration connectionConfiguration)
Sets a new connection configuration to be associated with this retrieval policy. |
void |
setOfflineResultSetConfiguration(OfflineResultSetConfiguration offlineResultSetConfiguration)
Sets a new offline configuration object on this retrieval policy. |
void |
setPolicyValue(int policy)
Set the retrieval policy to use when executing a query. |
Field Detail |
---|
public static final int FRESHEST
setPolicyValue(int)
,
Constant Field Valuespublic static final int FASTEST
setPolicyValue(int)
,
Constant Field ValuesConstructor Detail |
---|
public RetrievalPolicy()
RetrievalPolicy
that controls how data is retrieved
using a QueryConnector
.
The default value for the policy attribute is #FRESHEST
and the default
connection configuration is ConnectionConfiguration#USER_SESSION
.
public RetrievalPolicy(RetrievalPolicy retrievalPolicy)
Method Detail |
---|
public void setPolicyValue(int policy)
public int getPolicyValue()
FRESHEST
or FASTEST
public void setOfflineResultSetConfiguration(OfflineResultSetConfiguration offlineResultSetConfiguration)
offlineResultSetConfiguration
- The configuration to setpublic OfflineResultSetConfiguration getOfflineResultSetConfiguration()
public ConnectionConfiguration getConnectionConfiguration()
public void setConnectionConfiguration(ConnectionConfiguration connectionConfiguration)
connectionConfiguration
- The configuration to set
|
Query |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |