private function buildUnionQuery($context, array $args, $page, $number)
    {
        //throw an exception if no provider have been defined for this context
        if (!array_key_exists($context, $this->providers)) {
            throw new \LogicException(sprintf('No builders have been defined for "%s"'
                    . ' context', $context));
        }
        
        //append SELECT queries with UNION keyword between them
        $union = '';
        foreach($this->getProvidersByContext($context) as $provider) {  
            $select = $this->buildSelectQuery($provider, $context, $args); 
            $append = ($union === '') ?  $select : ' UNION '.$select;
            $union .= $append;
        }
        //add ORDER BY clause and LIMIT
        $union .= sprintf(' ORDER BY date DESC LIMIT %d OFFSET %d',
                $number, $page * $number);
        
        return $union;
    }