1 | |
package org.kuali.student.r2.core.process.model; |
2 | |
|
3 | |
import org.kuali.student.r2.common.dto.RichTextInfo; |
4 | |
import org.kuali.student.r2.common.entity.RichTextEntity; |
5 | |
import org.kuali.student.r2.common.infc.RichText; |
6 | |
|
7 | |
import javax.persistence.Entity; |
8 | |
import javax.persistence.Table; |
9 | |
|
10 | |
@Entity |
11 | |
@Table(name = "KSEN_INSTR_MESSAGE") |
12 | |
public class InstructionMessageEntity extends RichTextEntity { |
13 | |
|
14 | 0 | public InstructionMessageEntity() { |
15 | |
|
16 | 0 | } |
17 | |
|
18 | 0 | public InstructionMessageEntity(String plain, String formatted){ |
19 | 0 | this.setFormatted(formatted); |
20 | 0 | this.setPlain(plain); |
21 | 0 | } |
22 | |
|
23 | 0 | public InstructionMessageEntity(RichText rt) { |
24 | 0 | if (null != rt) { |
25 | 0 | this.setFormatted(rt.getFormatted()); |
26 | 0 | this.setPlain(rt.getPlain()); |
27 | |
} |
28 | 0 | } |
29 | |
|
30 | |
public RichTextInfo toDto() { |
31 | 0 | RichTextInfo rti = new RichTextInfo(); |
32 | 0 | rti.setPlain(getPlain()); |
33 | 0 | rti.setFormatted(getFormatted()); |
34 | 0 | return rti; |
35 | |
} |
36 | |
|
37 | |
} |