1 | <?php |
||
12 | class Import |
||
13 | { |
||
14 | /** |
||
15 | * @var int |
||
16 | * |
||
17 | * @ORM\Id |
||
18 | * @ORM\Column(type="integer") |
||
19 | * @ORM\GeneratedValue(strategy="AUTO") |
||
20 | */ |
||
21 | protected $id; |
||
22 | |||
23 | /** |
||
24 | * @var bool |
||
25 | * |
||
26 | * @ORM\Column(name="forced", type="boolean") |
||
27 | */ |
||
28 | protected $forced; |
||
29 | |||
30 | /** |
||
31 | * @var bool |
||
32 | * |
||
33 | * @ORM\Column(type="boolean") |
||
34 | */ |
||
35 | protected $partial; |
||
36 | |||
37 | /** |
||
38 | * @var int |
||
39 | * |
||
40 | * @ORM\Column(type="integer", nullable=true) |
||
41 | */ |
||
42 | protected $skipped; |
||
43 | |||
44 | /** |
||
45 | * @var int |
||
46 | * |
||
47 | * @ORM\Column(type="integer", nullable=true) |
||
48 | */ |
||
49 | protected $success; |
||
50 | |||
51 | /** |
||
52 | * @var int |
||
53 | * |
||
54 | * @ORM\Column(type="integer", nullable=true) |
||
55 | */ |
||
56 | protected $failed; |
||
57 | |||
58 | /** |
||
59 | * @var int |
||
60 | * |
||
61 | * @ORM\Column(type="integer", nullable=true) |
||
62 | */ |
||
63 | protected $erroredParts; |
||
64 | |||
65 | /** |
||
66 | * @var \DateTime |
||
67 | * |
||
68 | * @ORM\Column(type="datetime", nullable=true) |
||
69 | */ |
||
70 | protected $datetimeScheduled; |
||
71 | |||
72 | /** |
||
73 | * @var \DateTime |
||
74 | * |
||
75 | * @ORM\Column(type="datetime", nullable=true) |
||
76 | */ |
||
77 | protected $datetimeStarted; |
||
78 | |||
79 | /** |
||
80 | * @var \DateTime |
||
81 | * |
||
82 | * @ORM\Column(type="datetime", nullable=true) |
||
83 | */ |
||
84 | protected $datetimeEnded; |
||
85 | |||
86 | /** |
||
87 | * @var ArrayCollection|ImportPart[] |
||
88 | * |
||
89 | * @ORM\OneToMany(targetEntity="ImportPart", mappedBy="import", cascade={"persist", "remove"}) |
||
90 | */ |
||
91 | protected $parts; |
||
92 | |||
93 | /** |
||
94 | * @var Feed |
||
95 | * |
||
96 | * @ORM\ManyToOne(targetEntity="Feed", inversedBy="imports") |
||
97 | */ |
||
98 | protected $feed; |
||
99 | |||
100 | /** |
||
101 | * Constructor. |
||
102 | */ |
||
103 | 8 | public function __construct() |
|
112 | |||
113 | /** |
||
114 | * @return int |
||
115 | */ |
||
116 | 4 | public function getId() |
|
120 | |||
121 | /** |
||
122 | * @param bool $forced |
||
123 | * |
||
124 | * @return $this |
||
125 | */ |
||
126 | 4 | public function setForced($forced) |
|
132 | |||
133 | /** |
||
134 | * @return bool |
||
135 | */ |
||
136 | 4 | public function isForced() |
|
140 | |||
141 | /** |
||
142 | * @param bool $partial |
||
143 | * |
||
144 | * @return $this |
||
145 | */ |
||
146 | 4 | public function setPartial($partial) |
|
152 | |||
153 | /** |
||
154 | * @return bool |
||
155 | */ |
||
156 | 4 | public function isPartial() |
|
160 | |||
161 | /** |
||
162 | * @return int |
||
163 | */ |
||
164 | public function getTotalNumberOfItems() |
||
168 | |||
169 | /** |
||
170 | * @return int |
||
171 | */ |
||
172 | public function getNumberOfProcessedItems() |
||
176 | |||
177 | /** |
||
178 | * @param int $skipped |
||
179 | * |
||
180 | * @return $this |
||
181 | */ |
||
182 | public function setSkipped($skipped) |
||
188 | |||
189 | /** |
||
190 | * @return int |
||
191 | */ |
||
192 | 4 | public function getSkipped() |
|
196 | |||
197 | /** |
||
198 | * @param int $success |
||
199 | * |
||
200 | * @return $this |
||
201 | */ |
||
202 | public function setSuccess($success) |
||
208 | |||
209 | /** |
||
210 | * @return int |
||
211 | */ |
||
212 | 4 | public function getSuccess() |
|
216 | |||
217 | /** |
||
218 | * @param int $failed |
||
219 | * |
||
220 | * @return $this |
||
221 | */ |
||
222 | public function setFailed($failed) |
||
228 | |||
229 | /** |
||
230 | * @return int |
||
231 | */ |
||
232 | 4 | public function getFailed() |
|
236 | |||
237 | /** |
||
238 | * @param int $erroredParts |
||
239 | * |
||
240 | * @return $this |
||
241 | */ |
||
242 | 4 | public function setErroredParts($erroredParts) |
|
248 | |||
249 | /** |
||
250 | * @return int |
||
251 | */ |
||
252 | public function getErroredParts() |
||
256 | |||
257 | /** |
||
258 | * @param \DateTime $datetimeScheduled |
||
259 | * |
||
260 | * @return $this |
||
261 | */ |
||
262 | 4 | public function setDatetimeScheduled(\DateTime $datetimeScheduled) |
|
268 | |||
269 | /** |
||
270 | * @return \DateTime |
||
271 | */ |
||
272 | public function getDatetimeScheduled() |
||
276 | |||
277 | /** |
||
278 | * @param \DateTime $datetimeStarted |
||
279 | * |
||
280 | * @return $this |
||
281 | */ |
||
282 | 4 | public function setDatetimeStarted(\DateTime $datetimeStarted) |
|
288 | |||
289 | /** |
||
290 | * @return \DateTime |
||
291 | */ |
||
292 | 4 | public function getDatetimeStarted() |
|
296 | |||
297 | /** |
||
298 | * @param \DateTime $datetimeEnded |
||
299 | * |
||
300 | * @return $this |
||
301 | */ |
||
302 | 4 | public function setDatetimeEnded(\DateTime $datetimeEnded) |
|
308 | |||
309 | /** |
||
310 | * @return \DateTime |
||
311 | */ |
||
312 | 4 | public function getDatetimeEnded() |
|
316 | |||
317 | /** |
||
318 | * @param Feed $feed |
||
319 | * |
||
320 | * @return $this |
||
321 | */ |
||
322 | 4 | public function setFeed(Feed $feed = null) |
|
328 | |||
329 | /** |
||
330 | * @return Feed |
||
331 | */ |
||
332 | 4 | public function getFeed() |
|
336 | |||
337 | /** |
||
338 | * @param ImportPart $parts |
||
339 | * |
||
340 | * @return $this |
||
341 | */ |
||
342 | 4 | public function addPart(ImportPart $parts) |
|
348 | |||
349 | /** |
||
350 | * @param ImportPart $parts |
||
351 | */ |
||
352 | public function removePart(ImportPart $parts) |
||
356 | |||
357 | /** |
||
358 | * @return ArrayCollection|ImportPart[] |
||
359 | */ |
||
360 | 4 | public function getParts() |
|
364 | |||
365 | /** |
||
366 | * @return bool |
||
367 | */ |
||
368 | 4 | public function isStarted() |
|
372 | |||
373 | /** |
||
374 | * @return bool |
||
375 | */ |
||
376 | 4 | public function isFinished() |
|
380 | |||
381 | /** |
||
382 | * Checks if any of the parts of the given import has an error. |
||
383 | * |
||
384 | * @return bool |
||
385 | */ |
||
386 | public function hasErrors() |
||
390 | } |
||
391 |