code: @Override
     protected ResultSet findChildNodesByParentIdentifierCQ(String parentIdentifier, List<QPathEntryFilter> pattern)
        throws SQLException
     {
        if (pattern.isEmpty())
        {
           throw new SQLException("Pattern list is empty.");
        }
        else
        {
           if (findNodesByParentIdAndComplexPatternCQ == null)
           {
              findNodesByParentIdAndComplexPatternCQ = dbConnection.createStatement();
           }
  
           //create query from list
           StringBuilder query = new StringBuilder(FIND_NODES_BY_PARENTID_AND_PATTERN_CQ_TEMPLATE);
           query.append(" where I.PARENT_ID='");
           query.append(parentIdentifier);
           query.append("' and I.I_CLASS=1 and I.CONTAINER_NAME='");
           query.append(this.containerConfig.containerName);
           query.append("' and ( ");
           appendPattern(query, pattern.get(0).getQPathEntry(), true);
           for (int i = 1; i < pattern.size(); i++)
           {
              query.append(" or ");
              appendPattern(query, pattern.get(i).getQPathEntry(), true);
           }
           query.append(" ) and P.PARENT_ID=I.ID and P.I_CLASS=2 and P.CONTAINER_NAME='");
           query.append(this.containerConfig.containerName);
           query.append("' and (P.NAME='[http://www.jcp.org/jcr/1.0]primaryType'");
           query.append(" or P.NAME='[http://www.jcp.org/jcr/1.0]mixinTypes'");
           query.append(" or P.NAME='[http://www.exoplatform.com/jcr/exo/1.0]owner'");
           query.append(" or P.NAME='[http://www.exoplatform.com/jcr/exo/1.0]permissions')");
           query.append(" and V.PROPERTY_ID=P.ID order by I.N_ORDER_NUM, I.ID");
  
           return findNodesByParentIdAndComplexPatternCQ.executeQuery(query.toString());
        }
     }
docs: {@inheritDoc}