Class Affiliation

java.lang.Object
de.fraunhofer.iese.mydata.common.MyDataEntity
de.fraunhofer.iese.mydata.affiliation.Affiliation

@Entity public class Affiliation extends MyDataEntity
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for JPA
    assign an affiliationId to the current affiliation
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addSolution(@NonNull Solution solution)
    needed for JPA/Hibernate a solution, if not null, is added to the current list of solutions for this affiliation
    void
    addUser(@NonNull User user)
    needed for JPA/Hibernate a user, if not null, is added to the current list of users for this affiliation
    boolean
     
    boolean
     
    needed for JPA/Hibernate if the solutions set is null, a new set is initialized
    needed for JPA/Hibernate if the users set is null, a new set is initialized
    int
     
    void
    removeSolution(@NonNull Solution solution)
    needed for JPA/Hibernate a solution, if not null, is removed from the current list of solutions for this affiliation
    void
    removeUser(@NonNull User user)
    needed for JPA/Hibernate a user, if not null, is removed from the current list of users for this affiliation
    void
     
    void
    setSolutions(@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
    void
    setUsers(@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

    Methods inherited from class de.fraunhofer.iese.mydata.common.MyDataEntity

    fromJson, getGson, getGson, toJson, toString, validate, validateAndNullCheck

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Affiliation

      public Affiliation()
      Default constructor for JPA
    • Affiliation

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

    • 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 -
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • 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 -