Class TeamRole
- java.lang.Object
-
- ch.colabproject.colab.api.model.team.TeamRole
-
- All Implemented Interfaces:
ColabEntity
,WithDeletionStatus
,WithPermission
,WithTrackingData
,WithWebsocketChannels
,WithId
,WithJsonDiscriminator
,Serializable
@Entity public class TeamRole extends Object implements ColabEntity, WithWebsocketChannels
A role within the development team. A role is used to group several member sharing same skills or objective within the project.- Author:
- maxence
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TeamRole()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
List<Assignment>
getAssignments()
Get the list of assignmentsChannelsBuilders.ChannelsBuilder
getChannelsBuilder()
Get the channels this entity shall be sent through.DeletionStatus
getDeletionStatus()
Get the deletion status :Long
getId()
List<TeamMember>
getMembers()
Get membersString
getName()
Get role nameProject
getProject()
Long
getProjectId()
get the project id.Conditions.Condition
getReadCondition()
Get the condition required to read this entityTracking
getTrackingData()
Get the tracking dataConditions.Condition
getUpdateCondition()
Get the condition required to update this entityint
hashCode()
void
mergeToUpdate(ColabEntity other)
Update this object according to values provided by other.void
setAssignments(List<Assignment> assignments)
Set the list of assignmentsvoid
setDeletionStatus(DeletionStatus status)
Set the deletion status :void
setId(Long id)
Set idvoid
setMembers(List<TeamMember> members)
Set the list of membersvoid
setName(String name)
Set the namevoid
setProject(Project project)
void
setProjectId(Long id)
set the project id.void
setTrackingData(Tracking trackingData)
Set tracking dataString
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ch.colabproject.colab.api.model.ColabEntity
mergeToDuplicate
-
Methods inherited from interface ch.colabproject.colab.generator.model.interfaces.WithJsonDiscriminator
getJsonDiscriminator
-
Methods inherited from interface ch.colabproject.colab.api.model.WithPermission
getCreateCondition, getDeleteCondition
-
Methods inherited from interface ch.colabproject.colab.api.model.WithTrackingData
initErasureTrackingData, resetErasureTrackingData, touch
-
Methods inherited from interface ch.colabproject.colab.api.model.WithWebsocketChannels
getIndexEntryPayload
-
-
-
-
Method Detail
-
setId
public void setId(Long id)
Set id- Parameters:
id
- id
-
getTrackingData
public Tracking getTrackingData()
Get the tracking data- Specified by:
getTrackingData
in interfaceWithTrackingData
- Returns:
- tracking data
-
setTrackingData
public void setTrackingData(Tracking trackingData)
Set tracking data- Specified by:
setTrackingData
in interfaceWithTrackingData
- Parameters:
trackingData
- new tracking data
-
getDeletionStatus
public DeletionStatus getDeletionStatus()
Description copied from interface:WithDeletionStatus
Get the deletion status :Is it in a bin or ready to be definitely deleted.
Null means active.
- Specified by:
getDeletionStatus
in interfaceWithDeletionStatus
- Returns:
- null or a deletion status
-
setDeletionStatus
public void setDeletionStatus(DeletionStatus status)
Description copied from interface:WithDeletionStatus
Set the deletion status :Is it in a bin or ready to be definitely deleted.
Null means active.
- Specified by:
setDeletionStatus
in interfaceWithDeletionStatus
- Parameters:
status
- null or a deletion status
-
getName
public String getName()
Get role name- Returns:
- the name
-
setName
public void setName(String name)
Set the name- Parameters:
name
- new role name
-
getProject
public Project getProject()
- Returns:
- the project
-
setProject
public void setProject(Project project)
- Parameters:
project
- the project
-
getProjectId
public Long getProjectId()
get the project id. To be sent to client- Returns:
- id of the project or null
-
setProjectId
public void setProjectId(Long id)
set the project id. For serialization only- Parameters:
id
- the id of the project
-
getMembers
public List<TeamMember> getMembers()
Get members- Returns:
- members
-
setMembers
public void setMembers(List<TeamMember> members)
Set the list of members- Parameters:
members
- list of members
-
getAssignments
public List<Assignment> getAssignments()
Get the list of assignments- Returns:
- assignments list
-
setAssignments
public void setAssignments(List<Assignment> assignments)
Set the list of assignments- Parameters:
assignments
- new list of assignments
-
mergeToUpdate
public void mergeToUpdate(ColabEntity other) throws ColabMergeException
Description copied from interface:ColabEntity
Update this object according to values provided by other.This is used when an object is prepared to be updated in database.
- Specified by:
mergeToUpdate
in interfaceColabEntity
- Parameters:
other
- object to take new values from- Throws:
ColabMergeException
- if merging is not possible
-
getChannelsBuilder
public ChannelsBuilders.ChannelsBuilder getChannelsBuilder()
Description copied from interface:WithWebsocketChannels
Get the channels this entity shall be sent through.- Specified by:
getChannelsBuilder
in interfaceWithWebsocketChannels
- Returns:
- list of channels
-
getReadCondition
public Conditions.Condition getReadCondition()
Description copied from interface:WithPermission
Get the condition required to read this entity- Specified by:
getReadCondition
in interfaceWithPermission
- Returns:
- the condition
-
getUpdateCondition
public Conditions.Condition getUpdateCondition()
Description copied from interface:WithPermission
Get the condition required to update this entity- Specified by:
getUpdateCondition
in interfaceWithPermission
- Returns:
- the condition
-
-