View Javadoc
1   package fr.ifremer.quadrige3.synchro.service.client.vo;
2   
3   /*-
4    * #%L
5    * Quadrige3 Core :: Quadrige3 Client Core
6    * $Id:$
7    * $HeadURL:$
8    * %%
9    * Copyright (C) 2017 Ifremer
10   * %%
11   * This program is free software: you can redistribute it and/or modify
12   * it under the terms of the GNU Affero General Public License as published by
13   * the Free Software Foundation, either version 3 of the License, or
14   * (at your option) any later version.
15   * 
16   * This program is distributed in the hope that it will be useful,
17   * but WITHOUT ANY WARRANTY; without even the implied warranty of
18   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19   * GNU General Public License for more details.
20   * 
21   * You should have received a copy of the GNU Affero General Public License
22   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
23   * #L%
24   */
25  
26  import com.google.common.collect.Multimap;
27  import fr.ifremer.common.synchro.service.SynchroResult;
28  import fr.ifremer.quadrige3.synchro.service.data.DataSynchroContext;
29  import fr.ifremer.quadrige3.synchro.service.referential.ReferentialSynchroContext;
30  
31  import java.io.File;
32  import java.util.Date;
33  
34  /**
35   * <p>
36   * SynchroClientExportResult class.
37   * </p>
38   * 
39   */
40  public class SynchroClientExportResult {
41  
42  	private DataSynchroContext dataContext;
43  
44  	private ReferentialSynchroContext referentialContext;
45  
46  	private Date synchronizationDate;
47  
48  	private File tempDbExportDirectory;
49  
50  	private Multimap<String, String> pksToRevert;
51  
52  	private SynchroResult serverResult;
53  
54  	/**
55  	 * <p>
56  	 * Getter for the field <code>dataContext</code>.
57  	 * </p>
58  	 * 
59  	 * @return a {@link fr.ifremer.quadrige3.synchro.service.data.DataSynchroContext} object.
60  	 */
61  	public DataSynchroContext getDataContext() {
62  		return dataContext;
63  	}
64  
65  	/**
66  	 * <p>
67  	 * Setter for the field <code>dataContext</code>.
68  	 * </p>
69  	 * 
70  	 * @param dataContext
71  	 *            a {@link fr.ifremer.quadrige3.synchro.service.data.DataSynchroContext} object.
72  	 */
73  	public void setDataContext(DataSynchroContext dataContext) {
74  		this.dataContext = dataContext;
75  	}
76  
77  	/**
78  	 * <p>
79  	 * Getter for the field <code>referentialContext</code>.
80  	 * </p>
81  	 * 
82  	 * @return a {@link fr.ifremer.quadrige3.synchro.service.referential.ReferentialSynchroContext} object.
83  	 */
84  	public ReferentialSynchroContext getReferentialContext() {
85  		return referentialContext;
86  	}
87  
88  	/**
89  	 * <p>
90  	 * Setter for the field <code>referentialContext</code>.
91  	 * </p>
92  	 * 
93  	 * @param referentialContext
94  	 *            a {@link fr.ifremer.quadrige3.synchro.service.referential.ReferentialSynchroContext} object.
95  	 */
96  	public void setReferentialContext(ReferentialSynchroContext referentialContext) {
97  		this.referentialContext = referentialContext;
98  	}
99  
100 	/**
101 	 * <p>
102 	 * getDataResult.
103 	 * </p>
104 	 * 
105 	 * @return a {@link fr.ifremer.common.synchro.service.SynchroResult} object.
106 	 */
107 	public SynchroResult getDataResult() {
108 		if (dataContext == null)
109 			return null;
110 		return dataContext.getResult();
111 	}
112 
113 	/**
114 	 * <p>
115 	 * getReferentialResult.
116 	 * </p>
117 	 * 
118 	 * @return a {@link fr.ifremer.common.synchro.service.SynchroResult} object.
119 	 */
120 	public SynchroResult getReferentialResult() {
121 		if (referentialContext == null)
122 			return null;
123 		return referentialContext.getResult();
124 	}
125 
126 	/**
127 	 * <p>
128 	 * Getter for the field <code>synchronizationDate</code>.
129 	 * </p>
130 	 * 
131 	 * @return a {@link java.util.Date} object.
132 	 */
133 	public Date getSynchronizationDate() {
134 		return synchronizationDate;
135 	}
136 
137 	/**
138 	 * <p>
139 	 * Setter for the field <code>synchronizationDate</code>.
140 	 * </p>
141 	 * 
142 	 * @param synchronizationDate
143 	 *            a {@link java.util.Date} object.
144 	 */
145 	public void setSynchronizationDate(Date synchronizationDate) {
146 		this.synchronizationDate = synchronizationDate;
147 	}
148 
149 	/**
150 	 * <p>
151 	 * Getter for the field <code>tempDbExportDirectory</code>.
152 	 * </p>
153 	 * 
154 	 * @return a {@link java.io.File} object.
155 	 */
156 	public File getTempDbExportDirectory() {
157 		return tempDbExportDirectory;
158 	}
159 
160 	/**
161 	 * <p>
162 	 * Setter for the field <code>tempDbExportDirectory</code>.
163 	 * </p>
164 	 * 
165 	 * @param tempDbExportDirectory
166 	 *            a {@link java.io.File} object.
167 	 */
168 	public void setTempDbExportDirectory(File tempDbExportDirectory) {
169 		this.tempDbExportDirectory = tempDbExportDirectory;
170 	}
171 
172 	/**
173 	 * <p>
174 	 * Getter for the field <code>pksToRevert</code>.
175 	 * </p>
176 	 * 
177 	 * @return a {@link com.google.common.collect.Multimap} object.
178 	 */
179 	public Multimap<String, String> getPksToRevert() {
180 		return pksToRevert;
181 	}
182 
183 	/**
184 	 * <p>
185 	 * Setter for the field <code>pksToRevert</code>.
186 	 * </p>
187 	 * 
188 	 * @param pksToRevert
189 	 *            a {@link com.google.common.collect.Multimap} object.
190 	 */
191 	public void setPksToRevert(Multimap<String, String> pksToRevert) {
192 		this.pksToRevert = pksToRevert;
193 	}
194 
195 	/**
196 	 * <p>
197 	 * Getter for the field <code>serverResult</code>.
198 	 * </p>
199 	 * 
200 	 * @return a {@link fr.ifremer.common.synchro.service.SynchroResult} object.
201 	 */
202 	public SynchroResult getServerResult() {
203 		return serverResult;
204 	}
205 
206 	/**
207 	 * <p>
208 	 * Setter for the field <code>serverResult</code>.
209 	 * </p>
210 	 * 
211 	 * @param serverResult
212 	 *            a {@link fr.ifremer.common.synchro.service.SynchroResult} object.
213 	 */
214 	public void setServerResult(SynchroResult serverResult) {
215 		this.serverResult = serverResult;
216 	}
217 }