1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.db.event;
14 import org.simantics.db.ChangeSet;
15 import org.simantics.db.MetadataI;
16 import org.simantics.db.ReadGraph;
17 import org.simantics.db.Session;
18 import org.simantics.db.WriteGraph;
19 import org.simantics.db.service.TeamSupport;
22 * An event structure for {@link ChangeListener}.
24 * Informs of incoming changes in a Session, i.e. a completed transaction or an
25 * update external to this Session caused by a synchronize operation using
26 * {@link TeamSupport}.
28 * @author Tuukka Lehtonen
32 public class ChangeEvent {
34 private final Session session;
36 private final ReadGraph graph;
38 private final WriteGraph metadataGraph;
40 private final ChangeSet changes;
42 public ChangeEvent(Session session, ReadGraph graph, WriteGraph metadataGraph, ChangeSet changeSet) {
43 this.session = session;
45 this.metadataGraph = metadataGraph;
46 this.changes = changeSet;
49 public Session getSession() {
53 public ReadGraph getGraph() {
57 public ChangeSet getChanges() {
61 public MetadataI getMetadataI() {