Package net.sf.esims.model.entity

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


 
  public static ReceivedApplicationFormEssence createRAEssence(){
   
    AcademicYear academicYear = UtilsForTestCases.createValidAcademicYearWithId();
   
    ReceivedApplicationFormEssence essence = new ReceivedApplicationFormEssence();
   
    essence.setAcademicYear(academicYear);
    essence.setBelowPovertyLine(Boolean.TRUE);
    essence.setCaste("Kappiri");
   
   
    Date dateOfBirthCal = EsimsUtils.createDate(2, Calendar.DECEMBER, 1980);
    essence.setDateOfBirth(dateOfBirthCal);
   
    essence.setFatherFirstName("FatherFN");
    essence.setFatherMiddleName("FatherMN");
    essence.setFatherLastName("FatherLN");
   
    essence.setFirstName("AppFN");
    essence.setFormIssuedOn(new Date());
    essence.setFormFilledOn(new Date());
    essence.setFormReceivedOn(new Date());
   
    essence.setFormNumber("2007-35");
   
    essence.setGender("M");
    essence.setGrossHouseHoldIncome(new Float(1000));
   
    essence.setLastName("AppLN");
   
    essence.setMiddleName("AppMN");
    essence.setMotherFirstName("MotherFN");
    essence.setMotherMiddleName("MotherMN");
    essence.setMotherLastName("MotherLN");
   
    essence.setNationality("Indian");
    essence.setMotherTounge("malayalam");
   
    essence.setOtherBackwardCaste(Boolean.FALSE);
    essence.setPermanentHouseNameOrNumber("#3");
    essence.setPermanentPhoneNumber("914772702176");
    essence.setPermanentPinCode("688504");
    essence.setPermanentState("Karantaka");
    essence.setPermanentStreet("na");
    essence.setPermanentVillageOrTownOrCity("kemmanagudi");
    essence.setPlaceOfBirth("Ooty");
   
 
   
    essence.setPreviousSchoolIfAny("none");
    essence.setReligion("hindu");
    essence.setScheduledCasteOrTribe(Boolean.TRUE);
   
    essence.setSubcaste("muttaal");
   
    return essence;
  }
View Full Code Here


   */
 
  public static StudentDetails createStudentDetailsForTest(){
    StudentDetails details = new StudentDetails();
   
    ReceivedApplicationFormEssence essence = createRAEssence();
   
    details.setAcademicAchievements("1st in first standard");
   
    details.setBelowPovertyLine(essence.getBelowPovertyLine());
    details.setCaste(essence.getCaste());
    details.setDateOfBirth(essence.getDateOfBirth());
    details.setFatherFirstName(essence.getFatherFirstName());
    details.setFatherMiddleName(essence.getFatherMiddleName());
    details.setFatherLastName(essence.getFatherLastName());
    details.setFirstName(essence.getFirstName());
    details.setFormNumber(essence.getFormNumber());
    details.setGender(essence.getGender());
    details.setGrossHouseHoldIncome(essence.getGrossHouseHoldIncome());
    details.setLastName(essence.getLastName());
    details.setLocalGuardianFirstName("localfn");
    details.setLocalGuardianLastName("localGuardianLastName");
    details.setLocalGuardianMiddleName("localGuardianMiddleName");
    details.setMiddleName(essence.getMiddleName());
    details.setMotherFirstName(essence.getMotherFirstName());
    details.setMotherLastName(essence.getMotherLastName());
    details.setMotherMiddleName(essence.getMotherMiddleName());
    details.setMotherTounge(essence.getMotherTounge());
    details.setNationality(essence.getNationality());
    details.setNonAcademicAchievements("Ran fastest in 1st stnadard");
    details.setOtherBackwardCaste(Boolean.FALSE);
    details.setPermanentHouseNameOrNumber(essence.getPermanentHouseNameOrNumber());
    details.setPermanentPhoneNumber(essence.getPermanentPhoneNumber());
    details.setPermanentPinCode(essence.getPermanentPinCode());
    details.setPermanentState(essence.getPermanentState());
    details.setPermanentStreet(essence.getPermanentStreet());
    details.setPermanentVillageOrTownOrCity(essence.getPermanentVillageOrTownOrCity());
    details.setPlaceOfBirth(essence.getPlaceOfBirth());
    details.setPresentHouseNameOrNumber("presentHouseNameOrNumber");
    details.setPresentPhoneNumber("1231231231");
    details.setPresentPinCode("688594");
    details.setPresentState("presentState");
    details.setPresentStreet("presentStreet");
    details.setPresentVillageOrTownOrCity("presentVillageOrTownOrCity");
    details.setReligion(essence.getReligion());
    details.setScheduledCasteOrTribe(essence.getScheduledCasteOrTribe());
    details.setSubcaste(essence.getSubcaste());
    return details;
  }
