package com.megatim.apifdxweb.core.impl.administration; import com.bekosoftware.genericdaolayer.dao.ifaces.GenericDAO; import com.bekosoftware.genericmanagerlayer.core.impl.AbstractGenericManager; import com.megatim.apifdxweb.core.ifaces.administration.RoleManager; import com.megatim.apifdxweb.dao.ifaces.administration.RoleDAO; import com.megatim.apifdxweb.model.administration.Role; import javax.enterprise.context.Dependent; import javax.inject.Inject; @Dependent public class RoleManagerImpl extends AbstractGenericManager implements RoleManager { @Inject protected RoleDAO dao; public RoleManagerImpl() { } @Override public GenericDAO getDao() { return dao; } @Override public String getEntityIdName() { return "id"; } public Role getCurrentElement() { return dao.getCurrentRole(); } public Role saveOrUpdateCurrentElement(Role entityToSave) { return dao.save(entityToSave); } }