Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
AppointmentWindowRichTextEntity |
|
| 1.25;1.25 |
1 | /** | |
2 | * Copyright 2012 The Kuali Foundation Licensed under the | |
3 | * Educational Community License, Version 2.0 (the "License"); you may | |
4 | * not use this file except in compliance with the License. You may | |
5 | * obtain a copy of the License at | |
6 | * | |
7 | * http://www.osedu.org/licenses/ECL-2.0 | |
8 | * | |
9 | * Unless required by applicable law or agreed to in writing, | |
10 | * software distributed under the License is distributed on an "AS IS" | |
11 | * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | |
12 | * or implied. See the License for the specific language governing | |
13 | * permissions and limitations under the License. | |
14 | * | |
15 | * Created by Charles on 2/29/12 | |
16 | */ | |
17 | package org.kuali.student.r2.core.class1.appointment.model; | |
18 | ||
19 | import org.kuali.student.r2.common.dto.RichTextInfo; | |
20 | import org.kuali.student.r2.common.entity.RichTextEntity; | |
21 | import org.kuali.student.r2.common.infc.RichText; | |
22 | ||
23 | import javax.persistence.*; | |
24 | ||
25 | /** | |
26 | * This class //TODO ... | |
27 | * | |
28 | * @author Kuali Student Team | |
29 | */ | |
30 | @Entity | |
31 | @Table(name = "KSEN_RICH_TEXT_T") | |
32 | public class AppointmentWindowRichTextEntity extends RichTextEntity { | |
33 | ||
34 | 0 | public AppointmentWindowRichTextEntity() { |
35 | 0 | } |
36 | ||
37 | 0 | public AppointmentWindowRichTextEntity(String plain, String formatted){ |
38 | 0 | this.setFormatted(formatted); |
39 | 0 | this.setPlain(plain); |
40 | 0 | } |
41 | ||
42 | 0 | public AppointmentWindowRichTextEntity(RichText rt) { |
43 | 0 | if (null != rt) { |
44 | 0 | this.setFormatted(rt.getFormatted()); |
45 | 0 | this.setPlain(rt.getPlain()); |
46 | } | |
47 | 0 | } |
48 | ||
49 | public RichTextInfo toDto() { | |
50 | 0 | RichTextInfo rti = new RichTextInfo(); |
51 | 0 | rti.setPlain(getPlain()); |
52 | 0 | rti.setFormatted(getFormatted()); |
53 | 0 | return rti; |
54 | } | |
55 | } | |
56 |