Skip to content
This repository was archived by the owner on Feb 15, 2024. It is now read-only.

Commit ab7af18

Browse files
author
Atlassian Bamboo
committed
Updating raw Java classes to 1.1.2-SNAPSHOT
1 parent 4c5aeee commit ab7af18

3 files changed

Lines changed: 26 additions & 15 deletions

File tree

src/main/java/io/adminshell/aas/v3/model/Entity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ public interface Entity extends SubmodelElement {
6363
*
6464
* More information under https://admin-shell.io/aas/3/0/RC01/Entity/externalAssetId
6565
*
66-
* @return Returns the IdentifierKeyValuePair for the property externalAssetId.
66+
* @return Returns the List of IdentifierKeyValuePairs for the property externalAssetIds.
6767
*/
6868
@IRI("https://admin-shell.io/aas/3/0/RC01/Entity/externalAssetId")
69-
IdentifierKeyValuePair getExternalAssetId();
69+
List<IdentifierKeyValuePair> getExternalAssetIds();
7070

7171
/**
7272
* Reference to an identifier key value pair representing an external identifier of the asset
@@ -80,9 +80,9 @@ public interface Entity extends SubmodelElement {
8080
*
8181
* More information under https://admin-shell.io/aas/3/0/RC01/Entity/externalAssetId
8282
*
83-
* @param externalAssetId desired value for the property externalAssetId.
83+
* @param externalAssetIds desired value for the property externalAssetIds.
8484
*/
85-
void setExternalAssetId(IdentifierKeyValuePair externalAssetId);
85+
void setExternalAssetIds(List<IdentifierKeyValuePair> externalAssetIds);
8686

8787
/**
8888
* Describes whether the entity is a co-managed entity or a self-managed entity.

src/main/java/io/adminshell/aas/v3/model/builder/EntityBuilder.java

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,24 @@ public B globalAssetId(Reference globalAssetId) {
2323
}
2424

2525
/**
26-
* This function allows setting a value for externalAssetId
26+
* This function allows setting a value for externalAssetIds
2727
*
28-
* @param externalAssetId desired value to be set
29-
* @return Builder object with new value for externalAssetId
28+
* @param externalAssetIds desired value to be set
29+
* @return Builder object with new value for externalAssetIds
30+
*/
31+
public B externalAssetIds(List<IdentifierKeyValuePair> externalAssetIds) {
32+
getBuildingInstance().setExternalAssetIds(externalAssetIds);
33+
return getSelf();
34+
}
35+
36+
/**
37+
* This function allows adding a value to the List externalAssetIds
38+
*
39+
* @param externalAssetId desired value to be added
40+
* @return Builder object with new value for externalAssetIds
3041
*/
3142
public B externalAssetId(IdentifierKeyValuePair externalAssetId) {
32-
getBuildingInstance().setExternalAssetId(externalAssetId);
43+
getBuildingInstance().getExternalAssetIds().add(externalAssetId);
3344
return getSelf();
3445
}
3546

src/main/java/io/adminshell/aas/v3/model/impl/DefaultEntity.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class DefaultEntity implements Entity {
2626
protected EntityType entityType;
2727

2828
@IRI("https://admin-shell.io/aas/3/0/RC01/Entity/externalAssetId")
29-
protected IdentifierKeyValuePair externalAssetId;
29+
protected List<IdentifierKeyValuePair> externalAssetIds = new ArrayList<>();
3030

3131
@IRI("https://admin-shell.io/aas/3/0/RC01/Entity/globalAssetId")
3232
protected Reference globalAssetId;
@@ -63,7 +63,7 @@ public DefaultEntity() {}
6363
@Override
6464
public int hashCode() {
6565
return Objects.hash(this.globalAssetId,
66-
this.externalAssetId,
66+
this.externalAssetIds,
6767
this.entityType,
6868
this.statements,
6969
this.category,
@@ -87,7 +87,7 @@ public boolean equals(Object obj) {
8787
} else {
8888
DefaultEntity other = (DefaultEntity) obj;
8989
return Objects.equals(this.globalAssetId, other.globalAssetId) &&
90-
Objects.equals(this.externalAssetId, other.externalAssetId) &&
90+
Objects.equals(this.externalAssetIds, other.externalAssetIds) &&
9191
Objects.equals(this.entityType, other.entityType) &&
9292
Objects.equals(this.statements, other.statements) &&
9393
Objects.equals(this.category, other.category) &&
@@ -112,13 +112,13 @@ public void setGlobalAssetId(Reference globalAssetId) {
112112
}
113113

114114
@Override
115-
public IdentifierKeyValuePair getExternalAssetId() {
116-
return externalAssetId;
115+
public List<IdentifierKeyValuePair> getExternalAssetIds() {
116+
return externalAssetIds;
117117
}
118118

119119
@Override
120-
public void setExternalAssetId(IdentifierKeyValuePair externalAssetId) {
121-
this.externalAssetId = externalAssetId;
120+
public void setExternalAssetIds(List<IdentifierKeyValuePair> externalAssetIds) {
121+
this.externalAssetIds = externalAssetIds;
122122
}
123123

124124
@Override

0 commit comments

Comments
 (0)