Examples of PersonNotFoundException


Examples of org.fenixedu.academic.domain.phd.migration.common.exceptions.PersonNotFoundException

    public Person getPerson(String identification) {
        Teacher teacher = User.findByUsername(identification).getPerson().getTeacher();

        if (teacher == null) {
            throw new PersonNotFoundException();
        }

        return teacher.getPerson();
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.migration.common.exceptions.PersonNotFoundException

        // Get by identification number
        final Collection<Person> personSet = Person.readByDocumentIdNumber(getPersonalBean().getIdentificationNumber());
        final Collection<Person> personNamesSet = Person.findPerson(getPersonalBean().getFullName());

        if (personSet.isEmpty() && personNamesSet.isEmpty()) {
            throw new PersonNotFoundException();
        }

        if (personSet.size() > 1) {
            throw new MultiplePersonFoundByDocumentIdException(getPersonalBean().getIdentificationNumber());
        }
View Full Code Here

Examples of org.fenixedu.academic.domain.phd.migration.common.exceptions.PersonNotFoundException

        if (!possiblePersonSet.isEmpty()) {
            throw new PossiblePersonCandidatesException(possiblePersonSet);
        }

        throw new PersonNotFoundException();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.