<?php

/**
 * This class has been auto-generated by the Doctrine ORM Framework
 */
class ThdSegment extends BaseThdSegment
{

    public function getSolrDocumentFields()
    {           // keys of this array are fields' name of solr's schema.xml 
        $type = "ThdFilm";
        $fields = array('type'           => $type,
                        'id'             => $this->getId(),
                        'title'          => array('value' => $this->getTitle(), 'boost' => 1.0),
                        'tags'           => array('value' => $this->getTags(), 'boost' => 1.0),
                        'desc'           => array('value' => $this->getDesc(), 'boost' => 1.0),
                        'uniqueid'       => array('value' => $this->getUniqueid(), 'boost' => 1.0),
        );  

        return $fields;
    }


    public function preInsert($event)
    {
        $this->uniqueid = UUID::generate(UUID::UUID_TIME, UUID::FMT_STRING,     "mosatags");
    }

}
