View Javadoc

1   /*
2    * Copyright 2005-2008 The Kuali Foundation
3    *
4    *
5    * Licensed under the Educational Community License, Version 2.0 (the "License");
6    * you may not use this file except in compliance with the License.
7    * You may obtain a copy of the License at
8    *
9    * http://www.opensource.org/licenses/ecl2.php
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.kuali.rice.kew.edl.bo;
18  
19  import java.util.LinkedHashMap;
20  
21  import javax.persistence.Basic;
22  import javax.persistence.Column;
23  import javax.persistence.Entity;
24  import javax.persistence.FetchType;
25  import javax.persistence.Id;
26  import javax.persistence.Lob;
27  import javax.persistence.Table;
28  
29  import org.kuali.rice.core.jpa.annotations.Sequence;
30  import org.kuali.rice.kew.bo.KewPersistableBusinessObjectBase;
31  
32  /**
33   * EDocLite XSLT stylesheet
34   * Table: en_edoclt_style_t
35   * @author Kuali Rice Team (rice.collab@kuali.org)
36   */
37  @Entity
38  @Table(name="KREW_STYLE_T")
39  @Sequence(name="KREW_EDL_S", property="edocLiteStyleId")
40  public class EDocLiteStyle  extends KewPersistableBusinessObjectBase{
41      private static final long serialVersionUID = 2020611019976731725L;
42      /**
43       * edoclt_style_id
44       */
45      @Id
46  	@Column(name="STYLE_ID")
47  	private Long edocLiteStyleId;
48      /**
49       * edoclt_style_nm
50       */
51      @Column(name="NM")
52  	private String name;
53      /**
54       * edoclt_style_xml
55       */
56      @Lob
57  	@Basic(fetch=FetchType.LAZY)
58  	@Column(name="XML")
59  	private String xmlContent;
60      /**
61       * edoclt_style_actv_ind
62       */
63      @Column(name="ACTV_IND")
64  	private Boolean activeInd;
65  
66      public Long getEdocLiteStyleId() {
67          return edocLiteStyleId;
68      }
69      public void setEdocLiteStyleId(Long docLiteStyleId) {
70          edocLiteStyleId = docLiteStyleId;
71      }
72      public String getName() {
73          return name;
74      }
75      public void setName(String name) {
76          this.name = name;
77      }
78      public String getXmlContent() {
79          return xmlContent;
80      }
81      public void setXmlContent(String xmlContent) {
82          this.xmlContent = xmlContent;
83      }
84      public Boolean getActiveInd() {
85          return activeInd;
86      }
87      public void setActiveInd(Boolean activeInd) {
88          this.activeInd = activeInd;
89      }
90  
91      public String toString() {
92          return "[EDocLiteStyle: edocLiteStyleId=" + edocLiteStyleId
93                             + ", name=" + name
94                             + ", xml=" + (xmlContent == null ? xmlContent : xmlContent.length() + "chars")
95                             + ", activeInd=" + activeInd
96                             + ", versionNumber=" + versionNumber
97                             + "]";
98      }
99  	/**
100 	 * This overridden method ...
101 	 *
102 	 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
103 	 */
104 	@Override
105 	protected LinkedHashMap<String, Object> toStringMapper() {
106 		LinkedHashMap<String, Object> propMap = new LinkedHashMap<String, Object>();
107 		propMap.put("edocLiteStyleId",getEdocLiteStyleId());
108 		propMap.put("name",getName());
109 		propMap.put("xmlContent",(xmlContent == null ? xmlContent : xmlContent.length() + "chars"));
110 		propMap.put("activeInd",getActiveInd());
111 		propMap.put("versionNumber",getVersionNumber());
112 	    return propMap;
113 
114 	}
115 }