public function __getNewRoleObject()
{
if (!$this->__newRoleObject) {
if ($this->id) {
$this->__newRoleObject = Role::findPk($this->id);
}
if (!$this->__newRoleObject) {
throw new Exception('Role object is not found');
}
}
return $this->__newRoleObject;
}