Package org.fenixedu.academic.domain.contacts

Examples of org.fenixedu.academic.domain.contacts.PhysicalAddress


    }

    public PhysicalAddress getUpdatableAddress() {
        List<? extends PartyContact> partyContacts = getStudent().getPerson().getPartyContacts(PhysicalAddress.class);
        for (int i = 0; i < partyContacts.size(); i++) {
            PhysicalAddress address = (PhysicalAddress) partyContacts.get(i);
            if (!address.isDefault()) {
                return address;
            }
        }

        return null;
View Full Code Here


            setParishOfBirth(person.getParishOfBirth());
            setDistrictOfBirth(person.getDistrictOfBirth());
            setDistrictSubdivisionOfBirth(person.getDistrictSubdivisionOfBirth());

            if (person.hasDefaultPhysicalAddress()) {
                final PhysicalAddress physicalAddress = person.getDefaultPhysicalAddress();
                setParishOfResidence(physicalAddress.getParishOfResidence());
                setDistrictSubdivisionOfResidence(physicalAddress.getDistrictSubdivisionOfResidence());
                setDistrictOfResidence(physicalAddress.getDistrictOfResidence());
            }

            setMobile(person.hasDefaultMobilePhone() ? person.getDefaultMobilePhone().getNumber() : null);
            setWebAddress(person.hasDefaultWebAddress() ? person.getDefaultWebAddress().getUrl() : null);
            setEmailAvailable(person.getAvailableEmail());
View Full Code Here

        setDocumentIdNumber(person.getDocumentIdNumber());
        setIdDocumentType(person.getIdDocumentType());
        setSocialSecurityNumber(person.getSocialSecurityNumber());

        if (person.hasDefaultPhysicalAddress()) {
            final PhysicalAddress physicalAddress = person.getDefaultPhysicalAddress();
            setAddress(physicalAddress.getAddress());
            setArea(physicalAddress.getArea());
            setAreaCode(physicalAddress.getAreaCode());
            setAreaOfAreaCode(physicalAddress.getAreaOfAreaCode());
            setParishOfResidence(physicalAddress.getParishOfResidence());
            setDistrictSubdivisionOfResidence(physicalAddress.getDistrictSubdivisionOfResidence());
            setDistrictOfResidence(physicalAddress.getDistrictOfResidence());
            setCountryOfResidence(physicalAddress.getCountryOfResidence());
        }

        setPhone(person.hasDefaultPhone() ? person.getDefaultPhone().getNumber() : null);
        setMobile(person.hasDefaultMobilePhone() ? person.getDefaultMobilePhone().getNumber() : null);
        setWebAddress(person.hasDefaultWebAddress() ? person.getDefaultWebAddress().getUrl() : null);
View Full Code Here

        if (alumniBean.getCurrentPhysicalAddress() == null) {
            PhysicalAddress.createPhysicalAddress(person,
                    new PhysicalAddressData(addressBean.getAddress(), addressBean.getAreaCode(), addressBean.getAreaOfAreaCode(),
                            null), PartyContactType.PERSONAL, false);
        } else {
            PhysicalAddress address = alumniBean.getCurrentPhysicalAddress();
            address.setAddress(addressBean.getAddress());
            address.setAreaCode(addressBean.getAreaCode());
            address.setAreaOfAreaCode(addressBean.getAreaOfAreaCode());
            address.setCountryOfResidence(addressBean.getCountry());
        }
    }
View Full Code Here

    public void setDefaultPhysicalAddressData(final PhysicalAddressData data) {
        setDefaultPhysicalAddressData(data, false);
    }

    public void setDefaultPhysicalAddressData(final PhysicalAddressData data, final boolean valid) {
        PhysicalAddress defaultPhysicalAddress;
        if (hasDefaultPhysicalAddress()) {
            defaultPhysicalAddress = getDefaultPhysicalAddress();
            defaultPhysicalAddress.edit(data);
        } else {
            defaultPhysicalAddress = PhysicalAddress.createPhysicalAddress(this, data, PartyContactType.PERSONAL, true);
        }
        if (valid) {
            defaultPhysicalAddress.setValid();
        }
    }
View Full Code Here

            defaultPhysicalAddress.setValid();
        }
    }

    private PhysicalAddress getOrCreateDefaultPhysicalAddress() {
        final PhysicalAddress physicalAdress = getDefaultPhysicalAddress();
        return physicalAdress != null ? physicalAdress : PhysicalAddress.createPhysicalAddress(this, null,
                PartyContactType.PERSONAL, true);
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.contacts.PhysicalAddress

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.