From 6b309394a1d2f2867858467c225bca4fd13c1b74 Mon Sep 17 00:00:00 2001 From: Kenji Tanaka Date: Wed, 9 Aug 2023 09:26:22 -0500 Subject: [PATCH] Revert ":wrench: chore(activityTitle): Validate set values in activityTitle class" This reverts commit 83df0f62f971f634872fab32ae5200faa8cdd221. --- .../ccafs/marlo/data/model/ActivityTitle.java | 26 ++++++++++++++----- .../resources/xmls/ActivitiesTitles.hbm.xml | 2 -- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/ActivityTitle.java b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/ActivityTitle.java index 589333d2e3..355f8d2c8a 100644 --- a/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/ActivityTitle.java +++ b/marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/model/ActivityTitle.java @@ -31,13 +31,11 @@ public class ActivityTitle extends MarloBaseEntity implements java.io.Serializab private String title; private Set activities = new HashSet(0); + @Expose + private int startYear; + @Expose + private int endYear; - /* - * @Expose - * private int startYear; - * @Expose - * private int endYear; - */ @Override public boolean equals(Object obj) { if (this == obj) { @@ -63,6 +61,11 @@ public Set getActivities() { return activities; } + public int getEndYear() { + return endYear; + } + + @Override public String getLogDeatil() { StringBuilder sb = new StringBuilder(); @@ -84,6 +87,10 @@ public User getModifiedBy() { return null; } + public int getStartYear() { + return startYear; + } + public String getTitle() { return title; } @@ -106,12 +113,19 @@ public void setActivities(Set activities) { this.activities = activities; } + public void setEndYear(int endYear) { + this.endYear = endYear; + } @Override public void setModifiedBy(User modifiedBy) { // TODO Auto-generated method stub } + public void setStartYear(int startYear) { + this.startYear = startYear; + } + public void setTitle(String title) { this.title = title; } diff --git a/marlo-data/src/main/resources/xmls/ActivitiesTitles.hbm.xml b/marlo-data/src/main/resources/xmls/ActivitiesTitles.hbm.xml index db1312c90e..d54df7eced 100644 --- a/marlo-data/src/main/resources/xmls/ActivitiesTitles.hbm.xml +++ b/marlo-data/src/main/resources/xmls/ActivitiesTitles.hbm.xml @@ -11,14 +11,12 @@ -