bug 8613: Added accountId to listUsageRecords API, use active account incase of multiple account with same name

status 8613: resolved fixed
This commit is contained in:
kishan 2011-02-21 19:07:41 +05:30
parent 61a414fb8f
commit 60ecb564ea
2 changed files with 9 additions and 1 deletions

View File

@ -39,5 +39,6 @@ public interface AccountDao extends GenericDao<AccountVO, Long> {
List<AccountVO> findNewAccounts(Long minAccountId, Filter filter);
List<AccountVO> findCleanups();
List<AccountVO> findAdminAccountsForDomain(Long domainId);
void markForCleanup(long accountId);
void markForCleanup(long accountId);
List<AccountVO> listAccounts(String accountName, Long domainId);
}

View File

@ -129,6 +129,13 @@ public class AccountDaoImpl extends GenericDaoBase<AccountVO, Long> implements A
SearchCriteria<AccountVO> sc = AccountNameSearch.create("accountName", accountName);
sc.addAnd("domainId", SearchCriteria.Op.EQ, domainId);
return findOneIncludingRemovedBy(sc);
}
@Override
public List<AccountVO> listAccounts(String accountName, Long domainId) {
SearchCriteria<AccountVO> sc = AccountNameSearch.create("accountName", accountName);
sc.addAnd("domainId", SearchCriteria.Op.EQ, domainId);
return listIncludingRemovedBy(sc);
}
@Override