Moti Asayag has uploaded a new change for review. Change subject: core: Introduce NetworkLabel entity ......................................................................
core: Introduce NetworkLabel entity The NetworkLabel entity is a plan container of the label id. The class designed to be transfered to the clients when querying for the label information which is managed either as part of the Network entity or as part of the VdsNetworkInterface. Having the label as an explicit entity will standardize data transfer between the restapi to the engine. Change-Id: I28f4e7688a02cdc8bf0475dbd237e09352add2e3 Signed-off-by: Moti Asayag <[email protected]> --- A backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/NetworkLabel.java 1 file changed, 53 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/02/22802/1 diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/NetworkLabel.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/NetworkLabel.java new file mode 100644 index 0000000..0a2781c --- /dev/null +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/NetworkLabel.java @@ -0,0 +1,53 @@ +package org.ovirt.engine.core.common.businessentities.network; + +import org.ovirt.engine.core.common.businessentities.IVdcQueryable; + +public class NetworkLabel extends IVdcQueryable { + + private static final long serialVersionUID = -2906392515766833212L; + private String id; + + public NetworkLabel() { + } + + public NetworkLabel(String label) { + this.id = label; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Object getQueryableId() { + return getId(); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((id == null) ? 0 : id.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + NetworkLabel other = (NetworkLabel) obj; + if (id == null) { + if (other.id != null) + return false; + } else if (!id.equals(other.id)) + return false; + return true; + } +} -- To view, visit http://gerrit.ovirt.org/22802 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I28f4e7688a02cdc8bf0475dbd237e09352add2e3 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
