Interface SelectByPropertyMapper<T>
- Type Parameters:
T- 泛型
public interface SelectByPropertyMapper<T>
根据属性查询接口
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Method Summary
Modifier and TypeMethodDescriptionbooleanexistsWithProperty(org.miaixz.bus.core.center.function.FunctionX<T, ?> fn, Object value) 根据属性及对应值进行查询,检查是否存在对应记录,查询条件使用等号selectBetweenByProperty(org.miaixz.bus.core.center.function.FunctionX<T, ?> fn, Object begin, Object end) 根据属性及对应值进行查询,查询条件使用 betweenselectByProperty(org.miaixz.bus.core.center.function.FunctionX<T, ?> fn, Object value) 根据属性及对应值进行查询,有多个返回值,查询条件使用等号intselectCountByProperty(org.miaixz.bus.core.center.function.FunctionX<T, ?> fn, Object value) 根据属性及对应值进行查询,统计符合条件的记录数,查询条件使用等号selectInByProperty(org.miaixz.bus.core.center.function.FunctionX<T, ?> fn, List<?> values) 根据属性及对应值进行查询,查询条件使用 inselectOneByProperty(org.miaixz.bus.core.center.function.FunctionX<T, ?> fn, Object value) 根据属性及对应值进行查询,只能有一个返回值,有多个结果时抛出异常,查询条件使用等号
-
Method Details
-
selectOneByProperty
@SelectProvider(type=SelectPropertyProvider.class, method="dynamicSQL") T selectOneByProperty(@Param("fn") org.miaixz.bus.core.center.function.FunctionX<T, ?> fn, @Param("value") Object value) 根据属性及对应值进行查询,只能有一个返回值,有多个结果时抛出异常,查询条件使用等号- Parameters:
fn- 查询属性value- 属性值- Returns:
- the object
-
selectByProperty
@SelectProvider(type=SelectPropertyProvider.class, method="dynamicSQL") List<T> selectByProperty(@Param("fn") org.miaixz.bus.core.center.function.FunctionX<T, ?> fn, @Param("value") Object value) 根据属性及对应值进行查询,有多个返回值,查询条件使用等号- Parameters:
fn- 查询属性value- 属性值- Returns:
- the list
-
selectInByProperty
@SelectProvider(type=SelectPropertyProvider.class, method="dynamicSQL") List<T> selectInByProperty(@Param("fn") org.miaixz.bus.core.center.function.FunctionX<T, ?> fn, @Param("values") List<?> values) 根据属性及对应值进行查询,查询条件使用 in- Parameters:
fn- 查询属性values- 属性值集合,集合不能空- Returns:
- the list
-
selectBetweenByProperty
@SelectProvider(type=SelectPropertyProvider.class, method="dynamicSQL") List<T> selectBetweenByProperty(@Param("fn") org.miaixz.bus.core.center.function.FunctionX<T, ?> fn, @Param("begin") Object begin, @Param("end") Object end) 根据属性及对应值进行查询,查询条件使用 between- Parameters:
fn- 查询属性begin- 开始值end- 开始值- Returns:
- the list
-
existsWithProperty
@SelectProvider(type=SelectPropertyProvider.class, method="dynamicSQL") boolean existsWithProperty(@Param("fn") org.miaixz.bus.core.center.function.FunctionX<T, ?> fn, @Param("value") Object value) 根据属性及对应值进行查询,检查是否存在对应记录,查询条件使用等号- Parameters:
fn- 查询属性value- 属性值- Returns:
- the boolean
-
selectCountByProperty
@SelectProvider(type=SelectPropertyProvider.class, method="dynamicSQL") int selectCountByProperty(@Param("fn") org.miaixz.bus.core.center.function.FunctionX<T, ?> fn, @Param("value") Object value) 根据属性及对应值进行查询,统计符合条件的记录数,查询条件使用等号- Parameters:
fn- 查询属性value- 属性值- Returns:
- the int
-