bug 8029 added ref counts for physical locators.
[ovsdb.git] / hwvtepsouthbound / hwvtepsouthbound-impl / src / main / java / org / opendaylight / ovsdb / hwvtepsouthbound / transactions / md / AbstractTransactionCommand.java
1 /*
2  * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. 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.ovsdb.hwvtepsouthbound.transactions.md;
10
11 import org.opendaylight.ovsdb.hwvtepsouthbound.HwvtepConnectionInstance;
12 import org.opendaylight.ovsdb.hwvtepsouthbound.HwvtepDeviceInfo;
13 import org.opendaylight.ovsdb.lib.message.TableUpdates;
14 import org.opendaylight.ovsdb.lib.notation.UUID;
15 import org.opendaylight.ovsdb.lib.schema.DatabaseSchema;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.ConnectionInfo;
17 import org.opendaylight.yangtools.yang.binding.DataObject;
18 import org.opendaylight.yangtools.yang.binding.Identifiable;
19 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
20
21 public abstract class AbstractTransactionCommand<T extends DataObject> implements TransactionCommand{
22
23     private TableUpdates updates;
24     private DatabaseSchema dbSchema;
25     private HwvtepConnectionInstance key;
26
27     public TableUpdates getUpdates() {
28         return updates;
29     }
30
31     public DatabaseSchema getDbSchema() {
32         return dbSchema;
33     }
34
35     public ConnectionInfo getConnectionInfo() {
36         return key.getMDConnectionInfo();
37     }
38
39     public HwvtepConnectionInstance getOvsdbConnectionInstance() {
40         return key;
41     }
42
43     public AbstractTransactionCommand(HwvtepConnectionInstance key,TableUpdates updates, DatabaseSchema dbSchema) {
44         this.updates = updates;
45         this.dbSchema = dbSchema;
46         this.key = key;
47     }
48
49     public HwvtepDeviceInfo getDeviceInfo() {
50         return key.getDeviceInfo();
51     }
52 }