1 | |
package org.kuali.student.r2.core.class1.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 | |
|
11 | |
@Entity |
12 | |
@Table(name = "KSEN_CHECK_RICH_TEXT") |
13 | |
public class CheckRichTextEntity extends RichTextEntity { |
14 | |
|
15 | 0 | public CheckRichTextEntity() {} |
16 | |
|
17 | 0 | public CheckRichTextEntity(String plain, String formatted){ |
18 | 0 | this.setFormatted(formatted); |
19 | 0 | this.setPlain(plain); |
20 | 0 | } |
21 | |
|
22 | 0 | public CheckRichTextEntity(RichText rt) { |
23 | 0 | if (null != rt) { |
24 | 0 | this.setFormatted(rt.getFormatted()); |
25 | 0 | this.setPlain(rt.getPlain()); |
26 | |
} |
27 | 0 | } |
28 | |
|
29 | |
public RichTextInfo toDto() { |
30 | 0 | RichTextInfo rti = new RichTextInfo(); |
31 | 0 | rti.setPlain(getPlain()); |
32 | 0 | rti.setFormatted(getFormatted()); |
33 | 0 | return rti; |
34 | |
} |
35 | |
|
36 | |
} |