@Override public LAccount getAccountById(int accountId) { LAccount cachedAccount = getObject(accountId); if (cachedAccount == null) { LAccount dbAccount = accountDao.loadAccount(accountId); if (dbAccount != null) { addObject(dbAccount); cachedAccount = dbAccount; } } return cachedAccount; }
@Override public LAccount getAccountByName(String name) { LAccount cachedAccount = getDataObject(name); if (cachedAccount == null) { LAccount dbAccount = accountDao.loadAccount(name); if (dbAccount != null) { addObject(dbAccount); cachedAccount = dbAccount; } } return cachedAccount; }