Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class O {
- public String field;
- }
- StringTemplate query = new StringTemplate(
- "UPDATE customers SET customerName='$customer$'," +
- " customerAddress='$address$' WHERE id=$id$ AND $o.field$ IS NOT NULL");
- query.setAttribute("customer", "Frank");
- query.setAttribute("address", "1313 Mocking Bird Lane");
- query.setAttribute("id", "4453");
- O o = new O();
- o.field = "date";
- query.setAttribute("o", o);
- System.out.println(query);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement