01: /*
02: * ChainBuilder ESB
03: * Visual Enterprise Integration
04: *
05: * Copyright (C) 2006 Bostech Corporation
06: *
07: * This program is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU General Public License as published by the
09: * Free Software Foundation; either version 2 of the License, or (at your option)
10: * any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15: * for more details.
16: *
17: * You should have received a copy of the GNU General Public License along with
18: * this program; if not, write to the Free Software Foundation, Inc.,
19: * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20: *
21: *
22: * $Id: ErrorVO.java 10897 2007-12-13 02:42:59Z lzheng $
23: */
24: package com.bostechcorp.cbesb.runtime.ccsl.errordb;
25:
26: import java.sql.Timestamp;
27:
28: import com.bostechcorp.cbesb.runtime.ccsl.lib.ExceptionUtil;
29:
30: public class ErrorVO extends AbstractVO {
31: private String messageException;
32: private String stackTrace;
33: private Timestamp timeStamp;
34: long exchangeId;
35: long errorId;
36:
37: public ErrorVO() {
38: }
39:
40: public ErrorVO(long errorId) {
41: this .errorId = errorId;
42: }
43:
44: public ErrorVO(Exception e, long exchangeId) {
45: this .messageException = e.toString();
46: this .stackTrace = ExceptionUtil.stackTraceString(e);
47: timeStamp = new Timestamp(System.currentTimeMillis());
48: this .exchangeId = exchangeId;
49: }
50:
51: public void setErrorDateTime(Timestamp timeStamp) {
52: this .timeStamp = timeStamp;
53: }
54:
55: public Timestamp getErrorDateTime() {
56: return timeStamp;
57: }
58:
59: public void setExceptionString(String messageException) {
60: this .messageException = messageException;
61: }
62:
63: public String getExceptionString() {
64: return this .messageException;
65: }
66:
67: public void setStackTrace(String stackTrace) {
68: this .stackTrace = stackTrace;
69: }
70:
71: public String getStackTrace() {
72: return this .stackTrace;
73: }
74:
75: public void setExchangeId(long exchangeId) {
76: this .exchangeId = exchangeId;
77: }
78:
79: public long getExchangeId() {
80: return exchangeId;
81: }
82:
83: public void setErrorId(long eid) {
84: errorId = eid;
85: }
86:
87: public long getErrorId() {
88: return errorId;
89: }
90: }
|