protected function getDocumentLocation($database, $rid = null, $fetchPlan = null)
{
$this->ensureDatabase($database);
$arguments = array($rid);
if ($fetchPlan) {
$arguments[] = $fetchPlan;
}
return $this->getLocation('document', $database, $arguments);
}