View Javadoc
1   /**
2    *    Copyright 2006-2016 the original author or authors.
3    *
4    *    Licensed under the Apache License, Version 2.0 (the "License");
5    *    you may not use this file except in compliance with the License.
6    *    You may obtain a copy of the License at
7    *
8    *       http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *    Unless required by applicable law or agreed to in writing, software
11   *    distributed under the License is distributed on an "AS IS" BASIS,
12   *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *    See the License for the specific language governing permissions and
14   *    limitations under the License.
15   */
16  package org.mybatis.generator.codegen.mybatis3.javamapper.elements.sqlprovider;
17  
18  import java.util.List;
19  
20  import org.mybatis.generator.api.IntrospectedColumn;
21  import org.mybatis.generator.api.dom.java.Method;
22  import org.mybatis.generator.api.dom.java.TopLevelClass;
23  
24  /**
25   * 
26   * @author Jeff Butler
27   * 
28   */
29  public class ProviderUpdateByExampleWithBLOBsMethodGenerator extends
30          ProviderUpdateByExampleWithoutBLOBsMethodGenerator {
31  
32      public ProviderUpdateByExampleWithBLOBsMethodGenerator(boolean useLegacyBuilder) {
33          super(useLegacyBuilder);
34      }
35  
36      @Override
37      public String getMethodName() {
38          return introspectedTable.getUpdateByExampleWithBLOBsStatementId();
39      }
40  
41      @Override
42      public List<IntrospectedColumn> getColumns() {
43          return introspectedTable.getAllColumns();
44      }
45  
46      @Override
47      public boolean callPlugins(Method method, TopLevelClass topLevelClass) {
48          return context.getPlugins().providerUpdateByExampleWithBLOBsMethodGenerated(method, topLevelClass,
49                  introspectedTable);
50      }
51  }