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); }
@UpdateProvider(type = SqlProvider.class, method = "update") public int update(Map<String,Object> paramter);
@UpdateProvider(type=UserSqlProvider.class, method="updateByExampleSelective") int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);
@UpdateProvider(type=UserSqlProvider.class, method="updateByExample") int updateByExample(@Param("record") User record, @Param("example") UserExample example);
@UpdateProvider(type=UserSqlProvider.class, method="updateByPrimaryKeySelective") int updateByPrimaryKeySelective(User record);
@UpdateProvider( type = DynamicQueryBuilder.class, method = "buildUpdate") int update(@Param(PARAM_ENTITY_NAME) T bean);
@UpdateProvider(type = DynamicQueryBuilder.class, method = "buildSearchUpdate") int updateBySearch(@Param(PARAM_ENTITY_NAME) SQLParameter<T> sqlParameter);
@UpdateProvider(type = DynamicQueryProvider.class, method = "dynamicSQL") int updateSelectiveByDynamicQuery( @Param("record") T record, @Param(MapperConstants.DYNAMIC_QUERY) DynamicQuery<T> dynamicQuery);
@UpdateProvider(type = DynamicQueryProvider.class, method = "dynamicSQL") int updateByDynamicQuery( @Param("record") T record, @Param(MapperConstants.DYNAMIC_QUERY) DynamicQuery<T> dynamicQuery);
@UpdateProvider(type = StatementProvider.class, method = "provideUpdate") int update(S param);
@UpdateProvider(type= OurSqlBuilder.class, method= "buildUpdate") void update(User user);
@UpdateProvider(type = BatchLogicDeleteMapperProvider.class, method = "dynamicSQL") int batchDelete(List<T> arr);
@UpdateProvider(type = AccountSqlProvider.class, method = "deleteSql") void deleteByUid(long uid);
@UpdateProvider(type = AccountSqlProvider.class, method = "updateSql") MemAccount update(MemAccount memAccount);
@UpdateProvider(type = AccountSqlProvider.class, method = "updateSql") void updateByFields(MemAccount memAccount);
@UpdateProvider(type=UserSqlProvider.class, method="updateByExampleSelective") int updateByExampleSelective(@Param("record") User record, @Param("example") UserCriteria example);
@UpdateProvider(type=UserSqlProvider.class, method="updateByExample") int updateByExample(@Param("record") User record, @Param("example") UserCriteria example);
@UpdateProvider(type=SqlProviderAdapter.class, method="update") int update(UpdateStatementProvider updateStatement);
@UpdateProvider(type = RoleSqlProvider.class, method = "deleteSql") void delete(long uid);
@UpdateProvider(type = RoleSqlProvider.class, method = "updateSql") MemAccount update(MemAccount memAccount);
@UpdateProvider(type = BusListenerSqlProvider.class, method = "deleteSql") void delete(@Param("uid") long uid, @Param("event") int event);
@UpdateProvider(type = BusProgressSqlProvider.class, method = "updateSql") void update(MemBusProgress memBusProgress);
@UpdateProvider(type = BusProgressSqlProvider.class, method = "deleteSql") void delete(@Param("uid") long uid, @Param("event") int busId);
@UpdateProvider(type = BusInfoSqlProvider.class, method = "updateSql") void update(MemBusInfo memBusInfo);
@UpdateProvider(type = BusInfoSqlProvider.class, method = "deleteSql") void delete(@Param("uid") long uid, @Param("busId") int busId);