public function update()
    {
        // convert to criteria.
        $args = func_get_args();
        $attributes = array_shift($args);
        $criteria = call_user_func_array(array($this, 'argsToCriteria'), $args);

        // to SQL.
        $sql = $criteria->toUpdateSQL($attributes);

        // query.
        $sth = $this->query($sql, $criteria->getParams(), Database::TARGET_MASTER);
        return $sth->isSuccess();
    }