Class UlidConverter
java.lang.Object
com.broadleafcommerce.data.tracking.jpa.UlidConverter
public class UlidConverter
extends Object
implements javax.persistence.AttributeConverter<String,String>
Serves to pass through the string ULID representation of the field in the Java entity class into
a varchar field in the database. This is the most readable option and serves as the easiest
option during data troubleshooting. However, the Base32 string representation does use more
memory to store the value in the database, which can be important when considering database index
size. There is a byte array converting version of this class as well. Which version is used is
determined by which library is mounted on the classpath at runtime.
String fields in an entity class that should receive this persistence behaviour should be
annotated with @Convert(converter = UlidConverter.class)
.
- Author:
- Jeff Fischer
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconvertToDatabaseColumn
(String attribute) convertToEntityAttribute
(String dbData) static UlidConverter
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
UlidConverter
public UlidConverter()
-
-
Method Details