Java源码示例:org.wso2.carbon.utils.DataPaginator
示例1
private PaginatedLogEvent getPaginatedLogEvent(int pageNumber, List<LogEvent> logMsgList) {
if (logMsgList != null && !logMsgList.isEmpty()) {
PaginatedLogEvent paginatedLogEvent = new PaginatedLogEvent();
DataPaginator.doPaging(pageNumber, logMsgList, paginatedLogEvent);
return paginatedLogEvent;
} else {
return null;
}
}
示例2
private PaginatedLogFileInfo getPaginatedLogFileInfo(int pageNumber,
List<LogFileInfo> logFileInfoList) {
if (logFileInfoList != null && !logFileInfoList.isEmpty()) {
PaginatedLogFileInfo paginatedLogFileInfo = new PaginatedLogFileInfo();
DataPaginator.doPaging(pageNumber, logFileInfoList, paginatedLogFileInfo);
return paginatedLogFileInfo;
} else {
return null;
}
}
示例3
public static PaginatedMappingData getPaginatedMappings(int pageNumber, String tenantDomain)
throws UrlMapperException {
MappingData[] mappings = HostUtil.getTenantSpecificMappingsFromRegistry(tenantDomain);
if (mappings != null) {
List<MappingData> mappingsList = Arrays.asList(mappings);
// Pagination
PaginatedMappingData paginatedMappings = new PaginatedMappingData();
DataPaginator.doPaging(pageNumber, mappingsList, paginatedMappings);
return paginatedMappings;
} else {
return null;
}
}
示例4
public static PaginatedNamesBean retrievePaginatedFlaggedName(int pageNumber, List<FlaggedName> names) {
PaginatedNamesBean bean = new PaginatedNamesBean();
DataPaginator.doPaging(pageNumber, names, bean);
return bean;
}
示例5
public static PaginatedNamesBean retrievePaginatedFlaggedName(int pageNumber, List<FlaggedName> names) {
PaginatedNamesBean bean = new PaginatedNamesBean();
DataPaginator.doPaging(pageNumber, names, bean);
return bean;
}