O meu está diferente, porquê terminei de realizar a aula 4 onde ele altera a List para realizar a consulta no banco de dados:
#AgendamentoEmailBusiness
package br.com.alura.business;
import java.util.List;
import javax.ejb.Stateless;
import javax.inject.Inject;
import br.com.alura.dao.AgendamentoEmailDao;
import br.com.alura.entity.AgendamentoEmail;
@Stateless
public class AgendamentoEmailBusiness {
@Inject
private AgendamentoEmailDao agendamentoEmailDao;
public List<AgendamentoEmail> listarAgendamentosEmail(){
return agendamentoEmailDao.listarAgendamentosEmail();
}
}
#AgendamentoEmailResources
package br.com.alura.resources;
import java.util.List;
import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import br.com.alura.business.AgendamentoEmailBusiness;
import br.com.alura.entity.AgendamentoEmail;
@Path("/agendamentoemail")
public class AgendamentoEmailResource {
@Inject
private AgendamentoEmailBusiness agendamentoEmailBusiness;
@GET
@Produces(MediaType.APPLICATION_JSON)
public Response listarAgendamentosEmail() {
List<AgendamentoEmail> emails = agendamentoEmailBusiness.listarAgendamentosEmail();
return Response.ok(emails).build();
}
}
#AgendamentoEmailDao
package br.com.alura.resources;
import java.util.List;
import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import br.com.alura.business.AgendamentoEmailBusiness;
import br.com.alura.entity.AgendamentoEmail;
@Path("/agendamentoemail")
public class AgendamentoEmailResource {
@Inject
private AgendamentoEmailBusiness agendamentoEmailBusiness;
@GET
@Produces(MediaType.APPLICATION_JSON)
public Response listarAgendamentosEmail() {
List<AgendamentoEmail> emails = agendamentoEmailBusiness.listarAgendamentosEmail();
return Response.ok(emails).build();
}
}