org.apache.ibatis.annotations.DeleteProvider Java Examples
The following examples show how to use
org.apache.ibatis.annotations.DeleteProvider.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MapperAnnotationBuilder.java From mybatis with Apache License 2.0 | 6 votes |
private SqlCommandType getSqlCommandType(Method method) { Class<? extends Annotation> type = getSqlAnnotationType(method); if (type == null) { type = getSqlProviderAnnotationType(method); if (type == null) { return SqlCommandType.UNKNOWN; } if (type == SelectProvider.class) { type = Select.class; } else if (type == InsertProvider.class) { type = Insert.class; } else if (type == UpdateProvider.class) { type = Update.class; } else if (type == DeleteProvider.class) { type = Delete.class; } } return SqlCommandType.valueOf(type.getSimpleName().toUpperCase(Locale.ENGLISH)); }
Example #2
Source File: MapperAnnotationBuilder.java From mybatis with Apache License 2.0 | 6 votes |
public MapperAnnotationBuilder(Configuration configuration, Class<?> type) { String resource = type.getName().replace('.', '/') + ".java (best guess)"; this.assistant = new MapperBuilderAssistant(configuration, resource); this.configuration = configuration; this.type = type; sqlAnnotationTypes.add(Select.class); sqlAnnotationTypes.add(Insert.class); sqlAnnotationTypes.add(Update.class); sqlAnnotationTypes.add(Delete.class); sqlProviderAnnotationTypes.add(SelectProvider.class); sqlProviderAnnotationTypes.add(InsertProvider.class); sqlProviderAnnotationTypes.add(UpdateProvider.class); sqlProviderAnnotationTypes.add(DeleteProvider.class); }
Example #3
Source File: MapperAnnotationBuilder.java From mybaties with Apache License 2.0 | 6 votes |
private SqlCommandType getSqlCommandType(Method method) { Class<? extends Annotation> type = getSqlAnnotationType(method); if (type == null) { type = getSqlProviderAnnotationType(method); if (type == null) { return SqlCommandType.UNKNOWN; } if (type == SelectProvider.class) { type = Select.class; } else if (type == InsertProvider.class) { type = Insert.class; } else if (type == UpdateProvider.class) { type = Update.class; } else if (type == DeleteProvider.class) { type = Delete.class; } } return SqlCommandType.valueOf(type.getSimpleName().toUpperCase(Locale.ENGLISH)); }
Example #4
Source File: MapperAnnotationBuilder.java From mybaties with Apache License 2.0 | 6 votes |
public MapperAnnotationBuilder(Configuration configuration, Class<?> type) { String resource = type.getName().replace('.', '/') + ".java (best guess)"; this.assistant = new MapperBuilderAssistant(configuration, resource); this.configuration = configuration; this.type = type; sqlAnnotationTypes.add(Select.class); sqlAnnotationTypes.add(Insert.class); sqlAnnotationTypes.add(Update.class); sqlAnnotationTypes.add(Delete.class); sqlProviderAnnotationTypes.add(SelectProvider.class); sqlProviderAnnotationTypes.add(InsertProvider.class); sqlProviderAnnotationTypes.add(UpdateProvider.class); sqlProviderAnnotationTypes.add(DeleteProvider.class); }
Example #5
Source File: MemberMapper.java From maintain with MIT License | 4 votes |
@DeleteProvider(type = MemberSqlProvide.class, method = "deleteMemberSql") int deleteMember(Member member);
Example #6
Source File: ServerSystemMapper.java From maintain with MIT License | 4 votes |
@DeleteProvider(type = ServerSystemSqlProvide.class, method = "deleteServerSystemSql") int deleteServerSystem(String ip);
Example #7
Source File: InvtHeadMapper.java From maintain with MIT License | 4 votes |
@DeleteProvider(type = InvtHeadSqlProvide.class, method = "deleteInvtHeadByHeadGuidSql") Integer deleteInvtHeadByHeadGuid(String headGuid);
Example #8
Source File: UserMapper.java From SpringbootMybatis with Apache License 2.0 | 4 votes |
@DeleteProvider(type=UserSqlProvider.class, method="deleteByExample") int deleteByExample(UserCriteria example);
Example #9
Source File: BaseMapper.java From ace with Apache License 2.0 | 4 votes |
@DeleteProvider(type =BaseProvider.class,method = "delete") long delete(Object object);
Example #10
Source File: CommonMapper.java From uncode-dal-all with GNU General Public License v2.0 | 2 votes |
/** * 主键删除 * 主键参数传入 model.conditions,不能为空 * @param model * @return */ @DeleteProvider(method = "deleteByPrimaryKey", type = SqlTemplate.class) int deleteByPrimaryKey(Table model);
Example #11
Source File: EqualMapper.java From BlogManagePlatform with Apache License 2.0 | 2 votes |
/** * 通过equal条件删除,只支持一个equal条件,是简单的封装 * @param paramName 该表中的字段名(和Example不同,只能是表中字段名,不能是实体对应字段名) * @param param 该表中的对应字段 * @author Frodez * @date 2019-12-25 */ @DeleteProvider(type = EqualMapperProvider.class, method = "dynamicSQL") int deleteEqual(@Param("paramName") String paramName, @Param("param") Object param);
Example #12
Source File: IdsMapper.java From BlogManagePlatform with Apache License 2.0 | 2 votes |
/** * 通过id批量删除 * @param ids 必须是id的对应字段的值!!! * @author Frodez * @date 2019-12-25 */ @DeleteProvider(type = IdsMapperProvider.class, method = "dynamicSQL") int deleteByIds(@Param("ids") List<?> ids);
Example #13
Source File: DeleteByIdListMapper.java From Mapper with MIT License | 2 votes |
/** * 根据主键字符串进行删除,类中只有存在一个带有@Id注解的字段 * * @param idList * @return */ @DeleteProvider(type = IdListProvider.class, method = "dynamicSQL") int deleteByIdList(@Param("idList") List<PK> idList);
Example #14
Source File: DeleteByConditionMapper.java From Mapper with MIT License | 2 votes |
/** * 根据Condition条件删除数据 * * @param condition * @return */ @DeleteProvider(type = ConditionProvider.class, method = "dynamicSQL") int deleteByCondition(Object condition);
Example #15
Source File: DeleteByIdsMapper.java From Mapper with MIT License | 2 votes |
/** * 根据主键字符串进行删除,类中只有存在一个带有@Id注解的字段 * * @param ids 如 "1,2,3,4" * @return */ @DeleteProvider(type = IdsProvider.class, method = "dynamicSQL") int deleteByIds(String ids);
Example #16
Source File: DeleteByPrimaryKeyMapper.java From Mapper with MIT License | 2 votes |
/** * 根据主键字段进行删除,方法参数必须包含完整的主键属性 * * @param key * @return */ @DeleteProvider(type = BaseDeleteProvider.class, method = "dynamicSQL") int deleteByPrimaryKey(Object key);
Example #17
Source File: DeleteMapper.java From Mapper with MIT License | 2 votes |
/** * 根据实体属性作为条件进行删除,查询条件使用等号 * * @param record * @return */ @DeleteProvider(type = BaseDeleteProvider.class, method = "dynamicSQL") int delete(T record);
Example #18
Source File: DeleteByExampleMapper.java From Mapper with MIT License | 2 votes |
/** * 根据Example条件删除数据 * * @param example * @return */ @DeleteProvider(type = ExampleProvider.class, method = "dynamicSQL") int deleteByExample(Object example);
Example #19
Source File: DeleteByConditionMapper.java From tk-mybatis with MIT License | 2 votes |
/** * 根据Condition条件删除数据 * * @param condition * @return */ @DeleteProvider(type = ConditionProvider.class, method = "dynamicSQL") int deleteByCondition(Object condition);
Example #20
Source File: CommonMapper.java From uncode-dal-all with GNU General Public License v2.0 | 2 votes |
/** * 条件删除 * 条件传入model.QueryCriteria * @param model * @return */ @DeleteProvider(method = "deleteByCriteria", type = SqlTemplate.class) int deleteByCriteria(Table model);
Example #21
Source File: DeleteByExampleMapper.java From tk-mybatis with MIT License | 2 votes |
/** * 根据Example条件删除数据 * * @param example * @return */ @DeleteProvider(type = ExampleProvider.class, method = "dynamicSQL") int deleteByExample(Object example);
Example #22
Source File: InMapper.java From BlogManagePlatform with Apache License 2.0 | 2 votes |
/** * 通过in条件删除,只支持一个in条件,是简单的封装 * @param paramName 该表中的字段名(和Example不同,只能是表中字段名,不能是实体对应字段名) * @param params 该表中的对应字段 * @author Frodez * @date 2019-12-25 */ @DeleteProvider(type = InMapperProvider.class, method = "dynamicSQL") int deleteIn(@Param("paramName") String paramName, @Param("params") List<?> params);
Example #23
Source File: DeleteMapper.java From tk-mybatis with MIT License | 2 votes |
/** * 根据实体属性作为条件进行删除,查询条件使用等号 * * @param record * @return */ @DeleteProvider(type = BaseDeleteProvider.class, method = "dynamicSQL") int delete(T record);
Example #24
Source File: DeleteByPrimaryKeyMapper.java From tk-mybatis with MIT License | 2 votes |
/** * 根据主键字段进行删除,方法参数必须包含完整的主键属性 * * @param key * @return */ @DeleteProvider(type = BaseDeleteProvider.class, method = "dynamicSQL") int deleteByPrimaryKey(Object key);
Example #25
Source File: DeleteByIdsMapper.java From tk-mybatis with MIT License | 2 votes |
/** * 根据主键字符串进行删除,类中只有存在一个带有@Id注解的字段 * * @param ids 如 "1,2,3,4" * @return */ @DeleteProvider(type = IdsProvider.class, method = "dynamicSQL") int deleteByIds(String ids);
Example #26
Source File: DeleteByDynamicQueryMapper.java From mybatis-dynamic-query with Apache License 2.0 | 2 votes |
/** * delete by dynamic query. * * @param dynamicQuery dynamic query * @return effect rows */ @DeleteProvider(type = DynamicQueryProvider.class, method = "dynamicSQL") int deleteByDynamicQuery(@Param(MapperConstants.DYNAMIC_QUERY) DynamicQuery<T> dynamicQuery);