Class Affiliation
java.lang.Object
de.fraunhofer.iese.mydata.common.MyDataEntity
de.fraunhofer.iese.mydata.affiliation.Affiliation
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for JPAAffiliation(AffiliationId affId) assign an affiliationId to the current affiliation -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSolution(@NonNull Solution solution) needed for JPA/Hibernate a solution, if not null, is added to the current list of solutions for this affiliationvoidneeded for JPA/Hibernate a user, if not null, is added to the current list of users for this affiliationbooleanbooleanneeded for JPA/Hibernate if the solutions set is null, a new set is initializedgetUsers()needed for JPA/Hibernate if the users set is null, a new set is initializedinthashCode()voidremoveSolution(@NonNull Solution solution) needed for JPA/Hibernate a solution, if not null, is removed from the current list of solutions for this affiliationvoidremoveUser(@NonNull User user) needed for JPA/Hibernate a user, if not null, is removed from the current list of users for this affiliationvoidsetLockStatus(Boolean lo) voidsetSolutions(@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 affiliationvoidneeded 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 affiliationMethods inherited from class de.fraunhofer.iese.mydata.common.MyDataEntity
fromJson, getGson, getGson, toJson, toString, validate, validateAndNullCheck
-
Constructor Details
-
Affiliation
public Affiliation()Default constructor for JPA -
Affiliation
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
- Parameters:
lo- : lock or unlock the current affiliation
-
addSolution
needed for JPA/Hibernate a solution, if not null, is added to the current list of solutions for this affiliation- Parameters:
solution-
-
removeSolution
needed for JPA/Hibernate a solution, if not null, is removed from the current list of solutions for this affiliation- Parameters:
solution-
-
equals
-
hashCode
public int hashCode() -
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
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
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
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
needed for JPA/Hibernate a user, if not null, is added to the current list of users for this affiliation- Parameters:
user-
-
removeUser
needed for JPA/Hibernate a user, if not null, is removed from the current list of users for this affiliation- Parameters:
user-
-