1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  package psiprobe.model.jsp;
12  
13  import java.io.Serializable;
14  import java.sql.Timestamp;
15  import java.util.Date;
16  
17  
18  
19  
20  public class Item implements Serializable {
21  
22    
23    private static final long serialVersionUID = 1L;
24  
25    
26    public static final int STATE_OOD = 1;
27  
28    
29    public static final int STATE_READY = 2;
30  
31    
32    public static final int STATE_FAILED = 3;
33  
34    
35    private String name;
36  
37    
38    private Exception exception;
39  
40    
41    private long compileTime = -1;
42  
43    
44    private int state = STATE_OOD;
45  
46    
47    private int level;
48  
49    
50    private boolean missing = true;
51  
52    
53    private long size;
54  
55    
56    private long lastModified;
57  
58    
59    private Date timestamp;
60  
61    
62    private String encoding;
63  
64    
65  
66  
67  
68  
69    public String getName() {
70      return name;
71    }
72  
73    
74  
75  
76  
77  
78    public void setName(String name) {
79      this.name = name;
80    }
81  
82    
83  
84  
85  
86  
87    public Exception getException() {
88      return exception;
89    }
90  
91    
92  
93  
94  
95  
96    public void setException(Exception exception) {
97      this.exception = exception;
98    }
99  
100   
101 
102 
103 
104 
105   public long getCompileTime() {
106     return compileTime;
107   }
108 
109   
110 
111 
112 
113 
114   public void setCompileTime(long compileTime) {
115     this.compileTime = compileTime;
116   }
117 
118   
119 
120 
121 
122 
123   public int getState() {
124     return state;
125   }
126 
127   
128 
129 
130 
131 
132   public void setState(int state) {
133     this.state = state;
134   }
135 
136   
137 
138 
139 
140 
141   public int getLevel() {
142     return level;
143   }
144 
145   
146 
147 
148 
149 
150   public void setLevel(int level) {
151     this.level = level;
152   }
153 
154   
155 
156 
157 
158 
159   public boolean isMissing() {
160     return missing;
161   }
162 
163   
164 
165 
166 
167 
168   public void setMissing(boolean missing) {
169     this.missing = missing;
170   }
171 
172   
173 
174 
175 
176 
177   public long getSize() {
178     return size;
179   }
180 
181   
182 
183 
184 
185 
186   public void setSize(long size) {
187     this.size = size;
188   }
189 
190   
191 
192 
193 
194 
195   public long getLastModified() {
196     return lastModified;
197   }
198 
199   
200 
201 
202 
203 
204   public void setLastModified(long lastModified) {
205     this.lastModified = lastModified;
206     this.timestamp = new Timestamp(lastModified);
207   }
208 
209   
210 
211 
212 
213 
214   public Date getTimestamp() {
215     return timestamp == null ? null : new Date(timestamp.getTime());
216   }
217 
218   
219 
220 
221 
222 
223   public String getEncoding() {
224     return encoding;
225   }
226 
227   
228 
229 
230 
231 
232   public void setEncoding(String encoding) {
233     this.encoding = encoding;
234   }
235 
236 }