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); }
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)); }
public MybatisMapperAnnotationBuilder(Configuration configuration, Class<?> type) { // 执行父类 super(configuration, 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); }
public MybatisMapperAnnotationBuilder(Configuration configuration, Class<?> type) { // TODO 执行父类 super(configuration, 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); }
@DeleteProvider(type =BaseProvider.class,method = "delete") long delete(Object object);
@DeleteProvider(type = SqlProvider.class, method = "delete") public int delete(Map<String,Object> paramter);
@DeleteProvider(type=UserSqlProvider.class, method="deleteByExample") int deleteByExample(UserExample example);
@DeleteProvider(type = DynamicQueryProvider.class, method = "dynamicSQL") int deleteByDynamicQuery(@Param(MapperConstants.DYNAMIC_QUERY) DynamicQuery<T> dynamicQuery);
@DeleteProvider(type= OurSqlBuilder.class, method= "buildDelete") void delete(Integer id);
@DeleteProvider(type=UserSqlProvider.class, method="deleteByExample") int deleteByExample(UserCriteria example);
@DeleteProvider(type=SqlProviderAdapter.class, method="delete") int delete(DeleteStatementProvider deleteStatement);
/** * 根据Example条件删除数据 * * @param example * @return */ @DeleteProvider(type = ExampleProvider.class, method = "dynamicSQL") int deleteByExample(Object example);
/** * 根据实体属性作为条件进行删除,查询条件使用等号 * * @param record * @return */ @DeleteProvider(type = BaseDeleteProvider.class, method = "dynamicSQL") int delete(T record);
/** * 根据主键字段进行删除,方法参数必须包含完整的主键属性 * * @param key * @return */ @DeleteProvider(type = BaseDeleteProvider.class, method = "dynamicSQL") int deleteByPrimaryKey(Object key);
/** * 根据主键字符串进行删除,类中只有存在一个带有@Id注解的字段 * * @param ids 如 "1,2,3,4" * @return */ @DeleteProvider(type = IdsProvider.class, method = "dynamicSQL") int deleteByIds(String ids);
/** * 根据Condition条件删除数据 * * @param condition * @return */ @DeleteProvider(type = ConditionProvider.class, method = "dynamicSQL") int deleteByCondition(Object condition);
/** * 批量删除 */ @DeleteProvider(type = CommentSqlProvider.class, method = "batchDelete") void batchDelete(@Param("params") List<String> params);
/** * 条件删除 * 条件传入model.QueryCriteria * @param model * @return */ @DeleteProvider(method = "deleteByCriteria", type = SqlTemplate.class) int deleteByCriteria(Table model);
/** * 主键删除 * 主键参数传入 model.conditions,不能为空 * @param model * @return */ @DeleteProvider(method = "deleteByPrimaryKey", type = SqlTemplate.class) int deleteByPrimaryKey(Table model);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table BIZDATETIME_MASTER * * @mbggenerated */ @DeleteProvider(type=BizdatetimeMasterSqlProvider.class, method="deleteByExample") int deleteByExample(BizdatetimeMasterCriteria example);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table MAIL_TEMPLATE * * @mbggenerated */ @DeleteProvider(type=MailTemplateSqlProvider.class, method="deleteByExample") int deleteByExample(MailTemplateCriteria example);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table SQLTOOL_METADATA * * @mbggenerated */ @DeleteProvider(type=SqltoolMetadataSqlProvider.class, method="deleteByExample") int deleteByExample(SqltoolMetadataCriteria example);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table MAIL_TEMPLATE_RCPT * * @mbggenerated */ @DeleteProvider(type=MailTemplateRcptSqlProvider.class, method="deleteByExample") int deleteByExample(MailTemplateRcptCriteria example);