2021-06-27 11:19:26 +00:00
|
|
|
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace OCA\GPodderSync\Db\EpisodeAction;
|
|
|
|
|
2021-10-07 12:33:16 +00:00
|
|
|
use OCP\DB\Exception;
|
|
|
|
|
2021-06-27 11:19:26 +00:00
|
|
|
class EpisodeActionWriter {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var EpisodeActionMapper
|
|
|
|
*/
|
|
|
|
private EpisodeActionMapper $episodeActionMapper;
|
|
|
|
|
|
|
|
public function __construct(EpisodeActionMapper $episodeActionMapper) {
|
|
|
|
$this->episodeActionMapper = $episodeActionMapper;
|
|
|
|
}
|
|
|
|
|
2021-10-07 12:33:16 +00:00
|
|
|
/**
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
2021-06-27 11:19:26 +00:00
|
|
|
public function save(EpisodeActionEntity $episodeActionEntity): EpisodeActionEntity {
|
|
|
|
return $this->episodeActionMapper->insert($episodeActionEntity);
|
|
|
|
}
|
|
|
|
|
2021-10-07 12:33:16 +00:00
|
|
|
/**
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
2021-06-27 11:19:26 +00:00
|
|
|
public function update(EpisodeActionEntity $episodeActionEntity) {
|
|
|
|
return $this->episodeActionMapper->update($episodeActionEntity);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|