package com.megatim.fdxconsultation.core.impl.searchs; import com.megatim.fdxcommons.model.referentiel.Participant; import com.megatim.fdxconsultation.core.ifaces.searchs.UserParticipantManager; import com.megatim.fdxconsultation.dao.ifaces.searchs.UserParticipantDAO; import com.megatim.fdxconsultation.model.searchentities.ParticipantSearch; import java.util.ArrayList; import java.util.List; import javax.enterprise.context.Dependent; import javax.inject.Inject; /** * * @author Gabuntu */ @Dependent public class UserParticipantManagerImpl implements UserParticipantManager { @Inject private UserParticipantDAO dao; @Override public List findUserParticipants(String userName) { return dao.findUserParticipants(userName); } @Override public List findUserParticipantsWithPagination(String userName, ParticipantSearch participantSearch, int pageNumber, int pageSize) { try { return dao.findUserParticipantsWithPagination(userName, participantSearch, pageNumber, pageSize); } catch (Exception e) { e.printStackTrace(); return new ArrayList<>(); } } @Override public List findAllUserParticipants(String userName, ParticipantSearch participantSearch) { try { return dao.findAllUserParticipants(userName, participantSearch); } catch (Exception e) { e.printStackTrace(); return new ArrayList<>(); } } @Override public Long countUserParticipants(String userName, ParticipantSearch participantSearch) { return dao.countUserParticipants(userName, participantSearch); } }