use of com.remswork.project.alice.model.Student in project classify-system by anverliedoit.
the class StudentAdapter method onBindViewHolder.
@Override
public void onBindViewHolder(StudentAdapterViewHolder holder, int position) {
Student student = studentList.get(position);
holder.setView(student, position);
}
use of com.remswork.project.alice.model.Student in project classify-system by anverliedoit.
the class ClassStudentListResource method addStudentById.
@POST
public Response addStudentById(@PathParam("classId") long classId) {
try {
ClassStudentListResourceLinks resourceLinks = new ClassStudentListResourceLinks(uriInfo);
if (studentId == 0)
throw new ClassDaoException("Query param : studentId is required");
Student student = classService.addStudentById(classId, studentId);
student.addLink(resourceLinks.self(classId, studentId));
return Response.status(Response.Status.OK).entity(student).build();
} catch (ClassException | ClassDaoException e) {
e.printStackTrace();
Message message = new Message(400, "Bad Request", e.getMessage());
return Response.status(Response.Status.BAD_REQUEST).entity(message).build();
}
}
Aggregations