Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Portals committed Jun 8, 2024
1 parent cbbf966 commit dbd8073
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public Client toDomain(ClientEntity clientEntity) {
clientEntity.clientRestriction == null
? null
: new ClientRestriction(
new ClientRestrictionId(clientEntity.clientRestriction.getRestrictionId()),
new ClientRestrictionId(clientEntity.clientRestriction.getId()),
clientEntity.clientRestriction.getSuperGroupRestrictions().stream()
.map(
clientRestrictionSuperGroupEntity ->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package it.chalmers.gamma.adapter.secondary.jpa.client.restriction;

import it.chalmers.gamma.adapter.secondary.jpa.client.ClientEntity;
import it.chalmers.gamma.adapter.secondary.jpa.util.ImmutableEntity;
import jakarta.persistence.*;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

@Entity
@Table(name = "g_client_restriction")
public class ClientRestrictionEntity {
public class ClientRestrictionEntity extends ImmutableEntity<UUID> {

@Column(name = "restriction_id", columnDefinition = "uuid")
protected UUID restrictionId;
Expand Down Expand Up @@ -37,11 +38,12 @@ public void setSuperGroupRestrictions(
this.superGroupRestrictions = superGroupRestrictions;
}

public UUID getRestrictionId() {
return restrictionId;
}

public List<ClientRestrictionSuperGroupEntity> getSuperGroupRestrictions() {
return superGroupRestrictions;
}

@Override
public UUID getId() {
return restrictionId;
}
}

0 comments on commit dbd8073

Please sign in to comment.