Creates a new search object for storing search criterias.

@return MW_Common_Criteria_Interface Search object instance
505437
public function createSearch()
	{
		$conn = $this->_dbm->acquire( $this->_dbname );
		$search = new MW_Common_Criteria_SQL( $conn );
		$this->_dbm->release( $conn, $this->_dbname );

		return $search;
	}
1178845
public function search()
    {
        $criteria = new CDbCriteria;

        $criteria->compare('t.id', $this->id);
        $criteria->compare('t.transport', $this->transport);
        $criteria->compare('t.template', $this->template);
        $criteria->compare('t.priority', $this->priority);
        $criteria->compare('t.status', $this->status);
        $criteria->compare('t.model_id', $this->model_id);
        $criteria->compare('t.to_address', $this->to_address, true);
        $criteria->compare('t.from_address', $this->from_address, true);
        $criteria->compare('t.subject', $this->subject, true);
        $criteria->compare('t.message', $this->message, true);
        $criteria->compare('t.sent', $this->sent);
        $criteria->compare('t.created', $this->created);

        if (is_array($this->model_name)) {
            $criteria->addInCondition('t.model_name', $this->model_name);
        }
        else {
            $criteria->compare('t.model_name', $this->model_name);
        }

        return new CActiveDataProvider($this, array(
            'criteria' => $criteria,
            'sort' => array(
                'defaultOrder' => 'id DESC',
            ),
        ));
    }
815889
public function search()
    {
        $criteria = new CDbCriteria;

        $criteria->compare('t.id', $this->id);
        $criteria->compare('t.user_id', $this->user_id);
        $criteria->compare('t.created', $this->created);
        $criteria->compare('t.ip', $this->ip);
        $criteria->compare('t.link', $this->link, true);
        $criteria->compare('t.audit_field_count', $this->audit_field_count);
        $criteria->compare('t.total_time', $this->total_time);
        $criteria->compare('t.memory_usage', $this->memory_usage);
        $criteria->compare('t.memory_peak', $this->memory_peak);

        if ($this->model_name) {
            $criteria->distinct = true;
            $criteria->compare('t.audit_field_count', '>0');
            $criteria->join .= ' INNER JOIN audit_field ON audit_field.audit_request_id=t.id ';
            $criteria->compare('audit_field.model_name', $this->model_name);
            if ($this->model_id) {
                $criteria->compare('audit_field.model_id', $this->model_id);
            }
        }

        return new CActiveDataProvider(get_class($this), array(
            'criteria' => $criteria,
            'sort' => array(
                'defaultOrder' => 'id DESC',
            ),
        ));
    }
701258
public function buildCriteria()
    {
        $criteria = new Criteria(PersonTeamLinkTableMap::DATABASE_NAME);

        if ($this->isColumnModified(PersonTeamLinkTableMap::ID)) $criteria->add(PersonTeamLinkTableMap::ID, $this->id);
        if ($this->isColumnModified(PersonTeamLinkTableMap::PERSON_ID)) $criteria->add(PersonTeamLinkTableMap::PERSON_ID, $this->person_id);
        if ($this->isColumnModified(PersonTeamLinkTableMap::TEAM_ID)) $criteria->add(PersonTeamLinkTableMap::TEAM_ID, $this->team_id);
        if ($this->isColumnModified(PersonTeamLinkTableMap::CREATED_AT)) $criteria->add(PersonTeamLinkTableMap::CREATED_AT, $this->created_at);
        if ($this->isColumnModified(PersonTeamLinkTableMap::UPDATED_AT)) $criteria->add(PersonTeamLinkTableMap::UPDATED_AT, $this->updated_at);

        return $criteria;
    }
975507
public function buildCriteria()
    {
        $criteria = new Criteria(DealerContactInfoI18nTableMap::DATABASE_NAME);

        if ($this->isColumnModified(DealerContactInfoI18nTableMap::ID)) $criteria->add(DealerContactInfoI18nTableMap::ID, $this->id);
        if ($this->isColumnModified(DealerContactInfoI18nTableMap::LOCALE)) $criteria->add(DealerContactInfoI18nTableMap::LOCALE, $this->locale);
        if ($this->isColumnModified(DealerContactInfoI18nTableMap::VALUE)) $criteria->add(DealerContactInfoI18nTableMap::VALUE, $this->value);

        return $criteria;
    }
