package com.megatim.apifdxweb.core.impl.referentiel;
|
|
import com.megatim.apifdxweb.core.ifaces.referentiel.NoeudManager;
|
import com.megatim.apifdxweb.dao.ifaces.referentiel.NoeudDAO;
|
import com.megatim.apifdxweb.model.administration.User;
|
import com.megatim.fdxcommons.model.dtos.referentiel.NoeudDto;
|
import com.megatim.fdxcommons.model.mappers.MapStructMapper;
|
import com.megatim.fdxcommons.model.referentiel.Noeud;
|
import javax.ejb.EJB;
|
import javax.enterprise.context.Dependent;
|
import javax.inject.Inject;
|
|
@Dependent
|
public class NoeudManagerImpl implements NoeudManager {
|
|
@EJB
|
protected NoeudDAO dao;
|
|
@Inject
|
private MapStructMapper mapstructMapper;
|
|
/**
|
*
|
*/
|
public NoeudManagerImpl() {
|
}
|
|
@Override
|
public NoeudDAO getDao() {
|
return dao;
|
}
|
|
public Noeud saveOrUpdateCurrentElement(Noeud entityToSave) {
|
return dao.save(entityToSave);
|
}
|
|
@Override
|
public Noeud getById(String id, User connectedUser) {
|
Noeud noeud = dao.getById(id);
|
return noeud;
|
}
|
|
@Override
|
public Noeud getById(String id) {
|
return dao.getById(id);
|
}
|
|
}
|