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