1199176
public function create()
    {
        $type = NodeType::getByHandle('file');
        if (!is_object($type)) {
            NodeType::add('file');
        }
        $type = NodeType::getByHandle('file_folder');
        if (!is_object($type)) {
            NodeType::add('file_folder');
        }
        $type = NodeType::getByHandle('search_preset');
        if (!is_object($type)) {
            NodeType::add('search_preset');
        }
        $type = TreeType::getByHandle('file_manager');
        if (!is_object($type)) {
            TreeType::add('file_manager');
        }

        $manager = FileManager::get();
        if (!is_object($manager)) {
            $manager = FileManager::add();
        }

        return $manager;
    }
527884
public function buildCriteria()
    {
        $criteria = new Criteria(IndexEngineIndexTableMap::DATABASE_NAME);

        if ($this->isColumnModified(IndexEngineIndexTableMap::ID)) {
            $criteria->add(IndexEngineIndexTableMap::ID, $this->id);
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::VISIBLE)) {
            $criteria->add(IndexEngineIndexTableMap::VISIBLE, $this->visible);
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::CODE)) {
            $criteria->add(IndexEngineIndexTableMap::CODE, $this->code);
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::TITLE)) {
            $criteria->add(IndexEngineIndexTableMap::TITLE, $this->title);
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::TYPE)) {
            $criteria->add(IndexEngineIndexTableMap::TYPE, $this->type);
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::ENTITY)) {
            $criteria->add(IndexEngineIndexTableMap::ENTITY, $this->entity);
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::SERIALIZED_COLUMNS)) {
            $criteria->add(IndexEngineIndexTableMap::SERIALIZED_COLUMNS, $this->serialized_columns);
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::SERIALIZED_CONDITION)) {
            $criteria->add(IndexEngineIndexTableMap::SERIALIZED_CONDITION, $this->serialized_condition);
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::INDEX_ENGINE_DRIVER_CONFIGURATION_ID)) {
            $criteria->add(IndexEngineIndexTableMap::INDEX_ENGINE_DRIVER_CONFIGURATION_ID, $this->index_engine_driver_configuration_id);
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::CREATED_AT)) {
            $criteria->add(IndexEngineIndexTableMap::CREATED_AT, $this->created_at);
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::UPDATED_AT)) {
            $criteria->add(IndexEngineIndexTableMap::UPDATED_AT, $this->updated_at);
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::VERSION)) {
            $criteria->add(IndexEngineIndexTableMap::VERSION, $this->version);
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::VERSION_CREATED_AT)) {
            $criteria->add(IndexEngineIndexTableMap::VERSION_CREATED_AT, $this->version_created_at);
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::VERSION_CREATED_BY)) {
            $criteria->add(IndexEngineIndexTableMap::VERSION_CREATED_BY, $this->version_created_by);
        }

        return $criteria;
    }
636195
public function searchConfiguration()
    {
        $search = new Manager($this);
        $search->like('username', [
            'before' => true,
            'after' => true,
            'field' => [$this->aliasField('username')]
        ]);
        return $search;
    }
1025891
public function getSearchAttributes()
	{
		$attributes = array();

		foreach( $this->_searchConfig as $values ) {
			$attributes[] = new MW_Common_Criteria_Attribute_Default( $values );
		}

		return $attributes;
	}
2239
public function buildCriteria()
    {
        $criteria = new Criteria(C2PTableMap::DATABASE_NAME);

        if ($this->isColumnModified(C2PTableMap::COL_CATEGORY_ID)) {
            $criteria->add(C2PTableMap::COL_CATEGORY_ID, $this->category_id);
        }
        if ($this->isColumnModified(C2PTableMap::COL_PAGE_ID)) {
            $criteria->add(C2PTableMap::COL_PAGE_ID, $this->page_id);
        }

        return $criteria;
    }
