generated from digitalservicebund/java-application-template
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Show input fields based on reference type RISDEV-5238 * Add new endpoint for dependant literature doctypes RISDEV-5422 * Add frontend test RISDEV-5238 * Also add literature inputs to docunit references RISDEV-5238 * Fix e2e test RISDEV-5238 * Adapt to design RISDEV-5238 * Fix spotless RISDEV-0000 * Literature citations can be saved to database RISDEV-5436 * Bump schema RISDEV-0000 * Integration test for saving literature references RISDEV-5436 * Display of literature reference list item RISDEV-5237 * Renaming of method names RISDEV-5240 * Give more meaningful radio button ids RISDEV-0000 * Add field validation for literature references RISDEV-5454 * Fix backend tests RISDEV-0000 * RISDEV-0000 * Fix validation in docunit RISDEV-5454 * [WIP] save from edition RISDEV-5533 * Save lierature citations from edition RISDEV-5533 * Do not use repos in transformer RISDEV-5533 * Fix test RISDEV-0000 * Fix test RISDEV-0000 * Review finding RISDEV-0000 --------- Co-authored-by: Hanna Prinz <[email protected]>
- Loading branch information
1 parent
0330809
commit 4e2755a
Showing
40 changed files
with
1,690 additions
and
527 deletions.
There are no files selected for viewing
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
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
8 changes: 8 additions & 0 deletions
8
.../de/bund/digitalservice/ris/caselaw/adapter/database/jpa/DatabaseReferenceRepository.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,8 @@ | ||
package de.bund.digitalservice.ris.caselaw.adapter.database.jpa; | ||
|
||
import java.util.UUID; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface DatabaseReferenceRepository extends JpaRepository<ReferenceDTO, UUID> {} |
58 changes: 58 additions & 0 deletions
58
.../bund/digitalservice/ris/caselaw/adapter/database/jpa/DependentLiteratureCitationDTO.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,58 @@ | ||
package de.bund.digitalservice.ris.caselaw.adapter.database.jpa; | ||
|
||
import de.bund.digitalservice.ris.caselaw.domain.DependentLiteratureCitationType; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Convert; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.ManyToOne; | ||
import jakarta.persistence.Table; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotNull; | ||
import java.util.UUID; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder(toBuilder = true) | ||
@Entity | ||
@Table(schema = "incremental_migration", name = "dependent_literature_citation") | ||
public class DependentLiteratureCitationDTO { | ||
@Id private UUID id; | ||
|
||
private String author; | ||
|
||
@NotBlank private String citation; | ||
|
||
@JoinColumn(name = "document_type_id") | ||
@ManyToOne | ||
private DocumentTypeDTO documentType; | ||
|
||
@Column(name = "legal_periodical_raw_value") | ||
@NotNull | ||
private String legalPeriodicalRawValue; | ||
|
||
@JoinColumn(name = "legal_periodical_id") | ||
@ManyToOne | ||
private LegalPeriodicalDTO legalPeriodical; | ||
|
||
@Column(name = "dtype") | ||
@Convert(converter = DependentLiteratureCitationTypeConverter.class) | ||
private DependentLiteratureCitationType type; | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "documentation_unit_id") | ||
private DocumentationUnitDTO documentationUnit; | ||
|
||
@Column(name = "document_type_raw_value") | ||
private String documentTypeRawValue; | ||
|
||
private Integer rank; | ||
} |
9 changes: 9 additions & 0 deletions
9
...igitalservice/ris/caselaw/adapter/database/jpa/DependentLiteratureCitationRepository.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,9 @@ | ||
package de.bund.digitalservice.ris.caselaw.adapter.database.jpa; | ||
|
||
import java.util.UUID; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface DependentLiteratureCitationRepository | ||
extends JpaRepository<DependentLiteratureCitationDTO, UUID> {} |
20 changes: 20 additions & 0 deletions
20
...talservice/ris/caselaw/adapter/database/jpa/DependentLiteratureCitationTypeConverter.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,20 @@ | ||
package de.bund.digitalservice.ris.caselaw.adapter.database.jpa; | ||
|
||
import de.bund.digitalservice.ris.caselaw.domain.DependentLiteratureCitationType; | ||
import jakarta.persistence.AttributeConverter; | ||
import jakarta.persistence.Converter; | ||
|
||
@Converter(autoApply = true) | ||
public class DependentLiteratureCitationTypeConverter | ||
implements AttributeConverter<DependentLiteratureCitationType, String> { | ||
|
||
@Override | ||
public String convertToDatabaseColumn(DependentLiteratureCitationType attribute) { | ||
return (attribute == null) ? null : attribute.getValue(); // Store "passive" or "active" | ||
} | ||
|
||
@Override | ||
public DependentLiteratureCitationType convertToEntityAttribute(String dbData) { | ||
return (dbData == null) ? null : DependentLiteratureCitationType.of(dbData); | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.