-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed: multiple featured item creation endpoint converted to single
- Loading branch information
Showing
9 changed files
with
198 additions
and
13 deletions.
There are no files selected for viewing
57 changes: 53 additions & 4 deletions
57
src/main/java/edu/harvard/iq/dataverse/DataverseFeaturedItem.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 |
---|---|---|
@@ -1,22 +1,71 @@ | ||
package edu.harvard.iq.dataverse; | ||
|
||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.*; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.Min; | ||
import jakarta.validation.constraints.Size; | ||
|
||
@Entity | ||
@Table(indexes = {@Index(columnList = "dataverse_id"), @Index(columnList = "displayOrder")}) | ||
public class DataverseFeaturedItem { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "dataverse_id", nullable = false) | ||
private Dataverse dataverse; | ||
|
||
@NotBlank | ||
@Size(max = 15000) | ||
@Lob | ||
@Column(columnDefinition = "TEXT", nullable = false) | ||
private String content; | ||
|
||
@Min(0) | ||
@Column(nullable = false) | ||
private int displayOrder; | ||
|
||
private String imageFileName; | ||
|
||
public void setId(Long id) { | ||
this.id = id; | ||
} | ||
|
||
public Long getId() { | ||
return id; | ||
} | ||
|
||
public Dataverse getDataverse() { | ||
return dataverse; | ||
} | ||
|
||
public void setDataverse(Dataverse dataverse) { | ||
this.dataverse = dataverse; | ||
} | ||
|
||
public String getContent() { | ||
return content; | ||
} | ||
|
||
public void setContent(String content) { | ||
this.content = content; | ||
} | ||
|
||
public int getDisplayOrder() { | ||
return displayOrder; | ||
} | ||
|
||
public void setDisplayOrder(int displayOrder) { | ||
this.displayOrder = displayOrder; | ||
} | ||
|
||
public String getImageFileName() { | ||
return imageFileName; | ||
} | ||
|
||
public void setImageFileName(String imageFileName) { | ||
this.imageFileName = imageFileName; | ||
} | ||
} |
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
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