public class DataRequest extends FSRParent
//indicate that data service capability is being used
loginEnv.getUsedCapabilities().add(AISClientCapability.DATA_SERVICE);
//created the data request
DataRequest children = new DataRequest(loginEnv);
//it is a count type
children.setDataServiceType(DataRequest.TYPE_COUNT);
//over the F0150 table
children.setTargetName("F0150");
//indicate table type
children.setTargetType(DataRequest.TARGET_TABLE);
//create a query
Query childrenQ = new Query(loginEnv);
//set it to do a find
childrenQ.setAutoFind(true);
//match all conditions
childrenQ.setMatchType(Query.MATCH_ALL);
//first condition is value of ES in the OSTP column
childrenQ.addStringCondition("F0150.OSTP", StringOperator.EQUAL(), "ES");
//second condition is value of 7500 in the PA8 column
childrenQ.addStringCondition("F0150.PA8", StringOperator.EQUAL(), "7500");
//set the query to the request
children.setQuery(childrenQ);
//send the request in, indicatging the data service uri
String response = JDERestServiceProvider.jdeRestServiceCall(loginEnv, children, JDERestServiceProvider.POST_METHOD, JDERestServiceProvider.DATA_SERVICE_URI);
//marchal the response to the CountResponse class
CountResponse childrenCount = loginEnv.getObjectMapper().readValue(response, CountResponse.class);
//print out the count
System.out.println(childrenCount.getCount());
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TARGET_TABLE |
static java.lang.String |
TARGET_VIEW |
static java.lang.String |
TYPE_AGGREGATION |
static java.lang.String |
TYPE_BROWSE |
static java.lang.String |
TYPE_COUNT |
GRID_DATA_OUTPUT_TYPE, VERSION2_OUTPUT_TYPE| Modifier | Constructor and Description |
|---|---|
protected |
DataRequest() |
|
DataRequest(LoginEnvironment loginEnv) |
| Modifier and Type | Method and Description |
|---|---|
void |
addOrderBy(LoginEnvironment loginEnv,
java.lang.String tableId,
java.lang.String columnId,
OrderByDirection direction)
Use this method to add an order by to the request
|
AggregationInfo |
getAggregation() |
java.lang.String |
getDataServiceType() |
Having |
getHaving() |
int |
getNextPageTimeInterval() |
java.lang.String |
getNextPageTimeInterval1() |
java.lang.String |
getTargetName() |
java.lang.String |
getTargetType() |
boolean |
isEnableNextPageProcessing() |
void |
setAggregation(AggregationInfo aggregation) |
void |
setDataServiceType(java.lang.String dataServiceType) |
void |
setEnableNextPageProcessing(boolean enableNextPageProcessing) |
void |
setHaving(Having having) |
void |
setNextPageTimeInterval(int nextPageTimeInterval) |
void |
setTargetName(java.lang.String targetName) |
void |
setTargetType(java.lang.String targetType) |
addFSREvent, getFindOnEntry, getFormActions, getFormServiceDemo, getLoadBaseFormOnly, getMaxPageSize, getOutputType, getQuery, getQueryObjectName, getReturnControlIDs, isAliasNaming, isShowActionControls, setAliasNaming, setFindOnEntry, setFindOnEntry, setFormActions, setFormServiceDemo, setFormServiceDemo, setJasserver, setLoadBaseFormOnly, setMaxPageSize, setMaxPageSize, setMaxPageSizeUnlimited, setOutputType, setQuery, setQueryObjectName, setReturnControlIDs, setShowActionControlsgetCacheTime, isAllowCache, isForceUpdate, isIncludeTimings, isSetDirtyOnly, setAllowCache, setCacheTime, setForceUpdate, setIncludeTimings, setOutputType, setSetDirtyOnlygetDeviceName, getEnvironment, getJasserver, getPassword, getPsToken, getRole, getSsoUniqueId, getToken, getUsername, isSsoEnabled, setDeviceName, setEnvironment, setPassword, setPsToken, setRole, setSsoEnabled, setSsoUniqueId, setToken, setUsernamepublic static final java.lang.String TARGET_TABLE
public static final java.lang.String TARGET_VIEW
public static final java.lang.String TYPE_BROWSE
public static final java.lang.String TYPE_COUNT
public static final java.lang.String TYPE_AGGREGATION
public DataRequest(LoginEnvironment loginEnv) throws CapabilityException
CapabilityExceptionprotected DataRequest()
public void setTargetName(java.lang.String targetName)
public java.lang.String getTargetName()
public void setTargetType(java.lang.String targetType)
public java.lang.String getTargetType()
public void setDataServiceType(java.lang.String dataServiceType)
public java.lang.String getDataServiceType()
public void setAggregation(AggregationInfo aggregation)
public AggregationInfo getAggregation()
public void addOrderBy(LoginEnvironment loginEnv, java.lang.String tableId, java.lang.String columnId, OrderByDirection direction) throws CapabilityException
tableId - columnId - direction - CapabilityExceptionpublic void setHaving(Having having)
public Having getHaving()
public void setNextPageTimeInterval(int nextPageTimeInterval)
setNextPageTimeInterval in class JASRequestBasepublic java.lang.String getNextPageTimeInterval1()
public int getNextPageTimeInterval()
getNextPageTimeInterval in class JASRequestBasepublic void setEnableNextPageProcessing(boolean enableNextPageProcessing)
public boolean isEnableNextPageProcessing()
Copyright © 2022 Oracle and/or its affiliates. All Rights Reserved.