private static String declareServiceProcessFindByCriteria(
	                                                            List<Criteria> dataList,List<Proxy> listeProxy) {
	  StringBuilder sb = new StringBuilder();
	  sb.append(" /**\n");
	  sb.append(" * Permet de rechercher la liste des elements\n");
	  sb.append(" * @param cnx connexion de lecture au sein de laquelle sera entreprise la \n");
	  sb.append(" * recherche\n");
	  sb.append(" * @param context contexte permettant d'accéder au service et de prendre en\n");
	  sb.append(" * compte par exemple les droits d'accès\n");
	  sb.append(" * @param criteria ensemble des valeurs qui permettront de sélectionner l'objet\n");
	  sb.append(" * métier (i.e. clé primaire)\n");
	  sb.append(" * @return une réponse contenant un et un seul élément correspondant à l'objet\n");
	  sb.append(" * métier sélectionné si aucune erreur fonctionnelle n'a été rencontrée\n");
	  sb.append(" * @throws ServiceObjectNotFoundException soulevée si l'objet recherché\n");
	  sb.append(" * n'existe pas\n");
	  sb.append(" * @throws ServiceException soulevée si une erreur technique ne permet pas\n");
	  sb.append(" * d'extraire les informations de la couche de persistance\n");
	  sb.append(" */\n");
	  sb.append(" @Override\n");
	  sb.append(" protected ServiceResponse processFindByCriteria(Connection cnx, ServiceContext context,\n");
	  sb.append("                                               ServiceCriteria criteria,\n");
	  sb.append("                                               ServiceFindAttributes findAttributes) throws ServiceException {\n");
	  sb.append(" ServiceResponse serviceResponse = createDefaultServiceResponse();\n");
	  sb.append(" "+name+"ServiceCriteria serviceCriteria = ("+name+"ServiceCriteria) criteria;\n");
	  sb.append(" \n");
	  sb.append(" \n");
	  sb.append(" PreparedStatement stmt = null;\n");
	  sb.append(" ResultSet rs = null;\n");
	  sb.append(" try {\n");
	  sb.append("   SQLCriteria sqlCriteria = new SQLCriteria();\n");
	  sb.append("   StringBuffer sql = new StringBuffer();\n");	  
	  sb.append("   sql.append(_SQL_PRINCIPAL_SELECT);\n");
	  sb.append("   sql.append(_SQL_PRINCIPAL_FROM);\n");
	  sb.append("   sql.append(_SQL_PRINCIPAL_WHERE);\n");
	  sb.append("   \n");
	  if (!traitementSynthese){
	    sb.append("   sqlCriteria = _computeSQLWhereClauseFromServiceCriteria(serviceCriteria, sqlCriteria);\n");
	    sb.append("   if (sqlCriteria.getSQL() != null) {\n");
	    sb.append("     sql.append(sqlCriteria.getSQL());\n");
	    sb.append("   }\n");
	  }
	  sb.append("   \n");
	  sb.append("   sql.append(new SQLServiceFilterTools().computeFiltrerByClause(criteria,_champsFiltres));\n");
	  sb.append("   String orderClause = computeSQLOrderClause(findAttributes, _ORDER_PROPERTIES, _ORDER_COLUMN_PROPERTIES, _ORDER_BY_DEFAULT);\n");
	  sb.append("   if(null != orderClause) {\n");
	  sb.append("     sql.append(\" ORDER BY \");\n");
	  sb.append("     sql.append(orderClause);\n");
	  sb.append("   }\n");
	  sb.append("   \n");
	  sb.append("   stmt = cnx.prepareStatement(sql.toString());\n");
	  
	  if (!traitementSynthese){
	    sb.append("   if (sqlCriteria.getSQL() != null) {\n");
	    sb.append("     sqlCriteria.assignCriteria(stmt);\n");
	    sb.append("   }\n");
	  }else{
	    sb.append(traitementParametreEntree());
	  }
	  sb.append("   rs = stmt.executeQuery();\n");
	  sb.append("   rs = adaptResultSetForServiceFindAttributes(findAttributes, rs);\n");
	  sb.append("  \n");
	  sb.append("   // Liste de proxy à renvoyer\n");
	  sb.append("  "+name+"Proxy proxyTmp = null;\n");
	  sb.append("  List<"+name+"Proxy> proxys = new ArrayList<"+name+"Proxy>();\n");
	  sb.append("  while (rs.next()) {\n");
	  sb.append("     // On construit le proxy\n");
	  sb.append("     proxyTmp = new "+name+"Proxy();\n");
	  sb.append("      //remplir le champ GLFAM_COD_famMGCUT_LIB\n");
	  sb.append("     proxyTmp = computeBusinessObjectProxyFromResultSet(rs, proxyTmp);\n");
	  if (listeCompute!=null && listeCompute.size()>0){
      for (TypeCompute typeRequete: listeCompute){
        sb.append("     compute"+typeRequete.getCode()+"(cnx, context, proxyTmp); \n");
      }
    }
    sb.append("     //computeXXX_COD(cnx, context, proxyTmp,CLE); //Falcultatif \n");
	  for (Proxy proxy: listeProxy){
	    if (proxy.isLien()){
	      sb.append("     proxyTmp.set"+proxy.getNom()+"_URL(DonneesMetierLienUtils.getInstance().computeXXX);\n");
	    }
	  }
	  
	  
	  sb.append("     // On ajoute le proxy à la liste\n");
	  sb.append("     proxys.add(proxyTmp);\n");
	  sb.append("   }\n");
	  sb.append("   boolean hasMoreElements = !isResultSetExhausted(findAttributes, rs);\n");
	  sb.append("   serviceResponse = addElements(serviceResponse, proxys, hasMoreElements);\n");
	  sb.append(" } catch (SQLException SQLEx) {\n");
	  sb.append("   // Exception soulevée si une erreur d'entrée/sortie se produit lors de\n");
	  sb.append("   // l'accès à la base de données\n");
	  sb.append("   ServiceException IOEx = new ServiceException(\"Fatal error while accessing to persistence layer\",\n");
	  sb.append("                                                SQLEx);\n");
	  sb.append("   if (isLoggingError())\n");
	  sb.append("     logError(IOEx.getMessage(), SQLEx);\n");
	  sb.append("   throw IOEx;\n");
	  sb.append(" } finally {\n");
	  sb.append("   // On ferme le jeu de données\n");
	  sb.append("   if (rs != null) {\n");
	  sb.append("     try {\n");
	  sb.append("       rs.close();\n");
	  sb.append("     } catch (SQLException ignoreEx) {}\n");
	  sb.append("     rs = null;\n");
	  sb.append("   }\n");
	  sb.append("   // On ferme l'ordre SQL\n");
	  sb.append("   if (stmt != null) {\n");
	  sb.append("     try {\n");
	  sb.append("       stmt.close();\n");
	  sb.append("     } catch (SQLException ignoreEx) {}\n");
	  sb.append("     stmt = null;\n");
	  sb.append("   }\n");
	  sb.append(" }\n");
	  sb.append(" \n");
	  sb.append(" return serviceResponse;\n");
	  sb.append(" }\n");
	  return sb.toString();
	}