Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Also took a cursory look at this library. It uses MIT license, which basically means you can use it for any purpose. Looks reasonably well maintained. It has a few good ideas to be gleaned - e.g. passing in roundingRule as a parameter, using Java Currency as Adam noted, their approach to handling "persistent mapping frameworks". In general, there is much to be gained from using other OS projects, but in this case, the Money.java file is only about 336 lines long, so it seems like something we should just read for ideas, rather than integrating it in at this point. If we do use any ideas from it, we should cite it as a reference in comments. -Sam

Another issue related to the Money class and monetary storage in general is the way that Money gets persisted to the database is a pair of fields (amount and currency). This is awkward and probably would be more natural to have the currency selected at a coarser level (per-account or per-branch, say). This will all make more sense once we do Multicurrency for real - right now all those currency fields don't really do anything.

There are some links at Interesting Tech Questions to various currency rounding articles (a somewhat random collection, and probably worth moving the relevant bits to this page, but someplace to start).

Comment from Beth- I have put some links at Money Requirement Links that I found interesting in terms of handling money in financial applications in Java: