-
Notifications
You must be signed in to change notification settings - Fork 7
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 #1187 from neicnordic/last-sync-sda-doa
Last commit to sync with the old SDA-DOA repo
- Loading branch information
Showing
12 changed files
with
296 additions
and
40 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
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
28 changes: 28 additions & 0 deletions
28
sda-doa/src/main/java/no/uio/ifi/localega/doa/model/Dataset.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,28 @@ | ||
package no.uio.ifi.localega.doa.model; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.Table; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
import org.hibernate.annotations.CacheConcurrencyStrategy; | ||
import org.hibernate.annotations.Immutable; | ||
|
||
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL) | ||
@Entity | ||
@Immutable | ||
@Getter | ||
@Setter | ||
@ToString | ||
@RequiredArgsConstructor | ||
@Table(name = "datasets", schema = "sda") | ||
public class Dataset { | ||
@Id | ||
private Long id; | ||
|
||
@Column(name = "stable_id", unique = true) | ||
private String stableId; | ||
} |
28 changes: 28 additions & 0 deletions
28
sda-doa/src/main/java/no/uio/ifi/localega/doa/model/DatasetReferences.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,28 @@ | ||
package no.uio.ifi.localega.doa.model; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.Table; | ||
import lombok.*; | ||
import org.hibernate.annotations.CacheConcurrencyStrategy; | ||
import org.hibernate.annotations.Immutable; | ||
|
||
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL) | ||
@Entity | ||
@Immutable | ||
@Getter | ||
@Setter | ||
@ToString | ||
@RequiredArgsConstructor | ||
@Table(name = "dataset_references", schema = "sda") | ||
public class DatasetReferences { | ||
@Id | ||
private Integer id; | ||
|
||
@Column(name = "dataset_id", nullable = false) | ||
private Integer datasetId; | ||
|
||
@Column(name = "reference_id", nullable = false) | ||
private String referenceId; | ||
} |
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
10 changes: 10 additions & 0 deletions
10
sda-doa/src/main/java/no/uio/ifi/localega/doa/repositories/DatasetReferencesRepository.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 no.uio.ifi.localega.doa.repositories; | ||
|
||
import no.uio.ifi.localega.doa.model.DatasetReferences; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface DatasetReferencesRepository extends JpaRepository<DatasetReferences, Integer> { | ||
DatasetReferences findByReferenceId(String referenceId); | ||
} |
9 changes: 9 additions & 0 deletions
9
sda-doa/src/main/java/no/uio/ifi/localega/doa/repositories/DatasetsRepository.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 no.uio.ifi.localega.doa.repositories; | ||
|
||
import no.uio.ifi.localega.doa.model.Dataset; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface DatasetsRepository extends JpaRepository<Dataset, Integer> { | ||
} |
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.