+ /**
+ * Construct an Entity with an with a name. The general-entity schema is used to construct the
+ * YangInstanceIdentifier.
+ *
+ * @param type the type of the entity
+ * @param entityName the name of the entity used to construct a general-entity YangInstanceIdentifier
+ */
+ public Entity(@Nonnull String type, @Nonnull String entityName) {
+ this.type = Preconditions.checkNotNull(type, "type should not be null");
+ this.id = YangInstanceIdentifier.builder().node(ENTITY_QNAME).nodeWithKey(ENTITY_QNAME, ENTITY_NAME,
+ Preconditions.checkNotNull(entityName, "entityName should not be null")).build();
+ }
+