Revision 2036
Added by Duane Costa about 20 years ago
HarvestLog.java | ||
---|---|---|
26 | 26 |
private int harvestLogID; |
27 | 27 |
private Date harvestDate; |
28 | 28 |
private int status; |
29 |
private final String marker = |
|
30 |
"*****************************************************************************"; |
|
29 | 31 |
private String message; |
30 | 32 |
private String harvestOperationCode; |
31 | 33 |
private int siteScheduleID; |
... | ... | |
152 | 154 |
* this HarvestLog object. Not yet implemented. |
153 | 155 |
*/ |
154 | 156 |
void dbInsertHarvestLogEntry() { |
157 |
String dequotedMessage = harvester.dequoteText(message); |
|
155 | 158 |
String insertString; |
156 | 159 |
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd-MMM-yyyy"); |
157 | 160 |
Statement stmt; |
... | ... | |
163 | 166 |
harvestLogID + ", " + |
164 | 167 |
"'" + simpleDateFormat.format(harvestDate) + "', " + |
165 | 168 |
status + ", " + |
166 |
"'" + timestamp + ": " + message + "', " +
|
|
169 |
"'" + timestamp + ": " + dequotedMessage + "', " +
|
|
167 | 170 |
"'" + harvestOperationCode + "', " + |
168 | 171 |
siteScheduleID + |
169 | 172 |
")"; |
... | ... | |
264 | 267 |
*/ |
265 | 268 |
void printOutput() { |
266 | 269 |
System.out.println(""); |
267 |
System.out.println("harvestLogID: " + harvestLogID); |
|
268 |
System.out.println("harvestDate: " + harvestDate); |
|
269 |
System.out.println("status: " + status); |
|
270 |
System.out.println("message: " + message); |
|
271 |
System.out.println("harvestOperationCode: " + harvestOperationCode); |
|
272 |
|
|
273 |
if (siteScheduleID != 0) { |
|
274 |
harvester.printHarvestSiteSchedule(siteScheduleID); |
|
270 |
System.out.println(marker); |
|
271 |
System.out.println("*"); |
|
272 |
System.out.println("* harvestLogID: " + harvestLogID); |
|
273 |
System.out.println("* harvestDate: " + harvestDate); |
|
274 |
System.out.println("* status: " + status); |
|
275 |
System.out.println("* message: " + message); |
|
276 |
System.out.println("* harvestOperationCode: " + harvestOperationCode); |
|
277 |
|
|
278 |
if (harvestOperationCode.equals("GetDocListSuccess") || |
|
279 |
harvestOperationCode.equals("GetDocListError")) { |
|
280 |
if (siteScheduleID != 0) { |
|
281 |
harvester.printHarvestSiteSchedule(siteScheduleID); |
|
282 |
} |
|
275 | 283 |
} |
276 | 284 |
|
277 | 285 |
if (harvestDetailLog != null) { |
278 | 286 |
harvestDetailLog.printOutput(); |
279 | 287 |
} |
288 |
|
|
289 |
System.out.println("*"); |
|
290 |
System.out.println(marker); |
|
280 | 291 |
} |
281 | 292 |
|
282 | 293 |
} |
Also available in: Unified diff
Additional Harvester development