1 | |
package org.kuali.student.enrollment.class1.lpr.model; |
2 | |
|
3 | |
import javax.persistence.Entity; |
4 | |
import javax.persistence.Table; |
5 | |
|
6 | |
import org.kuali.student.r2.common.dto.RichTextInfo; |
7 | |
import org.kuali.student.r2.common.entity.RichTextEntity; |
8 | |
import org.kuali.student.r2.common.infc.RichText; |
9 | |
|
10 | |
@Entity |
11 | |
@Table(name = "KSEN_RICH_TEXT_T") |
12 | |
public class LprRichTextEntity extends RichTextEntity { |
13 | |
|
14 | 0 | public LprRichTextEntity() {} |
15 | |
|
16 | 0 | public LprRichTextEntity(String plain, String formatted) { |
17 | 0 | this.setFormatted(formatted); |
18 | 0 | this.setPlain(plain); |
19 | 0 | } |
20 | |
|
21 | 0 | public LprRichTextEntity(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 | |
} |