Search in sources :

Example 1 with AccountEmailModelDao

use of org.killbill.billing.account.dao.AccountEmailModelDao in project killbill by killbill.

the class DefaultAccountInternalApi method getEmails.

@Override
public List<AccountEmail> getEmails(final UUID accountId, final InternalTenantContext context) {
    final List<AccountEmailModelDao> childrenAccountsModelDao = accountDao.getEmailsByAccountId(accountId, context);
    final List<AccountEmail> emails = new LinkedList<AccountEmail>();
    for (final AccountEmailModelDao emailsModelDao : childrenAccountsModelDao) {
        emails.add(new DefaultAccountEmail(emailsModelDao));
    }
    return emails;
}
Also used : DefaultAccountEmail(org.killbill.billing.account.api.DefaultAccountEmail) AccountEmailModelDao(org.killbill.billing.account.dao.AccountEmailModelDao) AccountEmail(org.killbill.billing.account.api.AccountEmail) DefaultAccountEmail(org.killbill.billing.account.api.DefaultAccountEmail) LinkedList(java.util.LinkedList)

Example 2 with AccountEmailModelDao

use of org.killbill.billing.account.dao.AccountEmailModelDao in project killbill by killbill.

the class DefaultAccountUserApi method getEmails.

@Override
public List<AccountEmail> getEmails(final UUID accountId, final TenantContext context) {
    final List<AccountEmailModelDao> childrenAccountsModelDao = accountDao.getEmailsByAccountId(accountId, internalCallContextFactory.createInternalTenantContextWithoutAccountRecordId(context));
    final List<AccountEmail> emails = new LinkedList<AccountEmail>();
    for (final AccountEmailModelDao emailsModelDao : childrenAccountsModelDao) {
        emails.add(new DefaultAccountEmail(emailsModelDao));
    }
    return emails;
}
Also used : DefaultAccountEmail(org.killbill.billing.account.api.DefaultAccountEmail) AccountEmailModelDao(org.killbill.billing.account.dao.AccountEmailModelDao) AccountEmail(org.killbill.billing.account.api.AccountEmail) DefaultAccountEmail(org.killbill.billing.account.api.DefaultAccountEmail) LinkedList(java.util.LinkedList)

Aggregations

LinkedList (java.util.LinkedList)2 AccountEmail (org.killbill.billing.account.api.AccountEmail)2 DefaultAccountEmail (org.killbill.billing.account.api.DefaultAccountEmail)2 AccountEmailModelDao (org.killbill.billing.account.dao.AccountEmailModelDao)2