Source code: com/flexstor/common/data/ejb/reporttemplate/ReportTemplateData.java
1 /*
2 * ReportTemplateData.java
3 *
4 * Copyright $Date: 2003/08/11 02:22:51 $ FLEXSTOR.net Inc.
5 *
6 * This work is licensed for use and distribution under license terms found at
7 * http://www.flexstor.org/license.html
8 *
9 */
10
11 package com.flexstor.common.data.ejb.reporttemplate;
12
13 import com.flexstor.common.data.ejb.Data;
14 import com.flexstor.common.keys.ejb.ReportTemplateKey;
15
16 /**
17 * ReportTemplateData is the database data object that represents a Report Template.
18 *
19 * @author Dan Nickel - Jose Hernandez
20 * @version 3.0
21 */
22 public class ReportTemplateData
23 extends Data
24 {
25 /** MKS identifier. */
26 public final static String IDENTIFIER="$Id: ReportTemplateData.java,v 1.2 2003/08/11 02:22:51 aleric Exp $";
27 static final long serialVersionUID = -4998349517919230472L;
28
29 /** The key to reference this object in the database. */
30 protected ReportTemplateKey key = null;
31
32 /** Is This report template editable by the user */
33 protected boolean isEditable = true;
34
35 /** The displayable name for this Report Template. */
36 protected String sName = null;
37
38 /** The name of the server where the template file is located. */
39 protected String sFileServer = null;
40
41 /** The location where the template file is located. */
42 protected String sFileLocation = null;
43
44 /** The template file name. */
45 protected String sFileName = null;
46
47 /** The disguise id the template is based on. */
48 protected int nDisguiseId = 0;
49
50 public ReportTemplateData()
51 {
52 super();
53 }
54
55 /**
56 * @param sName the template displayable name.
57 * @param sFileServer the name of the server where the template file is located.
58 * @param sFileLocation the location where the template file is located.
59 * @param sFileName the template file name.
60 * @param nDisguiseId the disguise id the template is based on.
61 */
62 public ReportTemplateData( String sName,
63 String sFileServer,
64 String sFileLocation,
65 String sFileName,
66 int nDisguiseId )
67 {
68 super();
69
70 this.sName = sName;
71 this.sFileServer = sFileServer;
72 this.sFileLocation = sFileLocation;
73 this.sFileName = sFileName;
74 this.nDisguiseId = nDisguiseId;
75 }
76
77 /**
78 * Sets the database reference key for this Report Template data object.
79 *
80 * @param rtkKey the database reference key.
81 */
82 public void setKey( ReportTemplateKey rtkKey )
83 {
84 this.key = rtkKey;
85 }
86
87 /**
88 * Retrieve the database reference key for this Report Template data object.
89 */
90 public ReportTemplateKey getKey()
91 {
92 return key;
93 }
94
95 /**
96 * Sets the displayable name for this Report Template.
97 *
98 * @param sName the template displayable name.
99 */
100 public void setName( String sName )
101 {
102 this.sName = sName;
103 }
104
105 /**
106 * Retrieves the displayable name for this Report Template.
107 */
108 public String getName()
109 {
110 return sName;
111 }
112
113 /**
114 * Sets the name of the server where the template file is located.
115 *
116 * @param sFileServer the name of the server.
117 */
118 public void setFileServer( String sFileServer )
119 {
120 this.sFileServer = sFileServer;
121 }
122
123 /**
124 * Retrieves the name of the server where the template file is located.
125 */
126 public String getFileServer()
127 {
128 return sFileServer;
129 }
130
131 /**
132 * Sets the template file location.
133 *
134 * @param sFileLocation the location of the template file.
135 */
136 public void setFileLocation( String sFileLocation )
137 {
138 this.sFileLocation = sFileLocation;
139 }
140
141 /**
142 * Retrieves the template file location.
143 */
144 public String getFileLocation()
145 {
146 return sFileLocation;
147 }
148
149 /**
150 * Sets the template file name.
151 *
152 * @param sFileName the template file name.
153 */
154 public void setFileName( String sFileName )
155 {
156 this.sFileName = sFileName;
157 }
158
159 /**
160 * Retrieves the template file name.
161 */
162 public String getFileName()
163 {
164 return sFileName;
165 }
166
167 /**
168 * Sets the disguise id the template is based on.
169 *
170 * @param nDisguiseId the disguise id.
171 */
172 public void setDisguiseId( int nDisguiseId )
173 {
174 this.nDisguiseId = nDisguiseId;
175 }
176
177 /**
178 * Retrieves the id for the disguise the template is based on.
179 */
180 public int getDisguiseId()
181 {
182 return nDisguiseId;
183 }
184
185 /**
186 * Checks to see if this object is editable by the user
187 */
188 public boolean isEditable()
189 {
190 return isEditable;
191 }
192
193 /**
194 * This sets the editable flag for this object
195 */
196 public void setEditable( boolean editable )
197 {
198 isEditable = editable;
199 }
200
201 } // end of class