DataTable equivalent in Java(Java中的DataTable等价物)
问题描述
在 Java 中是否存在等效的 C# DataTable?
Is there a C# DataTable equivalent in Java?
推荐答案
一个已被问到的类似问题最近.ResultSet 当然不是直接等效的,因为它只适用于与数据库的活动连接,而 DataTable 可以离线"使用.
A similar question that has been asked recently. ResultSet certainly is not a direct equivalent as it only works with an active connection to the database while a DataTable can be used "offline".
根据个人经验,我会说 Java 中没有直接的等价物(虽然没有尝试过 javax.sql.rowset.WebRowSet).您要么使用纯 SQL,而 java.sql.ResultSet 是您的朋友.或者您使用一些 ORM 工具,例如 Hibernate、Cayenne、Toplink 等等.或者您自己构建(不是我鼓励这样做,但我认为已经成功完成的项目不止一个).
From personal experience I would say there is no direct equivalent in Java (haven't tried javax.sql.rowset.WebRowSet, though). You either go with plain SQL and java.sql.ResultSet is your friend. Or you use some ORM tool like Hibernate, Cayenne, Toplink to name a few. Or you build your own (not that I encourage this, but I think on more than one project that has been done successfully).
这篇关于Java中的DataTable等价物的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Java中的DataTable等价物
基础教程推荐
- 存储 20 位数字的数据类型 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
