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

Examples of org.mybatis.generator.api.dom.java.Field.addAnnotation()


    {
      mapper = mapper.substring(idx + 1);
    }
    mapper = mapper.substring(0, 1).toLowerCase() + mapper.substring(1);
    field.setName(mapper);
    field.addAnnotation("@Resource");
    topLevelClass.addField(field);
    importedTypes.add(type);
    topLevelClass.addImportedTypes(importedTypes);

    // add Method....
View Full Code Here


    field.setVisibility(JavaVisibility.PRIVATE);
    type = new FullyQualifiedJavaType(serviceInterfaceFullName);
    importedTypes.add(type);
    field.setType(type);
    field.setName(serviceObjName); //$NON-NLS-1$
    field.addAnnotation("@Resource");
    topLevelClass.addField(field);

    // private Pagination page;
    field = new Field();
    field.setVisibility(JavaVisibility.PRIVATE);
View Full Code Here

    field.setName(toLowerCase(daoType.getShortName())); // 设置变量名
    topLevelClass.addImportedType(daoType);
    field.setType(daoType); // 类型
    field.setVisibility(JavaVisibility.PRIVATE);
    if (enableAnnotation) {
      field.addAnnotation("@Autowired");
    }
    topLevelClass.addField(field);
  }

  /**
 
View Full Code Here

    field.setName(toLowerCase(daoType.getShortName())); // 设置变量名
    topLevelClass.addImportedType(daoType);
    field.setType(daoType); // 类型
    field.setVisibility(JavaVisibility.PRIVATE);
    if (enableAnnotation) {
      field.addAnnotation("@Autowired");
    }
    topLevelClass.addField(field);
  }

  /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.