1 | <?php |
||
11 | class ImportPart |
||
12 | { |
||
13 | /** |
||
14 | * @var int |
||
15 | * |
||
16 | * @ORM\Id |
||
17 | * @ORM\Column(type="integer") |
||
18 | * @ORM\GeneratedValue(strategy="AUTO") |
||
19 | */ |
||
20 | protected $id; |
||
21 | |||
22 | /** |
||
23 | * @var int |
||
24 | * |
||
25 | * @ORM\Column(type="integer") |
||
26 | */ |
||
27 | protected $position; |
||
28 | |||
29 | /** |
||
30 | * @var array |
||
31 | * |
||
32 | * @ORM\Column(type="json_array") |
||
33 | */ |
||
34 | protected $transportConfig; |
||
35 | |||
36 | /** |
||
37 | * @var int |
||
38 | * |
||
39 | * @ORM\Column(type="integer", nullable=true) |
||
40 | */ |
||
41 | protected $process; |
||
42 | |||
43 | /** |
||
44 | * @var string |
||
45 | * |
||
46 | * @ORM\Column(type="string", nullable=true) |
||
47 | */ |
||
48 | protected $error; |
||
49 | |||
50 | /** |
||
51 | * @var int |
||
52 | * |
||
53 | * @ORM\Column(type="integer") |
||
54 | */ |
||
55 | protected $retries; |
||
56 | |||
57 | /** |
||
58 | * @var \DateTime |
||
59 | * |
||
60 | * @ORM\Column(type="datetime", nullable=true) |
||
61 | */ |
||
62 | protected $datetimeScheduled; |
||
63 | |||
64 | /** |
||
65 | * @var \DateTime |
||
66 | * |
||
67 | * @ORM\Column(type="datetime", nullable=true) |
||
68 | */ |
||
69 | protected $datetimeStarted; |
||
70 | |||
71 | /** |
||
72 | * @var \DateTime |
||
73 | * |
||
74 | * @ORM\Column(type="datetime", nullable=true) |
||
75 | */ |
||
76 | protected $datetimeEnded; |
||
77 | |||
78 | /** |
||
79 | * @var Import |
||
80 | * |
||
81 | * @ORM\ManyToOne(targetEntity="Import", inversedBy="parts") |
||
82 | */ |
||
83 | protected $import; |
||
84 | |||
85 | /** |
||
86 | * Constructor. |
||
87 | */ |
||
88 | 2 | public function __construct() |
|
92 | |||
93 | /** |
||
94 | * @return int |
||
95 | */ |
||
96 | 2 | public function getId() |
|
100 | |||
101 | /** |
||
102 | * @param int $position |
||
103 | * |
||
104 | * @return $this |
||
105 | */ |
||
106 | 2 | public function setPosition($position) |
|
112 | |||
113 | /** |
||
114 | * @return int |
||
115 | */ |
||
116 | 2 | public function getPosition() |
|
120 | |||
121 | /** |
||
122 | * @param array $transportConfig |
||
123 | * |
||
124 | * @return $this |
||
125 | */ |
||
126 | 2 | public function setTransportConfig($transportConfig) |
|
132 | |||
133 | /** |
||
134 | * @return array |
||
135 | */ |
||
136 | 2 | public function getTransportConfig() |
|
140 | |||
141 | /** |
||
142 | * @param mixed $process |
||
143 | * |
||
144 | * @return $this |
||
145 | */ |
||
146 | 2 | public function setProcess($process) |
|
152 | |||
153 | /** |
||
154 | * @return mixed |
||
155 | */ |
||
156 | 2 | public function getProcess() |
|
160 | |||
161 | /** |
||
162 | * @param string $error |
||
163 | * |
||
164 | * @return $this |
||
165 | */ |
||
166 | 2 | public function setError($error) |
|
172 | |||
173 | /** |
||
174 | * @return string |
||
175 | */ |
||
176 | 2 | public function getError() |
|
180 | |||
181 | /** |
||
182 | * @param int $retries |
||
183 | * |
||
184 | * @return $this |
||
185 | */ |
||
186 | public function setRetries($retries) |
||
192 | |||
193 | /** |
||
194 | * @return int |
||
195 | */ |
||
196 | public function getRetries() |
||
200 | |||
201 | /** |
||
202 | * @param \DateTime $datetimeScheduled |
||
203 | * |
||
204 | * @return $this |
||
205 | */ |
||
206 | 2 | public function setDatetimeScheduled(\DateTime $datetimeScheduled = null) |
|
212 | |||
213 | /** |
||
214 | * @return \DateTime |
||
215 | */ |
||
216 | public function getDatetimeScheduled() |
||
220 | |||
221 | /** |
||
222 | * @param \DateTime $datetimeStarted |
||
223 | * |
||
224 | * @return $this |
||
225 | */ |
||
226 | 2 | public function setDatetimeStarted(\DateTime $datetimeStarted = null) |
|
232 | |||
233 | /** |
||
234 | * @return \DateTime |
||
235 | */ |
||
236 | public function getDatetimeStarted() |
||
240 | |||
241 | /** |
||
242 | * @param \DateTime $datetimeEnded |
||
243 | * |
||
244 | * @return $this |
||
245 | */ |
||
246 | 2 | public function setDatetimeEnded(\DateTime $datetimeEnded = null) |
|
252 | |||
253 | /** |
||
254 | * @return \DateTime |
||
255 | */ |
||
256 | 2 | public function getDatetimeEnded() |
|
260 | |||
261 | /** |
||
262 | * @param Import $import |
||
263 | * |
||
264 | * @return $this |
||
265 | */ |
||
266 | 2 | public function setImport(Import $import = null) |
|
272 | |||
273 | /** |
||
274 | * @return Import |
||
275 | */ |
||
276 | 2 | public function getImport() |
|
280 | |||
281 | /** |
||
282 | * @return bool |
||
283 | */ |
||
284 | 2 | public function isStarted() |
|
288 | |||
289 | /** |
||
290 | * @return bool |
||
291 | */ |
||
292 | 2 | public function isFinished() |
|
296 | |||
297 | /** |
||
298 | * @throws \InvalidArgumentException When the part does not have a valid pid |
||
299 | * |
||
300 | * @return bool |
||
301 | */ |
||
302 | public function isRunning() |
||
318 | } |
||
319 |