Package com.abstratt.kirra
Class Relationship
- java.lang.Object
-
- com.abstratt.kirra.NamedElement<O>
-
- com.abstratt.kirra.SubElement<O>
-
- com.abstratt.kirra.TypedElement<DataScope>
-
- com.abstratt.kirra.DataElement
-
- com.abstratt.kirra.Relationship
-
- All Implemented Interfaces:
Serializable
,Comparable<NamedElement<DataScope>>
public class Relationship extends DataElement
A relationship connects two entities. There are multipleRelationship.Style
s of relationships. A relationship represents one side of an association. Often, the same association will be represented as two, complementary relationships.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Relationship.Style
The style of a relationship.
-
Field Summary
Fields Modifier and Type Field Description protected String
associationName
protected String
associationNamespace
protected boolean
navigable
protected String
opposite
protected boolean
oppositeReadOnly
protected boolean
oppositeRequired
protected boolean
primary
protected Relationship.Style
style
-
Fields inherited from class com.abstratt.kirra.DataElement
derived, editable, initializable, mnemonic, position, unique
-
Fields inherited from class com.abstratt.kirra.TypedElement
enumerationLiterals, hasDefault, multiple, required, typeRef
-
Fields inherited from class com.abstratt.kirra.SubElement
definer, inherited, owner
-
Fields inherited from class com.abstratt.kirra.NamedElement
description, label, name, symbol, userVisible
-
-
Constructor Summary
Constructors Constructor Description Relationship()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAssociationName()
The name of the association that connects the two relationship ends.String
getAssociationNamespace()
String
getOpposite()
Returns the name of the opposite relationship, if available.Relationship.Style
getStyle()
What is the style of the relationship?boolean
isNavigable()
Is this end of the association navigable?boolean
isOppositeReadOnly()
boolean
isOppositeRequired()
boolean
isPrimary()
Is this the primary end of the association?void
setAssociationName(String associationName)
void
setAssociationNamespace(String associationNamespace)
void
setNavigable(boolean navigable)
void
setOpposite(String opposite)
void
setOppositeReadOnly(boolean oppositeReadOnly)
void
setOppositeRequired(boolean oppositeRequired)
void
setPrimary(boolean primary)
void
setStyle(Relationship.Style style)
-
Methods inherited from class com.abstratt.kirra.DataElement
getPosition, isDerived, isEditable, isInitializable, isMnemonic, isUnique, setDerived, setEditable, setInitializable, setMnemonic, setPosition, setUnique, toString
-
Methods inherited from class com.abstratt.kirra.TypedElement
equals, findElement, getEnumerationLiterals, getType, getTypeRef, hashCode, isHasDefault, isMultiple, isRequired, setEnumerationLiterals, setEnumerationLiterals, setHasDefault, setMultiple, setRequired, setTypeRef
-
Methods inherited from class com.abstratt.kirra.SubElement
getDefiner, getOwner, isInherited, setDefiner, setInherited, setOwner, setOwner
-
Methods inherited from class com.abstratt.kirra.NamedElement
compareTo, getDescription, getLabel, getName, getSymbol, isUserVisible, setDescription, setLabel, setName, setSymbol, setUserVisible
-
-
-
-
Field Detail
-
associationName
protected String associationName
-
associationNamespace
protected String associationNamespace
-
navigable
protected boolean navigable
-
opposite
protected String opposite
-
primary
protected boolean primary
-
style
protected Relationship.Style style
-
oppositeRequired
protected boolean oppositeRequired
-
oppositeReadOnly
protected boolean oppositeReadOnly
-
-
Method Detail
-
getAssociationName
public String getAssociationName()
The name of the association that connects the two relationship ends.
-
getAssociationNamespace
public String getAssociationNamespace()
-
getOpposite
public String getOpposite()
Returns the name of the opposite relationship, if available.- Returns:
- the name of the opposite relationship, or
null
-
getStyle
public Relationship.Style getStyle()
What is the style of the relationship?
-
isNavigable
public boolean isNavigable()
Is this end of the association navigable?
-
isPrimary
public boolean isPrimary()
Is this the primary end of the association?
-
setAssociationName
public void setAssociationName(String associationName)
-
setAssociationNamespace
public void setAssociationNamespace(String associationNamespace)
-
setNavigable
public void setNavigable(boolean navigable)
-
setOpposite
public void setOpposite(String opposite)
-
setPrimary
public void setPrimary(boolean primary)
-
setStyle
public void setStyle(Relationship.Style style)
-
setOppositeRequired
public void setOppositeRequired(boolean oppositeRequired)
-
isOppositeRequired
public boolean isOppositeRequired()
-
setOppositeReadOnly
public void setOppositeReadOnly(boolean oppositeReadOnly)
-
isOppositeReadOnly
public boolean isOppositeReadOnly()
-
-