Package org.mybatis.generator.internal.rules

Examples of org.mybatis.generator.internal.rules.Rules


  public String getUpdateByPrimaryKeyWithBLOBsMethodName(IntrospectedTable introspectedTable) {
    StringBuilder sb = new StringBuilder();
    sb.append("update"); //$NON-NLS-1$
    sb.append(introspectedTable.getFullyQualifiedTable().getDomainObjectName());

    Rules rules = introspectedTable.getRules();

    if (!rules.generateUpdateByPrimaryKeyWithoutBLOBs()) {
      sb.append("ByPrimaryKey"); //$NON-NLS-1$
    } else if (rules.generateRecordWithBLOBsClass()) {
      sb.append("ByPrimaryKey"); //$NON-NLS-1$
    } else {
      sb.append("ByPrimaryKeyWithBLOBs"); //$NON-NLS-1$
    }
View Full Code Here


    StringBuilder sb = new StringBuilder();
    sb.append("select"); //$NON-NLS-1$
    sb.append(introspectedTable.getFullyQualifiedTable().getDomainObjectName());
    sb.append("ByExample"); //$NON-NLS-1$

    Rules rules = introspectedTable.getRules();

    if (rules.generateSelectByExampleWithBLOBs()) {
      sb.append("WithoutBLOBs"); //$NON-NLS-1$
    }

    return sb.toString();
  }
View Full Code Here

    StringBuilder sb = new StringBuilder();
    sb.append("select"); //$NON-NLS-1$
    sb.append(introspectedTable.getFullyQualifiedTable().getDomainObjectName());
    sb.append("ByExample"); //$NON-NLS-1$

    Rules rules = introspectedTable.getRules();

    if (rules.generateSelectByExampleWithoutBLOBs()) {
      sb.append("WithBLOBs"); //$NON-NLS-1$
    }

    return sb.toString();
  }
View Full Code Here

  public String getUpdateByExampleWithBLOBsMethodName(IntrospectedTable introspectedTable) {
    StringBuilder sb = new StringBuilder();
    sb.append("update"); //$NON-NLS-1$
    sb.append(introspectedTable.getFullyQualifiedTable().getDomainObjectName());

    Rules rules = introspectedTable.getRules();

    if (!rules.generateUpdateByExampleWithoutBLOBs()) {
      sb.append("ByExample"); //$NON-NLS-1$
    } else if (rules.generateRecordWithBLOBsClass()) {
      sb.append("ByExample"); //$NON-NLS-1$
    } else {
      sb.append("ByExampleWithBLOBs"); //$NON-NLS-1$
    }
View Full Code Here

    StringBuilder sb = new StringBuilder();

    sb.append("update"); //$NON-NLS-1$
    sb.append(introspectedTable.getFullyQualifiedTable().getDomainObjectName());

    Rules rules = introspectedTable.getRules();

    if (!rules.generateUpdateByExampleWithBLOBs()) {
      sb.append("ByExample"); //$NON-NLS-1$
    } else if (rules.generateRecordWithBLOBsClass()) {
      sb.append("ByExample"); //$NON-NLS-1$
    } else {
      sb.append("ByExampleWithoutBLOBs"); //$NON-NLS-1$
    }
View Full Code Here

      initializeAndExecuteGenerator(methodGenerator, topLevelClass, interfaze);
    }
  }

  protected void addUpdateByExampleParmsInnerclass(TopLevelClass topLevelClass, Interface interfaze) {
    Rules rules = introspectedTable.getRules();
    if (rules.generateUpdateByExampleSelective() || rules.generateUpdateByExampleWithBLOBs()
        || rules.generateUpdateByExampleWithoutBLOBs()) {
      AbstractDAOElementGenerator methodGenerator = new UpdateByExampleParmsInnerclassGenerator();
      initializeAndExecuteGenerator(methodGenerator, topLevelClass, interfaze);
    }
  }
View Full Code Here

    topLevelClass.addMethod(method);

    // add shallow copy constructor if the update by
    // example methods are enabled - because the parameter
    // class for update by example methods will subclass this class
    Rules rules = introspectedTable.getRules();
    if (rules.generateUpdateByExampleSelective() || rules.generateUpdateByExampleWithBLOBs()
        || rules.generateUpdateByExampleWithoutBLOBs()) {
      method = new Method();
      method.setVisibility(JavaVisibility.PROTECTED);
      method.setConstructor(true);
      method.setName(type.getShortName());
      method.addParameter(new Parameter(type, "example")); //$NON-NLS-1$
View Full Code Here

        }
    }

    protected void addUpdateByExampleParmsInnerclass(
            TopLevelClass topLevelClass, Interface interfaze) {
        Rules rules = introspectedTable.getRules();
        if (rules.generateUpdateByExampleSelective()
                || rules.generateUpdateByExampleWithBLOBs()
                || rules.generateUpdateByExampleWithoutBLOBs()) {
            AbstractDAOElementGenerator methodGenerator = new UpdateByExampleParmsInnerclassGenerator();
            initializeAndExecuteGenerator(methodGenerator, topLevelClass,
                    interfaze);
        }
    }
View Full Code Here

        topLevelClass.addMethod(method);

        // add shallow copy constructor if the update by
        // example methods are enabled - because the parameter
        // class for update by example methods will subclass this class
        Rules rules = introspectedTable.getRules();
        if (rules.generateUpdateByExampleSelective()
                || rules.generateUpdateByExampleWithBLOBs()
                || rules.generateUpdateByExampleWithoutBLOBs()) {
            method = new Method();
            method.setVisibility(JavaVisibility.PROTECTED);
            method.setConstructor(true);
            method.setName(type.getShortName());
            method.addParameter(new Parameter(type, "example")); //$NON-NLS-1$
View Full Code Here

        topLevelClass.addMethod(method);

        // add shallow copy constructor if the update by
        // example methods are enabled - because the parameter
        // class for update by example methods will subclass this class
        Rules rules = introspectedTable.getRules();
        if (rules.generateUpdateByExampleSelective()
                || rules.generateUpdateByExampleWithBLOBs()
                || rules.generateUpdateByExampleWithoutBLOBs()) {
            method = new Method();
            method.setVisibility(JavaVisibility.PROTECTED);
            method.setConstructor(true);
            method.setName(type.getShortName());
            method.addParameter(new Parameter(type, "example")); //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.mybatis.generator.internal.rules.Rules

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.