public function filterByPattern($pattern = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($pattern)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $pattern)) {
                $pattern = str_replace('*', '%', $pattern);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(AttributeTypeTableMap::PATTERN, $pattern, $comparison);
    }
public function filterByPattern($pattern = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($pattern)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $pattern)) {
                $pattern = str_replace('*', '%', $pattern);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(AttributeTypeTableMap::PATTERN, $pattern, $comparison);
    }
public function filterByPattern ( $ pattern = null , $ comparison = null ) { if ( null === $ comparison ) { if ( is_array ( $ pattern ) ) { $ comparison = Criteria :: IN ; } elseif ( preg_match ( '/[\%\*]/' , $ pattern ) ) { $ pattern = str_replace ( '*' , '%' , $ pattern ) ; $ comparison = Criteria :: LIKE ; } } return $ this -> addUsingAlias ( AttributeTypeTableMap :: PATTERN , $ pattern , $ comparison ) ; }
Filter the query on the pattern column

Example usage:
<code>
$query->filterByPattern('fooValue');   // WHERE pattern = 'fooValue'
$query->filterByPattern('%fooValue%'); // WHERE pattern LIKE '%fooValue%'
</code>

@param     string $pattern The value to use as filter.
Accepts wildcards (* and % trigger a LIKE)
@param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

@return ChildAttributeTypeQuery The current query, for fluid interface
Filter the query on the pattern column