How do I escape parameters of queries in JDO (Google App Engine)?
For example, how do I make the next snippet safe, if the variable name may contain unsafe chars as single quotes (')
PersistenceManager pm = ...;
String query = "select from Person where name='"+name+"'";
List<Shortened> shortened = (List<Shortened>) pm.newQuery(query).execute();