<< August 27, 2008 | Home | August 29, 2008 >>

My data structures have changed - how can I migrate my data model?

Sometimes, people design data structures, persisted entities, only to find that - gasp! - their data structures are more fluid than they expected. When all of your data is transient - meaning that it can be destroyed safely - that's no big deal, because you just drop the tables in question (or the whole database) and start over. (Sound familiar, Rails fans?) Sometimes, that's not enough - so what do you do?

Read more...

How do I send mail with Java?

You send mail in Java with one of two APIs, basically: JavaMail and Commons-Email. People who use JavaMail fit in one of three categories: they don't know about Commons-Email, they are doing bulk mail and know what they're doing, or they're gluttons for punishment. Here's a class that shows how to send mail with both JavaMail and Commons-Email, for the case of sending to a single address.

Read more...

Tags :

How do I parse or format dates? Dates are hard!

Well, Barbie, dates are really pretty easy. Here's a class with a number of formatting and parsing examples.

Read more...

How can I get all classes in a specific package?

Every so often, we get "How do I get all classes in a specific package?" After all, IDEs do it, right? (You might want to inspect members for, say, a specific interface, or something like that.) There's usually no need to actually do this, but if you're interested, here's how.

Read more...

Tags :