code: public static CmsPair<String, List<I_CmsPreparedStatementParameter>> prepareUrlNameMappingConditions(
          CmsUrlNameMappingFilter filter) {
  
          List<String> sqlConditions = new ArrayList<String>();
          List<I_CmsPreparedStatementParameter> parameters = new ArrayList<I_CmsPreparedStatementParameter>();
          if (filter.getName() != null) {
              sqlConditions.add("NAME = ?");
              parameters.add(new CmsPreparedStatementStringParameter(filter.getName()));
          }
  
          if (filter.getStructureId() != null) {
              sqlConditions.add("STRUCTURE_ID = ?");
              parameters.add(new CmsPreparedStatementStringParameter(filter.getStructureId().toString()));
          }
  
          if (filter.getNamePattern() != null) {
              sqlConditions.add(" NAME LIKE ? ");
              parameters.add(new CmsPreparedStatementStringParameter(filter.getNamePattern()));
          }
  
          if ((filter.getStates() != null) && (filter.getStates().length > 0)) {
              List<String> stateConditions = new ArrayList<String>();
              stateConditions.add("1 = 0");
              for (int i = 0; i < filter.getStates().length; i++) {
                  stateConditions.add("STATE = ?");
                  parameters.add(new CmsPreparedStatementIntParameter(filter.getStates()[i]));
              }
              sqlConditions.add("( " + CmsStringUtil.listAsString(stateConditions, " OR ") + ")");
  
          }
  
          if (filter.getRejectStructureId() != null) {
              sqlConditions.add(" STRUCTURE_ID <> ? ");
              parameters.add(new CmsPreparedStatementStringParameter(filter.getRejectStructureId().toString()));
          }
  
          if (filter.getLocale() != null) {
              sqlConditions.add(" LOCALE = ? ");
              parameters.add(new CmsPreparedStatementStringParameter(filter.getLocale()));
          }
  
          String conditionString = CmsStringUtil.listAsString(sqlConditions, " AND ");
          return CmsPair.create(conditionString, parameters);
      }
docs: This method prepares the SQL conditions for mapping entries for a given URL name mapping filter.<p>
  
  @param filter the filter from which the SQL conditions should be generated
  
  @return a pair consisting of an SQL string and a list of the prepared statement parameters for the SQL