private static Object getValue ( Object value ) { if ( value != null && value . getClass ( ) . isAssignableFrom ( String . class ) ) { return ( ( String ) value ) . replaceAll ( "^'" , "" ) . replaceAll ( "'$" , "" ) . replaceAll ( "''" , "'" ) ; } return value ; }
Method to skip string literal as per JPA specification . if literal starts is enclose within then skip and include in case of replace it with .