【发布时间】:2015-05-25 07:08:09
【问题描述】:
我是 LinkedHashMap 的新手。
现在我有一些像 LinkedHashMap 这样的数据-
article_ID=386247568292, author_externalId=235697849816687, author_fbid=235697849816687, ...
现在这是我的数据库入口代码
public void InsertEntry(LinkedHashMap<String, Object> entMap) throws SQLException {
Connection conn = null;
PreparedStatement pstmt = null;
conn = pool.getConnection();
String sql="INSERT into socialmedia(article_ID,author_externalId, author_fbid)"
+ "VALUES(?,?,?)";
pstmt = conn.prepareStatement(sql);
现在我如何将 My LinkedHashMap 值输入到字符串中,以便我可以将所有这些值输入到数据库中。
我不想使用任何 Bean。
【问题讨论】:
标签: java dictionary linkedhashmap