code: protected String createRoleQuery(String mainQuery, boolean includeSubOus, boolean readRoles) {
  
          String sqlQuery = m_sqlManager.readQuery(mainQuery);
          sqlQuery += " ";
          if (includeSubOus) {
              sqlQuery += m_sqlManager.readQuery("C_GROUPS_GROUP_OU_LIKE_1");
          } else {
              sqlQuery += m_sqlManager.readQuery("C_GROUPS_GROUP_OU_EQUALS_1");
          }
          sqlQuery += AND_CONDITION;
          if (readRoles) {
              sqlQuery += m_sqlManager.readQuery("C_GROUPS_SELECT_ROLES_1");
          } else {
              sqlQuery += m_sqlManager.readQuery("C_GROUPS_SELECT_GROUPS_1");
          }
          sqlQuery += " ";
          sqlQuery += m_sqlManager.readQuery("C_GROUPS_ORDER_0");
          return sqlQuery;
      }
docs: Returns a sql query to select groups.<p>
  
  @param mainQuery the main select sql query
  @param includeSubOus if groups in sub-ous should be included in the selection
  @param readRoles if groups or roles whould be selected
  
  @return a sql query to select groups