private String filtrateLikeSql(String value){ if(null!=value){ String newValue=""; newValue=value.replaceAll("\\\\","\\\\\\\\"); newValue=newValue.replaceAll("'","\\\\'"); newValue=newValue.replaceAll("_","\\\\_"); newValue=newValue.replaceAll("\"","\\\\\""); newValue=newValue.replaceAll("%","\\\\%"); return newValue; } return value; } private String filtrateNotLikeSql(String value){ if(null!=value){ String newValue=""; newValue=value.replaceAll("\\\\","\\\\\\\\"); newValue=newValue.replaceAll("\"","\\\\\""); return newValue; } return value; }