com.raynigon.unit.api.jpa.cache.CachedQuantity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-boot-jpa-starter Show documentation
Show all versions of spring-boot-jpa-starter Show documentation
The spring-boot-jpa-starter is a part of the unit-api
package com.raynigon.unit.api.jpa.cache;
import java.io.Serializable;
/**
* The CachedQuantity is a simple Data Transfer Object (DTO)
* to store a quantity value as number and the unit of the quantity as symbol string.
* This DTO is needed because the Quantity itself is not serializable.
*
* @param value The value of the cached quantity
* @param unit The unit of the cached quantity
*/
public record CachedQuantity(
Number value,
String unit
) implements Serializable {
}