Package net.sf.esims.model.entity

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


    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);
   
    Division division = new Division("A",standard,"paplubhai",new Integer(50),new Integer(20),new Date());
    this.divisionService.save(division);
   
View Full Code Here


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

    Standard standardToBeLinkedWith = this.divisionService
    .getStandardById(this.standardId);
    Division division = new Division(this.divisionName,
        standardToBeLinkedWith, this.teacherInCharge,
        this.maxNoOfstudents, this.minNoOfstudents, this.createdOn);
    // setting the non mandatory fields

    division.setBuildingName(this.buildingName);
    division.setLeaderBoy(this.leaderBoy);
    division.setLeaderGirl(this.leaderGirl);
    division.setNoOfBenches(this.noOfBenches);
    division.setNoOfBlackBoards(this.noOfBlackBoards);
    division.setNoOfChairs(this.noOfChairs);
    division.setNoOfDesks(this.noOfDesks);
    division.setNoOfTables(this.noOfTables);
    division.setRoomNo(this.roomNo);

    // Check if the division already exists in the system.
    Division divInSystem = this.divisionService
    .checkIfDivisionExists(division);
    if (divInSystem != null) {
      message = EsimsUtils.createWarnMessage(this.getContext()
          .getContextPath(), "<strong>The division "
          + this.divisionName + " already exists !!</strong>");
    } else {
      this.divisionService.save(division);
      message = EsimsUtils.createInfoMessage(this.getContext()
          .getContextPath(), "Division <strong>" + this.divisionName
          + "</strong> was created succesfully for "
          + standardToBeLinkedWith.getName());
    }
    this.getContext().removeAttributeFromSession("listOfStandards");

    FlashScope.getCurrent(this.getContext().getRequest(),true).put("message", message);
    return new RedirectResolution(DisplayMessageAction.class,  "forwardToMessagePage");
View Full Code Here

    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);
   
    Division division = new Division("A",standard,"paplubhai",new Integer(50),new Integer(20),new Date());
    this.divisionService.save(division);
   
View Full Code Here

    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);
   
    Division division = new Division("A",standard,"paplubhai",new Integer(50),new Integer(20),new Date());
    this.divisionService.save(division);
   
View Full Code Here

    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);
   
    Division division = new Division("A",standard,"paplubhai",new Integer(50),new Integer(20),new Date());
    this.divisionService.save(division);
   
View Full Code Here

    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);
   
    Division division = new Division("A",standard,"paplubhai",new Integer(50),new Integer(20),new Date());
    this.divisionService.save(division);
   
View Full Code Here

  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()
View Full Code Here

    String buttonName = "updateStandard";
    String buttonValue = "Save";
    this.getContext().setAttributeToSession("buttonName", buttonName);
    this.getContext().setAttributeToSession("buttonValue", buttonValue);
    // create the bean needed for pre-population
    Standard standard = this.standardService.getById(new Long(this
        .getContext().getRequest().getParameter("standardId")));
    this.getContext().setAttributeToSession("standard", standard);
    return new ForwardResolution("/WEB-INF/pages/standardDetails.jsp");

  }
View Full Code Here

  @HandlesEvent("updateStandard")
  public Resolution updateStandard() {
    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);
    message = EsimsUtils.createInfoMessage(this.getContext()
        .getContextPath(), "Standard named<strong> " + this.name
        + "</strong> was updated succesfully");
View Full Code Here

  }

  @HandlesEvent("deleteStandard")
  public Resolution deleteStandard() {
    // Deleting the standard with the passed subjectId
    Standard standard = this.standardService.getById(new Long(this
        .getContext().getRequest().getParameter("standardId")));
    this.standardService.delete(standard);

    // re populating the list of standards and showing the
    // lastest list of avaialble standards based on the search criteria
View Full Code Here

TOP

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

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.