0
我的方法是排序列表<CrExcessMaster>由bean類Opendate裏的財產
public FilteredUIExcessList getCustomerExcesses(Long cif,String primaryCO) throws Exception {
if (cif != null && !cif.equals(0L)) {
List<CrExcessMaster> crExcessMasterList = getExcessDbService()
.getExcessesForCustomer(cif);
}
ExcessUIBean類有Opendate裏的財產
public class ExcessUIBean implements Comparable<ExcessUIBean>{
private boolean notifyDaHolder;
private String daValueForUser;
private String excessId;
private String excessDa;
private String status;
private String product;
private String measure;
private String currency;
private String limitAtExcess;
private String excessAmount;
private String excessDate;
private String maxRiskAmount;
private String maxRiskDate;
private String comments;
private String preDefinedComments;
private String openDate;
public String getOpenDate() {
return openDate;
}
public void setOpenDate(String openDate) {
this.openDate = openDate;
}
//getters and setters
我需要每opendate
財產crExcessMasterList
作爲
'ExcessUIBean'應該有一個'compareTo'方法,因爲它正在執行'Comparable'接口。你可以發佈這個代碼,如果它包含'openDate' /'getOpenDate()'涉及的東西? – cyroxx 2013-05-14 12:27:12
這個答案可能會幫助你:http://stackoverflow.com/a/1814112/1388240 – cyroxx 2013-05-14 12:39:01