自定义JPA之AttributeConverter

1. 执行类

public class BooleanConverter implements AttributeConverter<Boolean, Integer> {

}

2. 属性注解

@Column(name = "VALID")@Convert(converter = BooleanConverter.class)

posted @ 2015-06-02 14:22  samu  阅读(614)  评论(0编辑  收藏  举报