Exercise – a simple change request

This simple exercise will again demonstrate the power of generics. Each record inserted into the database should now be logged at using logger.info() with the message:

The "className" record with ID=? has been inserted

In addition, records that are deleted should be logged using logger.warn() with the message:

The "className" record with ID=? has been deleted

In both cases, the ? token should be replaced with the ID of the entity being inserted or deleted while the className token should be replaced with the class name of the entity being inserted or deleted. This is a trivial change when using generics, as the code can be added to the persist and remove methods of the GenericDaoImpl class. Without the use of generics, ...

Get Enterprise Application Development with Ext JS and Spring now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.