public function truncate($entity, $andCluster = false)
    {
        try {
            $validator = new RidValidator;
            $validator->check($entity);
            $commandClass = $this->getCommandClass('truncate.record');
        } catch (ValidationException $e) {
            $commandClass = $this->getCommandClass('truncate.class');

            if ($andCluster) {
                $commandClass = $this->getCommandClass('truncate.cluster');
            }
        }

        $this->command = new $commandClass($entity);

        return $this->command;
    }