001    package org.kuali.student.enrollment.class1.lrr.model;
002    
003    import org.kuali.student.r2.common.dto.RichTextInfo;
004    import org.kuali.student.r2.common.entity.RichTextEntity;
005    import org.kuali.student.r2.common.infc.RichText;
006    
007    import javax.persistence.Entity;
008    import javax.persistence.Table;
009    
010    @Entity
011    @Table(name = "KSEN_RICH_TEXT_T")
012    public class ResultSourceRichTextEntity extends RichTextEntity {
013    
014        public ResultSourceRichTextEntity() {}
015    
016        public ResultSourceRichTextEntity(String plain, String formatted) {
017            this.setFormatted(formatted);
018            this.setPlain(plain);
019        }
020    
021        public ResultSourceRichTextEntity(RichText rt) {
022            if (null != rt) {
023                this.setFormatted(rt.getFormatted());
024                this.setPlain(rt.getPlain());
025            }
026        }
027    
028        public RichTextInfo toDto() {
029            RichTextInfo rti = new RichTextInfo();
030            rti.setPlain(getPlain());
031            rti.setFormatted(getFormatted());
032            return rti;
033        }
034    }