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 Affiliation()
Default constructor for JPAAffiliation(AffiliationId affId)
assign an affiliationId to the current affiliation
-
Method Summary
All Methods Instance Methods Concrete Methods 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 affiliationvoid
addUser(@NonNull User user)
needed for JPA/Hibernate a user, if not null, is added to the current list of users for this affiliationboolean
equals(Object o)
boolean
getLockStatus()
Set<Solution>
getSolutions()
needed for JPA/Hibernate if the solutions set is null, a new set is initializedSet<User>
getUsers()
needed for JPA/Hibernate if the users set is null, a new set is initializedint
hashCode()
void
removeSolution(@NonNull Solution solution)
needed for JPA/Hibernate a solution, if not null, is removed from the current list of solutions for this affiliationvoid
removeUser(@NonNull User user)
needed for JPA/Hibernate a user, if not null, is removed from the current list of users for this affiliationvoid
setLockStatus(Boolean lo)
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 affiliationvoid
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
-
-
-
-
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
-
-
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
-
-
-