diff options
Diffstat (limited to 'controlloop/common/model-impl')
4 files changed, 522 insertions, 349 deletions
diff --git a/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java b/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java index 99b770475..25d0903d7 100644 --- a/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java +++ b/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java @@ -25,95 +25,135 @@ import java.util.UUID; public class Resource implements Serializable { - private static final long serialVersionUID = -913729158733348027L; - - public UUID resourceUUID; - public UUID resourceInvariantUUID; - public String resourceName; - public String resourceVersion; - public ResourceType resourceType; - - public Resource() { - - } - - public Resource(Resource resource) { - this.resourceUUID = resource.resourceUUID; - this.resourceInvariantUUID = resource.resourceInvariantUUID; - this.resourceName = resource.resourceName; - this.resourceVersion = resource.resourceVersion; - this.resourceType = resource.resourceType; - } - - public Resource(UUID uuid) { - this.resourceUUID = uuid; - } - - public Resource(String name, ResourceType type) { - this.resourceName = name; - this.resourceType = type; - } - - public Resource(UUID uuid, UUID invariantUUID, String name, String version, ResourceType type) { - this.resourceUUID = uuid; - this.resourceInvariantUUID = invariantUUID; - this.resourceName = name; - this.resourceVersion = version; - this.resourceType = type; - } - - @Override - public String toString() { - return "Resource [resourceUUID=" + resourceUUID + ", resourceInvariantUUID=" + resourceInvariantUUID - + ", resourceName=" + resourceName + ", resourceVersion=" + resourceVersion + ", resourceType=" - + resourceType + "]"; - } - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((resourceInvariantUUID == null) ? 0 : resourceInvariantUUID.hashCode()); - result = prime * result + ((resourceName == null) ? 0 : resourceName.hashCode()); - result = prime * result + ((resourceType == null) ? 0 : resourceType.hashCode()); - result = prime * result + ((resourceUUID == null) ? 0 : resourceUUID.hashCode()); - result = prime * result + ((resourceVersion == null) ? 0 : resourceVersion.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; - Resource other = (Resource) obj; - if (resourceInvariantUUID == null) { - if (other.resourceInvariantUUID != null) - return false; - } else if (!resourceInvariantUUID.equals(other.resourceInvariantUUID)) - return false; - if (resourceName == null) { - if (other.resourceName != null) - return false; - } else if (!resourceName.equals(other.resourceName)) - return false; - if (resourceType == null) { - if (other.resourceType != null) - return false; - } else if (!resourceType.equals(other.resourceType)) - return false; - if (resourceUUID == null) { - if (other.resourceUUID != null) - return false; - } else if (!resourceUUID.equals(other.resourceUUID)) - return false; - if (resourceVersion == null) { - if (other.resourceVersion != null) - return false; - } else if (!resourceVersion.equals(other.resourceVersion)) - return false; - return true; - } - + private static final long serialVersionUID = -913729158733348027L; + + private UUID resourceUUID; + private UUID resourceInvariantUUID; + private String resourceName; + private String resourceVersion; + private ResourceType resourceType; + + public Resource() { + //Empty Constructor + } + + public Resource(Resource resource) { + this.resourceUUID = resource.resourceUUID; + this.resourceInvariantUUID = resource.resourceInvariantUUID; + this.resourceName = resource.resourceName; + this.resourceVersion = resource.resourceVersion; + this.resourceType = resource.resourceType; + } + + public Resource(UUID uuid) { + this.resourceUUID = uuid; + } + + public Resource(String name, ResourceType type) { + this.resourceName = name; + this.resourceType = type; + } + + public Resource(UUID uuid, UUID invariantUUID, String name, String version, ResourceType type) { + this.resourceUUID = uuid; + this.resourceInvariantUUID = invariantUUID; + this.resourceName = name; + this.resourceVersion = version; + this.resourceType = type; + } + + public UUID getResourceUUID() { + return resourceUUID; + } + + public void setResourceUUID(UUID resourceUUID) { + this.resourceUUID = resourceUUID; + } + + public UUID getResourceInvariantUUID() { + return resourceInvariantUUID; + } + + public void setResourceInvariantUUID(UUID resourceInvariantUUID) { + this.resourceInvariantUUID = resourceInvariantUUID; + } + + public String getResourceName() { + return resourceName; + } + + public void setResourceName(String resourceName) { + this.resourceName = resourceName; + } + + public String getResourceVersion() { + return resourceVersion; + } + + public void setResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public ResourceType getResourceType() { + return resourceType; + } + + public void setResourceType(ResourceType resourceType) { + this.resourceType = resourceType; + } + + @Override + public String toString() { + return "Resource [resourceUUID=" + resourceUUID + ", resourceInvariantUUID=" + resourceInvariantUUID + + ", resourceName=" + resourceName + ", resourceVersion=" + resourceVersion + ", resourceType=" + + resourceType + "]"; + } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((resourceInvariantUUID == null) ? 0 : resourceInvariantUUID.hashCode()); + result = prime * result + ((resourceName == null) ? 0 : resourceName.hashCode()); + result = prime * result + ((resourceType == null) ? 0 : resourceType.hashCode()); + result = prime * result + ((resourceUUID == null) ? 0 : resourceUUID.hashCode()); + result = prime * result + ((resourceVersion == null) ? 0 : resourceVersion.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; + Resource other = (Resource) obj; + if (resourceInvariantUUID == null) { + if (other.resourceInvariantUUID != null) + return false; + } else if (!resourceInvariantUUID.equals(other.resourceInvariantUUID)) + return false; + if (resourceName == null) { + if (other.resourceName != null) + return false; + } else if (!resourceName.equals(other.resourceName)) + return false; + if (resourceType == null) { + if (other.resourceType != null) + return false; + } else if (!resourceType.equals(other.resourceType)) + return false; + if (resourceUUID == null) { + if (other.resourceUUID != null) + return false; + } else if (!resourceUUID.equals(other.resourceUUID)) + return false; + if (resourceVersion == null) { + if (other.resourceVersion != null) + return false; + } else if (!resourceVersion.equals(other.resourceVersion)) + return false; + return true; + } + } diff --git a/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java b/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java index 108163a34..7fca79fc3 100644 --- a/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java +++ b/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java @@ -24,86 +24,134 @@ import java.io.Serializable; import java.util.UUID; public class ResourceInstance implements Serializable { - private static final long serialVersionUID = -5506162340393802424L; - - public String resourceInstanceName; - public String resourceName; - public UUID resourceInvariantUUID; - public String resourceVersion; - public ResourceType resourceType; - public UUID resourceUUID; - - public ResourceInstance() { - - } - - public ResourceInstance(ResourceInstance instance) { - if (instance == null) { - return; - } - this.resourceInstanceName = instance.resourceInstanceName; - this.resourceName = instance.resourceName; - this.resourceInvariantUUID = instance.resourceInvariantUUID; - this.resourceVersion = instance.resourceVersion; - this.resourceType = instance.resourceType; - this.resourceUUID = instance.resourceUUID; - } - - @Override - public String toString() { - return "ResourceInstance [resourceInstanceName=" + resourceInstanceName + ", resourceName=" + resourceName - + ", resourceInvariantUUID=" + resourceInvariantUUID + ", resourceVersion=" + resourceVersion - + ", resourceType=" + resourceType + ", resourceUUID=" + resourceUUID + "]"; - } - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((resourceInstanceName == null) ? 0 : resourceInstanceName.hashCode()); - result = prime * result + ((resourceInvariantUUID == null) ? 0 : resourceInvariantUUID.hashCode()); - result = prime * result + ((resourceName == null) ? 0 : resourceName.hashCode()); - result = prime * result + ((resourceType == null) ? 0 : resourceType.hashCode()); - result = prime * result + ((resourceUUID == null) ? 0 : resourceUUID.hashCode()); - result = prime * result + ((resourceVersion == null) ? 0 : resourceVersion.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; - ResourceInstance other = (ResourceInstance) obj; - if (resourceInstanceName == null) { - if (other.resourceInstanceName != null) - return false; - } else if (!resourceInstanceName.equals(other.resourceInstanceName)) - return false; - if (resourceInvariantUUID == null) { - if (other.resourceInvariantUUID != null) - return false; - } else if (!resourceInvariantUUID.equals(other.resourceInvariantUUID)) - return false; - if (resourceName == null) { - if (other.resourceName != null) - return false; - } else if (!resourceName.equals(other.resourceName)) - return false; - if (resourceType != other.resourceType) - return false; - if (resourceUUID == null) { - if (other.resourceUUID != null) - return false; - } else if (!resourceUUID.equals(other.resourceUUID)) - return false; - if (resourceVersion == null) { - if (other.resourceVersion != null) - return false; - } else if (!resourceVersion.equals(other.resourceVersion)) - return false; - return true; - } - + private static final long serialVersionUID = -5506162340393802424L; + + private String resourceInstanceName; + private String resourceName; + private UUID resourceInvariantUUID; + private String resourceVersion; + private ResourceType resourceType; + private UUID resourceUUID; + + public ResourceInstance() { + //Empty Constructor + } + + public ResourceInstance(ResourceInstance instance) { + if (instance == null) { + return; + } + this.resourceInstanceName = instance.resourceInstanceName; + this.resourceName = instance.resourceName; + this.resourceInvariantUUID = instance.resourceInvariantUUID; + this.resourceVersion = instance.resourceVersion; + this.resourceType = instance.resourceType; + this.resourceUUID = instance.resourceUUID; + } + + public String getResourceInstanceName() { + return resourceInstanceName; + } + + public void setResourceInstanceName(String resourceInstanceName) { + this.resourceInstanceName = resourceInstanceName; + } + + public String getResourceName() { + return resourceName; + } + + public void setResourceName(String resourceName) { + this.resourceName = resourceName; + } + + public UUID getResourceInvariantUUID() { + return resourceInvariantUUID; + } + + public void setResourceInvariantUUID(UUID resourceInvariantUUID) { + this.resourceInvariantUUID = resourceInvariantUUID; + } + + public String getResourceVersion() { + return resourceVersion; + } + + public void setResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public ResourceType getResourceType() { + return resourceType; + } + + public void setResourceType(ResourceType resourceType) { + this.resourceType = resourceType; + } + + public UUID getResourceUUID() { + return resourceUUID; + } + + public void setResourceUUID(UUID resourceUUID) { + this.resourceUUID = resourceUUID; + } + + @Override + public String toString() { + return "ResourceInstance [resourceInstanceName=" + resourceInstanceName + ", resourceName=" + resourceName + + ", resourceInvariantUUID=" + resourceInvariantUUID + ", resourceVersion=" + resourceVersion + + ", resourceType=" + resourceType + ", resourceUUID=" + resourceUUID + "]"; + } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((resourceInstanceName == null) ? 0 : resourceInstanceName.hashCode()); + result = prime * result + ((resourceInvariantUUID == null) ? 0 : resourceInvariantUUID.hashCode()); + result = prime * result + ((resourceName == null) ? 0 : resourceName.hashCode()); + result = prime * result + ((resourceType == null) ? 0 : resourceType.hashCode()); + result = prime * result + ((resourceUUID == null) ? 0 : resourceUUID.hashCode()); + result = prime * result + ((resourceVersion == null) ? 0 : resourceVersion.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; + ResourceInstance other = (ResourceInstance) obj; + if (resourceInstanceName == null) { + if (other.resourceInstanceName != null) + return false; + } else if (!resourceInstanceName.equals(other.resourceInstanceName)) + return false; + if (resourceInvariantUUID == null) { + if (other.resourceInvariantUUID != null) + return false; + } else if (!resourceInvariantUUID.equals(other.resourceInvariantUUID)) + return false; + if (resourceName == null) { + if (other.resourceName != null) + return false; + } else if (!resourceName.equals(other.resourceName)) + return false; + if (resourceType != other.resourceType) + return false; + if (resourceUUID == null) { + if (other.resourceUUID != null) + return false; + } else if (!resourceUUID.equals(other.resourceUUID)) + return false; + if (resourceVersion == null) { + if (other.resourceVersion != null) + return false; + } else if (!resourceVersion.equals(other.resourceVersion)) + return false; + return true; + } + } diff --git a/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java b/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java index 4b97168b8..7bfc62e67 100644 --- a/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java +++ b/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java @@ -25,87 +25,116 @@ import java.util.UUID; public class Service implements Serializable { - /** - * - */ - private static final long serialVersionUID = -1249276698549996806L; - - public UUID serviceUUID; - public UUID serviceInvariantUUID; - public String serviceName; - public String serviceVersion; - - public Service() { - - } - - public Service(UUID uuid) { - this.serviceUUID = uuid; - } - - public Service(String name) { - this.serviceName = name; - } - - public Service(UUID uuid, UUID invariantUUID, String name, String version) { - this.serviceUUID = uuid; - this.serviceInvariantUUID = invariantUUID; - this.serviceName = name; - this.serviceVersion = version; - } - - public Service(Service service) { - this.serviceUUID = service.serviceUUID; - this.serviceInvariantUUID = service.serviceInvariantUUID; - this.serviceName = service.serviceName; - this.serviceVersion = service.serviceVersion; - } - - @Override - public String toString() { - return "Service [serviceUUID=" + serviceUUID + ", serviceInvariantUUID=" + serviceInvariantUUID - + ", serviceName=" + serviceName + ", serviceVersion=" + serviceVersion + "]"; - } - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((serviceInvariantUUID == null) ? 0 : serviceInvariantUUID.hashCode()); - result = prime * result + ((serviceName == null) ? 0 : serviceName.hashCode()); - result = prime * result + ((serviceUUID == null) ? 0 : serviceUUID.hashCode()); - result = prime * result + ((serviceVersion == null) ? 0 : serviceVersion.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; - Service other = (Service) obj; - if (serviceInvariantUUID == null) { - if (other.serviceInvariantUUID != null) - return false; - } else if (!serviceInvariantUUID.equals(other.serviceInvariantUUID)) - return false; - if (serviceName == null) { - if (other.serviceName != null) - return false; - } else if (!serviceName.equals(other.serviceName)) - return false; - if (serviceUUID == null) { - if (other.serviceUUID != null) - return false; - } else if (!serviceUUID.equals(other.serviceUUID)) - return false; - if (serviceVersion == null) { - if (other.serviceVersion != null) - return false; - } else if (!serviceVersion.equals(other.serviceVersion)) - return false; - return true; - } + private static final long serialVersionUID = -1249276698549996806L; + + private UUID serviceUUID; + private UUID serviceInvariantUUID; + private String serviceName; + private String serviceVersion; + + public Service() { + //Empty Constructor + } + + public Service(UUID uuid) { + this.serviceUUID = uuid; + } + + public Service(String name) { + this.serviceName = name; + } + + public Service(UUID uuid, UUID invariantUUID, String name, String version) { + this.serviceUUID = uuid; + this.serviceInvariantUUID = invariantUUID; + this.serviceName = name; + this.serviceVersion = version; + } + + public Service(Service service) { + this.serviceUUID = service.serviceUUID; + this.serviceInvariantUUID = service.serviceInvariantUUID; + this.serviceName = service.serviceName; + this.serviceVersion = service.serviceVersion; + } + + public UUID getServiceUUID() { + return serviceUUID; + } + + public void setServiceUUID(UUID serviceUUID) { + this.serviceUUID = serviceUUID; + } + + public UUID getServiceInvariantUUID() { + return serviceInvariantUUID; + } + + public void setServiceInvariantUUID(UUID serviceInvariantUUID) { + this.serviceInvariantUUID = serviceInvariantUUID; + } + + public String getServiceName() { + return serviceName; + } + + public void setServiceName(String serviceName) { + this.serviceName = serviceName; + } + + public String getServiceVersion() { + return serviceVersion; + } + + public void setServiceVersion(String serviceVersion) { + this.serviceVersion = serviceVersion; + } + + @Override + public String toString() { + return "Service [serviceUUID=" + serviceUUID + ", serviceInvariantUUID=" + serviceInvariantUUID + + ", serviceName=" + serviceName + ", serviceVersion=" + serviceVersion + "]"; + } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((serviceInvariantUUID == null) ? 0 : serviceInvariantUUID.hashCode()); + result = prime * result + ((serviceName == null) ? 0 : serviceName.hashCode()); + result = prime * result + ((serviceUUID == null) ? 0 : serviceUUID.hashCode()); + result = prime * result + ((serviceVersion == null) ? 0 : serviceVersion.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; + Service other = (Service) obj; + if (serviceInvariantUUID == null) { + if (other.serviceInvariantUUID != null) + return false; + } else if (!serviceInvariantUUID.equals(other.serviceInvariantUUID)) + return false; + if (serviceName == null) { + if (other.serviceName != null) + return false; + } else if (!serviceName.equals(other.serviceName)) + return false; + if (serviceUUID == null) { + if (other.serviceUUID != null) + return false; + } else if (!serviceUUID.equals(other.serviceUUID)) + return false; + if (serviceVersion == null) { + if (other.serviceVersion != null) + return false; + } else if (!serviceVersion.equals(other.serviceVersion)) + return false; + return true; + } } diff --git a/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java b/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java index 519f88712..c35d7dfde 100644 --- a/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java +++ b/controlloop/common/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java @@ -24,98 +24,154 @@ import java.io.Serializable; import java.util.UUID; public class ServiceInstance implements Serializable { - private static final long serialVersionUID = 6285260780966679625L; - - public UUID personaModelUUID; - public UUID serviceUUID; - public UUID serviceInstanceUUID; - public UUID widgetModelUUID; - public String widgetModelVersion; - public String serviceName; - public String serviceInstanceName; - - public ServiceInstance() { - - } - - public ServiceInstance(ServiceInstance instance) { - if (instance == null) { - return; - } - this.personaModelUUID = instance.personaModelUUID; - this.serviceUUID = instance.serviceUUID; - this.serviceInstanceUUID = instance.serviceInstanceUUID; - this.widgetModelUUID = instance.widgetModelUUID; - this.widgetModelVersion = instance.widgetModelVersion; - this.serviceName = instance.serviceName; - this.serviceInstanceName = instance.serviceInstanceName; - } - - @Override - public String toString() { - return "ServiceInstance [personaModelUUID=" + personaModelUUID + ", serviceUUID=" + serviceUUID - + ", serviceInstanceUUID=" + serviceInstanceUUID + ", widgetModelUUID=" + widgetModelUUID - + ", widgetModelVersion=" + widgetModelVersion + ", serviceName=" + serviceName - + ", serviceInstanceName=" + serviceInstanceName + "]"; - } - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((personaModelUUID == null) ? 0 : personaModelUUID.hashCode()); - result = prime * result + ((serviceInstanceName == null) ? 0 : serviceInstanceName.hashCode()); - result = prime * result + ((serviceInstanceUUID == null) ? 0 : serviceInstanceUUID.hashCode()); - result = prime * result + ((serviceName == null) ? 0 : serviceName.hashCode()); - result = prime * result + ((serviceUUID == null) ? 0 : serviceUUID.hashCode()); - result = prime * result + ((widgetModelUUID == null) ? 0 : widgetModelUUID.hashCode()); - result = prime * result + ((widgetModelVersion == null) ? 0 : widgetModelVersion.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; - ServiceInstance other = (ServiceInstance) obj; - if (personaModelUUID == null) { - if (other.personaModelUUID != null) - return false; - } else if (!personaModelUUID.equals(other.personaModelUUID)) - return false; - if (serviceInstanceName == null) { - if (other.serviceInstanceName != null) - return false; - } else if (!serviceInstanceName.equals(other.serviceInstanceName)) - return false; - if (serviceInstanceUUID == null) { - if (other.serviceInstanceUUID != null) - return false; - } else if (!serviceInstanceUUID.equals(other.serviceInstanceUUID)) - return false; - if (serviceName == null) { - if (other.serviceName != null) - return false; - } else if (!serviceName.equals(other.serviceName)) - return false; - if (serviceUUID == null) { - if (other.serviceUUID != null) - return false; - } else if (!serviceUUID.equals(other.serviceUUID)) - return false; - if (widgetModelUUID == null) { - if (other.widgetModelUUID != null) - return false; - } else if (!widgetModelUUID.equals(other.widgetModelUUID)) - return false; - if (widgetModelVersion == null) { - if (other.widgetModelVersion != null) - return false; - } else if (!widgetModelVersion.equals(other.widgetModelVersion)) - return false; - return true; - } - + private static final long serialVersionUID = 6285260780966679625L; + + private UUID personaModelUUID; + private UUID serviceUUID; + private UUID serviceInstanceUUID; + private UUID widgetModelUUID; + private String widgetModelVersion; + private String serviceName; + private String serviceInstanceName; + + public ServiceInstance() { + //Empty Constructor + } + + public ServiceInstance(ServiceInstance instance) { + if (instance == null) { + return; + } + this.personaModelUUID = instance.personaModelUUID; + this.serviceUUID = instance.serviceUUID; + this.serviceInstanceUUID = instance.serviceInstanceUUID; + this.widgetModelUUID = instance.widgetModelUUID; + this.widgetModelVersion = instance.widgetModelVersion; + this.serviceName = instance.serviceName; + this.serviceInstanceName = instance.serviceInstanceName; + } + + public UUID getPersonaModelUUID() { + return personaModelUUID; + } + + public void setPersonaModelUUID(UUID personaModelUUID) { + this.personaModelUUID = personaModelUUID; + } + + public UUID getServiceUUID() { + return serviceUUID; + } + + public void setServiceUUID(UUID serviceUUID) { + this.serviceUUID = serviceUUID; + } + + public UUID getServiceInstanceUUID() { + return serviceInstanceUUID; + } + + public void setServiceInstanceUUID(UUID serviceInstanceUUID) { + this.serviceInstanceUUID = serviceInstanceUUID; + } + + public UUID getWidgetModelUUID() { + return widgetModelUUID; + } + + public void setWidgetModelUUID(UUID widgetModelUUID) { + this.widgetModelUUID = widgetModelUUID; + } + + public String getWidgetModelVersion() { + return widgetModelVersion; + } + + public void setWidgetModelVersion(String widgetModelVersion) { + this.widgetModelVersion = widgetModelVersion; + } + + public String getServiceName() { + return serviceName; + } + + public void setServiceName(String serviceName) { + this.serviceName = serviceName; + } + + public String getServiceInstanceName() { + return serviceInstanceName; + } + + public void setServiceInstanceName(String serviceInstanceName) { + this.serviceInstanceName = serviceInstanceName; + } + + @Override + public String toString() { + return "ServiceInstance [personaModelUUID=" + personaModelUUID + ", serviceUUID=" + serviceUUID + + ", serviceInstanceUUID=" + serviceInstanceUUID + ", widgetModelUUID=" + widgetModelUUID + + ", widgetModelVersion=" + widgetModelVersion + ", serviceName=" + serviceName + + ", serviceInstanceName=" + serviceInstanceName + "]"; + } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((personaModelUUID == null) ? 0 : personaModelUUID.hashCode()); + result = prime * result + ((serviceInstanceName == null) ? 0 : serviceInstanceName.hashCode()); + result = prime * result + ((serviceInstanceUUID == null) ? 0 : serviceInstanceUUID.hashCode()); + result = prime * result + ((serviceName == null) ? 0 : serviceName.hashCode()); + result = prime * result + ((serviceUUID == null) ? 0 : serviceUUID.hashCode()); + result = prime * result + ((widgetModelUUID == null) ? 0 : widgetModelUUID.hashCode()); + result = prime * result + ((widgetModelVersion == null) ? 0 : widgetModelVersion.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; + ServiceInstance other = (ServiceInstance) obj; + if (personaModelUUID == null) { + if (other.personaModelUUID != null) + return false; + } else if (!personaModelUUID.equals(other.personaModelUUID)) + return false; + if (serviceInstanceName == null) { + if (other.serviceInstanceName != null) + return false; + } else if (!serviceInstanceName.equals(other.serviceInstanceName)) + return false; + if (serviceInstanceUUID == null) { + if (other.serviceInstanceUUID != null) + return false; + } else if (!serviceInstanceUUID.equals(other.serviceInstanceUUID)) + return false; + if (serviceName == null) { + if (other.serviceName != null) + return false; + } else if (!serviceName.equals(other.serviceName)) + return false; + if (serviceUUID == null) { + if (other.serviceUUID != null) + return false; + } else if (!serviceUUID.equals(other.serviceUUID)) + return false; + if (widgetModelUUID == null) { + if (other.widgetModelUUID != null) + return false; + } else if (!widgetModelUUID.equals(other.widgetModelUUID)) + return false; + if (widgetModelVersion == null) { + if (other.widgetModelVersion != null) + return false; + } else if (!widgetModelVersion.equals(other.widgetModelVersion)) + return false; + return true; + } + } |