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.hibernate.validator.constraints.NotBlank;
|
||||||
import org.libreccm.core.DefaultEntityGraph;
|
import org.libreccm.core.DefaultEntityGraph;
|
||||||
|
import org.libreccm.l10n.LocalizedString;
|
||||||
import org.libreccm.workflow.TaskAssignment;
|
import org.libreccm.workflow.TaskAssignment;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -145,6 +146,13 @@ public class Role implements Serializable {
|
||||||
@OneToMany(mappedBy = "role")
|
@OneToMany(mappedBy = "role")
|
||||||
private List<TaskAssignment> assignedTasks;
|
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() {
|
public Role() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
@ -225,6 +233,14 @@ public class Role implements Serializable {
|
||||||
assignedTasks.remove(taskAssignment);
|
assignedTasks.remove(taskAssignment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setDescription(final LocalizedString description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalizedString getDescription() {
|
||||||
|
return this.description;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hash = 7;
|
int hash = 7;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue