01: /*
02: * Copyright (c) 1998 - 2005 Versant Corporation
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * Versant Corporation - initial API and implementation
10: */
11: package com.versant.core.storagemanager.logging;
12:
13: /**
14: * Event logged when data is fetched for an instance.
15: */
16: public class SmFetchEvent extends SmFetchEventBase {
17:
18: private String className;
19: private String primaryKey;
20:
21: public SmFetchEvent(int storageManagerId, int type,
22: String className, String primaryKey, String fetchGroup,
23: String fieldName) {
24: super (storageManagerId, type, fieldName, fetchGroup);
25: this .className = className;
26: this .primaryKey = primaryKey;
27: }
28:
29: public String getPrimaryKey() {
30: return primaryKey;
31: }
32:
33: public String getClassName() {
34: return className;
35: }
36:
37: public void setClassName(String className) {
38: this .className = className;
39: }
40:
41: public void setPrimaryKey(String primaryKey) {
42: this .primaryKey = primaryKey;
43: }
44:
45: /**
46: * Get a long description for this event (e.g. the query text).
47: */
48: public String getDescription() {
49: return className + " " + primaryKey + " " + getFetchGroup()
50: + " " + (fieldName == null ? "" : fieldName + " ")
51: + returnedSize + " state(s)";
52: }
53:
54: }
|