View Full Code Here

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

    ReceivedApplicationFormEssence applicationFormEssence = this
        .setPropertiesToEssence();
    ReceivedApplicationForm receivedApplicationForm = applicationFormEssence
        .createReceivedApplicationForm();
    // check for duplicate submission and save
    if (this.receivedApplicationFormService
        .checkForDuplicate(receivedApplicationForm)) {
      message = EsimsUtils.createWarnMessage(this.getContext()
View Full Code Here

  }

  // helper method for creating essence

  private ReceivedApplicationFormEssence setPropertiesToEssence() {
    ReceivedApplicationFormEssence applicationFormEssence = new ReceivedApplicationFormEssence();

    AcademicYear academicYear = this.academicYearService
        .getById(this.academicYearId);
    applicationFormEssence.setAcademicYear(academicYear);

   
    applicationFormEssence.setBelowPovertyLine(this.belowPovertyLine);
    applicationFormEssence.setCaste(this.caste);
    applicationFormEssence.setDateOfBirth(this.dateOfBirth);
    applicationFormEssence.setFatherFirstName(this.fatherFirstName);
    applicationFormEssence.setFatherLastName(this.fatherLastName);
    applicationFormEssence.setFatherMiddleName(this.fatherMiddleName);
    applicationFormEssence.setFirstName(this.firstName);
    applicationFormEssence.setFormFilledOn(this.formFilledOn);
    applicationFormEssence.setFormIssuedOn(this.formIssuedOn);
    applicationFormEssence.setFormNumber(this.formNumber);
    applicationFormEssence.setFormReceivedOn(this.formReceivedOn);
    applicationFormEssence.setGender(this.gender);
    applicationFormEssence
        .setGrossHouseHoldIncome(this.grossHouseHoldIncome);
    applicationFormEssence.setLastName(this.lastName);

    applicationFormEssence.setMiddleName(this.middleName);
    applicationFormEssence.setMotherFirstName(this.motherFirstName);
    applicationFormEssence.setMotherLastName(this.motherLastName);
    applicationFormEssence.setMotherMiddleName(this.motherMiddleName);
    applicationFormEssence.setMotherTounge(this.motherTounge);
    applicationFormEssence.setNationality(this.nationality);

    applicationFormEssence.setOtherBackwardCaste(this.otherBackwardCaste);
    applicationFormEssence
        .setPermanentHouseNameOrNumber(this.permanentHouseNameOrNumber);
    applicationFormEssence
        .setPermanentPhoneNumber(this.permanentPhoneNumber);
    applicationFormEssence.setPermanentPinCode(this.permanentPinCode);
    applicationFormEssence.setPermanentState(this.permanentState);
    applicationFormEssence.setPermanentStreet(this.permanentStreet);
    applicationFormEssence
        .setPermanentVillageOrTownOrCity(this.permanentVillageOrTownOrCity);
    applicationFormEssence.setPlaceOfBirth(this.placeOfBirth);

    applicationFormEssence.setReligion(this.religion);
    applicationFormEssence
        .setScheduledCasteOrTribe(this.scheduledCasteOrTribe);
    applicationFormEssence.setSubcaste(this.subcaste);

    return applicationFormEssence;
  }
View Full Code Here

    AcademicYear academicYear = new  AcademicYear("2006-2007",school,d1,d2,"active");
    this.academicYearDAO.save(academicYear);
   
    this.academicYearDAO.save(academicYear);
    //saving valid instance
    ReceivedApplicationFormEssence essence = createValidInstance();
    essence.setAcademicYear(academicYear);
   
    ReceivedApplicationForm form = essence.createReceivedApplicationForm();
    receivedApplicationFormDAO.save(form);
    form = receivedApplicationFormDAO.get(form.getId());
    assertNotNull(form);
    DatabaseOperation.DELETE_ALL.execute(connection, receivedApplicationFormDataSet);
    DatabaseOperation.DELETE_ALL.execute(connection, academicYearDataSet);
View Full Code Here

    Date d2 = EsimsUtils.createDate(13, Calendar.MARCH, 2008);   
   
    AcademicYear academicYear = new  AcademicYear("2006-2007",school,d1,d2,"active");
    this.academicYearDAO.save(academicYear);
   
    ReceivedApplicationFormEssence essence = createValidInstance();
    essence.setAcademicYear(academicYear);
    ReceivedApplicationForm form = essence.createReceivedApplicationForm();
    receivedApplicationFormDAO.save(form);
    form = receivedApplicationFormDAO.get(form.getId());
    receivedApplicationFormDAO.delete(form);
    List<ReceivedApplicationForm> listOfForms = receivedApplicationFormDAO.getAll();
    assertEquals(0, listOfForms.size());
View Full Code Here

    Date d2 = EsimsUtils.createDate(13, Calendar.MARCH, 2008);   
   
    AcademicYear academicYear = new  AcademicYear("2006-2007",school,d1,d2,"active");
    this.academicYearDAO.save(academicYear);
   
    ReceivedApplicationFormEssence essence = createValidInstance();
    essence.setAcademicYear(academicYear);
    ReceivedApplicationForm form = essence.createReceivedApplicationForm();
    receivedApplicationFormDAO.save(form);
   
    form = receivedApplicationFormDAO.get(form.getId());
    assertNotNull(form);
   
View Full Code Here

    academicYearDataSet = getDataSet("academicYearDataSet.xml");
    receivedApplicationFormDataSet = getDataSet("receivedApplicationFormDataSet.xml");
  }

  private ReceivedApplicationFormEssence createValidInstance(){
    ReceivedApplicationFormEssence essence = new ReceivedApplicationFormEssence();
   
   
    essence.setBelowPovertyLine(Boolean.TRUE);
    essence.setCaste("Kappiri");
   
    Calendar dateOfBirthCal = Calendar.getInstance();
    dateOfBirthCal.set(Calendar.DAY_OF_MONTH, 3);
    dateOfBirthCal.set(Calendar.MONTH, Calendar.DECEMBER);
    dateOfBirthCal.set(Calendar.YEAR, 1980);
    essence.setDateOfBirth(dateOfBirthCal.getTime());
   
    essence.setFatherFirstName("FatherFN");
    essence.setFatherMiddleName("FatherMN");
    essence.setFatherLastName("FatherLN");
   
    essence.setFirstName("AppFN");
    essence.setFormIssuedOn(new Date());
    essence.setFormFilledOn(new Date());
    essence.setFormReceivedOn(new Date());
   
    essence.setFormNumber("2007-35");
   
    essence.setGender("M");
    essence.setGrossHouseHoldIncome(new Float(1000));
   
    essence.setLastName("AppLN");
   
    essence.setMiddleName("AppMN");
    essence.setMotherFirstName("MotherFN");
    essence.setMotherMiddleName("MotherMN");
    essence.setMotherLastName("MotherLN");
   
    essence.setMotherTounge("Malayalam");
    essence.setNationality("Indian");
   
    essence.setOtherBackwardCaste(Boolean.FALSE);
    essence.setPermanentHouseNameOrNumber("#3");
    essence.setPermanentPhoneNumber("914772702176");
    essence.setPermanentPinCode("688504");
    essence.setPermanentState("Karantaka");
    essence.setPermanentStreet("na");
    essence.setPermanentVillageOrTownOrCity("kemmanagudi");
    essence.setPlaceOfBirth("Ooty");
   
   
   
    essence.setPreviousSchoolIfAny("none");
    essence.setReligion("hindu");
    essence.setScheduledCasteOrTribe(Boolean.TRUE);
   
    essence.setSubcaste("muttaal");
   
    return essence;
  }
View Full Code Here

TOP

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

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.