- java.lang.Object
-
- org.mal_lang.langspec.builders.AssociationBuilder
-
public final class AssociationBuilder extends Object
A builder for creatingAssociationobjects.- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description AssociationBuilder(String name, String leftAsset, String leftField, Multiplicity leftMultiplicity, String rightAsset, String rightField, Multiplicity rightMultiplicity)Constructs a newAssociationBuilderobject.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AssociationBuilderfromJson(JsonObject jsonAssociation)Creates a newAssociationBuilderfrom aJsonObject.StringgetLeftAsset()Returns the left asset of thisAssociationBuilderobject.StringgetLeftField()Returns the left field of thisAssociationBuilderobject.MultiplicitygetLeftMultiplicity()Returns the left multiplicity of thisAssociationBuilderobject.MetaBuildergetMeta()Returns the meta info of thisAssociationBuilderobject.StringgetName()Returns the name of thisAssociationBuilderobject.StringgetRightAsset()Returns the right asset of thisAssociationBuilderobject.StringgetRightField()Returns the right field of thisAssociationBuilderobject.MultiplicitygetRightMultiplicity()Returns the right multiplicity of thisAssociationBuilderobject.
-
-
-
Constructor Detail
-
AssociationBuilder
public AssociationBuilder(String name, String leftAsset, String leftField, Multiplicity leftMultiplicity, String rightAsset, String rightField, Multiplicity rightMultiplicity)
Constructs a newAssociationBuilderobject.- Parameters:
name- the name of the associationleftAsset- the left asset of the associationleftField- the left field of the associationleftMultiplicity- the left multiplicity of the associationrightAsset- the right asset of the associationrightField- the right field of the associationrightMultiplicity- the right multiplicity of the association- Throws:
NullPointerException- ifname,leftAsset,leftField,leftMultiplicity,rightAsset,rightField, orrightMultiplicityisnullIllegalArgumentException- ifname,leftAsset,leftField,rightAsset, orrightFieldis not a valid identifier- Since:
- 1.0.0
-
-
Method Detail
-
getName
public String getName()
Returns the name of thisAssociationBuilderobject.- Returns:
- the name of this
AssociationBuilderobject - Since:
- 1.0.0
-
getMeta
public MetaBuilder getMeta()
Returns the meta info of thisAssociationBuilderobject.- Returns:
- the meta info of this
AssociationBuilderobject - Since:
- 1.0.0
-
getLeftAsset
public String getLeftAsset()
Returns the left asset of thisAssociationBuilderobject.- Returns:
- the left asset of this
AssociationBuilderobject - Since:
- 1.0.0
-
getLeftField
public String getLeftField()
Returns the left field of thisAssociationBuilderobject.- Returns:
- the left field of this
AssociationBuilderobject - Since:
- 1.0.0
-
getLeftMultiplicity
public Multiplicity getLeftMultiplicity()
Returns the left multiplicity of thisAssociationBuilderobject.- Returns:
- the left multiplicity of this
AssociationBuilderobject - Since:
- 1.0.0
-
getRightAsset
public String getRightAsset()
Returns the right asset of thisAssociationBuilderobject.- Returns:
- the right asset of this
AssociationBuilderobject - Since:
- 1.0.0
-
getRightField
public String getRightField()
Returns the right field of thisAssociationBuilderobject.- Returns:
- the right field of this
AssociationBuilderobject - Since:
- 1.0.0
-
getRightMultiplicity
public Multiplicity getRightMultiplicity()
Returns the right multiplicity of thisAssociationBuilderobject.- Returns:
- the right multiplicity of this
AssociationBuilderobject - Since:
- 1.0.0
-
fromJson
public static AssociationBuilder fromJson(JsonObject jsonAssociation)
Creates a newAssociationBuilderfrom aJsonObject.- Parameters:
jsonAssociation- theJsonObject- Returns:
- a new
AssociationBuilder - Throws:
NullPointerException- ifjsonAssociationisnull- Since:
- 1.0.0
-
-