ISPN-3797 DataContainer should interact atomically with Persistence

* Changed DefaultDataContainer implementation to use named inner classes.
It avoids duplicate code.