本文整理了Java中org.apache.ibatis.executor.keygen.Jdbc3KeyGenerator.populateKeys()
方法的一些代码示例,展示了Jdbc3KeyGenerator.populateKeys()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jdbc3KeyGenerator.populateKeys()
方法的具体详情如下:
包路径:org.apache.ibatis.executor.keygen.Jdbc3KeyGenerator
类名称:Jdbc3KeyGenerator
方法名:populateKeys
暂无
代码示例来源:origin: org.mybatis/mybatis
private void assignKeysToParam(final Configuration configuration, ResultSet rs, final String[] keyProperties,
Object param)
throws SQLException {
final TypeHandlerRegistry typeHandlerRegistry = configuration.getTypeHandlerRegistry();
final ResultSetMetaData rsmd = rs.getMetaData();
// Wrap the parameter in Collection to normalize the logic.
Collection<?> paramAsCollection = null;
if (param instanceof Object[]) {
paramAsCollection = Arrays.asList((Object[]) param);
} else if (!(param instanceof Collection)) {
paramAsCollection = Arrays.asList(param);
} else {
paramAsCollection = (Collection<?>) param;
}
TypeHandler<?>[] typeHandlers = null;
for (Object obj : paramAsCollection) {
if (!rs.next()) {
break;
}
MetaObject metaParam = configuration.newMetaObject(obj);
if (typeHandlers == null) {
typeHandlers = getTypeHandlers(typeHandlerRegistry, metaParam, keyProperties, rsmd);
}
populateKeys(rs, metaParam, keyProperties, typeHandlers);
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
typeHandlers = getTypeHandlers(typeHandlerRegistry, metaParam, keyProperties, rsmd);
populateKeys(rs, metaParam, keyProperties, typeHandlers);
内容来源于网络,如有侵权,请联系作者删除!