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   * SynchroClientExportToFileResult class.
37   * </p>
38   * 
39   */
40  public class SynchroClientExportToFileResult {
41  
42  	private DataSynchroContext dataContext;
43  
44  	private ReferentialSynchroContext referentialContext;
45  
46  	private Date synchronizationDate;
47  
48  	private File file;
49  
50  	private Multimap<String, String> pksToRevert;
51  
52  	/**
53  	 * <p>
54  	 * Getter for the field <code>dataContext</code>.
55  	 * </p>
56  	 * 
57  	 * @return a {@link fr.ifremer.quadrige3.synchro.service.data.DataSynchroContext} object.
58  	 */
59  	public DataSynchroContext getDataContext() {
60  		return dataContext;
61  	}
62  
63  	/**
64  	 * <p>
65  	 * Setter for the field <code>dataContext</code>.
66  	 * </p>
67  	 * 
68  	 * @param dataContext
69  	 *            a {@link fr.ifremer.quadrige3.synchro.service.data.DataSynchroContext} object.
70  	 */
71  	public void setDataContext(DataSynchroContext dataContext) {
72  		this.dataContext = dataContext;
73  	}
74  
75  	/**
76  	 * <p>
77  	 * Getter for the field <code>referentialContext</code>.
78  	 * </p>
79  	 * 
80  	 * @return a {@link fr.ifremer.quadrige3.synchro.service.referential.ReferentialSynchroContext} object.
81  	 */
82  	public ReferentialSynchroContext getReferentialContext() {
83  		return referentialContext;
84  	}
85  
86  	/**
87  	 * <p>
88  	 * Setter for the field <code>referentialContext</code>.
89  	 * </p>
90  	 * 
91  	 * @param referentialContext
92  	 *            a {@link fr.ifremer.quadrige3.synchro.service.referential.ReferentialSynchroContext} object.
93  	 */
94  	public void setReferentialContext(ReferentialSynchroContext referentialContext) {
95  		this.referentialContext = referentialContext;
96  	}
97  
98  	/**
99  	 * <p>
100 	 * getDataResult.
101 	 * </p>
102 	 * 
103 	 * @return a {@link fr.ifremer.common.synchro.service.SynchroResult} object.
104 	 */
105 	public SynchroResult getDataResult() {
106 		if (dataContext == null)
107 			return null;
108 		return dataContext.getResult();
109 	}
110 
111 	/**
112 	 * <p>
113 	 * getReferentialResult.
114 	 * </p>
115 	 * 
116 	 * @return a {@link fr.ifremer.common.synchro.service.SynchroResult} object.
117 	 */
118 	public SynchroResult getReferentialResult() {
119 		if (referentialContext == null)
120 			return null;
121 		return referentialContext.getResult();
122 	}
123 
124 	/**
125 	 * <p>
126 	 * Getter for the field <code>synchronizationDate</code>.
127 	 * </p>
128 	 * 
129 	 * @return a {@link java.util.Date} object.
130 	 */
131 	public Date getSynchronizationDate() {
132 		return synchronizationDate;
133 	}
134 
135 	/**
136 	 * <p>
137 	 * Setter for the field <code>synchronizationDate</code>.
138 	 * </p>
139 	 * 
140 	 * @param synchronizationDate
141 	 *            a {@link java.util.Date} object.
142 	 */
143 	public void setSynchronizationDate(Date synchronizationDate) {
144 		this.synchronizationDate = synchronizationDate;
145 	}
146 
147 	/**
148 	 * <p>
149 	 * Getter for the field <code>file</code>.
150 	 * </p>
151 	 * 
152 	 * @return a {@link java.io.File} object.
153 	 */
154 	public File getFile() {
155 		return file;
156 	}
157 
158 	/**
159 	 * <p>
160 	 * Setter for the field <code>file</code>.
161 	 * </p>
162 	 * 
163 	 * @param file
164 	 *            a {@link java.io.File} object.
165 	 */
166 	public void setFile(File file) {
167 		this.file = file;
168 	}
169 
170 	/**
171 	 * <p>
172 	 * Getter for the field <code>pksToRevert</code>.
173 	 * </p>
174 	 * 
175 	 * @return a {@link com.google.common.collect.Multimap} object.
176 	 */
177 	public Multimap<String, String> getPksToRevert() {
178 		return pksToRevert;
179 	}
180 
181 	/**
182 	 * <p>
183 	 * Setter for the field <code>pksToRevert</code>.
184 	 * </p>
185 	 * 
186 	 * @param pksToRevert
187 	 *            a {@link com.google.common.collect.Multimap} object.
188 	 */
189 	public void setPksToRevert(Multimap<String, String> pksToRevert) {
190 		this.pksToRevert = pksToRevert;
191 	}
192 }