public function findBySelector( $selector, $media = '', $rootId = null )
    {
        $where = array(
            'selector'  => (string) $selector,
            'media'     => (string) $media,
        );

        if ( empty( $rootId ) )
        {
            $where[] = new Predicate\IsNull( 'rootParagraphId' );
        }
        else
        {
            $where['rootParagraphId'] = (int) $rootId;
        }

        return $this->findOne( $where );
    }