Package net.sf.esims.model.entity

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


  }


  public boolean checkForDuplicate(AcademicYear academicYear) {
   
    AcademicYear academicYear2 =
      (AcademicYear)this.getSession().createCriteria(AcademicYear.class)
      .add(Expression.eq("school", academicYear.getSchool()))
      .add(Expression.eq("description", academicYear.getDescription()))
      .uniqueResult();
    if(academicYear2 == null)
View Full Code Here


          "The student was found null @ StudentService:delete");
    this.studentDAO.delete(student);
  }

  public String generateAdmissionNumber() {
    AcademicYear academicYear = this.academicYearDAO
        .getActiveAcademicYear();
    String schoolCode = academicYear.getSchool().getSchoolCode();
    String ay_code = academicYear.getDescription().substring(2, 4);

    if (this.studentDAO.getCountOfAdmissions().intValue() == 0)
      return ay_code + schoolCode + "1001";
    else
      return (ay_code + schoolCode + (1001 + this.studentDAO
View Full Code Here

    Date endDate = EsimsUtils.createDate(31, Calendar.MAY, 2008);
    SchoolEssence schoolEssence = UtilsForTestCases
        .createValidSchoolEssence();
    School school = schoolEssence.createSchool();
    this.schoolService.save(school);
    AcademicYear academicYear1 = new AcademicYear("2006-2007", school,
        startDate, endDate, "active");
    this.academicYearService.saveAcademicYear(academicYear1);
    // //cleanin up
    this.academicYearService.deleteAcademicYear(academicYear1);
    this.schoolService.delete(school);
View Full Code Here

    Date endDate = EsimsUtils.createDate(31, Calendar.MAY, 2008);
    SchoolEssence schoolEssence = UtilsForTestCases
        .createValidSchoolEssence();
    School school = schoolEssence.createSchool();
    this.schoolService.save(school);
    AcademicYear academicYear1 = new AcademicYear("2006-2007", school,
        startDate, endDate, "active");
    this.academicYearService.saveAcademicYear(academicYear1);
    academicYear1.setStatus("history");
    this.academicYearService.saveAcademicYear(academicYear1);
    this.academicYearService.deleteAcademicYear(academicYear1);
    this.schoolService.delete(school);
  }
View Full Code Here

    Date endDate = EsimsUtils.createDate(31, Calendar.MAY, 2008);
    SchoolEssence schoolEssence = UtilsForTestCases
        .createValidSchoolEssence();
    School school = schoolEssence.createSchool();
    this.schoolService.save(school);
    AcademicYear academicYear1 = new AcademicYear("2007-2008", school,
        startDate, endDate, "active");
    this.academicYearService.saveAcademicYear(academicYear1);
    List<AcademicYear> list = this.academicYearService.getAll();
    assertTrue(list.size() > 0);
    // cleaning up data
View Full Code Here

    SchoolEssence schoolEssence = UtilsForTestCases
        .createValidSchoolEssence();
    School school = schoolEssence.createSchool();
    school.setSchoolName("testSchool");
    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");
    this.academicYearService.saveAcademicYear(academicYear);
    Standard standard = new Standard("6th 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");
    this.academicYearService.saveAcademicYear(academicYear);
    Standard standard = new Standard("6th standard", academicYear);
    this.standardService.save(standard);
    // testing of various types of gets begin
View Full Code Here

    Date d1 = EsimsUtils.createDate(12, Calendar.MARCH, 2007);
    Date d2 = EsimsUtils.createDate(13, Calendar.MARCH, 2008);
    SchoolEssence essence = createValidSchoolEssence();
    School school= essence.createSchool();
    school.setSchoolId(new Long(33));
    return new AcademicYear("2007-2008",school,d1,d2,"active");
  }
View Full Code Here

   * @return valid instance of academic year , Fictious ID is assigned
   * must be used only for unit tests.
   */
 
  public static AcademicYear createValidAcademicYearWithId(){
    AcademicYear academicYear = createValidAcademicYear();
    academicYear.setAcademicYearId(new Long(54));
    return academicYear;
  }
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.