Skip to content

Commit

Permalink
Merge pull request #15 from ncats/springBootUpdate
Browse files Browse the repository at this point in the history
revert from spring boot 2.7.11 to 2.4.5
  • Loading branch information
blueSwordfish authored Sep 13, 2023
2 parents f59b5a9 + dcfdc03 commit 3f3f9cb
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 255 deletions.
2 changes: 1 addition & 1 deletion applications-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>2.7.11</version>
<version>2.4.5</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,6 @@ protected DateFormat initialValue() {
@Column(name = "STATUS")
public String status;

/*
@Indexable(facet = true, name = "Source")
@Column(name = "SOURCE")
public String source;
*/

@Indexable(facet = true, name = "Public Domain")
@Column(name = "PUBLIC_DOMAIN")
public String publicDomain;
Expand All @@ -126,7 +120,6 @@ protected DateFormat initialValue() {
@Column(name = "EXTERNAL_TITLE")
public String externalTitle;


@ToString.Exclude
@LazyCollection(LazyCollectionOption.FALSE)
@OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "owner")
Expand Down Expand Up @@ -245,63 +238,6 @@ public String getStatusDateByYear(){
return result;
}

/*
@JsonIgnore
@Indexable(facet=true, name="Submit Date")
public String getSubmitDateRange(){
String result = HAS_NO_SUBMIT_DATE;
if (this.submitDate != null) {
LocalDate localDateSubmitDate = Instant.ofEpochMilli(this.submitDate.getTime()).atZone(ZoneId.systemDefault()).toLocalDate();
//Instant instant = Instant.ofEpochMilli(this.submitDate.getTime());
//LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, ZoneId.systemDefault());
// LocalDate localDateSubmitDate = localDateTime.toLocalDate();
//System.out.println("Submit date : " + localDateSubmitDate.toString());
// Period days = Period.between(localDateSubmitDate.withDayOfMonth(1), todayDate.withDayOfMonth(1));
long month = ChronoUnit.MONTHS.between(localDateSubmitDate.withDayOfMonth(1), todayDate.withDayOfMonth(1));
// int day = days.getDays();
//int months = days.getMonths();
// int years = days.getYears();
//System.out.println("DAYS: " + days + " " + day + " " + months + " " + years);
// System.out.println("MONTH: " + month);
//if (day <= 7) {
// result = THIS_WEEK;
// }
if (month > 24) {
result = OLDER_THAN_2_YEARS;
}
if ((month >= 13) && (month <= 24)) {
result = PAST_2_YEARS;
}
if ((month >= 7) && (month <= 12)) {
result = PAST_1_YEAR;
}
if ((month >= 2) && (month <= 6)) {
result = PAST_6_MONTHS;
}
if (month == 1) {
result = THIS_MONTH;
}
}
return result;
}
*/

/*
@JsonIgnore
@Indexable(facet=true, name="Product Name Deprecated")
public String getProductNameDeprecated(){
String result = "";
for(ApplicationProduct p: this.applicationProductList){
for(ApplicationProductName pn: p.applicationProductNameList){
if (pn != null) {
result = pn.deprecated;
}
}
}
return result;
}
*/

@JsonIgnore
@Indexable(facet=true, name="Deprecated")
public String getDeprecated(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
@MappedSuperclass
public class ApplicationCommanData extends AbstractGsrsEntity implements ForceUpdateDirtyMakerMixin{

// @Id
// @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "appSeq")
// public Long id;

@Indexable(facet = true, name = "Record Created By")
@Column(name = "CREATED_BY")
private String createdBy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,6 @@ public class ApplicationIndication extends ApplicationCommanData {
@JoinColumn(name="APPLICATION_ID_FK", referencedColumnName="APPLICATION_ID")
public Application owner;

/*
@Column(name = "CREATED_BY")
public String createdBy;
@Column(name = "MODIFIED_BY")
public String modifiedBy;
@JsonSerialize(using = GsrsDateSerializer.class)
@JsonDeserialize(using = GsrsDateDeserializer.class)
@CreatedDate
@Indexable( name = "Create Date", sortable=true)
@Column(name = "CREATE_DATE")
private Date creationDate;
@JsonSerialize(using = GsrsDateSerializer.class)
@JsonDeserialize(using = GsrsDateDeserializer.class)
@LastModifiedDate
@Indexable( name = "Last Modified Date", sortable=true)
@Column(name = "MODIFY_DATE")
private Date lastModifiedDate;
*/

public ApplicationIndication () {}

public void setOwner(Application application) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,8 @@ public class ApplicationIngredient extends AbstractGsrsEntity {
@Column(name="APPLICATION_TYPE_ID")
public Long id;

// @Column(name="PRODUCT_ID")
// public String productId;

@Column(name="APPLICANT_INGRED_NAME")
public String applicantIngredName;
/*
@Indexable(facet = true, name = "Bdnum")
@Column(name="BDNUM")
public String bdnum;
@Column(name="BASIS_OF_STRENGTH")
public String basisOfStrengthBdnum;
*/

@Indexable(facet = true, name = "Substance Key")
@Column(name="SUBSTANCE_KEY")
Expand Down Expand Up @@ -163,29 +152,4 @@ public void preUpdate() {
}
}

/*
@Transient
@JsonProperty("_substanceUuid")
public String _substanceUuid;
@Transient
@JsonProperty("_approvalID")
public String _approvalID;
@Transient
@JsonProperty("_name")
public String _name;
@Transient
@JsonProperty("_basisOfStrengthSubstanceUuid")
public String _basisOfStrengthSubstanceUuid;
@Transient
@JsonProperty("_basisOfStrengthApprovalID")
public String _basisOfStrengthApprovalID;
@Transient
@JsonProperty("_basisOfStrengthName")
public String _basisOfStrengthName;
*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ public class ApplicationProduct extends ApplicationCommanData {
@Column(name = "PRODUCT_ID")
public Long id;

// @Column(name="APPLICATION_ID")
// public String applicationId;

@Indexable(facet = true, name = "Dosage Form")
@Column(name="DOSAGE_FORM")
public String dosageForm;
Expand All @@ -52,16 +49,6 @@ public class ApplicationProduct extends ApplicationCommanData {
@Column(name="REVIEW_DATE")
public Date reviewDate;

/*
@Indexable(indexed=false)
@ParentReference
@EqualsAndHashCode.Exclude
@JsonIgnore
@ManyToOne(cascade = CascadeType.PERSIST)
@JoinColumn(name="APPLICATION_ID")
public Application owner;
*/

@Indexable(indexed=false)
@ParentReference
@EqualsAndHashCode.Exclude
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,39 +47,4 @@ public class ApplicationProductName extends ApplicationCommanData {
public void setOwner(ApplicationProduct applicationProduct) {
this.owner = applicationProduct;
}

/*
@Version
@Column(name = "INTERNAL_VERSION")
public Long internalVersion;
@Column(name = "CREATED_BY")
public String createdBy;
@Column(name = "MODIFIED_BY")
public String modifiedBy;
@JsonSerialize(using = GsrsDateSerializer.class)
@JsonDeserialize(using = GsrsDateDeserializer.class)
@CreatedDate
@Indexable( name = "Create Date", sortable=true)
@Column(name = "CREATE_DATE")
private Date creationDate;
@JsonSerialize(using = GsrsDateSerializer.class)
@JsonDeserialize(using = GsrsDateDeserializer.class)
@LastModifiedDate
@Indexable( name = "Last Modified Date", sortable=true)
@Column(name = "MODIFY_DATE")
private Date lastModifiedDate;
*/

/*
@Indexable(indexed=false)
@JsonIgnore
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name="PRODUCT_ID")
public ApplicationProduct productFromName;
*/

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,58 +14,58 @@
public class ClinicalTrial extends AbstractGsrsEntity {

@Id
@Column(name = "NCTN", length=22)
@Column(name = "NCTN")
@JsonProperty("nctNumber")
public String nctn;

@Column(name = "TITLE", length=4000)
@Column(name = "TITLE")
public String title;

@Column(name = "RECRUITMENT", length=4000)
@Column(name = "RECRUITMENT")
public String recruitment;

@Column(name = "RESULTS_FIRST_RECEIVED", length=4000)
@Column(name = "RESULTS_FIRST_RECEIVED")
public String resultsFirstRecieved;

@Column(name = "CONDITIONS", length=4000)
@Column(name = "CONDITIONS")
public String conditions;

@Column(name = "INTERVENTION", length=4000)
@Column(name = "INTERVENTION")
public String intervention;

@Column(name = "SPONSOR", length=4000)
@Column(name = "SPONSOR")
public String sponsor;

@Column(name = "PHASES", length=2000)
@Column(name = "PHASES")
public String phases;

@Column(name = "FUNDED_BYS", length=2000)
@Column(name = "FUNDED_BYS")
public String fundedBys;

@Indexable(facet = true, name = "Study Types")
@Column(name = "STUDY_TYPES", length=2000)
@Column(name = "STUDY_TYPES")
public String studyTypes;

@Column(name = "STUDY_DESIGNS", length=2000)
@Column(name = "STUDY_DESIGNS")
public String studyDesigns;

@Indexable(facet = true, name = "Study Results")
@Column(name = "STUDY_RESULTS", length=4000)
@Column(name = "STUDY_RESULTS")
public String studyResults;

@Column(name = "AGE_GROUPS", length=50)
@Column(name = "AGE_GROUPS")
public String ageGroups;

@Column(name = "GENDER", length=50)
@Column(name = "GENDER")
public String gender;

@Column(name = "ENROLLMENT", length=2000)
@Column(name = "ENROLLMENT")
public String enrollment;

@Column(name = "OTHER_IDS", length=500)
@Column(name = "OTHER_IDS")
public String otherIds;

@Column(name = "ACRONYM", length=4000)
@Column(name = "ACRONYM")
public String acronym;

@Column(name = "START_DATE")
Expand All @@ -86,19 +86,13 @@ public class ClinicalTrial extends AbstractGsrsEntity {
@Column(name = "LAST_UPDATED")
public Date lastUpdated;

@Column(name = "OUTCOME_MEASURES", length=4000)
@Column(name = "OUTCOME_MEASURES")
public String outcomeMeasures;

@Column(name = "URL", length=4000)
@Column(name = "URL")
public String url;

@Column(name = "LOCATIONS", length=4000)
public String locations;
/*
@JsonIgnore
@Indexable(indexed=false)
@JoinColumn(name = "NCT_NUMBER", referencedColumnName = "NCTN")
@OneToMany(mappedBy="clinicalTrialApp", fetch=FetchType.EAGER, cascade = CascadeType.ALL)
public List<ClinicalTrialApplication> clinicalTrialApplicationList = new ArrayList<ClinicalTrialApplication>();
*/
/*@Column(name = "LOCATIONS", length=4000)
public String locations;*/

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,6 @@ public class AppIngredientAll extends AbstractGsrsEntity {
@Column(name="INGREDIENT_TYPE")
public String ingredientType;

/*
@ManyToOne(optional=true)
@JoinColumn(name="BDNUM", insertable=false, updatable=false)
public BdnumName bdnumName;
@JsonIgnore
@ManyToOne
@JoinColumn(name="BDNUM")
@Indexable(indexed = false)
public SubstanceAll subAllAppType;
*/

public AppIngredientAll () {}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,4 @@ public Date convertStringToDate(String strDate) {

return dtDate;
}

/*
@JsonIgnore
@Indexable(facet=true, name= "Ingredient Type")
public List<String> getIndexedIngredientTypes(){
if(this.ingredientType!=null){
return Arrays.asList(this.ingredientType.split("\\|"));
}
return new ArrayList<String>();
}
*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ public class ApplicationDarrts extends AbstractGsrsEntity {
})
public List<ApplicationIndicationDarrts> indicationList = new ArrayList<ApplicationIndicationDarrts>();

// public List<String> indicationList = new ArrayList<>();
// public List<ApplicationDarrtsIngredient> ingredientList = new ArrayList<>();

public ApplicationDarrts () {}

public String getAppType() {
Expand Down
Loading

0 comments on commit 3f3f9cb

Please sign in to comment.