Java Reference
In-Depth Information
e.getLocalizedMessage(), e);
throw new DaoException(e);
}
return (List<Account>)accountList;
}
G
Gets list
of maps
public List<Map<String, Object>> getMapListByExample(
Account account
)
{
List<Account> accountList =
getAccountListByExample(account);
List<Map<String, Object>> mapList =
new ArrayList<Map<String, Object>>();
for (Account acctToAdd : accountList) {
Map<String, Object> map =
new HashMap<String, Object>();
map.put("accountId", acctToAdd.getAccountId());
map.put("address1", acctToAdd.getAddress1());
map.put("address2", acctToAdd.getAddress2());
map.put("city", acctToAdd.getCity());
map.put("country", acctToAdd.getCountry());
map.put("firstName", acctToAdd.getFirstName());
map.put("lastName", acctToAdd.getLastName());
map.put("password", acctToAdd.getPassword());
map.put("postalCode", acctToAdd.getPostalCode());
map.put("state", acctToAdd.getState());
map.put("username", acctToAdd.getUsername());
mapList.add(map);
}
return mapList;
}
public List<IdDescription> getIdDescriptionListByExample(
Account exAcct
) {
List<Account> acctList =
getAccountListByExample(exAcct);
List<IdDescription> idDescriptionList =
new ArrayList<IdDescription>();
for (Account acct : acctList) {
idDescriptionList.add(
new IdDescription(
acct.getAccountId(),
acct.getFirstName() + " " + acct.getLastName()
)
);
}
return idDescriptionList;
}
Gets different
list of beans
H
Search WWH ::




Custom Search