View Javadoc

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