Examples of FullyQualifiedJavaType


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

    String serviceInterfaceFullName = serveicePackge + ".I"
        + recordFullType + "Service";

    Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
    // 导入 com.eatle.utils.DwzAjaxJsonUtil;
    FullyQualifiedJavaType type = new FullyQualifiedJavaType(
        "com.eatle.utils.DwzAjaxJsonUtil");
    importedTypes.add(type);
    type = FullyQualifiedJavaType.getNewMapInstance();
    importedTypes.add(type);
    // import ...
    type = new FullyQualifiedJavaType(introspectedTable.getBaseRecordType());
    importedTypes.add(type);

    type = new FullyQualifiedJavaType(actionFullName);
    TopLevelClass topLevelClass = new TopLevelClass(type);
    topLevelClass.setVisibility(JavaVisibility.PUBLIC);
    type = new FullyQualifiedJavaType("com.eatle.web.action.BaseAction");
    topLevelClass.setSuperClass(type);
    importedTypes.add(type);
    // add field, getter, setter for orderby clause
    // @Resource
    // private IUserService userService;
    type = new FullyQualifiedJavaType("javax.annotation.Resource");
    importedTypes.add(type);
    Field field = new Field();
    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);
    type = new FullyQualifiedJavaType("com.eatle.utils.Pagination");
    importedTypes.add(type);
    field.setType(type);
    field.setName("page");
    topLevelClass.addField(field);

    field = new Field();
    field.setVisibility(JavaVisibility.PRIVATE);
    type = new FullyQualifiedJavaType(recordFullType);
    field.setType(type);
    field.setName(recordLowerFullType);
    topLevelClass.addField(field);
    topLevelClass.addImportedTypes(importedTypes);
    // setter getter
View Full Code Here

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

      IntrospectedTable introspectedTable, String recordFullType,
      String recordLowerFullType)
  {
    Method method = new Method();
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setReturnType(new FullyQualifiedJavaType(introspectedTable
        .getBaseRecordType()));
    method.setName("get" + recordFullType); //$NON-NLS-1$
    method.addBodyLine("return this." + recordLowerFullType + ";"); //$NON-NLS-1$
    topLevelClass.addMethod(method);
  }
View Full Code Here

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

      String recordLowerFullType)
  {
    Method method = new Method();
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setName("set" + recordFullType); //$NON-NLS-1$
    method.addParameter(new Parameter(new FullyQualifiedJavaType(
        recordFullType), recordLowerFullType));
    method
        .addBodyLine("this." + recordLowerFullType + " = " + recordLowerFullType + ";"); //$NON-NLS-1$
    topLevelClass.addMethod(method);
  }
View Full Code Here

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

  private void addGetPageMethod(TopLevelClass topLevelClass,
      IntrospectedTable introspectedTable)
  {
    Method method = new Method();
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setReturnType(new FullyQualifiedJavaType(
        "com.eatle.utils.Pagination"));
    method.setName("getPage"); //$NON-NLS-1$
    method.addBodyLine("return this.page;"); //$NON-NLS-1$
    topLevelClass.addMethod(method);
  }
View Full Code Here

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

      IntrospectedTable introspectedTable)
  {
    Method method = new Method();
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setName("setPage"); //$NON-NLS-1$
    method.addParameter(new Parameter(new FullyQualifiedJavaType(
        "com.eatle.utils.Pagination"), "page"));
    method.addBodyLine("this.page = page;"); //$NON-NLS-1$
    topLevelClass.addMethod(method);
  }
View Full Code Here

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

   */
  private void addShowIndexMethod(TopLevelClass topLevelClass,
      IntrospectedTable introspectedTable)
  {
    Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
    FullyQualifiedJavaType type = FullyQualifiedJavaType
        .getStringInstance();
    importedTypes.add(type);
    Method method = new Method();
    method.setReturnType(type);
    method.setVisibility(JavaVisibility.PUBLIC);
View Full Code Here

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

  {
    Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
    Method method = new Method();
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setName("delete");
    FullyQualifiedJavaType type = new FullyQualifiedJavaType(
        "java.io.IOException");
    importedTypes.add(type);
    method.addException(type);

    method
View Full Code Here

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

   */
  private void addShowUpdateMethod(TopLevelClass topLevelClass,
      IntrospectedTable introspectedTable)
  {
    Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
    FullyQualifiedJavaType type = FullyQualifiedJavaType
        .getStringInstance();
    importedTypes.add(type);
    Method method = new Method();
    method.setReturnType(type);
    method.setVisibility(JavaVisibility.PUBLIC);
View Full Code Here

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

    method.addBodyLine("}else{");
    method.addBodyLine(serviceObjName + ".update(" + recordLowerFullType
        + ");");
    method.addBodyLine("}");
    method.addBodyLine("super.writeMap(json);");
    method.addException(new FullyQualifiedJavaType("java.io.IOException"));
    topLevelClass.addImportedTypes(importedTypes);
    topLevelClass.addMethod(method);
  }
View Full Code Here

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

   */
  private void addShowAddMethod(TopLevelClass topLevelClass,
      IntrospectedTable introspectedTable)
  {
    Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
    FullyQualifiedJavaType type = FullyQualifiedJavaType
        .getStringInstance();
    importedTypes.add(type);
    Method method = new Method();
    method.setReturnType(type);
    method.setVisibility(JavaVisibility.PUBLIC);
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.