0
有沒有辦法來格式化的:如何格式化與標準(JPA 2.0的EclipseLink)數爲貨幣
CriteriaQuery<Country> q = cb.createQuery(Country.class);
Root<Country> c = q.from(Country.class);
q.select(c.get("currency")).distinct(true);
所以,當返回中所有數字的貨幣因素,他們看起來像:
12345 - > $ 12,345.00
123,45 - > $; 123.45&
這樣,我不腦水腫循環的結果集格式化字符串。
https://stackoverflow.com/questions/2379221/java-currency-number-format#2379425 –
我應該在哪裏放置NumberFormatter? –
我知道如何格式化Java數字,但我不知道如何使用Criteria執行此操作。 –