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

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


    super();
  }

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

    GeneratedKey gk = introspectedTable.getGeneratedKey();

    method.addAnnotation("@Insert({"); //$NON-NLS-1$
    StringBuilder insertClause = new StringBuilder();
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

    return answer;
  }

  protected TopLevelClass getTopLevelClassShell() {
    FullyQualifiedJavaType interfaceType = new FullyQualifiedJavaType(introspectedTable.getDAOInterfaceType());
    FullyQualifiedJavaType implementationType = new FullyQualifiedJavaType(
        introspectedTable.getDAOImplementationType());

    CommentGenerator commentGenerator = context.getCommentGenerator();

    TopLevelClass answer = new TopLevelClass(implementationType);
View Full Code Here

    return answer;
  }

  protected Interface getInterfaceShell() {
    Interface answer = new Interface(new FullyQualifiedJavaType(introspectedTable.getDAOInterfaceType()));
    answer.setVisibility(JavaVisibility.PUBLIC);

    String rootInterface = introspectedTable.getTableConfigurationProperty(PropertyRegistry.ANY_ROOT_INTERFACE);
    if (!stringHasValue(rootInterface)) {
      rootInterface = context.getJavaClientGeneratorConfiguration().getProperty(
          PropertyRegistry.ANY_ROOT_INTERFACE);
    }

    if (stringHasValue(rootInterface)) {
      FullyQualifiedJavaType fqjt = new FullyQualifiedJavaType(rootInterface);
      answer.addSuperInterface(fqjt);
      answer.addImportedType(fqjt);
    }

    for (FullyQualifiedJavaType fqjt : daoTemplate.getInterfaceImports()) {
View Full Code Here

    super();
  }

  @Override
  protected void configureCheckedExceptions() {
    addCheckedException(new FullyQualifiedJavaType("java.sql.SQLException")); //$NON-NLS-1$
  }
View Full Code Here

    setQueryForObjectMethodTemplate("queryForObject(\"{0}.{1}\", {2});"); //$NON-NLS-1$
  }

  @Override
  protected void configureSuperClass() {
    setSuperClass(new FullyQualifiedJavaType("com.ibatis.dao.client.template.SqlMapDaoTemplate")); //$NON-NLS-1$
  }
View Full Code Here

    super();
  }

  @Override
  protected void configureCheckedExceptions() {
    addCheckedException(new FullyQualifiedJavaType("java.sql.SQLException")); //$NON-NLS-1$
  }
View Full Code Here

    setQueryForObjectMethodTemplate("getSqlMapClientTemplate().queryForObject(\"{0}.{1}\", {2});"); //$NON-NLS-1$
  }

  @Override
  protected void configureSuperClass() {
    setSuperClass(new FullyQualifiedJavaType("org.springframework.orm.ibatis.support.SqlMapClientDaoSupport")); //$NON-NLS-1$
  }
View Full Code Here

  @Override
  public boolean validate(List<String> warnings) {
    databaseType = context.getJdbcConnectionConfiguration().getDriverClass();
    String criterias = context.getJavaModelGeneratorConfiguration().getTargetPackage() + ".Criteria";
    criteria = new FullyQualifiedJavaType(criterias);
    if (stringHasValue(properties.getProperty("isAllInOne"))) { //$NON-NLS-1$
      isAllInOne = StringUtility.isTrue(properties.getProperty("isAllInOne"));
    } else {
      isAllInOne = false;
    }
View Full Code Here

    topLevelClass.setVisibility(JavaVisibility.PUBLIC);
    addClassComment(topLevelClass, "公用条件查询类");
    topLevelClass.addImportedType(FullyQualifiedJavaType.getNewMapInstance());
    topLevelClass.addImportedType(FullyQualifiedJavaType.getNewHashMapInstance());

    FullyQualifiedJavaType types = new FullyQualifiedJavaType("java.util.Map<java.lang.String, java.lang.Object>");
    Rules rules = introspectedTable.getRules();
    if (rules.generateUpdateByExampleSelective() || rules.generateUpdateByExampleWithBLOBs()
        || rules.generateUpdateByExampleWithoutBLOBs()) {
      Method method = new Method();
      method.setVisibility(JavaVisibility.PROTECTED);
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.