private function processPropertiesAnnotation($name, $annotation)
    {
        $class = get_class($annotation);
        switch ($class) {
            case "JPC\MongoDB\ODM\Annotations\Mapping\Id":
                $this->propertiesInfos[$name]->setField("_id");
                $this->idGenerator = $annotation->generator;
                break;
            case "JPC\MongoDB\ODM\Annotations\Mapping\Field":
                $this->propertiesInfos[$name]->setField($annotation->name);
                break;
            case "JPC\MongoDB\ODM\Annotations\Mapping\EmbeddedDocument":
                $this->propertiesInfos[$name]->setEmbedded(true);
                $this->propertiesInfos[$name]->setEmbeddedClass($annotation->document);
                break;
            case "JPC\MongoDB\ODM\Annotations\Mapping\MultiEmbeddedDocument":
                $this->propertiesInfos[$name]->setMultiEmbedded(true);
                $this->propertiesInfos[$name]->setEmbeddedClass($annotation->document);
                break;
            case "JPC\MongoDB\ODM\Annotations\Mapping\Id":
                $this->propertiesInfos[$name]->setField("_id");
                break;
            case "JPC\MongoDB\ODM\GridFS\Annotations\Mapping\Stream":
                $this->propertiesInfos[$name]->setField("stream");
                break;
            case "JPC\MongoDB\ODM\GridFS\Annotations\Mapping\Filename":
                $this->propertiesInfos[$name]->setField("filename");
                break;
            case "JPC\MongoDB\ODM\GridFS\Annotations\Mapping\Aliases":
                $this->propertiesInfos[$name]->setField("aliases");
                break;
            case "JPC\MongoDB\ODM\GridFS\Annotations\Mapping\ChunkSize":
                $this->propertiesInfos[$name]->setField("chunkSize");
                break;
            case "JPC\MongoDB\ODM\GridFS\Annotations\Mapping\UploadDate":
                $this->propertiesInfos[$name]->setField("uploadDate");
                break;
            case "JPC\MongoDB\ODM\GridFS\Annotations\Mapping\Length":
                $this->propertiesInfos[$name]->setField("length");
                break;
            case "JPC\MongoDB\ODM\GridFS\Annotations\Mapping\ContentType":
                $this->propertiesInfos[$name]->setField("contentType");
                break;
            case "JPC\MongoDB\ODM\GridFS\Annotations\Mapping\Md5":
                $this->propertiesInfos[$name]->setField("md5");
                break;
            case "JPC\MongoDB\ODM\GridFS\Annotations\Mapping\Metadata":
                $this->propertiesInfos[$name]->setMetadata(true);
                break;
            case "JPC\MongoDB\ODM\Annotations\Mapping\RefersOne":
                $referenceInfo = new ReferenceInfo();
                $referenceInfo->setDocument($annotation->document)->setCollection($annotation->collection);
                $this->propertiesInfos[$name]->setReferenceInfo($referenceInfo);
                break;
            case "JPC\MongoDB\ODM\Annotations\Mapping\RefersMany":
                $referenceInfo = new ReferenceInfo();
                $referenceInfo->setIsMultiple(true)->setDocument($annotation->document)->setCollection($annotation->collection);
                $this->propertiesInfos[$name]->setReferenceInfo($referenceInfo);
                break;
            case "JPC\MongoDB\ODM\Annotations\Mapping\DiscriminatorField":
                $this->propertiesInfos[$name]->setDiscriminatorField($annotation->field);
                break;
            case "JPC\MongoDB\ODM\Annotations\Mapping\DiscriminatorMap":
                $this->propertiesInfos[$name]->setDiscriminatorMap($annotation->map);
                break;
            case "JPC\MongoDB\ODM\Annotations\Mapping\DiscriminatorMethod":
                $this->propertiesInfos[$name]->setDiscriminatorMethod($annotation->method);
                break;
        }
    }