Merge "Bug 2597: Batch modification operations in TransactionProxy"
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / modification / AbstractModification.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.controller.cluster.datastore.modification;
10
11
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
13
14 /**
15  * Base class to be used for all simple modifications that can be applied to a DOMStoreTransaction
16  */
17 public abstract class AbstractModification implements Modification {
18
19     private YangInstanceIdentifier path;
20     private short version;
21
22     protected AbstractModification(short version) {
23         this.version = version;
24     }
25
26     protected AbstractModification(YangInstanceIdentifier path) {
27         this.path = path;
28     }
29
30     protected void setPath(YangInstanceIdentifier path) {
31         this.path = path;
32     }
33
34     public YangInstanceIdentifier getPath() {
35         return path;
36     }
37
38     public short getVersion() {
39         return version;
40     }
41 }