532910
public function buildCriteria()
    {
        $criteria = new Criteria(DealerContactTableMap::DATABASE_NAME);

        if ($this->isColumnModified(DealerContactTableMap::ID)) $criteria->add(DealerContactTableMap::ID, $this->id);
        if ($this->isColumnModified(DealerContactTableMap::DEALER_ID)) $criteria->add(DealerContactTableMap::DEALER_ID, $this->dealer_id);
        if ($this->isColumnModified(DealerContactTableMap::IS_DEFAULT)) $criteria->add(DealerContactTableMap::IS_DEFAULT, $this->is_default);
        if ($this->isColumnModified(DealerContactTableMap::CREATED_AT)) $criteria->add(DealerContactTableMap::CREATED_AT, $this->created_at);
        if ($this->isColumnModified(DealerContactTableMap::UPDATED_AT)) $criteria->add(DealerContactTableMap::UPDATED_AT, $this->updated_at);
        if ($this->isColumnModified(DealerContactTableMap::VERSION)) $criteria->add(DealerContactTableMap::VERSION, $this->version);
        if ($this->isColumnModified(DealerContactTableMap::VERSION_CREATED_AT)) $criteria->add(DealerContactTableMap::VERSION_CREATED_AT, $this->version_created_at);
        if ($this->isColumnModified(DealerContactTableMap::VERSION_CREATED_BY)) $criteria->add(DealerContactTableMap::VERSION_CREATED_BY, $this->version_created_by);

        return $criteria;
    }
1217085
public function getModelAdminSearchContext()
    {
        return SearchContext::create(
            get_class($this->getOwner()),
            $this->getOwner()->scaffoldSearchFields(),
            $this->getOwner()->defaultSearchFilters()
        );
    }
294777
public function newQuery() {
        $factory = $this->factory;
        $factory->setServiceLocator($this->serviceLocator);
        return $factory->get($this->queryClassName)->setParent($this);
    }
764270
public function buildCriteria()
    {
        $criteria = new Criteria(SkillReferenceTableMap::DATABASE_NAME);

        if ($this->isColumnModified(SkillReferenceTableMap::COL_SKILL_ID)) {
            $criteria->add(SkillReferenceTableMap::COL_SKILL_ID, $this->skill_id);
        }
        if ($this->isColumnModified(SkillReferenceTableMap::COL_REFERENCE_ID)) {
            $criteria->add(SkillReferenceTableMap::COL_REFERENCE_ID, $this->reference_id);
        }

        return $criteria;
    }
441338
public function buildCriteria()
    {
        $criteria = new Criteria(PersonFunctionLinkTableMap::DATABASE_NAME);

        if ($this->isColumnModified(PersonFunctionLinkTableMap::ID)) $criteria->add(PersonFunctionLinkTableMap::ID, $this->id);
        if ($this->isColumnModified(PersonFunctionLinkTableMap::PERSON_ID)) $criteria->add(PersonFunctionLinkTableMap::PERSON_ID, $this->person_id);
        if ($this->isColumnModified(PersonFunctionLinkTableMap::FUNCTION_ID)) $criteria->add(PersonFunctionLinkTableMap::FUNCTION_ID, $this->function_id);
        if ($this->isColumnModified(PersonFunctionLinkTableMap::CREATED_AT)) $criteria->add(PersonFunctionLinkTableMap::CREATED_AT, $this->created_at);
        if ($this->isColumnModified(PersonFunctionLinkTableMap::UPDATED_AT)) $criteria->add(PersonFunctionLinkTableMap::UPDATED_AT, $this->updated_at);

        return $criteria;
    }
50159
public function search()
    {
        foreach ($this->getFeatureTypeDeclarations() as $id => $declaration) {
            if (empty($this->instances[$id])) {
                $this->instances[$id] = new FeatureType($this->container, $declaration);
            }
        }
        return $this->instances;
    }
713338
public function buildCriteria()
    {
        $criteria = new Criteria(PersonFunctionTableMap::DATABASE_NAME);

        if ($this->isColumnModified(PersonFunctionTableMap::ID)) $criteria->add(PersonFunctionTableMap::ID, $this->id);
        if ($this->isColumnModified(PersonFunctionTableMap::CODE)) $criteria->add(PersonFunctionTableMap::CODE, $this->code);
        if ($this->isColumnModified(PersonFunctionTableMap::CREATED_AT)) $criteria->add(PersonFunctionTableMap::CREATED_AT, $this->created_at);
        if ($this->isColumnModified(PersonFunctionTableMap::UPDATED_AT)) $criteria->add(PersonFunctionTableMap::UPDATED_AT, $this->updated_at);

        return $criteria;
    }