classNotMapped() public static method

public static classNotMapped ( )
 /**
  * Gets the class metadata descriptor for a class.
  *
  * @param string $className The name of the class.
  * @return Doctrine\ODM\CouchDB\Mapping\ClassMetadata
  */
 public function getMetadataFor($className)
 {
     if (!isset($this->loadedMetadata[$className])) {
         $realClassName = $className;
         // Check for namespace alias
         if (strpos($className, ':') !== false) {
             list($namespaceAlias, $simpleClassName) = explode(':', $className);
             $realClassName = $this->dm->getConfiguration()->getDocumentNamespace($namespaceAlias) . '\\' . $simpleClassName;
             if (isset($this->loadedMetadata[$realClassName])) {
                 // We do not have the alias name in the map, include it
                 $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName];
                 return $this->loadedMetadata[$realClassName];
             }
         }
         if ($this->cacheDriver) {
             if (($cached = $this->cacheDriver->fetch("{$realClassName}\$COUCHDBCLASSMETADATA")) !== false) {
                 $this->loadedMetadata[$realClassName] = $cached;
             } else {
                 foreach ($this->loadMetadata($realClassName) as $loadedClassName) {
                     $this->cacheDriver->save("{$loadedClassName}\$COUCHDBCLASSMETADATA", $this->loadedMetadata[$loadedClassName], null);
                 }
             }
         } else {
             $this->loadMetadata($realClassName);
         }
         if ($className != $realClassName) {
             // We do not have the alias name in the map, include it
             $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName];
         }
     }
     if (!isset($this->loadedMetadata[$className])) {
         throw MappingException::classNotMapped();
     }
     return $this->loadedMetadata[$className];
 }
 /**
  * Gets the class metadata descriptor for a class.
  *
  * @param string $className The name of the class.
  * @return ClassMetadata
  * @throws MappingException
  */
 public function getMetadataFor($className)
 {
     $metadata = parent::getMetadataFor($className);
     if ($metadata) {
         return $metadata;
     }
     throw MappingException::classNotMapped($className);
 }