Fix NoSuchMethodError in Eclipse IDE by removing M2E lifecycle mapping
[mdsal.git] / singleton-service / mdsal-singleton-dom-impl / src / test / java / org / opendaylight / mdsal / singleton / common / spi / util / TestEntity.java
1 /*
2  * Copyright (c) 2016 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
9 package org.opendaylight.mdsal.singleton.common.spi.util;
10
11 import javax.annotation.Nonnull;
12 import org.opendaylight.mdsal.eos.common.api.GenericEntity;
13 import org.opendaylight.yangtools.yang.common.QName;
14
15 /**
16  * Test util class.
17  */
18 public class TestEntity extends GenericEntity<TestInstanceIdentifier> {
19     private static final long serialVersionUID = 1L;
20
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();
24
25     /** Constructs an instance.
26      *
27      * @param type the entity type
28      * @param id the entity id.
29      */
30     public TestEntity(@Nonnull final String type, @Nonnull final TestInstanceIdentifier id) {
31         super(type, id);
32     }
33
34     /**
35      * Construct an Entity with an with a name. The general-entity schema is used to construct the
36      * {@link TestInstanceIdentifier}.
37      *
38      * @param type the type of the entity
39      * @param entityName the name of the entity used to construct a general-entity YangInstanceIdentifier
40      */
41     public TestEntity(@Nonnull final String type, @Nonnull final String entityName) {
42         super(type, new TestInstanceIdentifier(entityName));
43     }
44 }