Person endpoints: filterBy for all people

These are about filtering on all the people from database based on their username/displayName/number/cohort.

I have noticed that in Person model, there is no link to cohort. Is this something that we want to be implemented or we need to figure out a different way how to filter on cohort for everyone? If it's too complicated, I think we can do with the first 3 for now.

Endpoint (Method): filterByUsername

Params Type Comment
Input String username
Output List<PersonViewDTO> people
What does this method do?
  1. For this, I would use the findByUsernameLike query.

Endpoint (Method): filterByDisplayName

Params Type Comment
Input String displayName
Output List<PersonViewDTO> people
What does this method do?
  1. For this, I would use the findByDisplayNameLike query.

Endpoint (Method): filterByNumber

Params Type Comment
Input Integer number
Output List<PersonViewDTO> people
What does this method do?
  1. For this, I would use the findByNumberLike query.

Endpoint (Method): filterByCohort

Params Type Comment
Input Long cohortId
Output List<PersonViewDTO> people
What does this method do?
  1. I'm not really sure how to go about this if Person doesn't have a cohort linked to them. As I was saying above, maybe we can just do the first 3 endpoints for now and leave this for later.