1. add _locked_ column in the tables 2. add _locked_ field to the JPA entities 3. add lock set/get at JPA level (with lock DS checking for complete) 4. along with that little reordering of code is made to make it more structured Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>