SQLightable.Reflection.ColumnSequencer
public static class SQLiteHouse.ColumnIndexComparator
extends java.lang.Object
implements java.util.Comparator<java.lang.reflect.Field>
SQLiteHouse
to sort the indices and/or names of columns
within a table specification.Constructor and Description |
---|
ColumnIndexComparator()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(java.lang.reflect.Field fldFirst,
java.lang.reflect.Field fldSecond)
Deprecated.
The algorithm in this method prefers to sort a column with an
explicit index definition before any column with no index definition.
|
public int compare(java.lang.reflect.Field fldFirst, java.lang.reflect.Field fldSecond)
0
(equal) would be to have two columns with the same
name, which is a violation of SQL table requirements anyway.compare
in interface java.util.Comparator<java.lang.reflect.Field>
fldFirst
- the first column to be comparedfldSecond
- the second column to be compared-1
if the first column should be before the second;
1
if the first column should be after the second; 0
if no sort criteria can be resolved.