Package org.mybatis.generator.api.dom.java

Examples of org.mybatis.generator.api.dom.java.FullyQualifiedJavaType


            : introspectedTable.getBaseResultMapId());
    method.addAnnotation(annotation);
  }

  private void addAnnotatedResults(Interface interfaze, Method method) {
    interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.type.JdbcType")); //$NON-NLS-1$

    if (introspectedTable.isConstructorBased()) {
      interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.Arg")); //$NON-NLS-1$
      interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.ConstructorArgs")); //$NON-NLS-1$
      method.addAnnotation("@ConstructorArgs({"); //$NON-NLS-1$
    } else {
      interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.Result")); //$NON-NLS-1$
      interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.Results")); //$NON-NLS-1$
      method.addAnnotation("@Results({"); //$NON-NLS-1$
    }

    StringBuilder sb = new StringBuilder();
View Full Code Here


    super();
  }

  @Override
  public void addMapperAnnotations(Interface interfaze, Method method) {
    FullyQualifiedJavaType fqjt = new FullyQualifiedJavaType(introspectedTable.getMyBatis3SqlProviderType());
    interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.UpdateProvider")); //$NON-NLS-1$
    StringBuilder sb = new StringBuilder();
    sb.append("@UpdateProvider(type="); //$NON-NLS-1$
    sb.append(fqjt.getShortName());
    sb.append(".class, method=\""); //$NON-NLS-1$
    sb.append(introspectedTable.getUpdateByExampleStatementId());
    sb.append("\")"); //$NON-NLS-1$

    method.addAnnotation(sb.toString());
View Full Code Here

    super();
  }

  @Override
  public void addMapperAnnotations(Interface interfaze, Method method) {
    FullyQualifiedJavaType fqjt = new FullyQualifiedJavaType(introspectedTable.getMyBatis3SqlProviderType());
    interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.SelectProvider")); //$NON-NLS-1$
    interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.type.JdbcType")); //$NON-NLS-1$

    if (introspectedTable.isConstructorBased()) {
      interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.Arg")); //$NON-NLS-1$
      interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.ConstructorArgs")); //$NON-NLS-1$
    } else {
      interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.Result")); //$NON-NLS-1$
      interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.Results")); //$NON-NLS-1$
    }

    StringBuilder sb = new StringBuilder();
    sb.append("@SelectProvider(type="); //$NON-NLS-1$
    sb.append(fqjt.getShortName());
    sb.append(".class, method=\""); //$NON-NLS-1$
    sb.append(introspectedTable.getSelectByExampleWithBLOBsStatementId());
    sb.append("\")"); //$NON-NLS-1$

    method.addAnnotation(sb.toString());
View Full Code Here

    super();
  }

  @Override
  public void addMapperAnnotations(Interface interfaze, Method method) {
    interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.Delete")); //$NON-NLS-1$

    method.addAnnotation("@Delete({"); //$NON-NLS-1$

    StringBuilder sb = new StringBuilder();
    javaIndent(sb, 1);
View Full Code Here

    super();
  }

  @Override
  public void addMapperAnnotations(Interface interfaze, Method method) {
    FullyQualifiedJavaType fqjt = new FullyQualifiedJavaType(introspectedTable.getMyBatis3SqlProviderType());
    interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.UpdateProvider")); //$NON-NLS-1$
    StringBuilder sb = new StringBuilder();
    sb.append("@UpdateProvider(type="); //$NON-NLS-1$
    sb.append(fqjt.getShortName());
    sb.append(".class, method=\""); //$NON-NLS-1$
    sb.append(introspectedTable.getUpdateByExampleWithBLOBsStatementId());
    sb.append("\")"); //$NON-NLS-1$

    method.addAnnotation(sb.toString());
View Full Code Here

    super();
  }

  @Override
  public void addMapperAnnotations(Interface interfaze, Method method) {
    FullyQualifiedJavaType fqjt = new FullyQualifiedJavaType(introspectedTable.getMyBatis3SqlProviderType());
    interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.SelectProvider")); //$NON-NLS-1$
    StringBuilder sb = new StringBuilder();
    sb.append("@SelectProvider(type="); //$NON-NLS-1$
    sb.append(fqjt.getShortName());
    sb.append(".class, method=\""); //$NON-NLS-1$
    sb.append(introspectedTable.getCountByExampleStatementId());
    sb.append("\")"); //$NON-NLS-1$

    method.addAnnotation(sb.toString());
View Full Code Here

    super();
  }

  @Override
  public void addMapperAnnotations(Interface interfaze, Method method) {
    FullyQualifiedJavaType fqjt = new FullyQualifiedJavaType(introspectedTable.getMyBatis3SqlProviderType());
    interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.UpdateProvider")); //$NON-NLS-1$
    StringBuilder sb = new StringBuilder();
    sb.append("@UpdateProvider(type="); //$NON-NLS-1$
    sb.append(fqjt.getShortName());
    sb.append(".class, method=\""); //$NON-NLS-1$
    sb.append(introspectedTable.getUpdateByExampleSelectiveStatementId());
    sb.append("\")"); //$NON-NLS-1$

    method.addAnnotation(sb.toString());
View Full Code Here

    super();
  }

  @Override
  public void addMapperAnnotations(Interface interfaze, Method method) {
    FullyQualifiedJavaType fqjt = new FullyQualifiedJavaType(introspectedTable.getMyBatis3SqlProviderType());
    interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.UpdateProvider")); //$NON-NLS-1$
    StringBuilder sb = new StringBuilder();
    sb.append("@UpdateProvider(type="); //$NON-NLS-1$
    sb.append(fqjt.getShortName());
    sb.append(".class, method=\""); //$NON-NLS-1$
    sb.append(introspectedTable.getUpdateByPrimaryKeySelectiveStatementId());
    sb.append("\")"); //$NON-NLS-1$

    method.addAnnotation(sb.toString());
View Full Code Here

    super();
  }

  @Override
  public void addMapperAnnotations(Interface interfaze, Method method) {
    interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.Update")); //$NON-NLS-1$

    method.addAnnotation("@Update({"); //$NON-NLS-1$

    StringBuilder sb = new StringBuilder();
    javaIndent(sb, 1);
View Full Code Here

    super();
  }

  @Override
  public void addMapperAnnotations(Interface interfaze, Method method) {
    FullyQualifiedJavaType fqjt = new FullyQualifiedJavaType(introspectedTable.getMyBatis3SqlProviderType());
    interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.InsertProvider")); //$NON-NLS-1$
    StringBuilder sb = new StringBuilder();
    sb.append("@InsertProvider(type="); //$NON-NLS-1$
    sb.append(fqjt.getShortName());
    sb.append(".class, method=\""); //$NON-NLS-1$
    sb.append(introspectedTable.getInsertSelectiveStatementId());
    sb.append("\")"); //$NON-NLS-1$

    method.addAnnotation(sb.toString());
View Full Code Here

TOP

Related Classes of org.mybatis.generator.api.dom.java.FullyQualifiedJavaType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.