| 1 | |
package org.kuali.db.jdbc; |
| 2 | |
|
| 3 | |
import java.util.Date; |
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
public class SQLEvent { |
| 9 | |
String message; |
| 10 | |
MessagePriority priority; |
| 11 | |
Date timestamp; |
| 12 | |
Throwable exception; |
| 13 | |
Transaction transaction; |
| 14 | |
int totalStatements; |
| 15 | |
int successfulStatements; |
| 16 | |
String sql; |
| 17 | |
int updateCountTotal; |
| 18 | |
|
| 19 | |
public SQLEvent() { |
| 20 | 0 | this(null); |
| 21 | 0 | } |
| 22 | |
|
| 23 | |
public SQLEvent(String message) { |
| 24 | 0 | this(message, MessagePriority.INFO); |
| 25 | 0 | } |
| 26 | |
|
| 27 | |
public SQLEvent(String message, MessagePriority priority) { |
| 28 | 0 | this(message, priority, new Date(), null, null); |
| 29 | 0 | } |
| 30 | |
|
| 31 | |
public SQLEvent(String message, MessagePriority priority, Date timestamp, Throwable exception, |
| 32 | |
Transaction transaction) { |
| 33 | 0 | super(); |
| 34 | 0 | this.message = message; |
| 35 | 0 | this.priority = priority; |
| 36 | 0 | this.timestamp = timestamp; |
| 37 | 0 | this.exception = exception; |
| 38 | 0 | this.transaction = transaction; |
| 39 | 0 | } |
| 40 | |
|
| 41 | |
public String getMessage() { |
| 42 | 0 | return message; |
| 43 | |
} |
| 44 | |
|
| 45 | |
public void setMessage(String message) { |
| 46 | 0 | this.message = message; |
| 47 | 0 | } |
| 48 | |
|
| 49 | |
public MessagePriority getPriority() { |
| 50 | 0 | return priority; |
| 51 | |
} |
| 52 | |
|
| 53 | |
public void setPriority(MessagePriority priority) { |
| 54 | 0 | this.priority = priority; |
| 55 | 0 | } |
| 56 | |
|
| 57 | |
public Date getTimestamp() { |
| 58 | 0 | return timestamp; |
| 59 | |
} |
| 60 | |
|
| 61 | |
public void setTimestamp(Date timestamp) { |
| 62 | 0 | this.timestamp = timestamp; |
| 63 | 0 | } |
| 64 | |
|
| 65 | |
public Throwable getException() { |
| 66 | 0 | return exception; |
| 67 | |
} |
| 68 | |
|
| 69 | |
public void setException(Throwable exception) { |
| 70 | 0 | this.exception = exception; |
| 71 | 0 | } |
| 72 | |
|
| 73 | |
public Transaction getTransaction() { |
| 74 | 0 | return transaction; |
| 75 | |
} |
| 76 | |
|
| 77 | |
public void setTransaction(Transaction transaction) { |
| 78 | 0 | this.transaction = transaction; |
| 79 | 0 | } |
| 80 | |
|
| 81 | |
public int getTotalStatements() { |
| 82 | 0 | return totalStatements; |
| 83 | |
} |
| 84 | |
|
| 85 | |
public void setTotalStatements(int totalStatements) { |
| 86 | 0 | this.totalStatements = totalStatements; |
| 87 | 0 | } |
| 88 | |
|
| 89 | |
public int getSuccessfulStatements() { |
| 90 | 0 | return successfulStatements; |
| 91 | |
} |
| 92 | |
|
| 93 | |
public void setSuccessfulStatements(int successfulStatements) { |
| 94 | 0 | this.successfulStatements = successfulStatements; |
| 95 | 0 | } |
| 96 | |
|
| 97 | |
public String getSql() { |
| 98 | 0 | return sql; |
| 99 | |
} |
| 100 | |
|
| 101 | |
public void setSql(String sql) { |
| 102 | 0 | this.sql = sql; |
| 103 | 0 | } |
| 104 | |
|
| 105 | |
public int getUpdateCountTotal() { |
| 106 | 0 | return updateCountTotal; |
| 107 | |
} |
| 108 | |
|
| 109 | |
public void setUpdateCountTotal(int updateCountTotal) { |
| 110 | 0 | this.updateCountTotal = updateCountTotal; |
| 111 | 0 | } |
| 112 | |
} |