public void onApplicationEvent ( ApplicationEvent e ) { if ( e instanceof LifecycleApplicationEvent ) { LifecycleApplicationEvent le = ( LifecycleApplicationEvent ) e ; if ( shouldHandleEvent ( e ) ) { if ( le . getEventType ( ) == LifecycleApplicationEvent . CREATED ) { handleNewObject ( le . getObject ( ) ) ; } else if ( le . getEventType ( ) == LifecycleApplicationEvent . MODIFIED ) { handleUpdatedObject ( le . getObject ( ) ) ; } else if ( le . getEventType ( ) == LifecycleApplicationEvent . DELETED ) { handleDeletedObject ( le . getObject ( ) ) ; } } } }
Handle an application event . This will notify us of object adds deletes and modifications . Update our table model accordingly .