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