public interface IdentifiableData
version. The id is always greater than 0 for an item which has been saved to the database, and 0 for a new item that has not yet been saved to the database.
The version number is used by Hibernate to prevent concurrent modifications by different threads or processes. It does this by incrementing the version number each time the information is updated in the database. If the version number in the database is different from the version on the object it is interpreted as another process has modified the item and an exception is thrown.
This interface is implemented by the
class, which also provides the Hibernate mapping for the id property.
Hibernate also requires a
setId() and a
so this must also be implemented even though it is not required by this interface.