X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-common-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fcommon%2Fapi%2Fclustering%2FEntity.java;h=c97fe51d363dc39dc6d71365e410c1861a6a127f;hb=refs%2Fchanges%2F97%2F69097%2F3;hp=7cb672e9b06e87bf278352194c462ed71150afcb;hpb=a81d98f692b80c45bce3fe6a87e731abfb012a9f;p=controller.git diff --git a/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/clustering/Entity.java b/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/clustering/Entity.java index 7cb672e9b0..c97fe51d36 100644 --- a/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/clustering/Entity.java +++ b/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/clustering/Entity.java @@ -34,12 +34,16 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; *

* Note that an entity identifier must conform to a valid yang schema. If there is no existing yang schema to * represent an entity, the general-entity yang model can be used. + * + * @deprecated Use org.opendaylight.mdsal.binding.api.clustering.Entity or + * org.opendaylight.mdsal.eos.dom.api.DOMEntity instead */ +@Deprecated public final class Entity implements Serializable { private static final long serialVersionUID = 1L; - private static final QName ENTITY_QNAME = - org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.core.general.entity.rev150820.Entity.QNAME; + private static final QName ENTITY_QNAME = org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang + .controller.md.sal.core.general.entity.rev150820.Entity.QNAME; private static final QName ENTITY_NAME = QName.create(ENTITY_QNAME, "name"); private final String type; @@ -70,34 +74,32 @@ public final class Entity implements Serializable { } /** - * - * @return id of entity + * Returns the id of entity. */ @Nonnull - public YangInstanceIdentifier getId(){ + public YangInstanceIdentifier getId() { return id; } /** - * - * @return type of entity + * Returns the type of entity. */ @Nonnull - public String getType(){ + public String getType() { return type; } @Override - public boolean equals(Object o) { - if (this == o) { + public boolean equals(Object obj) { + if (this == obj) { return true; } - if (o == null || getClass() != o.getClass()) { + if (obj == null || getClass() != obj.getClass()) { return false; } - Entity entity = (Entity) o; + Entity entity = (Entity) obj; if (!id.equals(entity.id)) { return false; @@ -117,10 +119,6 @@ public final class Entity implements Serializable { @Override public String toString() { - final StringBuilder sb = new StringBuilder("Entity{"); - sb.append("type='").append(type).append('\''); - sb.append(", id=").append(id); - sb.append('}'); - return sb.toString(); + return "Entity{" + "type='" + type + '\'' + ", id=" + id + '}'; } }