2 * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.mdsal.eos.binding.api;
10 import com.google.common.annotations.Beta;
11 import com.google.common.base.Preconditions;
12 import javax.annotation.Nonnull;
13 import org.opendaylight.mdsal.eos.common.api.GenericEntity;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.core.general.entity.rev150930.EntityKey;
15 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
18 * Binding version of {@link GenericEntity}.
20 * @author Thomas Pantelis
23 public class Entity extends GenericEntity<InstanceIdentifier<?>> {
24 private static final long serialVersionUID = 1L;
26 /** Constructs an instance.
28 * @param type the entity type
29 * @param id the entity id.
31 public Entity(@Nonnull final String type, @Nonnull final InstanceIdentifier<?> id) {
36 * Construct an Entity with an with a name. The general-entity schema is used to construct the
39 * @param type the type of the entity
40 * @param entityName the name of the entity used to construct a general-entity InstanceIdentifier
42 public Entity(@Nonnull String type, @Nonnull String entityName) {
43 super(type, InstanceIdentifier.builder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang
44 .mdsal.core.general.entity.rev150930.Entity.class,
45 new EntityKey(Preconditions.checkNotNull(entityName, "entityName should not be null"))).build());