如何解决如何通过JPA在MySQL中存储HashMap <String,QuestionWrapper>,其中QuestionWrapper是带有多个List <Question>的对象
public class QuestionWrapper {
private Set<Qbank> tfQuestionSetMain = new HashSet<>();
private Set<Qbank> fibQuestionSetMain = new HashSet<>();
private Set<Qbank> etfQuestionSetMain = new HashSet<>();
private Set<Qbank> mtfQuestionSetMain = new HashSet<>();
private Set<Qbank> mcQuestionSetMain = new HashSet<>();
private Set<Qbank> saQuestionSetMain = new HashSet<>();
private Set<Qbank> laQuestionSetMain = new HashSet<>();
private Set<Qbank> tfQuestionSetRe = new HashSet<>();
private Set<Qbank> fibQuestionSetRe = new HashSet<>();
private Set<Qbank> etfQuestionSetRe = new HashSet<>();
private Set<Qbank> mtfQuestionSetRe = new HashSet<>();
private Set<Qbank> mcQuestionSetRe = new HashSet<>();
private Set<Qbank> saQuestionSetRe = new HashSet<>();
private Set<Qbank> laQuestionSetRe = new HashSet<>();
private QpData qpData;
// getters & setters
}
我显然可以将每个Qbank对象存储在数据库中,然后构造QuestionWrapper,最后构造一个hashmap。但是我想要一种更简单,更省力的方式来存储整个哈希图,并在需要时进行检索。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。