本文整理了Java中org.mybatis.generator.config.GeneratedKey.getType()
方法的一些代码示例,展示了GeneratedKey.getType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GeneratedKey.getType()
方法的具体详情如下:
包路径:org.mybatis.generator.config.GeneratedKey
类名称:GeneratedKey
方法名:getType
暂无
代码示例来源:origin: cxjava/mybatis-generator-core
/**
* This method should return an XmlElement for the select key used to
* automatically generate keys.
*
* @param introspectedColumn
* the column related to the select key statement
* @param generatedKey
* the generated key for the current table
* @return the selectKey element
*/
protected XmlElement getSelectKey(IntrospectedColumn introspectedColumn, GeneratedKey generatedKey) {
String identityColumnType = introspectedColumn.getFullyQualifiedJavaType().getFullyQualifiedName();
XmlElement answer = new XmlElement("selectKey"); //$NON-NLS-1$
answer.addAttribute(new Attribute("resultClass", identityColumnType)); //$NON-NLS-1$
answer.addAttribute(new Attribute("keyProperty", introspectedColumn.getJavaProperty())); //$NON-NLS-1$
if (stringHasValue(generatedKey.getType())) {
answer.addAttribute(new Attribute("type", generatedKey.getType())); //$NON-NLS-1$
}
answer.addElement(new TextElement(generatedKey.getRuntimeSqlStatement()));
return answer;
}
代码示例来源:origin: handosme/mybatis-generator-plus
/**
* This method should return an XmlElement for the select key used to
* automatically generate keys.
*
* @param introspectedColumn
* the column related to the select key statement
* @param generatedKey
* the generated key for the current table
* @return the selectKey element
*/
protected XmlElement getSelectKey(IntrospectedColumn introspectedColumn,
GeneratedKey generatedKey) {
String identityColumnType = introspectedColumn
.getFullyQualifiedJavaType().getFullyQualifiedName();
XmlElement answer = new XmlElement("selectKey"); //$NON-NLS-1$
answer.addAttribute(new Attribute("resultClass", identityColumnType)); //$NON-NLS-1$
answer.addAttribute(new Attribute(
"keyProperty", introspectedColumn.getJavaProperty())); //$NON-NLS-1$
if (stringHasValue(generatedKey.getType())) {
answer.addAttribute(new Attribute("type", generatedKey.getType())); //$NON-NLS-1$
}
answer
.addElement(new TextElement(generatedKey
.getRuntimeSqlStatement()));
return answer;
}
代码示例来源:origin: org.mybatis.generator/mybatis-generator-core
/**
* This method should return an XmlElement for the select key used to
* automatically generate keys.
*
* @param introspectedColumn
* the column related to the select key statement
* @param generatedKey
* the generated key for the current table
* @return the selectKey element
*/
protected XmlElement getSelectKey(IntrospectedColumn introspectedColumn,
GeneratedKey generatedKey) {
String identityColumnType = introspectedColumn
.getFullyQualifiedJavaType().getFullyQualifiedName();
XmlElement answer = new XmlElement("selectKey"); //$NON-NLS-1$
answer.addAttribute(new Attribute("resultClass", identityColumnType)); //$NON-NLS-1$
answer.addAttribute(new Attribute(
"keyProperty", introspectedColumn.getJavaProperty())); //$NON-NLS-1$
if (stringHasValue(generatedKey.getType())) {
answer.addAttribute(new Attribute("type", generatedKey.getType())); //$NON-NLS-1$
}
answer
.addElement(new TextElement(generatedKey
.getRuntimeSqlStatement()));
return answer;
}
代码示例来源:origin: roncoo/roncoo-mybatis-generator
/**
* This method should return an XmlElement for the select key used to
* automatically generate keys.
*
* @param introspectedColumn
* the column related to the select key statement
* @param generatedKey
* the generated key for the current table
* @return the selectKey element
*/
protected XmlElement getSelectKey(IntrospectedColumn introspectedColumn,
GeneratedKey generatedKey) {
String identityColumnType = introspectedColumn
.getFullyQualifiedJavaType().getFullyQualifiedName();
XmlElement answer = new XmlElement("selectKey"); //$NON-NLS-1$
answer.addAttribute(new Attribute("resultClass", identityColumnType)); //$NON-NLS-1$
answer.addAttribute(new Attribute(
"keyProperty", introspectedColumn.getJavaProperty())); //$NON-NLS-1$
if (stringHasValue(generatedKey.getType())) {
answer.addAttribute(new Attribute("type", generatedKey.getType())); //$NON-NLS-1$
}
answer
.addElement(new TextElement(generatedKey
.getRuntimeSqlStatement()));
return answer;
}
内容来源于网络,如有侵权,请联系作者删除!