org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ReferenceDataAssetProperties Maven / Gradle / Ivy
/* SPDX-License-Identifier: Apache 2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.accessservices.digitalarchitecture.properties;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import java.util.*;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;
/**
* ReferenceDataAssetProperties is a java bean used to create assets associated with the digital architecture.
*/
@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown=true)
public class ReferenceDataAssetProperties extends ReferenceableProperties
{
private static final long serialVersionUID = 1L;
private String displayName = null;
private String description = null;
/**
* Default constructor
*/
public ReferenceDataAssetProperties()
{
}
/**
* Copy/clone constructor. Note, this is a deep copy
*
* @param template object to copy
*/
public ReferenceDataAssetProperties(ReferenceDataAssetProperties template)
{
super(template);
if (template != null)
{
displayName = template.getDisplayName();
description = template.getDescription();
}
}
/**
* Returns the stored display name property for the asset.
* If no display name is available then null is returned.
*
* @return String name
*/
public String getDisplayName()
{
return displayName;
}
/**
* Set up the stored display name property for the asset.
*
* @param displayName String name
*/
public void setDisplayName(String displayName)
{
this.displayName = displayName;
}
/**
* Returns the stored description property for the asset.
* If no description is provided then null is returned.
*
* @return description String text
*/
public String getDescription()
{
return description;
}
/**
* Set up the stored description property associated with the asset.
*
* @param description String text
*/
public void setDescription(String description)
{
this.description = description;
}
/**
* Standard toString method.
*
* @return print out of variables in a JSON-style
*/
@Override
public String toString()
{
return "ReferenceDataAssetProperties{" +
"displayName='" + displayName + '\'' +
", description='" + description + '\'' +
", qualifiedName='" + getQualifiedName() + '\'' +
", additionalProperties=" + getAdditionalProperties() +
", classifications=" + getClassifications() +
", typeName='" + getTypeName() + '\'' +
", extendedProperties=" + getExtendedProperties() +
'}';
}
/**
* Compare the values of the supplied object with those stored in the current object.
*
* @param objectToCompare supplied object
* @return boolean result of comparison
*/
@Override
public boolean equals(Object objectToCompare)
{
if (this == objectToCompare)
{
return true;
}
if (objectToCompare == null || getClass() != objectToCompare.getClass())
{
return false;
}
if (!super.equals(objectToCompare))
{
return false;
}
ReferenceDataAssetProperties that = (ReferenceDataAssetProperties) objectToCompare;
return Objects.equals(displayName, that.displayName) &&
Objects.equals(description, that.description);
}
/**
* Return has code based on properties.
*
* @return int
*/
@Override
public int hashCode()
{
return Objects.hash(super.hashCode(), displayName, description);
}
}