public function retrieve(EntityRetrieverCriteria $criteria)
 {
     $container = $criteria->getContainerName();
     $uuid = $criteria->getUuid();
     $keyname = $criteria->getKeyname();
     $keynames = $criteria->getKeynames();
     $uri = $this->createRetrievalUri($container, $uuid, $keyname, $keynames);
     return $this->retrieveSingle($uri, $container);
 }
 private function createQuery(EntityRetrieverCriteria $criteria, $containerName)
 {
     if ($criteria->hasUuid()) {
         $uuid = $criteria->getUuid();
         return $this->createQueryFromUuid($containerName, $uuid);
     }
     if ($criteria->hasKeynames()) {
         $keynames = $criteria->getKeynames();
         return $this->createQueryFromKeynames($containerName, $keynames);
     }
     $keyname = $criteria->getKeyname();
     $name = $keyname->getName();
     $value = $keyname->getValue();
     return array('name' => 'select * from ' . $containerName . ' where ' . $name . ' = :' . $name . ' limit 0,1;', 'params' => array($name => $value));
 }