Skip to end of metadata
Go to start of metadata

Converting your objects to POJOs

Your objecs should already be POJOs, so there's no much work here. You probably will not need the object IDs anymore, so consider removing the getId() methods, if they were there just to fullfill Hibernate's contracts.

Converting your transactions to Transactions

Use a good code browser (optimally, your IDE should have one already) to look for every call to setters, constructors, adders and other methods that perform changes to your business objects' state. After you identified those, start creating as coarse-grained as possible Transaction or TransactionWithQuery objects that wrap these mutations.

Converting your Queries

When using Prevayler, you do not need to use Hibernate's query language (HQL) anymore, and you're free to choose whatever query mechanism suits your application better, or just not use any query mechanism but the good old Java language. So, you'll need to search for any calls to Hibernate's find and reimplement those queries using your query mechanism of choice.

Optionally, you can wrap some more sensitive queries inside a Query object, and execute them with a call to Prevayler.execute(), as detailed in the Documentation.

Labels
  • None