public Person createPerson(Person toCreate)
			throws PersonEntityExistsException, PersonPasswordException,
			PersonEmailException {
		String email = toCreate.getEmail();
		if (email == null || email.trim().length() == 0) {
			throw new PersonEmailException("Length is zero");
		}
		String password = toCreate.getPassword();
		if (password == null || password.length() < 6) {
			throw new PersonPasswordException("Length is less than 6");
		}
		if (getPerson(email) != null) {
			throw new PersonEntityExistsException(
					"Person record already exists with an email of "
							+ toCreate.getEmail());
		}
		em.persist(toCreate);
		return toCreate;
	}