01: /*
02: * Copyright 2006 Holger West, Ralf Joachim
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package log4j;
17:
18: /**
19: * A <code>LogExceptionEntry</code> holds the information belongs to a related exception
20: * of a <code>LoggingEvent</code>.
21: *
22: * @author <a href="mailto:holger.west@syscon-informatics.de">Holger West</a>
23: */
24: public final class LogExceptionEntry {
25: // -----------------------------------------------------------------------------------
26:
27: /** The identity of this object. */
28: private Integer _id;
29:
30: /** The stack trace of this exception. */
31: private String _stackTrace;
32:
33: /** Reference to the <code>LogEntry</code> this <code>LogExceptionEntry</code>
34: * belongs to. */
35: private LogEntry _entry;
36:
37: // -----------------------------------------------------------------------------------
38:
39: /**
40: * Get the identity of this object.
41: *
42: * @return The identity of this object.
43: */
44: public Integer getId() {
45: return _id;
46: }
47:
48: /**
49: * Set the identity of this object.
50: *
51: * @param id The identity of this object.
52: */
53: public void setId(final Integer id) {
54: _id = id;
55: }
56:
57: /**
58: * Get the stack trace of the exception.
59: *
60: * @return Stack trace of the exception.
61: */
62: public String getStackTrace() {
63: return _stackTrace;
64: }
65:
66: /**
67: * Set the stack trace of this exception.
68: *
69: * @param stackTrace Stack trace of this exception.
70: */
71: public void setStackTrace(final String stackTrace) {
72: _stackTrace = stackTrace;
73: }
74:
75: /**
76: * Get the <code>LogEntry</code> this <code>LogExceptionEntry</code> belongs to.
77: *
78: * @return <code>LogEntry</code> this <code>LogExceptionEntry</code> belongs to.
79: */
80: public LogEntry getEntry() {
81: return _entry;
82: }
83:
84: /**
85: * Set the <code>LogEntry</code> this <code>LogExceptionEntry</code> belongs to.
86: *
87: * @param entry <code>LogEntry</code> this <code>LogExceptionEntry</code> belongs to.
88: */
89: public void setEntry(final LogEntry entry) {
90: _entry = entry;
91: }
92:
93: // -----------------------------------------------------------------------------------
94: }
|