public static function findByKey($nb_customer, $key)
    {
        $nb_customer_id = nb_getMixedValue($nb_customer, 'nb_customer_id');
        if (is_numeric($nb_customer_id)) {
            $retval = CNabuMediotecaType::buildObjectFromSQL(
                    'select * '
                    . 'from nb_medioteca_type '
                   . 'where nb_customer_id=%cust_id$d '
                     . "and nb_medioteca_type_key='%key\$s'",
                    array(
                        'cust_id' => $nb_customer_id,
                        'key' => $key
                    )
            );
        } else {
            $retval = null;
        }
        
        return $retval;
    }