Changed model versions to dependencies
[controller.git] / opendaylight / config / config-manager / src / main / java / org / opendaylight / controller / config / manager / impl / TransactionIdentifier.java
1 /*
2  * Copyright (c) 2013 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 package org.opendaylight.controller.config.manager.impl;
9
10 import org.opendaylight.yangtools.concepts.Identifier;
11
12 public class TransactionIdentifier implements Identifier {
13
14     private final String name;
15
16     public TransactionIdentifier(String name) {
17         this.name = name;
18     }
19
20     @Override
21     public String toString() {
22         return "TransactionIdentifier{" + "name='" + name + '\'' + '}';
23     }
24
25     public String getName() {
26         return name;
27     }
28
29     @Override
30     public boolean equals(Object o) {
31         if (this == o)
32             return true;
33         if (o == null || getClass() != o.getClass())
34             return false;
35
36         TransactionIdentifier that = (TransactionIdentifier) o;
37
38         if (name != null ? !name.equals(that.name) : that.name != null)
39             return false;
40
41         return true;
42     }
43
44     @Override
45     public int hashCode() {
46         return name != null ? name.hashCode() : 0;
47     }
48 }