All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.beetl.sql.clazz.ClassExtAnnotation Maven / Gradle / Ivy

There is a newer version: 3.30.14-RELEASE
Show newest version
package org.beetl.sql.clazz;


import lombok.Data;
import org.beetl.sql.annotation.builder.AttributeConvert;
import org.beetl.sql.annotation.builder.BeanConvert;
import org.beetl.sql.annotation.builder.TargetAdditional;

import java.lang.annotation.Annotation;
import java.util.HashMap;
import java.util.Map;

/**
 * 用户自定义的注解
 * @author xiandafu
 */
@Data
public class ClassExtAnnotation {
    private TargetAdditional targetAdditional;
    private Annotation additionalAnnotation;
    private Map  attributeConvertMap = new HashMap<>() ;
    private BeanConvert beanConvert;
    private Annotation beanConvertAnnotation;

   public boolean hasAttributeExt(){
       return attributeConvertMap!=null;
   }
   public boolean hasEntityExt(){
       return beanConvert!=null|| targetAdditional !=null;
   }



    public void addAttributeConvert(String attrName,AttributeConvert  convert){
        if(attributeConvertMap==null){
            attributeConvertMap = new HashMap();
        }
        attributeConvertMap.put(attrName,convert);
    }




}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy