public function prePersist()
{
$redirectType = $this->getRedirectType();
switch ($redirectType) {
case 0:
$this->setRedirectRoute(null);
$this->setRedirectUrl(null);
break;
case 1:
$this->setRedirectRoute(null);
break;
case 2:
$this->setRedirectUrl(null);
break;
}
}