b6bb79d4d20688dd1567fb3e319d9bbc4e5b1645
[mdsal.git] / binding / mdsal-binding-api / src / main / java / org / opendaylight / mdsal / binding / api / clustering / Entity.java
1 /*
2  * Copyright (c) 2015 Brocade Communications 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.mdsal.binding.api.clustering;
9
10 import com.google.common.annotations.Beta;
11 import javax.annotation.Nonnull;
12 import org.opendaylight.mdsal.common.api.clustering.GenericEntity;
13 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
14
15 /**
16  * Binding version of {@link GenericEntity}.
17  *
18  * @author Thomas Pantelis
19  */
20 @Beta
21 public class Entity extends GenericEntity<InstanceIdentifier<?>> {
22     private static final long serialVersionUID = 1L;
23
24     /** Constructs an instance.
25      *
26      * @param type the entity type
27      * @param id the entity id.
28      */
29     public Entity(@Nonnull final String type, @Nonnull final InstanceIdentifier<?> id) {
30         super(type, id);
31     }
32
33     /**
34      * Construct an Entity with an with a name. The general-entity schema is used to construct the
35      * InstanceIdentifier.
36      *
37      * @param type the type of the entity
38      * @param entityName the name of the entity used to construct a general-entity InstanceIdentifier
39      */
40     // FIXME: needs to be enabled in a follow-up
41 //    public Entity(@Nonnull String type, @Nonnull String entityName) {
42 //        super(type, InstanceIdentifier.builder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.
43 //                ns.yang.controller.md.sal.core.general.entity.rev150820.Entity.class,
44 //                    new EntityKey(Preconditions.checkNotNull(entityName, "entityName should not be null"))).build());
45 //    }
46 }