public static class EntityResultUtils.EntityResultSorter extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
compares |
protected EntityResult |
entityResult |
protected int[] |
indexes |
protected List<EntityResultUtils.Order> |
order |
protected int |
totalRecord |
| Constructor and Description |
|---|
EntityResultUtils.EntityResultSorter(EntityResult entityResult,
List<EntityResultUtils.Order> order) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
compare(int rowIndex1,
int rowIndex2)
Compares two rows column by column, following the sorting of the
columns.
|
int |
compareRowsByColumn(int rowIndex1,
int rowIndex2,
String columnName)
Compares to row values of the same column.
|
protected void |
init() |
protected void |
relocatedRecords() |
void |
shuttleSort(int[] from,
int[] to,
int low,
int high)
Fast algorithm to sort an array.
|
void |
sort() |
protected List<EntityResultUtils.Order> order
protected EntityResult entityResult
protected int totalRecord
protected int[] indexes
protected int compares
public EntityResultUtils.EntityResultSorter(EntityResult entityResult, List<EntityResultUtils.Order> order)
protected void init()
public void sort()
protected void relocatedRecords()
public void shuttleSort(int[] from,
int[] to,
int low,
int high)
from - the original arrayto - the sorted arraylow - the starting index (typically 0)high - the ending index (typically from.length)protected int compare(int rowIndex1,
int rowIndex2)
rowIndex1 - rowIndex2 - #compareRowsByColumn(int, int, int)public int compareRowsByColumn(int rowIndex1,
int rowIndex2,
String columnName)
rowIndex1 - rowIndex2 - columnName - Copyright © 2016 Imatia Innovation S.L.. All rights reserved.