public function createInstanceOfResult($registry)
{
$handler = $registry->getTypeHandler($this->getClass());
try {
if ($handler !== null) {
return $handler->createNewInstance();
} else {
return $registry->createInstanceOf($this->getClass());
}
} catch (TSqlMapException $e) {
throw new TSqlMapException('sqlmap_unable_to_create_new_instance', $this->getClass(), get_class($handler), $this->getID());
}
}