本文整理汇总了Java中org.mybatis.generator.config.MergeConstants类的典型用法代码示例。如果您正苦于以下问题:Java MergeConstants类的具体用法?Java MergeConstants怎么用?Java MergeConstants使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MergeConstants类属于org.mybatis.generator.config包,在下文中一共展示了MergeConstants类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addJavadocTag
import org.mybatis.generator.config.MergeConstants; //导入依赖的package包/类
/**
* This method adds the custom javadoc tag for. You may do nothing if you do
* not wish to include the Javadoc tag - however, if you do not include the
* Javadoc tag then the Java merge capability of the eclipse plugin will
* break.
*
* @param javaElement
* the java element
*/
protected void addJavadocTag(JavaElement javaElement, boolean markAsDoNotDelete) {
javaElement.addJavaDocLine(" *");
StringBuilder sb = new StringBuilder();
sb.append(" * ");
sb.append(MergeConstants.NEW_ELEMENT_TAG);
if (markAsDoNotDelete) {
sb.append(" do_not_delete_during_merge");
}
String s = getDateString();
if (s != null) {
sb.append(' ');
sb.append(s);
}
javaElement.addJavaDocLine(sb.toString());
}
示例2: addJavadocTag
import org.mybatis.generator.config.MergeConstants; //导入依赖的package包/类
/**
* This method adds the custom javadoc tag for. You may do nothing if you do not wish to include the Javadoc tag -
* however, if you do not include the Javadoc tag then the Java merge capability of the eclipse plugin will break.
*
* @param javaElement
* the java element
* @param markAsDoNotDelete
* the mark as do not delete
*/
protected void addJavadocTag(JavaElement javaElement,
boolean markAsDoNotDelete) {
javaElement.addJavaDocLine(" *"); //$NON-NLS-1$
StringBuilder sb = new StringBuilder();
sb.append(" * "); //$NON-NLS-1$
sb.append(MergeConstants.NEW_ELEMENT_TAG);
if (markAsDoNotDelete) {
sb.append(" do_not_delete_during_merge"); //$NON-NLS-1$
}
String s = getDateString();
if (s != null) {
sb.append(' ');
sb.append(s);
}
javaElement.addJavaDocLine(sb.toString());
}
示例3: addJavadocTag
import org.mybatis.generator.config.MergeConstants; //导入依赖的package包/类
/**
* This method adds the custom javadoc tag for. You may do nothing if you do not wish to include the Javadoc tag -
* however, if you do not include the Javadoc tag then the Java merge capability of the eclipse plugin will break.
*
* @param javaElement the java element
* @param markAsDoNotDelete the mark as do not delete
*/
protected void addJavadocTag(JavaElement javaElement,
boolean markAsDoNotDelete) {
javaElement.addJavaDocLine(" *"); //$NON-NLS-1$
StringBuilder sb = new StringBuilder();
sb.append(" * "); //$NON-NLS-1$
sb.append(MergeConstants.NEW_ELEMENT_TAG);
if (markAsDoNotDelete) {
sb.append(" do_not_delete_during_merge"); //$NON-NLS-1$
}
String s = getDateString();
if (s != null) {
sb.append(' ');
sb.append(s);
}
javaElement.addJavaDocLine(sb.toString());
}
示例4: addJavadocTag
import org.mybatis.generator.config.MergeConstants; //导入依赖的package包/类
/**
* This method adds the custom javadoc tag for. You may do nothing if you do not wish to include the Javadoc tag -
* however, if you do not include the Javadoc tag then the Java merge capability of the eclipse plugin will break.
*
* @param javaElement
* the java element
* @param markAsDoNotDelete
* the mark as do not delete
*/
protected void addJavadocTag(JavaElement javaElement,
boolean markAsDoNotDelete) {
javaElement.addJavaDocLine(" *");
StringBuilder sb = new StringBuilder();
sb.append(" * ");
sb.append(MergeConstants.NEW_ELEMENT_TAG);
if (markAsDoNotDelete) {
sb.append(" do_not_delete_during_merge");
}
String s = getDateString();
if (s != null) {
sb.append(' ');
sb.append(s);
}
javaElement.addJavaDocLine(sb.toString());
}
示例5: addJavadocTag
import org.mybatis.generator.config.MergeConstants; //导入依赖的package包/类
/**
* This method adds the custom javadoc tag for. You may do nothing if you do
* not wish to include the Javadoc tag - however, if you do not include the
* Javadoc tag then the Java merge capability of the eclipse plugin will
* break.
*
* @param javaElement the java element
*/
protected void addJavadocTag(JavaElement javaElement,
boolean markAsDoNotDelete) {
/**
* 不用打tag标记
*/
if (1 == 1)
return;
javaElement.addJavaDocLine(" *"); //$NON-NLS-1$
StringBuilder sb = new StringBuilder();
sb.append(" * "); //$NON-NLS-1$
sb.append(MergeConstants.NEW_ELEMENT_TAG);
if (markAsDoNotDelete) {
sb.append(" do_not_delete_during_merge"); //$NON-NLS-1$
}
String s = getDateString();
if (s != null) {
sb.append(' ');
sb.append(s);
}
javaElement.addJavaDocLine(sb.toString());
}
示例6: addComment
import org.mybatis.generator.config.MergeConstants; //导入依赖的package包/类
@Override
public void addComment(XmlElement xmlElement) {
xmlElement.addElement(new TextElement("<!--")); //$NON-NLS-1$
StringBuilder sb = new StringBuilder();
sb.append(" " + MergeConstants.NEW_ELEMENT_TAG);
xmlElement.addElement(new TextElement(sb.toString()));
String s = getDateString();
if (s != null) {
sb.setLength(0);
sb.append(" This element is automatically generated by MyBatis Generator,Do not modify ! Generated on "); //$NON-NLS-1$
sb.append(s);
sb.append('.');
xmlElement.addElement(new TextElement(sb.toString()));
}
xmlElement.addElement(new TextElement("-->")); //$NON-NLS-1$
}
示例7: addJavadocTag
import org.mybatis.generator.config.MergeConstants; //导入依赖的package包/类
/**
* This method adds the custom javadoc tag for. You may do nothing if you do
* not wish to include the Javadoc tag - however, if you do not include the
* Javadoc tag then the Java merge capability of the eclipse plugin will
* break.
*
* @param javaElement
* the java element
*/
protected void addJavadocTag(JavaElement javaElement,
boolean markAsDoNotDelete) {
javaElement.addJavaDocLine(" *"); //$NON-NLS-1$
StringBuilder sb = new StringBuilder();
sb.append(" * "); //$NON-NLS-1$
sb.append(MergeConstants.NEW_ELEMENT_TAG);
if (markAsDoNotDelete) {
sb.append(" do_not_delete_during_merge"); //$NON-NLS-1$
}
String s = getDateString();
if (s != null) {
sb.append(' ');
sb.append(s);
}
javaElement.addJavaDocLine(sb.toString());
}
示例8: addComment
import org.mybatis.generator.config.MergeConstants; //导入依赖的package包/类
@Override
public void addComment(XmlElement xmlElement) {
xmlElement.addElement(new TextElement("<!--")); //$NON-NLS-1$
StringBuilder sb = new StringBuilder();
sb.append(MergeConstants.NEW_ELEMENT_TAG);
xmlElement.addElement(new TextElement(sb.toString()));
// xmlElement
// .addElement(new TextElement(
// " This element is automatically generated by MyBatis Generator, do not modify.")); //$NON-NLS-1$
// String s = getDateString();
// if (s != null) {
// sb.setLength(0);
// sb.append(" This element was generated on "); //$NON-NLS-1$
// sb.append(s);
// sb.append('.');
// xmlElement.addElement(new TextElement(sb.toString()));
// }
xmlElement.addElement(new TextElement("-->")); //$NON-NLS-1$
}
示例9: addJavadocTag
import org.mybatis.generator.config.MergeConstants; //导入依赖的package包/类
/**
* This method adds the custom javadoc tag for. You may do nothing if you do
* not wish to include the Javadoc tag - however, if you do not include the
* Javadoc tag then the Java merge capability of the eclipse plugin will
* break.
*
* @param javaElement
* the java element
*/
protected void addJavadocTag(JavaElement javaElement, boolean markAsDoNotDelete) {
javaElement.addJavaDocLine(" *"); //$NON-NLS-1$
StringBuilder sb = new StringBuilder();
sb.append(" * "); //$NON-NLS-1$
sb.append(MergeConstants.NEW_ELEMENT_TAG);
if (markAsDoNotDelete) {
sb.append(" do_not_delete_during_merge"); //$NON-NLS-1$
}
String s = getDateString();
if (s != null) {
sb.append(' ');
sb.append(s);
}
javaElement.addJavaDocLine(sb.toString());
}
示例10: addComment
import org.mybatis.generator.config.MergeConstants; //导入依赖的package包/类
/**
* Adds a suitable comment to warn users that the element was generated, and when it was generated.
*
* @param xmlElement
* the xml element
*/
public void addComment(XmlElement xmlElement) {
if (suppressAllComments) {
return;
}
xmlElement.addElement(new TextElement("<!--")); //$NON-NLS-1$
StringBuilder sb = new StringBuilder();
sb.append(" WARNING - "); //$NON-NLS-1$
sb.append(MergeConstants.NEW_ELEMENT_TAG);
xmlElement.addElement(new TextElement(sb.toString()));
xmlElement
.addElement(new TextElement(
" This element is automatically generated by MyBatis Generator, do not modify.")); //$NON-NLS-1$
String s = getDateString();
if (s != null) {
sb.setLength(0);
sb.append(" This element was generated on "); //$NON-NLS-1$
sb.append(s);
sb.append('.');
xmlElement.addElement(new TextElement(sb.toString()));
}
xmlElement.addElement(new TextElement("-->")); //$NON-NLS-1$
}
示例11: addComment
import org.mybatis.generator.config.MergeConstants; //导入依赖的package包/类
/**
* xml中的注释
*
* @param xmlElement
*/
public void addComment(XmlElement xmlElement) {
xmlElement.addElement(new TextElement("<!--"));
StringBuilder sb = new StringBuilder();
sb.append(" WARNING - ");
sb.append(MergeConstants.NEW_ELEMENT_TAG);
xmlElement.addElement(new TextElement(sb.toString()));
xmlElement.addElement(new TextElement("-->"));
}
示例12: addJavadocTag
import org.mybatis.generator.config.MergeConstants; //导入依赖的package包/类
/**
* 删除标记
*
* @param javaElement
* @param markAsDoNotDelete
*/
protected void addJavadocTag(JavaElement javaElement, boolean markAsDoNotDelete) {
StringBuilder sb = new StringBuilder();
sb.append(" * ");
sb.append(MergeConstants.NEW_ELEMENT_TAG);
if (markAsDoNotDelete) {
sb.append(" do_not_delete_during_merge");
}
javaElement.addJavaDocLine(sb.toString());
}
示例13: addFieldComment
import org.mybatis.generator.config.MergeConstants; //导入依赖的package包/类
/**
* Adds the field comment.
*
* @param field
* the field
* @param introspectedTable
* the introspected table
*/
@Override
public void addFieldComment(Field field, IntrospectedTable introspectedTable) {
Map<String, Object> map = new HashMap<>();
map.put("mgb", MergeConstants.NEW_ELEMENT_TAG);
map.put("field", field);
map.put("introspectedTable", introspectedTable);
// 添加评论
addJavaElementComment(field, map, EnumNode.ADD_FIELD_COMMENT);
}
示例14: addClassComment
import org.mybatis.generator.config.MergeConstants; //导入依赖的package包/类
/**
* Adds the inner class comment.
*
* @param innerClass
* the inner class
* @param introspectedTable
* the introspected table
* @param markAsDoNotDelete
* the mark as do not delete
*/
@Override
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable, boolean markAsDoNotDelete) {
Map<String, Object> map = new HashMap<>();
map.put("mgb", MergeConstants.NEW_ELEMENT_TAG);
map.put("innerClass", innerClass);
map.put("introspectedTable", introspectedTable);
map.put("markAsDoNotDelete", markAsDoNotDelete);
// 添加评论
addJavaElementComment(innerClass, map, EnumNode.ADD_CLASS_COMMENT);
}
示例15: addEnumComment
import org.mybatis.generator.config.MergeConstants; //导入依赖的package包/类
/**
* Adds the enum comment.
*
* @param innerEnum
* the inner enum
* @param introspectedTable
* the introspected table
*/
@Override
public void addEnumComment(InnerEnum innerEnum, IntrospectedTable introspectedTable) {
Map<String, Object> map = new HashMap<>();
map.put("mgb", MergeConstants.NEW_ELEMENT_TAG);
map.put("innerEnum", innerEnum);
map.put("introspectedTable", introspectedTable);
// 添加评论
addJavaElementComment(innerEnum, map, EnumNode.ADD_ENUM_COMMENT);
}