@Override protected Record createRecord(Account value) { Record record = new Record(value); record.add(getMessages().name(), value.getName()); record.add(getMessages().number(), value.getNumber()); record.add(getMessages().balance(), value.getTotalBalanceInAccountCurrency()); return record; }
@Override protected String getDisplayValue(Account value) { return value != null ? value.getNumber() + "-" + value.getName() + "-" + CommandUtils.getAccountTypeString(value.getType()) : ""; }
@Override protected boolean filter(Account e, String name) { return e.getName().toLowerCase().startsWith(name.toLowerCase()) || e.getNumber().startsWith(String.valueOf(getNumberFromString(name))); }