}
protected void sort(final String column, final boolean ascending) {
Comparator comparator = new Comparator() {
public int compare(Object o1, Object o2) {
LeadVO c1 = (LeadVO) o1;
LeadVO c2 = (LeadVO) o2;
if (column == null) {
return 0;
}
if (column.equals("quoteState")) {
return ascending
? c1.getLeadState().compareTo(c2.getLeadState())
: c2.getLeadState().compareTo(c1.getLeadState());
} else if (column.equals("custAccountId")) {
return ascending
? c1.getCustAccountVO().getCustAccountId().compareTo(
c2.getCustAccountVO().getCustAccountId())
: c2.getCustAccountVO().getCustAccountId().compareTo(
c1.getCustAccountVO().getCustAccountId());
} else {
return 0;
}
}