T - The entity managed by the annotated controller.public interface ConcurrencyManager<T>
Interface that defines all the operations that should be implemented by a controller that wants to manage concurrency.
| Modifier and Type | Method and Description |
|---|---|
String |
getEditViewPath()
All the controllers that implements ConcurrencyManager must implement a method that returns a String with the
path of the edit view.
|
Integer |
getLastVersion(T record)
All the controllers that implements ConcurrencyManager must implement a method that returns the last version of
the provided record.
|
String |
getModelName()
All the controllers that implements ConcurrencyManager must implement a method that returns a String with the
name of the entity used in the model.
|
org.springframework.web.servlet.ModelAndView |
populateAndGetFormView(T entity,
org.springframework.ui.Model model)
All the controllers that implements ConcurrencyManager could implement a populateConcurrencyForm method to ensure
that the edit form is populate correctly when a Concurrency Exception appears.
|
void |
populateForm(org.springframework.ui.Model model)
All the controllers that implements ConcurrencyManager must implement a populateForm method to ensure that the
populateConcurrencyForm method is able to populate a complete edit form.
|
String getModelName()
model.addAttribute(getModelName(), entity);
String getEditViewPath()
"entities/edit"
Integer getLastVersion(T record)
record - void populateForm(org.springframework.ui.Model model)
model - org.springframework.web.servlet.ModelAndView populateAndGetFormView(T entity, org.springframework.ui.Model model)
entity - Copyright © 2018 DISID Corporation. All rights reserved.