Skip to content

Commit

Permalink
♻️ refactor(ProjectPartnerAction): Adapt DTOs to the appropriate file…
Browse files Browse the repository at this point in the history
…s .A2-525
  • Loading branch information
Cristian45 committed May 21, 2024
1 parent ad5bb71 commit 03908e9
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 65 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*****************************************************************
* This file is part of Managing Agricultural Research for Learning &
* Outcomes Platform (MARLO).
* MARLO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
* MARLO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with MARLO. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************/

package org.cgiar.ccafs.marlo.data.model;

import java.util.List;

public class ProjectDTO {

List<ProjectPartnerDTO> projectPartnerDTO;

public List<ProjectPartnerDTO> getProjectPartner() {
return projectPartnerDTO;
}

public void setProjectPartner(List<ProjectPartnerDTO> projectPartnerDTO) {
this.projectPartnerDTO = projectPartnerDTO;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*****************************************************************
* This file is part of Managing Agricultural Research for Learning &
* Outcomes Platform (MARLO).
* MARLO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
* MARLO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with MARLO. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************/

package org.cgiar.ccafs.marlo.data.model;


import java.util.List;

public class ProjectPartnerDTO {

Long id;

List<ProjectPartnerPersonDTO> projectPartnerPersonDTO;

public Long getId() {
return this.id;
}


public List<ProjectPartnerPersonDTO> getProjectPartnerPersonDTO() {
return projectPartnerPersonDTO;
}


public void setId(Long id) {
this.id = id;
}

public void setProjectPartnerPersonDTO(List<ProjectPartnerPersonDTO> projectPartnerPersonDTO) {
this.projectPartnerPersonDTO = projectPartnerPersonDTO;
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*****************************************************************
* This file is part of Managing Agricultural Research for Learning &
* Outcomes Platform (MARLO).
* MARLO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
* MARLO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with MARLO. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************/

package org.cgiar.ccafs.marlo.data.model;

import java.util.List;

public class ProjectPartnerPersonDTO {

Long id;

List<Activity> activities;

public List<Activity> getActivity() {
return activities;
}


public Long getId() {
return this.id;
}

public void setActivity(List<Activity> activities) {
this.activities = activities;
}


public void setId(Long id) {
this.id = id;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,21 @@
import org.cgiar.ccafs.marlo.data.model.PartnerDivision;
import org.cgiar.ccafs.marlo.data.model.ProgramType;
import org.cgiar.ccafs.marlo.data.model.Project;
import org.cgiar.ccafs.marlo.data.model.ProjectDTO;
import org.cgiar.ccafs.marlo.data.model.ProjectExpectedStudy;
import org.cgiar.ccafs.marlo.data.model.ProjectExpectedStudyCenter;
import org.cgiar.ccafs.marlo.data.model.ProjectInnovation;
import org.cgiar.ccafs.marlo.data.model.ProjectInnovationCenter;
import org.cgiar.ccafs.marlo.data.model.ProjectPartner;
import org.cgiar.ccafs.marlo.data.model.ProjectPartnerContribution;
import org.cgiar.ccafs.marlo.data.model.ProjectPartnerDTO;
import org.cgiar.ccafs.marlo.data.model.ProjectPartnerLocation;
import org.cgiar.ccafs.marlo.data.model.ProjectPartnerOverall;
import org.cgiar.ccafs.marlo.data.model.ProjectPartnerPartnership;
import org.cgiar.ccafs.marlo.data.model.ProjectPartnerPartnershipLocation;
import org.cgiar.ccafs.marlo.data.model.ProjectPartnerPartnershipResearchPhase;
import org.cgiar.ccafs.marlo.data.model.ProjectPartnerPerson;
import org.cgiar.ccafs.marlo.data.model.ProjectPartnerPersonDTO;
import org.cgiar.ccafs.marlo.data.model.ProjectPolicy;
import org.cgiar.ccafs.marlo.data.model.ProjectPolicyCenter;
import org.cgiar.ccafs.marlo.data.model.ProjectStatusEnum;
Expand Down Expand Up @@ -125,20 +128,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

class ProjectDTO {

List<ProjectPartnerDTO> projectPartnerDTO;

public List<ProjectPartnerDTO> getProjectPartner() {
return projectPartnerDTO;
}

public void setProjectPartner(List<ProjectPartnerDTO> projectPartnerDTO) {
this.projectPartnerDTO = projectPartnerDTO;
}


}

public class ProjectPartnerAction extends BaseAction {

Expand Down Expand Up @@ -2485,54 +2474,3 @@ private boolean validateEmailNotification() {

}

class ProjectPartnerDTO {

Long id;

List<ProjectPartnerPersonDTO> projectPartnerPersonDTO;

public Long getId() {
return this.id;
}


public List<ProjectPartnerPersonDTO> getProjectPartnerPersonDTO() {
return projectPartnerPersonDTO;
}


public void setId(Long id) {
this.id = id;
}

public void setProjectPartnerPersonDTO(List<ProjectPartnerPersonDTO> projectPartnerPersonDTO) {
this.projectPartnerPersonDTO = projectPartnerPersonDTO;
}
}


class ProjectPartnerPersonDTO {

Long id;

List<Activity> activities;

public List<Activity> getActivity() {
return activities;
}


public Long getId() {
return this.id;
}

public void setActivity(List<Activity> activities) {
this.activities = activities;
}


public void setId(Long id) {
this.id = id;
}

}

0 comments on commit 03908e9

Please sign in to comment.