Handling immutable objects in Spring MVC