-
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 #316 from neicnordic/using-refrence-id-for-export
use reference id for exporting data
- Loading branch information
Showing
6 changed files
with
110 additions
and
7 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
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; | ||
} |
32 changes: 32 additions & 0 deletions
32
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,32 @@ | ||
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; | ||
import org.hibernate.proxy.HibernateProxy; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.Objects; | ||
|
||
@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
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
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