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

Examples of org.mybatis.generator.api.dom.java.InnerClass.addMethod()


      answer.addMethod(getSetLessThanMethod(introspectedColumn));
      answer.addMethod(getSetLessThanOrEqualMethod(introspectedColumn));

      if (introspectedColumn.isJdbcCharacterColumn()) {
        answer.addMethod(getSetLikeMethod(introspectedColumn));
        answer.addMethod(getSetNotLikeMethod(introspectedColumn));
      }

      answer.addMethod(getSetInOrNotInMethod(introspectedColumn, true));
      answer.addMethod(getSetInOrNotInMethod(introspectedColumn, false));
      answer.addMethod(getSetBetweenOrNotBetweenMethod(introspectedColumn, true));
View Full Code Here


      if (introspectedColumn.isJdbcCharacterColumn()) {
        answer.addMethod(getSetLikeMethod(introspectedColumn));
        answer.addMethod(getSetNotLikeMethod(introspectedColumn));
      }

      answer.addMethod(getSetInOrNotInMethod(introspectedColumn, true));
      answer.addMethod(getSetInOrNotInMethod(introspectedColumn, false));
      answer.addMethod(getSetBetweenOrNotBetweenMethod(introspectedColumn, true));
      answer.addMethod(getSetBetweenOrNotBetweenMethod(introspectedColumn, false));
    }
View Full Code Here

        answer.addMethod(getSetLikeMethod(introspectedColumn));
        answer.addMethod(getSetNotLikeMethod(introspectedColumn));
      }

      answer.addMethod(getSetInOrNotInMethod(introspectedColumn, true));
      answer.addMethod(getSetInOrNotInMethod(introspectedColumn, false));
      answer.addMethod(getSetBetweenOrNotBetweenMethod(introspectedColumn, true));
      answer.addMethod(getSetBetweenOrNotBetweenMethod(introspectedColumn, false));
    }

    return answer;
View Full Code Here

        answer.addMethod(getSetNotLikeMethod(introspectedColumn));
      }

      answer.addMethod(getSetInOrNotInMethod(introspectedColumn, true));
      answer.addMethod(getSetInOrNotInMethod(introspectedColumn, false));
      answer.addMethod(getSetBetweenOrNotBetweenMethod(introspectedColumn, true));
      answer.addMethod(getSetBetweenOrNotBetweenMethod(introspectedColumn, false));
    }

    return answer;
  }
View Full Code Here

      }

      answer.addMethod(getSetInOrNotInMethod(introspectedColumn, true));
      answer.addMethod(getSetInOrNotInMethod(introspectedColumn, false));
      answer.addMethod(getSetBetweenOrNotBetweenMethod(introspectedColumn, true));
      answer.addMethod(getSetBetweenOrNotBetweenMethod(introspectedColumn, false));
    }

    return answer;
  }
View Full Code Here

        method = new Method();
        method.setVisibility(JavaVisibility.PROTECTED);
        method.setName("Criteria"); //$NON-NLS-1$
        method.setConstructor(true);
        method.addBodyLine("super();"); //$NON-NLS-1$
        answer.addMethod(method);

        return answer;
    }

    private InnerClass getGeneratedCriteriaInnerClass(
View Full Code Here

            method.addBodyLine("criteriaWithoutValue = new ArrayList();"); //$NON-NLS-1$
            method.addBodyLine("criteriaWithSingleValue = new ArrayList();"); //$NON-NLS-1$
            method.addBodyLine("criteriaWithListValue = new ArrayList();"); //$NON-NLS-1$
            method.addBodyLine("criteriaWithBetweenValue = new ArrayList();"); //$NON-NLS-1$
        }
        answer.addMethod(method);

        List<String> criteriaLists = new ArrayList<String>();
        criteriaLists.add("criteriaWithoutValue"); //$NON-NLS-1$
        criteriaLists.add("criteriaWithSingleValue"); //$NON-NLS-1$
        criteriaLists.add("criteriaWithListValue"); //$NON-NLS-1$
View Full Code Here

            if (!strIter.hasNext()) {
                sb.append(';');
            }
            method.addBodyLine(sb.toString());
        }
        answer.addMethod(method);

        // now we need to generate the methods that will be used in the SqlMap
        // to generate the dynamic where clause
        topLevelClass.addImportedType(FullyQualifiedJavaType
                .getNewMapInstance());
View Full Code Here

        method.setVisibility(JavaVisibility.PUBLIC);
        method.setReturnType(field.getType());
        method.setName(getGetterMethodName(field.getName(), field
                .getType()));
        method.addBodyLine("return criteriaWithoutValue;"); //$NON-NLS-1$
        answer.addMethod(method);

        FullyQualifiedJavaType listOfMaps;
        if (generateForJava5) {
            listOfMaps = new FullyQualifiedJavaType(
                    "java.util.List<java.util.Map<java.lang.String, java.lang.Object>>"); //$NON-NLS-1$
View Full Code Here

        method.setVisibility(JavaVisibility.PUBLIC);
        method.setReturnType(field.getType());
        method.setName(getGetterMethodName(field.getName(), field
                .getType()));
        method.addBodyLine("return criteriaWithSingleValue;"); //$NON-NLS-1$
        answer.addMethod(method);

        field = new Field();
        field.setVisibility(JavaVisibility.PROTECTED);
        field.setType(listOfMaps);
        field.setName("criteriaWithListValue"); //$NON-NLS-1$
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.