标签:
package com.springup.utiku.model; import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Index; import javax.persistence.Table; @Entity @Table(indexes = { @Index(name="studentAnswerQueIdIndex", columnList="studentAnswerQueId DESC"), @Index(name="questionConIdIndex", columnList="questionConId") }) public class StudentAnswerConEntity implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy=GenerationType.AUTO) private Long id; private Long studentAnswerQueId; private Long questionConId; private String selected;// 学员答题记录 public StudentAnswerConEntity() {} public StudentAnswerConEntity(Long studentAnswerQueId, Long questionConId) { this.studentAnswerQueId = studentAnswerQueId; this.questionConId = questionConId; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long getQuestionConId() { return questionConId; } public void setQuestionConId(Long questionConId) { this.questionConId = questionConId; } public Long getStudentAnswerQueId() { return studentAnswerQueId; } public void setStudentAnswerQueId(Long studentAnswerQueId) { this.studentAnswerQueId = studentAnswerQueId; } public String getSelected() { return selected; } public void setSelected(String selected) { this.selected = selected; } }
@Index用法——javax.persistence.Index
标签:
原文地址:http://www.cnblogs.com/springup/p/5150033.html