public function search()
{
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria = new CDbCriteria();
$criteria->compare('resource_id', $this->resource_id, true);
$criteria->compare('resource_name', $this->resource_name, true);
$criteria->compare('resource_body', $this->resource_body, true);
$criteria->compare('resource_path', $this->resource_path, true);
$criteria->compare('resource_type', $this->resource_type, true);
$criteria->compare('created', $this->created);
$criteria->compare('updated', $this->updated);
$criteria->compare('creator', $this->creator, true);
$sort = new CSort();
$sort->attributes = array('resource_id');
$sort->defaultOrder = 'resource_id DESC';
return new CActiveDataProvider(get_class($this), array('criteria' => $criteria, 'sort' => $sort));
}