JPAOverriddenAnnotationReader.java 文件源码

java
阅读 39 收藏 0 点赞 0 评论 0

项目:lams 作者:
/**
 * Adds a @MapKeyEnumerated annotation to the specified annotationList if the specified element
 * contains a map-key-enumerated sub-element. This should only be the case for
 * element-collection, many-to-many, or one-to-many associations.
 */
private void getMapKeyEnumerated(List<Annotation> annotationList, Element element) {
    Element subelement = element != null ? element.element( "map-key-enumerated" ) : null;
    if ( subelement != null ) {
        AnnotationDescriptor ad = new AnnotationDescriptor( MapKeyEnumerated.class );
        EnumType value = EnumType.valueOf( subelement.getTextTrim() );
        ad.setValue( "value", value );
        annotationList.add( AnnotationFactory.create( ad ) );
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号