Skip to end of metadata
Go to start of metadata

We're going to create a simple system to manage a quick-and-dirty to-do list. The very first thing we need to create, then, is a Task:

An error occurred: cvs.prevayler.codehaus.org. The system administrator has been notified.

(warning) Notice that the Task class must implement java.io.Serializable, and all its fields must be serializable, too.

Then, we proceed to create a TaskList:

An error occurred: cvs.prevayler.codehaus.org. The system administrator has been notified.

On this TaskList, we have two methods that change the data on our system: addTask() and removeTask(). Because of the way Prevayler works (saving every change to the system, instead of the data itself), we must wrap any calls to these methods inside Transaction objects (Command Pattern).

Labels: