Class Affiliation

    • Constructor Detail

      • Affiliation

        public Affiliation()
        Default constructor for JPA
      • Affiliation

        public Affiliation​(AffiliationId affId)
        assign an affiliationId to the current affiliation
        Parameters:
        affId -
    • Method Detail

      • getLockStatus

        public boolean getLockStatus()
        Returns:
        true if the affiliation is locked, false if still ok
      • setLockStatus

        public void setLockStatus​(Boolean lo)
        Parameters:
        lo - : lock or unlock the current affiliation
      • addSolution

        public void addSolution​(@NonNull
                                @NonNull Solution solution)
        needed for JPA/Hibernate a solution, if not null, is added to the current list of solutions for this affiliation
        Parameters:
        solution -
      • removeSolution

        public void removeSolution​(@NonNull
                                   @NonNull Solution solution)
        needed for JPA/Hibernate a solution, if not null, is removed from the current list of solutions for this affiliation
        Parameters:
        solution -
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getSolutions

        public Set<Solution> getSolutions()
        needed for JPA/Hibernate if the solutions set is null, a new set is initialized
        Returns:
        the current list (set) of solutions for this affiliation
      • getUsers

        public Set<User> getUsers()
        needed for JPA/Hibernate if the users set is null, a new set is initialized
        Returns:
        the current list (set) of users for this affiliation
      • setSolutions

        public void setSolutions​(@NonNull
                                 @NonNull Set<Solution> solutions)
        needed for JPA/Hibernate if the solutions set is null, a new set is initialized, else, it re-uses the previous object then updates the current list (set) of solutions for this affiliation
        Parameters:
        solutions - the new list(set) of solutions for this affiliation
      • setUsers

        public void setUsers​(@NonNull
                             @NonNull Set<User> users)
        needed for JPA/Hibernate if the users set is null, a new set is initialized, else, it re-uses the previous object then updates the current list (set) of users for this affiliation
        Parameters:
        users - the new list(set) of users for this affiliation
      • addUser

        public void addUser​(@NonNull
                            @NonNull User user)
        needed for JPA/Hibernate a user, if not null, is added to the current list of users for this affiliation
        Parameters:
        user -
      • removeUser

        public void removeUser​(@NonNull
                               @NonNull User user)
        needed for JPA/Hibernate a user, if not null, is removed from the current list of users for this affiliation
        Parameters:
        user -