-
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.
- Loading branch information
Showing
9 changed files
with
147 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
package de.samply.annotations; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target(ElementType.PARAMETER) | ||
public @interface Bridgehead { | ||
} |
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
src/main/java/de/samply/bridgehead/BridgeheadOperationType.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.samply.bridgehead; | ||
|
||
public enum BridgeheadOperationType { | ||
SEND_QUERY_TO_BRIDGEHEAD_AND_EXECUTE, | ||
SEND_QUERY_TO_BRIDGEHEAD, | ||
CREATE_DATASHIELD_TOKEN | ||
|
||
} |
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,48 @@ | ||
package de.samply.db.model; | ||
|
||
import de.samply.bridgehead.BridgeheadOperationType; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import org.springframework.http.HttpStatus; | ||
|
||
import java.time.LocalDate; | ||
|
||
@Entity | ||
@Table(name = "bridgehead_operation", schema = "samply") | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class BridgeheadOperation { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "id", nullable = false) | ||
private Long id; | ||
|
||
@Column(name = "bridgehead", nullable = false) | ||
private String bridgehead; | ||
|
||
@Column(name = "user_email", nullable = false) | ||
private String userEmail; | ||
|
||
@Column(name = "timestamp", nullable = false) | ||
private LocalDate timestamp; | ||
|
||
@Column(name = "http_status", nullable = false) | ||
@Enumerated(EnumType.STRING) | ||
private HttpStatus httpStatus; | ||
|
||
@Column(name = "error") | ||
private String error; | ||
|
||
@Column(name = "type", nullable = false) | ||
@Enumerated(EnumType.STRING) | ||
private BridgeheadOperationType type; | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "project_id", nullable = false) | ||
private Project project; | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/de/samply/db/repository/BridgeheadOperationRepository.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.samply.db.repository; | ||
|
||
import de.samply.db.model.BridgeheadOperation; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface BridgeheadOperationRepository extends JpaRepository<BridgeheadOperation, Long> { | ||
|
||
} |
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