This module is view-only. You do not have an enrolement for this module.

File operations with annotations

This tutorial is based on the bandstand example application. You might want to check out the source code and experiment with it:


Lets kick things off with the simplest of all the file operations, at least to understand - deleting

Just add the @Delete annotation to a method with the first argument being the thing to delete:

    public void deleteImage(Image image) {
        Transaction tx = SessionManager.session().beginTransaction();
        try {
        } catch (Exception e) {

From ImagesController

Note that the transaction handling in this example app isnt anything very special, you should probably do it a bit more declaratively!