01: /*
02: * Copyright 2004-2006 the original author or authors.
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:
17: package org.compass.gps.device.hibernate.scrollable.snapshot;
18:
19: import java.util.List;
20:
21: import org.compass.gps.device.jdbc.mapping.ResultSetToResourceMapping;
22: import org.compass.gps.spi.CompassGpsInterfaceDevice;
23: import org.hibernate.Session;
24:
25: /**
26: * A delete snapshot event, works with
27: * {@link org.compass.gps.device.hibernate.scrollable.snapshot.HibernateSnapshotEventListener#onDelete(DeleteSnapshotEvent)}.
28: * Holds the
29: * {@link org.compass.gps.device.jdbc.mapping.ResultSetToResourceMapping}
30: * that maps to the result set that initiated the event, a list of
31: * {@link org.compass.gps.device.hibernate.scrollable.snapshot.HibernateAliasRowSnapshot}
32: * for all the row snapapshots that were deleted, and the
33: * <code>CompassTemplate</code> to use in order to reflect the changes to the
34: * index.
35: *
36: * @author kimchy
37: */
38: public class DeleteSnapshotEvent extends AbstractSnapshotEvent {
39:
40: private ResultSetToResourceMapping mapping;
41:
42: private List deleteSnapshots;
43:
44: private CompassGpsInterfaceDevice compassGps;
45:
46: public DeleteSnapshotEvent(Session session,
47: ResultSetToResourceMapping mapping, List deleteSnapshots,
48: CompassGpsInterfaceDevice compassGps) {
49: super (session);
50: this .mapping = mapping;
51: this .deleteSnapshots = deleteSnapshots;
52: this .compassGps = compassGps;
53: }
54:
55: public List getDeleteSnapshots() {
56: return deleteSnapshots;
57: }
58:
59: public ResultSetToResourceMapping getMapping() {
60: return mapping;
61: }
62:
63: public CompassGpsInterfaceDevice getCompassGps() {
64: return compassGps;
65: }
66:
67: }
|