Class ForeignKeyProperties
java.lang.Object
org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties
org.odpi.openmetadata.frameworks.openmetadata.properties.schema.ForeignKeyProperties
ForeignKeyProperties describes a foreign key relationship between two columns in different
tables in a database. The foreign key shows where the primary key of one table is used in another
table to show they are related. Foreign key relationships are typically discovered from analysis
of the values stored in the rows, or asserted by the DBA/steward.
-
Constructor Summary
ConstructorDescriptionDefault constructorForeignKeyProperties
(ForeignKeyProperties template) Copy/clone constructor for a foreign key. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compare the values of the supplied object with those stored in the current object.int
Returns the level of confidence that the foreign key is correct.Return the description for the foreign key.getName()
Returns the stored display name property for the foreign key.Returns the id of the source of the knowledge of the foreign key.Returns the name of the steward who assigned the foreign key (or approved the discovered value).int
hashCode()
Return hash code based on properties.void
setConfidence
(int confidence) Set up the level of confidence that the foreign key is correct.void
setDescription
(String description) Set up description of the foreign key.void
Set up the display name for UIs and reports.void
Set up the id of the source of the knowledge of the foreign key.void
setSteward
(String steward) Set up the id of the steward who assigned the foreign key (or approved the discovered value).toString()
Standard toString method.Methods inherited from class org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties
getEffectiveFrom, getEffectiveTo, getExtendedProperties, setEffectiveFrom, setEffectiveTo, setExtendedProperties
-
Constructor Details
-
ForeignKeyProperties
public ForeignKeyProperties()Default constructor -
ForeignKeyProperties
Copy/clone constructor for a foreign key.- Parameters:
template
- template object to copy.
-
-
Method Details
-
setName
Set up the display name for UIs and reports.- Parameters:
name
- String name
-
getName
Returns the stored display name property for the foreign key.- Returns:
- String name
-
setDescription
Set up description of the foreign key.- Parameters:
description
- String
-
getDescription
Return the description for the foreign key.- Returns:
- String description
-
setConfidence
public void setConfidence(int confidence) Set up the level of confidence that the foreign key is correct. This is a value between 0 and 100.- Parameters:
confidence
- int
-
getConfidence
public int getConfidence()Returns the level of confidence that the foreign key is correct. This is a value between 0 and 100.- Returns:
- int
-
setSteward
Set up the id of the steward who assigned the foreign key (or approved the discovered value).- Parameters:
steward
- user id or name of steward
-
getSteward
Returns the name of the steward who assigned the foreign key (or approved the discovered value).- Returns:
- user id or name of steward
-
setSource
Set up the id of the source of the knowledge of the foreign key.- Parameters:
source
- String id
-
getSource
Returns the id of the source of the knowledge of the foreign key.- Returns:
- String id
-
toString
Standard toString method.- Overrides:
toString
in classRelationshipProperties
- Returns:
- print out of variables in a JSON-style
-
equals
Compare the values of the supplied object with those stored in the current object.- Overrides:
equals
in classRelationshipProperties
- Parameters:
objectToCompare
- supplied object- Returns:
- boolean result of comparison
-
hashCode
public int hashCode()Return hash code based on properties.- Overrides:
hashCode
in classRelationshipProperties
- Returns:
- int
-