public List<Person> getById(UUID personId) throws SQLException {
        //todo  stored procedures are outside scope of demo
        List<Person> people = new ArrayList<Person>();

        String GET_ALL_PERSON_INFO = "SELECT a.idPerson, a.firstName, a.lastName, pos.positionname, f.factoidTopic, f.factoidDesc " +
                "FROM people as a " +
                "LEFT JOIN position as pos " +
                " ON a.idPerson = pos.idPos " +
                "   JOIN factoid as f" +
                "   ON a.idPerson = f.idFactoid";

        try {
            PreparedStatement ps = conn.prepareStatement(
                        (personId != null) ? GET_ALL_PERSON_INFO + " where a.idPerson = ? " : GET_ALL_PERSON_INFO);

            if(personId != null) {
                ps.setString(1, personId.toString());
            }

            ResultSet rs = ps.executeQuery();
            try {
                while (rs.next()) {
                    Person person = new Person();
                    person.setId(UUID.fromString(rs.getString("idPerson")));
                    person.setFirstName(rs.getString("firstName"));
                    person.setLastName(rs.getString("lastName"));
                    person.setTitle(rs.getString("positionName"));
                    person.setFactoid(rs.getString("factoidTopic"));
                    person.setFactoidDesc(rs.getString("factoidDesc"));

                    people.add(person);
                }
            } finally {
                rs.close();
            }
        } catch(SQLException e){
            logger.error("SQL exception encountered while querying person. " + e.getMessage());
            throw e;
        }

        return people;
    }