- java.lang.Object
-
- org.mal_lang.langspec.builders.AssociationBuilder
-
public final class AssociationBuilder extends Object
A builder for creatingAssociation
objects.- 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 newAssociationBuilder
object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AssociationBuilder
fromJson(JsonObject jsonAssociation)
Creates a newAssociationBuilder
from aJsonObject
.String
getLeftAsset()
Returns the left asset of thisAssociationBuilder
object.String
getLeftField()
Returns the left field of thisAssociationBuilder
object.Multiplicity
getLeftMultiplicity()
Returns the left multiplicity of thisAssociationBuilder
object.MetaBuilder
getMeta()
Returns the meta info of thisAssociationBuilder
object.String
getName()
Returns the name of thisAssociationBuilder
object.String
getRightAsset()
Returns the right asset of thisAssociationBuilder
object.String
getRightField()
Returns the right field of thisAssociationBuilder
object.Multiplicity
getRightMultiplicity()
Returns the right multiplicity of thisAssociationBuilder
object.
-
-
-
Constructor Detail
-
AssociationBuilder
public AssociationBuilder(String name, String leftAsset, String leftField, Multiplicity leftMultiplicity, String rightAsset, String rightField, Multiplicity rightMultiplicity)
Constructs a newAssociationBuilder
object.- 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
, orrightMultiplicity
isnull
IllegalArgumentException
- ifname
,leftAsset
,leftField
,rightAsset
, orrightField
is not a valid identifier- Since:
- 1.0.0
-
-
Method Detail
-
getName
public String getName()
Returns the name of thisAssociationBuilder
object.- Returns:
- the name of this
AssociationBuilder
object - Since:
- 1.0.0
-
getMeta
public MetaBuilder getMeta()
Returns the meta info of thisAssociationBuilder
object.- Returns:
- the meta info of this
AssociationBuilder
object - Since:
- 1.0.0
-
getLeftAsset
public String getLeftAsset()
Returns the left asset of thisAssociationBuilder
object.- Returns:
- the left asset of this
AssociationBuilder
object - Since:
- 1.0.0
-
getLeftField
public String getLeftField()
Returns the left field of thisAssociationBuilder
object.- Returns:
- the left field of this
AssociationBuilder
object - Since:
- 1.0.0
-
getLeftMultiplicity
public Multiplicity getLeftMultiplicity()
Returns the left multiplicity of thisAssociationBuilder
object.- Returns:
- the left multiplicity of this
AssociationBuilder
object - Since:
- 1.0.0
-
getRightAsset
public String getRightAsset()
Returns the right asset of thisAssociationBuilder
object.- Returns:
- the right asset of this
AssociationBuilder
object - Since:
- 1.0.0
-
getRightField
public String getRightField()
Returns the right field of thisAssociationBuilder
object.- Returns:
- the right field of this
AssociationBuilder
object - Since:
- 1.0.0
-
getRightMultiplicity
public Multiplicity getRightMultiplicity()
Returns the right multiplicity of thisAssociationBuilder
object.- Returns:
- the right multiplicity of this
AssociationBuilder
object - Since:
- 1.0.0
-
fromJson
public static AssociationBuilder fromJson(JsonObject jsonAssociation)
Creates a newAssociationBuilder
from aJsonObject
.- Parameters:
jsonAssociation
- theJsonObject
- Returns:
- a new
AssociationBuilder
- Throws:
NullPointerException
- ifjsonAssociation
isnull
- Since:
- 1.0.0
-
-