/** * */ package net.sourceforge.fenixedu.dataTransferObject.candidacy; import java.io.Serializable; import net.sourceforge.fenixedu.dataTransferObject.person.PersonBean; import net.sourceforge.fenixedu.domain.District; import net.sourceforge.fenixedu.domain.DistrictSubdivision; import net.sourceforge.fenixedu.domain.DomainReference; import net.sourceforge.fenixedu.domain.GrantOwnerType; import net.sourceforge.fenixedu.domain.ProfessionType; import net.sourceforge.fenixedu.domain.ProfessionalSituationConditionType; import net.sourceforge.fenixedu.domain.SchoolLevelType; import net.sourceforge.fenixedu.domain.organizationalStructure.AcademicalInstitutionType; import net.sourceforge.fenixedu.domain.organizationalStructure.Unit; import net.sourceforge.fenixedu.domain.organizationalStructure.UnitName; /** * @author - Shezad Anavarali (shezad@ist.utl.pt) * */ public class OriginInformationBean implements Serializable { /* * if foreign dislocated * * if dislocated schoolTimeDistrictSubdivisionOfResidence != null */ private Boolean dislocatedFromPermanentResidence; private DomainReference schoolTimeDistrictOfResidence;// nonpersistent private DomainReference schoolTimeDistrictSubdivisionOfResidence; private GrantOwnerType grantOwnerType; private DomainReference grantOwnerProvider; private String grantOwnerProviderName; private Integer numberOfCandidaciesToHigherSchool; private Integer numberOfFlunksOnHighSchool; private AcademicalInstitutionType highSchoolType; private SchoolLevelType motherSchoolLevel; private ProfessionType motherProfessionType; private ProfessionalSituationConditionType motherProfessionalCondition; private SchoolLevelType fatherSchoolLevel; private ProfessionType fatherProfessionType; private ProfessionalSituationConditionType fatherProfessionalCondition; private SchoolLevelType spouseSchoolLevel; private ProfessionType spouseProfessionType; private ProfessionalSituationConditionType spouseProfessionalCondition; public OriginInformationBean(PersonBean personBean) { if (personBean.hasCountryOfResidence() && !personBean.getCountryOfResidence().isDefaultCountry()) { setDislocatedFromPermanentResidence(true); } } public Boolean getDislocatedFromPermanentResidence() { return dislocatedFromPermanentResidence; } public void setDislocatedFromPermanentResidence(Boolean dislocatedFromPermanentResidence) { this.dislocatedFromPermanentResidence = dislocatedFromPermanentResidence; } public District getSchoolTimeDistrictOfResidence() { return (this.schoolTimeDistrictOfResidence != null) ? this.schoolTimeDistrictOfResidence.getObject() : null; } public void setSchoolTimeDistrictOfResidence(District district) { this.schoolTimeDistrictOfResidence = (district != null) ? new DomainReference(district) : null; } public DistrictSubdivision getSchoolTimeDistrictSubdivisionOfResidence() { return (this.schoolTimeDistrictSubdivisionOfResidence != null) ? this.schoolTimeDistrictSubdivisionOfResidence .getObject() : null; } public void setSchoolTimeDistrictSubdivisionOfResidence(DistrictSubdivision districtSubdivision) { this.schoolTimeDistrictSubdivisionOfResidence = (districtSubdivision != null) ? new DomainReference( districtSubdivision) : null; } public GrantOwnerType getGrantOwnerType() { return grantOwnerType; } public void setGrantOwnerType(GrantOwnerType grantOwnerType) { this.grantOwnerType = grantOwnerType; } public Unit getGrantOwnerProvider() { return (this.grantOwnerProvider != null) ? this.grantOwnerProvider.getObject() : null; } public void setGrantOwnerProvider(Unit grantOwnerProvider) { this.grantOwnerProvider = (grantOwnerProvider != null) ? new DomainReference(grantOwnerProvider) : null; } public String getGrantOwnerProviderName() { return grantOwnerProviderName; } public void setGrantOwnerProviderName(String grantOwnerProviderName) { this.grantOwnerProviderName = grantOwnerProviderName; } public UnitName getGrantOwnerProviderUnitName() { return (grantOwnerProvider == null) ? null : grantOwnerProvider.getObject().getUnitName(); } public void setGrantOwnerProviderUnitName(UnitName grantOwnerProviderUnitName) { this.grantOwnerProvider = (grantOwnerProviderUnitName == null) ? null : new DomainReference( grantOwnerProviderUnitName.getUnit()); } public Integer getNumberOfCandidaciesToHigherSchool() { return numberOfCandidaciesToHigherSchool; } public void setNumberOfCandidaciesToHigherSchool(Integer numberOfCandidaciesToHigherSchool) { this.numberOfCandidaciesToHigherSchool = numberOfCandidaciesToHigherSchool; } public Integer getNumberOfFlunksOnHighSchool() { return numberOfFlunksOnHighSchool; } public void setNumberOfFlunksOnHighSchool(Integer numberOfFlunksOnHighSchool) { this.numberOfFlunksOnHighSchool = numberOfFlunksOnHighSchool; } public AcademicalInstitutionType getHighSchoolType() { return highSchoolType; } public void setHighSchoolType(AcademicalInstitutionType highSchoolType) { this.highSchoolType = highSchoolType; } public SchoolLevelType getMotherSchoolLevel() { return motherSchoolLevel; } public void setMotherSchoolLevel(SchoolLevelType motherSchoolLevel) { this.motherSchoolLevel = motherSchoolLevel; } public ProfessionType getMotherProfessionType() { return motherProfessionType; } public void setMotherProfessionType(ProfessionType motherProfessionType) { this.motherProfessionType = motherProfessionType; } public ProfessionalSituationConditionType getMotherProfessionalCondition() { return motherProfessionalCondition; } public void setMotherProfessionalCondition(ProfessionalSituationConditionType motherProfessionalCondition) { this.motherProfessionalCondition = motherProfessionalCondition; } public SchoolLevelType getFatherSchoolLevel() { return fatherSchoolLevel; } public void setFatherSchoolLevel(SchoolLevelType fatherSchoolLevel) { this.fatherSchoolLevel = fatherSchoolLevel; } public ProfessionType getFatherProfessionType() { return fatherProfessionType; } public void setFatherProfessionType(ProfessionType fatherProfessionType) { this.fatherProfessionType = fatherProfessionType; } public ProfessionalSituationConditionType getFatherProfessionalCondition() { return fatherProfessionalCondition; } public void setFatherProfessionalCondition(ProfessionalSituationConditionType fatherProfessionalCondition) { this.fatherProfessionalCondition = fatherProfessionalCondition; } public SchoolLevelType getSpouseSchoolLevel() { return spouseSchoolLevel; } public void setSpouseSchoolLevel(SchoolLevelType spouseSchoolLevel) { this.spouseSchoolLevel = spouseSchoolLevel; } public ProfessionType getSpouseProfessionType() { return spouseProfessionType; } public void setSpouseProfessionType(ProfessionType spouseProfessionType) { this.spouseProfessionType = spouseProfessionType; } public ProfessionalSituationConditionType getSpouseProfessionalCondition() { return spouseProfessionalCondition; } public void setSpouseProfessionalCondition(ProfessionalSituationConditionType spouseProfessionalCondition) { this.spouseProfessionalCondition = spouseProfessionalCondition; } }