Package net.sf.esims.model.entity

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


    Date d2 = EsimsUtils.createDate(13, Calendar.MARCH, 2007);
    SchoolEssence schoolEssence = UtilsForTestCases
        .createValidSchoolEssence();
    School school = schoolEssence.createSchool();
    this.schoolService.save(school);
    AcademicYear academicYear = new AcademicYear("2006-2007", school, d1,
        d2, "active");
    academicYearService.saveAcademicYear(academicYear);
    Standard standard = new Standard("5th standard", academicYear);
    this.standardService.save(standard);
   
View Full Code Here


    Date d2 = EsimsUtils.createDate(13, Calendar.MARCH, 2007);
    SchoolEssence schoolEssence = UtilsForTestCases
        .createValidSchoolEssence();
    School school = schoolEssence.createSchool();
    this.schoolService.save(school);
    AcademicYear academicYear = new AcademicYear("2006-2007", school, d1,
        d2, "active");
    academicYearService.saveAcademicYear(academicYear);
    Standard standard = new Standard("5th standard", academicYear);
    this.standardService.save(standard);
   
View Full Code Here

    Date d2 = EsimsUtils.createDate(13, Calendar.MARCH, 2007);
    SchoolEssence schoolEssence = UtilsForTestCases
        .createValidSchoolEssence();
    School school = schoolEssence.createSchool();
    this.schoolService.save(school);
    AcademicYear academicYear = new AcademicYear("2006-2007", school, d1,
        d2, "active");
    academicYearService.saveAcademicYear(academicYear);
    Standard standard = new Standard("5th standard", academicYear);
    this.standardService.save(standard);
   
View Full Code Here

    Date d2 = EsimsUtils.createDate(13, Calendar.MARCH, 2007);
    SchoolEssence schoolEssence = UtilsForTestCases
        .createValidSchoolEssence();
    School school = schoolEssence.createSchool();
    this.schoolService.save(school);
    AcademicYear academicYear = new AcademicYear("2006-2007", school, d1,
        d2, "active");
    academicYearService.saveAcademicYear(academicYear);
    Standard standard = new Standard("5th standard", academicYear);
    this.standardService.save(standard);
   
View Full Code Here

    Date d2 = EsimsUtils.createDate(13, Calendar.MARCH, 2007);
    SchoolEssence schoolEssence = UtilsForTestCases
        .createValidSchoolEssence();
    School school = schoolEssence.createSchool();
    this.schoolService.save(school);
    AcademicYear academicYear = new AcademicYear("2006-2007", school, d1,
        d2, "active");
    academicYearService.saveAcademicYear(academicYear);
    Standard standard = new Standard("5th standard", academicYear);
    this.standardService.save(standard);
   
View Full Code Here

    Date d2 = EsimsUtils.createDate(13, Calendar.MARCH, 2007);
    SchoolEssence schoolEssence = UtilsForTestCases
        .createValidSchoolEssence();
    School school = schoolEssence.createSchool();
    this.schoolService.save(school);
    AcademicYear academicYear = new AcademicYear("2006-2007", school, d1,
        d2, "active");
    academicYearService.saveAcademicYear(academicYear);
    Standard standard = new Standard("5th standard", academicYear);
    this.standardService.save(standard);
   
View Full Code Here

    Date d2 = EsimsUtils.createDate(13, Calendar.MARCH, 2007);
    SchoolEssence schoolEssence = UtilsForTestCases
        .createValidSchoolEssence();
    School school = schoolEssence.createSchool();
    this.schoolService.save(school);
    AcademicYear academicYear = new AcademicYear("2006-2007", school, d1,
        d2, "active");
    academicYearService.saveAcademicYear(academicYear);
    Standard standard = new Standard("5th standard", academicYear);
    this.standardService.save(standard);
   
View Full Code Here

   */

  @HandlesEvent("getStandardsForAcademicYear")
  public Resolution getStandardsForAcademicYear() {
    // Get the academicYear
    AcademicYear academicYear = this.academicYearService
    .getById(this.academicYearId);
    // Get all standards for the academic year
    List<Standard> listOfStandards = this.divisionService
    .getAllStandards(academicYear);
    // Since a division depends on standard, academic year and school we
View Full Code Here

  }

  @HandlesEvent("createStandard")
  public Resolution createStandard() {
    String message = EsimsConstants._BLANK_STRING;
    AcademicYear academicYearToBeLinkedWith = this.standardService
        .getAcademicYearsById(this.academicYearId);

    Standard standard = new Standard(this.name, academicYearToBeLinkedWith);

    // Check if the standard already exists inthe system before performing a
    // save.
    if (this.standardService.checkIfStdExists(standard)) {
      message = EsimsUtils.createWarnMessage(this.getContext()
          .getContextPath(), "<strong>The standard " + this.getName()
          + " already exists !!</strong>");
    } else {
      this.standardService.save(standard);
      message = EsimsUtils.createInfoMessage(this.getContext()
          .getContextPath(), "<strong>" + this.name
          + "</strong> was created succesfully for "
          + academicYearToBeLinkedWith.getDescription());
      this.getContext().removeAttributeFromSession("listOfAcademicYears");
    }
    FlashScope.getCurrent(this.getContext().getRequest(),true).put("message", message);
    return new RedirectResolution(DisplayMessageAction.class,  "forwardToMessagePage");
  }
View Full Code Here

    String message = EsimsConstants._BLANK_STRING;

    // retrieve the original entities
    Standard standard = (Standard) this.getContext()
        .getAttributeFromSession("standard");
    AcademicYear academicYear = this.standardService
        .getAcademicYearsById(this.academicYearId);
    // update with the new values
    standard.setName(this.name);
    standard.setAcademicYear(academicYear);
    this.standardService.save(standard);
View Full Code Here

TOP

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

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.