com.github.nomou.mybatis.SmartDefinition Maven / Gradle / Ivy
package com.github.nomou.mybatis;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* [可选]的Mapper的实体和主键类型定义, 也可以通过继承{@link SmartMapper}或{@link SmartCrudMapper}来实现相同作用.
*
* Note: 设置类型和主键类型可以更加精确的判定字段.
*
* @author vacoor
* @see SmartMapper
* @see SmartCrudMapper
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
@Inherited
public @interface SmartDefinition {
String table();
/**
* 主键类型.
*/
Class> idClass() default Object.class;
/**
* 实体类型.
*/
Class> domainClass() default Object.class;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy