Interface SelectByPrimaryKeyMapper<T>
- Type Parameters:
T- 泛型
- All Known Subinterfaces:
BasicMapper<T>,BasicSelectMapper<T>,Mapper<T>
public interface SelectByPrimaryKeyMapper<T>
通用Mapper接口,其他接口继承该接口即可 需要在Entity类中为主键字段加上@javax.persistence.Id注解,声明主键 否则无法确认实体类哪个属性是主键
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Method Summary
Modifier and TypeMethodDescriptionselectByPrimaryKey(Object key) 根据主键字段进行查询,方法参数必须包含完整的主键属性,查询条件使用等号
-
Method Details
-
selectByPrimaryKey
@SelectProvider(type=BasicSelectProvider.class, method="dynamicSQL") T selectByPrimaryKey(Object key) 根据主键字段进行查询,方法参数必须包含完整的主键属性,查询条件使用等号- Parameters:
key- 主键- Returns:
- the object 操作结果
-