Kenmegne
7 days ago 1bc8864f134272c4bf23a9b05831803a423a4771
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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<Role, Long> implements RoleManager {
 
    @Inject
    protected RoleDAO dao;
 
    public RoleManagerImpl() {
    }
 
    @Override
    public GenericDAO<Role, Long> getDao() {
        return dao;
    }
 
    @Override
    public String getEntityIdName() {
        return "id";
    }
 
    public Role getCurrentElement() {
        return dao.getCurrentRole();
    }
 
    public Role saveOrUpdateCurrentElement(Role entityToSave) {
        return dao.save(entityToSave);
    }
    
}