Class DataContractRelationship
java.lang.Object
org.odpi.openmetadata.frameworks.integration.bitol.odcs.DataContractRelationship
This class represents a relationship (typically a foreign key) between schema elements in an Open Data
Contract Standard (ODCS) data contract. At the schema object level both the "from" and "to" references are
supplied. At the property level the "from" is implicit (the property itself) and only the "to" reference is
supplied. Each reference is either a shorthand reference (object.property) or a fully qualified reference
(contractId.object.property). The standard allows a single reference or a list of references (for composite
keys); this bean always holds a list.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompare the values of the supplied object with those stored in the current object.Return the list of custom (key/value) properties attached to this element.getFrom()Return the source property reference(s) of the relationship.getId()Return the stable identifier of the relationship.getTo()Return the target property reference(s) of the relationship.getType()Return the type of relationship.inthashCode()Return hash code based on properties.voidsetCustomProperties(List<BitolCustomProperty> customProperties) Set up the list of custom (key/value) properties attached to this element.voidSet up the source property reference(s) of the relationship.voidSet up the stable identifier of the relationship.voidSet up the target property reference(s) of the relationship.voidSet up the type of relationship.toString()Standard toString method.
-
Constructor Details
-
DataContractRelationship
public DataContractRelationship()Default constructor
-
-
Method Details
-
getType
Return the type of relationship. The only standard value is foreignKey.- Returns:
- string type name
-
setType
Set up the type of relationship. The only standard value is foreignKey.- Parameters:
type- string type name
-
getFrom
Return the source property reference(s) of the relationship.- Returns:
- list of property references
-
setFrom
Set up the source property reference(s) of the relationship.- Parameters:
from- list of property references
-
getTo
Return the target property reference(s) of the relationship.- Returns:
- list of property references
-
setTo
Set up the target property reference(s) of the relationship.- Parameters:
to- list of property references
-
getCustomProperties
Return the list of custom (key/value) properties attached to this element.- Returns:
- list of custom properties
-
setCustomProperties
Set up the list of custom (key/value) properties attached to this element.- Parameters:
customProperties- list of custom properties
-
getId
Return the stable identifier of the relationship.- Returns:
- String
-
setId
Set up the stable identifier of the relationship.- Parameters:
id- String
-
toString
Standard toString method. -
equals
Compare the values of the supplied object with those stored in the current object. -
hashCode
public int hashCode()Return hash code based on properties.
-