All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.evasion.ejbfacade.AccountManager Maven / Gradle / Ivy

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.evasion.ejbfacade;

import com.evasion.entity.Account;
import com.evasion.exception.PersistenceViolationException;
import com.evasion.ejb.local.AccountManagerLocal;
import com.evasion.ejb.remote.AccountManagerRemote;
import java.util.List;
import javax.ejb.Local;
import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author user
 */
@Stateless
@Local(value = AccountManagerLocal.class)
@Remote(value = AccountManagerRemote.class)
public class AccountManager implements AccountManagerLocal, AccountManagerRemote {

    @PersistenceContext(unitName = "EvasionPU")
    private EntityManager em;

    @Override
    public Account createAccount(Account account) throws PersistenceViolationException {
        return (new com.evasion.plugin.account.AccountManager(em)).createAccount(account);
    }

    @Override
    public void deleteAccount(Account u) {
        (new com.evasion.plugin.account.AccountManager(em)).deleteAccount(u);
    }

    @Override
    public Account updateAccount(Account u) {
        return (new com.evasion.plugin.account.AccountManager(em)).updateAccount(u);
    }

    @Override
    public List listAllAccount() {
        return (new com.evasion.plugin.account.AccountManager(em)).listAllAccount();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy