generated from it-at-m/oss-repository-en-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #337 from it-at-m/154-implementierung-wahlvorschlag
154 implementierung wahlvorschlag
- Loading branch information
Showing
37 changed files
with
1,946 additions
and
38 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
stack/keycloak/migration/add-authorities-eai-wahlvorschlag.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
id: add authorities eai wahlvorstand | ||
author: dragonfly28 | ||
realm: ${SSO_REALM} | ||
changes: | ||
- addRole: | ||
name: aoueai_BUSINESSACTION_LoadWahlvorschlaege | ||
clientRole: true | ||
clientId: ${SSO_CLIENT_ID} | ||
- assignRoleToGroup: | ||
group: allEaiAuthorities | ||
role: aoueai_BUSINESSACTION_LoadWahlvorschlaege | ||
clientId: ${SSO_CLIENT_ID} | ||
- addRole: | ||
name: aoueai_BUSINESSACTION_LoadWahlvorschlaegeListe | ||
clientRole: true | ||
clientId: ${SSO_CLIENT_ID} | ||
- assignRoleToGroup: | ||
group: allEaiAuthorities | ||
role: aoueai_BUSINESSACTION_LoadWahlvorschlaegeListe | ||
clientId: ${SSO_CLIENT_ID} | ||
- addRole: | ||
name: aoueai_BUSINESSACTION_LoadReferendumvorlagen | ||
clientRole: true | ||
clientId: ${SSO_CLIENT_ID} | ||
- assignRoleToGroup: | ||
group: allEaiAuthorities | ||
role: aoueai_BUSINESSACTION_LoadReferendumvorlagen | ||
clientId: ${SSO_CLIENT_ID} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...c/main/java/de/muenchen/oss/wahllokalsystem/eaiservice/domain/wahlvorschlag/Kandidat.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package de.muenchen.oss.wahllokalsystem.eaiservice.domain.wahlvorschlag; | ||
|
||
import de.muenchen.oss.wahllokalsystem.eaiservice.domain.BaseEntity; | ||
import jakarta.persistence.Entity; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.AllArgsConstructor; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
@Entity | ||
@Getter | ||
@Setter | ||
@EqualsAndHashCode(callSuper = true) | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@ToString(onlyExplicitlyIncluded = true, callSuper = true) | ||
public class Kandidat extends BaseEntity { | ||
|
||
@NotNull | ||
@ToString.Include | ||
String name; | ||
|
||
@NotNull | ||
@ToString.Include | ||
long listenposition; | ||
|
||
@NotNull | ||
@ToString.Include | ||
boolean direktkandidat; | ||
|
||
@NotNull | ||
@ToString.Include | ||
long tabellenSpalteInNiederschrift; | ||
|
||
@NotNull | ||
@ToString.Include | ||
boolean einzelbewerber; | ||
} |
29 changes: 29 additions & 0 deletions
29
...ava/de/muenchen/oss/wahllokalsystem/eaiservice/domain/wahlvorschlag/Referendumoption.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package de.muenchen.oss.wahllokalsystem.eaiservice.domain.wahlvorschlag; | ||
|
||
import de.muenchen.oss.wahllokalsystem.eaiservice.domain.BaseEntity; | ||
import jakarta.persistence.Entity; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.AllArgsConstructor; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
@Entity | ||
@Getter | ||
@Setter | ||
@EqualsAndHashCode(callSuper = true) | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@ToString(onlyExplicitlyIncluded = true, callSuper = true) | ||
public class Referendumoption extends BaseEntity { | ||
|
||
@NotNull | ||
@ToString.Include | ||
private String name; | ||
|
||
@NotNull | ||
@ToString.Include | ||
private Long position; | ||
} |
46 changes: 46 additions & 0 deletions
46
...va/de/muenchen/oss/wahllokalsystem/eaiservice/domain/wahlvorschlag/Referendumvorlage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package de.muenchen.oss.wahllokalsystem.eaiservice.domain.wahlvorschlag; | ||
|
||
import de.muenchen.oss.wahllokalsystem.eaiservice.domain.BaseEntity; | ||
import jakarta.persistence.CascadeType; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.OneToMany; | ||
import jakarta.validation.constraints.NotNull; | ||
import java.util.Set; | ||
import lombok.AllArgsConstructor; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
@Entity | ||
@Getter | ||
@Setter | ||
@EqualsAndHashCode(callSuper = true) | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@ToString(onlyExplicitlyIncluded = true, callSuper = true) | ||
public class Referendumvorlage extends BaseEntity { | ||
|
||
@NotNull | ||
@ToString.Include | ||
private String wahlvorschlagID; | ||
|
||
@NotNull | ||
@ToString.Include | ||
private long ordnungszahl; | ||
|
||
@NotNull | ||
@ToString.Include | ||
private String kurzname; | ||
|
||
@NotNull | ||
@ToString.Include | ||
private String frage; | ||
|
||
@OneToMany(cascade = CascadeType.ALL) | ||
@JoinColumn(name = "referendumvorlageid") | ||
private Set<Referendumoption> referendumoptionen; | ||
|
||
} |
41 changes: 41 additions & 0 deletions
41
...a/de/muenchen/oss/wahllokalsystem/eaiservice/domain/wahlvorschlag/Referendumvorlagen.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package de.muenchen.oss.wahllokalsystem.eaiservice.domain.wahlvorschlag; | ||
|
||
import de.muenchen.oss.wahllokalsystem.eaiservice.domain.BaseEntity; | ||
import jakarta.persistence.CascadeType; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.OneToMany; | ||
import jakarta.validation.constraints.NotNull; | ||
import java.util.Set; | ||
import lombok.AllArgsConstructor; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
@Entity | ||
@Getter | ||
@Setter | ||
@EqualsAndHashCode(callSuper = true) | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@ToString(onlyExplicitlyIncluded = true, callSuper = true) | ||
public class Referendumvorlagen extends BaseEntity { | ||
|
||
@NotNull | ||
@ToString.Include | ||
String wahlbezirkID; | ||
|
||
@NotNull | ||
@ToString.Include | ||
String wahlID; | ||
|
||
@NotNull | ||
@ToString.Include | ||
private String stimmzettelgebietID; | ||
|
||
@OneToMany(cascade = CascadeType.ALL) | ||
@JoinColumn(name = "referendumvorlagenID") | ||
private Set<Referendumvorlage> referendumvorlagen; | ||
} |
10 changes: 10 additions & 0 deletions
10
...hen/oss/wahllokalsystem/eaiservice/domain/wahlvorschlag/ReferendumvorlagenRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package de.muenchen.oss.wahllokalsystem.eaiservice.domain.wahlvorschlag; | ||
|
||
import java.util.Optional; | ||
import java.util.UUID; | ||
import org.springframework.data.repository.CrudRepository; | ||
|
||
public interface ReferendumvorlagenRepository extends CrudRepository<Referendumvorlagen, UUID> { | ||
|
||
Optional<Referendumvorlagen> findFirstByWahlbezirkIDAndWahlID(String wahlbezirkID, String wahlID); | ||
} |
41 changes: 41 additions & 0 deletions
41
...java/de/muenchen/oss/wahllokalsystem/eaiservice/domain/wahlvorschlag/Wahlvorschlaege.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package de.muenchen.oss.wahllokalsystem.eaiservice.domain.wahlvorschlag; | ||
|
||
import de.muenchen.oss.wahllokalsystem.eaiservice.domain.BaseEntity; | ||
import jakarta.persistence.CascadeType; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.OneToMany; | ||
import jakarta.validation.constraints.NotNull; | ||
import java.util.Set; | ||
import lombok.AllArgsConstructor; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
@Entity | ||
@Getter | ||
@Setter | ||
@EqualsAndHashCode(callSuper = true) | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@ToString(onlyExplicitlyIncluded = true, callSuper = true) | ||
public class Wahlvorschlaege extends BaseEntity { | ||
|
||
@NotNull | ||
@ToString.Include | ||
String wahlbezirkID; | ||
|
||
@NotNull | ||
@ToString.Include | ||
String wahlID; | ||
|
||
@NotNull | ||
@ToString.Include | ||
String stimmzettelgebietID; | ||
|
||
@OneToMany(cascade = CascadeType.ALL) | ||
@JoinColumn(name = "wahlvorschlaegeID") | ||
Set<Wahlvorschlag> wahlvorschlaege; | ||
} |
38 changes: 38 additions & 0 deletions
38
...de/muenchen/oss/wahllokalsystem/eaiservice/domain/wahlvorschlag/WahlvorschlaegeListe.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package de.muenchen.oss.wahllokalsystem.eaiservice.domain.wahlvorschlag; | ||
|
||
import de.muenchen.oss.wahllokalsystem.eaiservice.domain.BaseEntity; | ||
import jakarta.persistence.CascadeType; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.OneToMany; | ||
import jakarta.validation.constraints.NotNull; | ||
import java.time.LocalDate; | ||
import java.util.Set; | ||
import lombok.AllArgsConstructor; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
@Entity | ||
@Getter | ||
@Setter | ||
@EqualsAndHashCode(callSuper = true) | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@ToString(onlyExplicitlyIncluded = true, callSuper = true) | ||
public class WahlvorschlaegeListe extends BaseEntity { | ||
|
||
@NotNull | ||
@ToString.Include | ||
LocalDate wahltag; | ||
|
||
@NotNull | ||
@ToString.Include | ||
String wahlID; | ||
|
||
@OneToMany(cascade = CascadeType.ALL) | ||
@JoinColumn(name = "wahlvorschlaegelisteID") | ||
Set<Wahlvorschlaege> wahlvorschlaegeliste; | ||
} |
12 changes: 12 additions & 0 deletions
12
...n/oss/wahllokalsystem/eaiservice/domain/wahlvorschlag/WahlvorschlaegeListeRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package de.muenchen.oss.wahllokalsystem.eaiservice.domain.wahlvorschlag; | ||
|
||
import java.time.LocalDate; | ||
import java.util.Optional; | ||
import java.util.UUID; | ||
import org.springframework.data.repository.CrudRepository; | ||
|
||
public interface WahlvorschlaegeListeRepository extends CrudRepository<WahlvorschlaegeListe, UUID> { | ||
|
||
Optional<WahlvorschlaegeListe> findFirstByWahltagAndWahlID(LocalDate wahltag, String wahlID); | ||
|
||
} |
40 changes: 40 additions & 0 deletions
40
...n/java/de/muenchen/oss/wahllokalsystem/eaiservice/domain/wahlvorschlag/Wahlvorschlag.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package de.muenchen.oss.wahllokalsystem.eaiservice.domain.wahlvorschlag; | ||
|
||
import de.muenchen.oss.wahllokalsystem.eaiservice.domain.BaseEntity; | ||
import jakarta.persistence.CascadeType; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.OneToMany; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.AllArgsConstructor; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
@Entity | ||
@Getter | ||
@Setter | ||
@EqualsAndHashCode(callSuper = true) | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@ToString(onlyExplicitlyIncluded = true, callSuper = true) | ||
public class Wahlvorschlag extends BaseEntity { | ||
|
||
@NotNull | ||
@ToString.Include | ||
private long ordnungszahl; | ||
|
||
@NotNull | ||
@ToString.Include | ||
private String kurzname; | ||
|
||
@NotNull | ||
@ToString.Include | ||
private boolean erhaeltStimmen; | ||
|
||
@OneToMany(cascade = CascadeType.ALL) | ||
@JoinColumn(name = "wahlvorschlagID") | ||
private java.util.Set<Kandidat> kandidaten; | ||
} |
11 changes: 11 additions & 0 deletions
11
...muenchen/oss/wahllokalsystem/eaiservice/domain/wahlvorschlag/WahlvorschlagRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package de.muenchen.oss.wahllokalsystem.eaiservice.domain.wahlvorschlag; | ||
|
||
import java.util.Optional; | ||
import java.util.UUID; | ||
import org.springframework.data.repository.CrudRepository; | ||
|
||
public interface WahlvorschlagRepository extends CrudRepository<Wahlvorschlaege, UUID> { | ||
|
||
Optional<Wahlvorschlaege> findFirstByWahlbezirkIDAndWahlID(String wahlbezirkID, String wahlID); | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
...rc/main/java/de/muenchen/oss/wahllokalsystem/eaiservice/exception/ExceptionConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package de.muenchen.oss.wahllokalsystem.eaiservice.exception; | ||
|
||
import de.muenchen.oss.wahllokalsystem.wls.common.exception.util.ExceptionDataWrapper; | ||
|
||
public class ExceptionConstants { | ||
|
||
public static final String CODE_WAHLID_FEHLT = "001"; | ||
public static final String MESSAGE_WAHLID_FEHLT = "Die WahlID fehlt"; | ||
|
||
public static final String CODE_BEZIRKID_FEHLT = "002"; | ||
public static final String MESSAGE_BEZIRKID_FEHLT = "Die BezirkID fehlt"; | ||
|
||
//loadWahlvorschlaege | ||
public static final ExceptionDataWrapper LOADWAHLVORSCHLAEGE_WAHLID_FEHLT = new ExceptionDataWrapper( | ||
CODE_WAHLID_FEHLT, MESSAGE_WAHLID_FEHLT); | ||
public static final ExceptionDataWrapper LOADWAHLVORSCHLAEGE_BEZIRKID_FEHLT = new ExceptionDataWrapper( | ||
CODE_BEZIRKID_FEHLT, MESSAGE_BEZIRKID_FEHLT); | ||
|
||
//loadWahlvorschlaegeListe | ||
public static final ExceptionDataWrapper LOADWAHLVORSCHLAEGELISTE_WAHLID_FEHLT = new ExceptionDataWrapper( | ||
CODE_WAHLID_FEHLT, MESSAGE_WAHLID_FEHLT); | ||
|
||
//loadReferendumvorlagen | ||
public static final ExceptionDataWrapper LOADREFERENDUMVORLAGEN_WAHLBEZIRKID_FEHLT = new ExceptionDataWrapper( | ||
CODE_BEZIRKID_FEHLT, MESSAGE_BEZIRKID_FEHLT); | ||
public static final ExceptionDataWrapper LOADREFERENDUMVORLAGEN_WAHLID_FEHLT = new ExceptionDataWrapper( | ||
CODE_WAHLID_FEHLT, MESSAGE_WAHLID_FEHLT); | ||
|
||
/** | ||
* @throws IllegalAccessException when constructor is used | ||
*/ | ||
private ExceptionConstants() throws IllegalAccessException { | ||
throw new IllegalAccessException("dont create instanced - it is just a holder for constants"); | ||
} | ||
} |
Oops, something went wrong.