Adds a description to the Role class.
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4319 8810af33-2d31-482b-a856-94f89814c4dfpull/2/head
parent
2e868a697b
commit
ac46ffb059
|
|
@ -22,6 +22,7 @@ import static org.libreccm.core.CoreConstants.*;
|
|||
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import org.libreccm.core.DefaultEntityGraph;
|
||||
import org.libreccm.l10n.LocalizedString;
|
||||
import org.libreccm.workflow.TaskAssignment;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -145,6 +146,13 @@ public class Role implements Serializable {
|
|||
@OneToMany(mappedBy = "role")
|
||||
private List<TaskAssignment> assignedTasks;
|
||||
|
||||
/**
|
||||
* An optional description for a role.
|
||||
*/
|
||||
@Column(name = "DESCRIPTION", length = 2048)
|
||||
@XmlElement(name = "description", namespace = CORE_XML_NS)
|
||||
private LocalizedString description;
|
||||
|
||||
public Role() {
|
||||
super();
|
||||
}
|
||||
|
|
@ -225,6 +233,14 @@ public class Role implements Serializable {
|
|||
assignedTasks.remove(taskAssignment);
|
||||
}
|
||||
|
||||
public void setDescription(final LocalizedString description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public LocalizedString getDescription() {
|
||||
return this.description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 7;
|
||||
|
|
|
|||
Loading…
Reference in New Issue