当前位置: 首页>>代码示例>>Java>>正文


Java PageRequest类代码示例

本文整理汇总了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;
}
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:33,代码来源:QueryResultPagedTableDisplayer.java

示例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);
    }
}
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:10,代码来源:QueryRpcService.java

示例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);
    }
}
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:10,代码来源:TeiidRpcService.java

示例4: getDataSources

import org.uberfire.paging.PageRequest; //导入依赖的package包/类
public PageResponse<DataSourcePageRow> getDataSources( final PageRequest pageRequest, final String filters) throws DataVirtUiException; 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:2,代码来源:ITeiidService.java

示例5: getQueryResults

import org.uberfire.paging.PageRequest; //导入依赖的package包/类
public PageResponse<QueryResultPageRow> getQueryResults( final PageRequest pageRequest, String dataSource, String sql ) throws DataVirtUiException; 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:2,代码来源:IQueryService.java


注:本文中的org.uberfire.paging.PageRequest类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。