In Java Persistence API (JPA), a class can either be an @Entity or a value type. If a class is an @Entity, it is a persistent class. It represents a database table (or set of tables). If a class is a value type, it is not a persistent class. It may not represent a database table or a set of database tables. It may be used as a reusable component whose properties are used across multiple tables.
JPA – Optimistic Lock with @Version
In JPA, the use of @Version allows us to use Optimistic Locking wherein no real locks are actually applied to the database when updating records.