2 * Copyright (c) 2016 Cisco 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
9 package org.opendaylight.mdsal.singleton.common.spi.util;
11 import javax.annotation.Nonnull;
12 import org.opendaylight.mdsal.eos.common.api.GenericEntity;
13 import org.opendaylight.yangtools.yang.common.QName;
18 public class TestEntity extends GenericEntity<TestInstanceIdentifier> {
19 private static final long serialVersionUID = 1L;
21 static final QName ENTITY = QName
22 .create("urn:opendaylight:params:xml:ns:yang:mdsal:core:test-entity", "2016-06-06", "entity").intern();
23 static final QName ENTITY_NAME = QName.create(ENTITY, "name").intern();
25 /** Constructs an instance.
27 * @param type the entity type
28 * @param id the entity id.
30 public TestEntity(@Nonnull final String type, @Nonnull final TestInstanceIdentifier id) {
35 * Construct an Entity with an with a name. The general-entity schema is used to construct the
36 * {@link TestInstanceIdentifier}.
38 * @param type the type of the entity
39 * @param entityName the name of the entity used to construct a general-entity YangInstanceIdentifier
41 public TestEntity(@Nonnull final String type, @Nonnull final String entityName) {
42 super(type, new TestInstanceIdentifier(entityName));