add a comment to example code (#7591)

This commit is contained in:
Gavin King 2023-12-01 18:14:25 +01:00 committed by GitHub
parent b9ff9744a3
commit c67ea33206
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -694,7 +694,9 @@ For example, the following converter will be automatically applied to any attrib
[source,java] [source,java]
---- ----
@Converter(autoApply = true) @Converter(autoApply = true)
public static class EnumSetConverter implements AttributeConverter<EnumSet<DayOfWeek>,Integer> { public static class EnumSetConverter
// converts Java values of type EnumSet<DayOfWeek> to integers for storage in an INT column
implements AttributeConverter<EnumSet<DayOfWeek>,Integer> {
@Override @Override
public Integer convertToDatabaseColumn(EnumSet<DayOfWeek> enumSet) { public Integer convertToDatabaseColumn(EnumSet<DayOfWeek> enumSet) {
int encoded = 0; int encoded = 0;