Package net.sf.esims.exception

Examples of net.sf.esims.exception.BusinessRuleException


    return individualExams;
  }

  public void setIndividualExams(Set<IndividualExam> individualExams) {
    if (individualExams == null)
      throw new BusinessRuleException(
          "An exam cannot have a null list of Individual exams");
    this.individualExams = individualExams;
  }
View Full Code Here


    return standard;
  }

  public void setStandard(Standard standard) {
    if (standard == null)
      throw new BusinessRuleException(
          "The standard associated with an Exam cannot be null");
    if (standard.getStandardId() == null)
      throw new BusinessRuleException(
          "The standard associated with an Exam cannot have a null ID");
    this.standard = standard;
  }
View Full Code Here

    this.applicationFormNumber = applicationFormNumber;
  }

  public void setDivision(Division division) {
    if(division == null)
      throw new BusinessRuleException("A student cannot be assigned a null division");
    this.division = division;
  }
View Full Code Here

    this.division = division;
  }

  public void setStandard(Standard standard) {
    if(standard == null)
      throw new BusinessRuleException("A student cannot be assigned a null standard");
    this.standard = standard;
  }
View Full Code Here

    this.standard = standard;
  }
   
  public void setStudentDetails(StudentDetails studentDetails) {
    if(studentDetails == null)
      throw new BusinessRuleException("A student must have a non-null details section");
    this.studentDetails = studentDetails;
  }
View Full Code Here

  }


  public void setDateOfAdmission(Date dateOfAdmission) {
    if(dateOfAdmission == null)
      throw new BusinessRuleException("A student must have a date of admission");
    this.dateOfAdmission = dateOfAdmission;
  }
View Full Code Here

    }

    public void setApplicantDateOfBirth(Date applicantDateOfBirth) {
      Calendar today = Calendar.getInstance();
      if(applicantDateOfBirth == null)
        throw new BusinessRuleException("Date of birth of applicant cant be empty");
      else{
       
        int currentYear = today.get(Calendar.YEAR);
        Calendar applicantBirthCal = Calendar.getInstance();
        applicantBirthCal.setTime(applicantDateOfBirth);
        int applicantBirthYear = applicantBirthCal.get(Calendar.YEAR);
        if(currentYear-applicantBirthYear < 5)
          throw new BusinessRuleException("The applicant must be atleast 5 years Old");
       
      }
      this.applicantDateOfBirth = applicantDateOfBirth;
    }
View Full Code Here

    }

    public void setApplicantFirstName(String applicantFirstName) {
      EsimsUtils.validateStrings(applicantFirstName, 32);
      if(! StringUtils.isAlpha(applicantFirstName))
        throw new BusinessRuleException("The First name of the applicant cannot contain numbers / special characters");
      this.applicantFirstName = applicantFirstName;
    }
View Full Code Here

    }

    public void setApplicantLastName(String applicantLastName) {
      EsimsUtils.validateStrings(applicantLastName, 32);
      if(! StringUtils.isAlpha(applicantLastName))
        throw new BusinessRuleException("The Last name of the applicant cannot contain numbers / special characters");
      this.applicantLastName = applicantLastName;
    }
View Full Code Here

    }

    public void setBuyerFirstName(String buyerFirstName) {
      EsimsUtils.validateStrings(buyerFirstName, 32);
      if(! StringUtils.isAlpha(buyerFirstName))
        throw new BusinessRuleException("The First name of the applicaton buyer cannot contain numbers / special characters");
      this.buyerFirstName = buyerFirstName;
    }
View Full Code Here

TOP

Related Classes of net.sf.esims.exception.BusinessRuleException

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.