public class RelationalEntityVersionUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <S> Number |
getVersionNumberFromEntity(S instance,
RelationalPersistentEntity<S> persistentEntity,
RelationalConverter converter)
Get the current value of the version property for an instance of a relational persistent entity.
|
static <S> S |
setVersionNumberOnEntity(S instance,
Number version,
RelationalPersistentEntity<S> persistentEntity,
RelationalConverter converter)
Set the version property on an instance of a relational persistent entity.
|
@Nullable public static <S> Number getVersionNumberFromEntity(S instance, RelationalPersistentEntity<S> persistentEntity, RelationalConverter converter)
instance
- must not be null.persistentEntity
- must not be null.converter
- must not be null.IllegalArgumentException
- if the entity does not have a version property.public static <S> S setVersionNumberOnEntity(S instance, @Nullable Number version, RelationalPersistentEntity<S> persistentEntity, RelationalConverter converter)
instance
- must not be null.version
- The value to be set on the version property.persistentEntity
- must not be null.converter
- must not be null.IllegalArgumentException
- if the entity does not have a version property.Copyright © 2017–2020 Pivotal Software, Inc.. All rights reserved.