-
Notifications
You must be signed in to change notification settings - Fork 5
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 #83 from waterflow80/md-table-element-collection
Added a metadata table - one-to-many relationship enhanced
- Loading branch information
Showing
12 changed files
with
151 additions
and
51 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
17 changes: 0 additions & 17 deletions
17
src/main/java/uk/ac/ebi/eva/evaseqcol/entities/SeqColId.java
This file was deleted.
Oops, something went wrong.
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
57 changes: 57 additions & 0 deletions
57
src/main/java/uk/ac/ebi/eva/evaseqcol/entities/SeqColMetadataEntity.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,57 @@ | ||
package uk.ac.ebi.eva.evaseqcol.entities; | ||
|
||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import org.hibernate.annotations.CreationTimestamp; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Embeddable; | ||
import javax.persistence.EnumType; | ||
import javax.persistence.Enumerated; | ||
import javax.persistence.Temporal; | ||
import javax.persistence.TemporalType; | ||
import java.util.Date; | ||
|
||
@Data | ||
@Embeddable | ||
@NoArgsConstructor | ||
public class SeqColMetadataEntity { | ||
|
||
@Column(name = "source_id") | ||
private String sourceIdentifier; // Eg: INSDC Acession | ||
|
||
@Column(name = "source_url") | ||
private String sourceUrl; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(name = "naming_convention") | ||
private SeqColEntity.NamingConvention namingConvention; | ||
|
||
@Column(name = "created_on", nullable = false) | ||
@Temporal(TemporalType.TIMESTAMP) | ||
@CreationTimestamp | ||
private Date createdOn = new Date(); | ||
|
||
public SeqColMetadataEntity(String sourceIdentifier, String sourceUrl, SeqColEntity.NamingConvention namingConvention, | ||
Date createdOn) { | ||
this.sourceIdentifier = sourceIdentifier; | ||
this.sourceUrl = sourceUrl; | ||
this.namingConvention = namingConvention; | ||
this.createdOn = createdOn; | ||
} | ||
|
||
public SeqColMetadataEntity setNamingConvention(SeqColEntity.NamingConvention namingConvention) { | ||
this.namingConvention = namingConvention; | ||
return this; | ||
} | ||
|
||
public SeqColMetadataEntity setSourceIdentifier(String sourceIdentifier) { | ||
this.sourceIdentifier = sourceIdentifier; | ||
return this; | ||
} | ||
|
||
public SeqColMetadataEntity setSourceUrl(String sourceUrl) { | ||
this.sourceUrl = sourceUrl; | ||
return this; | ||
} | ||
} |
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
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.