code: public void setVersionMetadata(PropertyMetadata versionMetadata) {
      if (this.versionMetadata != null) {
        throwDuplicateAnnotationException(entityClass, Version.class, this.versionMetadata,
            versionMetadata);
      }
      this.versionMetadata = versionMetadata;
    }
docs: Sets the metadata of the field that is used for optimistic locking.
  
  @param versionMetadata
  metadata of the field that is used for optimistic locking.