Package net.sf.esims.model.entity

Examples of net.sf.esims.model.entity.EntranceExam


  public Resolution createEntranceExam() {
    String message = EsimsConstants._BLANK_STRING;

    AcademicYear academicYear = this.academicYearService.getById(new Long(
        this.getContext().getRequest().getParameter("academicYearId")));
    EntranceExam entranceExam = new EntranceExam(academicYear,
        this.dateOfExam, this.description, this.startTime, this.endTime);
    // Check if entrance exam already exists
    if (this.entranceExamService.checkIfAlreadyExists(entranceExam)) {
      message = EsimsUtils.createWarnMessage(this.getContext()
          .getContextPath(),
          "<strong>The entrance exam  already exists !!</strong>");
    } else {
      this.entranceExamService.save(entranceExam);
      message = EsimsUtils.createInfoMessage(this.getContext()
          .getContextPath(), "<strong>The entrance exam "
          + entranceExam.getDescription()
          + " has been created succesfully !</strong>");
    }
    this.getContext().removeAttributeFromSession("academicYear");
    FlashScope.getCurrent(this.getContext().getRequest(),true).put("message", message);
    return new RedirectResolution(DisplayMessageAction.class,  "forwardToMessagePage");
View Full Code Here


  }

  @HandlesEvent("beginEditing")
  public Resolution beginEditing() {

    EntranceExam entranceExam = this.entranceExamService.getById(new Long(
        this.getContext().getRequest().getParameter("entranceExamId")));
    this.getContext().setAttributeToRequest("academicYear",
        entranceExam.getAcademicYear());
    this.getContext().setAttributeToSession("entranceExam", entranceExam);
    String buttonName = "updateEntranceExam";
    String buttonValue = "Update";
    this.getContext().setAttributeToSession("buttonName", buttonName);
    this.getContext().setAttributeToSession("buttonValue", buttonValue);
View Full Code Here

  @HandlesEvent("updateEntranceExam")
  public Resolution updateEntranceExam() {
    String message = EsimsConstants._BLANK_STRING;

    EntranceExam entranceExam = (EntranceExam) this.getContext()
        .getAttributeFromSession("entranceExam");
    entranceExam.setDateOfExam(this.dateOfExam);
    entranceExam.setStartTime(this.startTime);
    entranceExam.setEndTime(this.endTime);
    this.entranceExamService.save(entranceExam);
    message = EsimsUtils.createInfoMessage(this.getContext()
        .getContextPath(), "Entrance exam for <strong> "
        + this.description + "</strong> was updated succesfully");
View Full Code Here

    Date dateOfExam = EsimsUtils.createDate(12, Calendar.MARCH, 2007);
    String startTime = "9:30";
    String endTime = "11:30";
   
   
    EntranceExam entranceExam = new EntranceExam(academicYear, dateOfExam,
        academicYear.getDescription(),startTime, endTime);
       
    entranceExamDAO.save(entranceExam);
   
   
View Full Code Here

    Date dateOfExam = EsimsUtils.createDate(12, Calendar.MARCH, 2007);
    String startTime = "9:30";
    String endTime = "11:30";
   
   
    EntranceExam entranceExam = new EntranceExam(academicYear, dateOfExam,
        academicYear.getDescription(),startTime, endTime);
       
    entranceExamDAO.save(entranceExam);
   
   
View Full Code Here

    Date dateOfExam = EsimsUtils.createDate(12, Calendar.MARCH, 2007);
    String startTime = "9:30";
    String endTime = "11:30";
   
   
    EntranceExam entranceExam = new EntranceExam(academicYear, dateOfExam,
        academicYear.getDescription(),startTime, endTime);
       
    entranceExamDAO.save(entranceExam);
   
    List<EntranceExam> listOfEntranceExams = entranceExamDAO.getAll();
View Full Code Here

TOP

Related Classes of net.sf.esims.model.entity.EntranceExam

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.