author | chris <chris@marvin> |
Tue, 20 Jan 2009 10:21:03 +0100 | |
changeset 0 | f907866f0e4b |
permissions | -rw-r--r-- |
chris@0 | 1 |
/* |
chris@0 | 2 |
* To change this template, choose Tools | Templates |
chris@0 | 3 |
* and open the template in the editor. |
chris@0 | 4 |
*/ |
chris@0 | 5 |
|
chris@0 | 6 |
package test; |
chris@0 | 7 |
|
chris@0 | 8 |
import com.so.news.util.StringTemplate; |
chris@0 | 9 |
|
chris@0 | 10 |
/** |
chris@0 | 11 |
* |
chris@0 | 12 |
* @author chris |
chris@0 | 13 |
*/ |
chris@0 | 14 |
public class StringTemplateTest |
chris@0 | 15 |
{ |
chris@0 | 16 |
public static void main(String[] args) |
chris@0 | 17 |
{ |
chris@0 | 18 |
StringTemplate templ |
chris@0 | 19 |
= new StringTemplate("SELECT %row FROM %table WHERE %row = ich"); |
chris@0 | 20 |
|
chris@0 | 21 |
templ.set("row", "name"); |
chris@0 | 22 |
templ.set("table", "UserTable"); |
chris@0 | 23 |
|
chris@0 | 24 |
System.out.println(templ.toString()); |
chris@0 | 25 |
} |
chris@0 | 26 |
} |