/**
  * This builds a query for returning all the records to index from the
  * database.
  *
  * @param Omeka_Db_Table         $table The table to create the SQL for.
  * @param SolrSearch_Addon_Addon $addon The addon to generate SQL for.
  *
  * @return Omeka_Db_Select $select The select statement to execute for the
  * query.
  * @author Eric Rochester <*****@*****.**>
  **/
 public function buildSelect($table, $addon)
 {
     $select = $table->select()->from($table->getTableName());
     if ($addon->hasFlag()) {
         $this->_addFlag($select, $addon);
     }
     return $select;
 }