本文整理匯總了Java中org.uberfire.paging.PageRequest類的典型用法代碼示例。如果您正苦於以下問題:Java PageRequest類的具體用法?Java PageRequest怎麽用?Java PageRequest使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
PageRequest類屬於org.uberfire.paging包,在下文中一共展示了PageRequest類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createDataProvider
import org.uberfire.paging.PageRequest; //導入依賴的package包/類
/**
* Create DataProvider for the DataSources table
* @return the data provider
*/
private AsyncDataProvider<QueryResultPageRow> createDataProvider(final String source, final String sql) {
AsyncDataProvider<QueryResultPageRow> dataProvider = new AsyncDataProvider<QueryResultPageRow>() {
protected void onRangeChanged( HasData<QueryResultPageRow> display ) {
final Range range = display.getVisibleRange();
PageRequest request = new PageRequest( range.getStart(), range.getLength() );
queryService.getQueryResults(request, source, sql, new IRpcServiceInvocationHandler<PageResponse<QueryResultPageRow>>() {
@Override
public void onReturn(final PageResponse<QueryResultPageRow> response) {
updateRowCount( response.getTotalRowSize(), response.isTotalRowSizeExact() );
updateRowData( response.getStartRowIndex(), response.getPageRowList() );
if(response.getTotalRowSize()==0) {
refreshCompleteEvent.fire(new UiEvent(UiEventType.QUERY_RESULT_DISPLAYER_REFRESHED_NOROWS));
} else {
refreshCompleteEvent.fire(new UiEvent(UiEventType.QUERY_RESULT_DISPLAYER_REFRESHED_OK));
}
}
@Override
public void onError(Throwable error) {
errorMessage = error.getMessage();
refreshCompleteEvent.fire(new UiEvent(UiEventType.QUERY_RESULT_DISPLAYER_REFRESHED_ERROR));
}
});
}
};
return dataProvider;
}
示例2: getQueryResults
import org.uberfire.paging.PageRequest; //導入依賴的package包/類
public void getQueryResults(final PageRequest request, final String dataSource, final String sql, final IRpcServiceInvocationHandler<PageResponse<QueryResultPageRow>> handler) {
RemoteCallback<PageResponse<QueryResultPageRow>> successCallback = new DelegatingRemoteCallback<PageResponse<QueryResultPageRow>>(handler);
ErrorCallback<?> errorCallback = new DelegatingErrorCallback(handler);
try {
remoteQueryService.call(successCallback, errorCallback).getQueryResults(request,dataSource,sql);
} catch (DataVirtUiException e) {
errorCallback.error(null, e);
}
}
示例3: getDataSources
import org.uberfire.paging.PageRequest; //導入依賴的package包/類
public void getDataSources(final PageRequest request, final String filter, final IRpcServiceInvocationHandler<PageResponse<DataSourcePageRow>> handler) {
RemoteCallback<PageResponse<DataSourcePageRow>> successCallback = new DelegatingRemoteCallback<PageResponse<DataSourcePageRow>>(handler);
ErrorCallback<?> errorCallback = new DelegatingErrorCallback(handler);
try {
remoteTeiidService.call(successCallback, errorCallback).getDataSources(request,filter);
} catch (DataVirtUiException e) {
errorCallback.error(null, e);
}
}
示例4: getDataSources
import org.uberfire.paging.PageRequest; //導入依賴的package包/類
public PageResponse<DataSourcePageRow> getDataSources( final PageRequest pageRequest, final String filters) throws DataVirtUiException;
示例5: getQueryResults
import org.uberfire.paging.PageRequest; //導入依賴的package包/類
public PageResponse<QueryResultPageRow> getQueryResults( final PageRequest pageRequest, String dataSource, String sql ) throws DataVirtUiException;