Package org.mybatis.generator.internal.rules

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


    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);
      method.setConstructor(true);
      method.setName(criteria.getShortName());
      method.addParameter(new Parameter(criteria, "example")); //$NON-NLS-1$
View Full Code Here


    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);
      method.setConstructor(true);
      method.setName(criteria.getShortName());
      method.addParameter(new Parameter(criteria, "example")); //$NON-NLS-1$
View Full Code Here

   * seperate base and blob classes, then the method name should be
   * updateByPrimaryKey 3. Else the method name should be
   * updateByPrimaryKeyWithoutBLOBs
   */
  public String getUpdateByPrimaryKeyWithoutBLOBsMethodName(IntrospectedTable introspectedTable) {
    Rules rules = introspectedTable.getRules();

    if (!rules.generateUpdateByPrimaryKeyWithBLOBs()) {
      return "updateByPrimaryKey"; //$NON-NLS-1$
    } else if (rules.generateRecordWithBLOBsClass()) {
      return "updateByPrimaryKey"; //$NON-NLS-1$
    } else {
      return "updateByPrimaryKeyWithoutBLOBs"; //$NON-NLS-1$
    }
  }
View Full Code Here

   * seperate base and blob classes, then the method name should be
   * updateByPrimaryKey 3. Else the method name should be
   * updateByPrimaryKeyWithBLOBs
   */
  public String getUpdateByPrimaryKeyWithBLOBsMethodName(IntrospectedTable introspectedTable) {
    Rules rules = introspectedTable.getRules();

    if (!rules.generateUpdateByPrimaryKeyWithoutBLOBs()) {
      return "updateByPrimaryKey"; //$NON-NLS-1$
    } else if (rules.generateRecordWithBLOBsClass()) {
      return "updateByPrimaryKey"; //$NON-NLS-1$
    } else {
      return "updateByPrimaryKeyWithBLOBs"; //$NON-NLS-1$
    }
  }
View Full Code Here

   * 1. if this will be the only selectByExample, then the result should be
   * selectByExample. 2. Else the method name should be
   * selectByExampleWithoutBLOBs
   */
  public String getSelectByExampleWithoutBLOBsMethodName(IntrospectedTable introspectedTable) {
    Rules rules = introspectedTable.getRules();

    if (!rules.generateSelectByExampleWithBLOBs()) {
      return "selectByExample"; //$NON-NLS-1$
    } else {
      return "selectByExampleWithoutBLOBs"; //$NON-NLS-1$
    }
  }
View Full Code Here

   * 1. if this will be the only selectByExample, then the result should be
   * selectByExample. 2. Else the method name should be
   * selectByExampleWithBLOBs
   */
  public String getSelectByExampleWithBLOBsMethodName(IntrospectedTable introspectedTable) {
    Rules rules = introspectedTable.getRules();

    if (!rules.generateSelectByExampleWithoutBLOBs()) {
      return "selectByExample"; //$NON-NLS-1$
    } else {
      return "selectByExampleWithBLOBs"; //$NON-NLS-1$
    }
  }
View Full Code Here

  public String getUpdateByExampleSelectiveMethodName(IntrospectedTable introspectedTable) {
    return "updateByExampleSelective"; //$NON-NLS-1$
  }

  public String getUpdateByExampleWithBLOBsMethodName(IntrospectedTable introspectedTable) {
    Rules rules = introspectedTable.getRules();

    if (!rules.generateUpdateByExampleWithoutBLOBs()) {
      return "updateByExample"; //$NON-NLS-1$
    } else if (rules.generateRecordWithBLOBsClass()) {
      return "updateByExample"; //$NON-NLS-1$
    } else {
      return "updateByExampleWithBLOBs"; //$NON-NLS-1$
    }
  }
View Full Code Here

      return "updateByExampleWithBLOBs"; //$NON-NLS-1$
    }
  }

  public String getUpdateByExampleWithoutBLOBsMethodName(IntrospectedTable introspectedTable) {
    Rules rules = introspectedTable.getRules();

    if (!rules.generateUpdateByExampleWithBLOBs()) {
      return "updateByExample"; //$NON-NLS-1$
    } else if (rules.generateRecordWithBLOBsClass()) {
      return "updateByExample"; //$NON-NLS-1$
    } else {
      return "updateByExampleWithoutBLOBs"; //$NON-NLS-1$
    }
  }
View Full Code Here

    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);
      method.setConstructor(true);
      method.setName(criteria.getShortName());
      method.addParameter(new Parameter(criteria, "example")); //$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.generateUpdateByPrimaryKeyWithBLOBs()) {
      sb.append("ByPrimaryKey"); //$NON-NLS-1$
    } else if (rules.generateRecordWithBLOBsClass()) {
      sb.append("ByPrimaryKey"); //$NON-NLS-1$
    } else {
      sb.append("ByPrimaryKeyWithoutBLOBs"); //$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.