Class GenderCategoryConverter
java.lang.Object
com.endurancetrio.data.event.model.converter.GenderCategoryConverter
- All Implemented Interfaces:
jakarta.persistence.AttributeConverter<GenderCategory,String>
public class GenderCategoryConverter
extends Object
implements jakarta.persistence.AttributeConverter<GenderCategory,String>
The
GenderCategoryConverter class is responsible for converting the
GenderCategory enum to its corresponding database column representation and vice versa.
This converter is used to persist the GenderCategory enum as a string in the database. It
converts the enum to its code when storing it in the database and converts the code back to the
enum when retrieving it from the database.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
GenderCategoryConverter
public GenderCategoryConverter()
-
-
Method Details
-
convertToDatabaseColumn
- Specified by:
convertToDatabaseColumnin interfacejakarta.persistence.AttributeConverter<GenderCategory,String>
-
convertToEntityAttribute
- Specified by:
convertToEntityAttributein interfacejakarta.persistence.AttributeConverter<GenderCategory,String>
-