code: protected void addOrgUnitCondition(
          CmsSelectQuery select,
          TableAlias users,
          CmsOrganizationalUnit orgUnit,
          boolean recursive) {
  
          String ouName = orgUnit.getName();
          String pattern = CmsOrganizationalUnit.SEPARATOR + ouName;
          if (recursive) {
              pattern += "%";
          }
          select.addCondition(CmsDbUtil.columnLike(users.column(colOu()), pattern));
      }
docs: Adds a check for an OU to an SQL query.<p>
  
  @param select the query
  @param users the user table alias
  @param orgUnit the organizational unit
  @param recursive if true, checks for sub-OUs too