下面列出了怎么用javax.persistence.GenerationType的API类实例代码及写法,或者点击链接到github查看源代码。
@Id
@Column(name = "INSTRUCTOR_ID", unique = true, nullable = false)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_INSTRUCTOR_ID")
@SequenceGenerator(name = "SEQ_INSTRUCTOR_ID", sequenceName = "SEQ_INSTRUCTOR_ID", allocationSize=1, initialValue=1)
public Integer getId() {
return this.id;
}
/**
* Gets the id.
*
* @return the id
*/
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@JsonIgnore
public Long getId() {
return id;
}
/**
* Gets the hjid.
*
* @return the hjid
*/
@Id
@Column(name = "HJID")
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getHjid() {
return hjid;
}
/**
* Gets the hjid.
*
* @return the hjid
*/
@Id
@Column(name = "HJID")
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getHjid() {
return hjid;
}
/**
* Gets the hjid.
*
* @return the hjid
*/
@Id
@Column(name = "HJID")
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getHjid() {
return hjid;
}
@Id
@Column(name = "CLASSES_ID", unique = true, nullable = false)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_CLASSES_ID")
@SequenceGenerator(name = "SEQ_CLASSES_ID", sequenceName = "SEQ_CLASSES_ID", allocationSize=1, initialValue=1)
public Integer getId() {
return this.id;
}
/**
* Gets the hjid.
*
* @return the hjid
*/
@Id
@Column(name = "HJID")
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getHjid() {
return hjid;
}
@Id
@SequenceGenerator(name = "ID_SEQ")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "ID_SEQ")
@Column(name = "ID", nullable = false)
public Long getId() {
return id;
}
/**
* Gets the hjid.
*
* @return the hjid
*/
@Id
@Column(name = "HJID")
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getHjid() {
return hjid;
}
/**
* Gets the hjid.
*
* @return the hjid
*/
@Id
@Column(name = "HJID")
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getHjid() {
return hjid;
}
@Id
@Column(name = "order_item_id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Override
public long getOrderItemId() {
return super.getOrderItemId();
}
@Id
@Column(name = "order_id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Override
public long getOrderId() {
return super.getOrderId();
}
@Id
@Column(name = "ID", unique = true, nullable = false, length = 19)
@GeneratedValue(strategy = GenerationType.TABLE, generator = "table")
@GenericGenerator(name = "table", strategy = "org.hibernate.id.MultipleHiLoPerTableGenerator", parameters = {
@Parameter(name = "max_lo", value = "5") })//增长级别为5,可根据并发级别适当调整
public Long getId() {
return this.id;
}
/**
* Gets the hjid.
*
* @return the hjid
*/
@Id
@Column(name = "HJID")
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getHjid() {
return hjid;
}
@SuppressWarnings("ConstantConditions")
private static GenerationType interpretGenerationType(GeneratedValue generatedValueAnn) {
if ( generatedValueAnn.strategy() == null ) {
return GenerationType.AUTO;
}
return generatedValueAnn.strategy();
}
/**
*方法: 取得java.lang.Integer
*@return: java.lang.Integer id
*/
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name ="ID",nullable=false,length=32)
public java.lang.Integer getId(){
return this.id;
}
/**
* Gets the id.
*
* @return id
*/
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "content_prj_env_target_seq")
@SequenceGenerator(name = "content_prj_env_target_seq", sequenceName = "suse_ct_env_tgt_seq", allocationSize = 1)
public Long getId() {
return id;
}
/**
* Gets the hjid.
*
* @return the hjid
*/
@Id
@Column(name = "HJID")
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getHjid() {
return hjid;
}
/**
* Gets the hjid.
*
* @return the hjid
*/
@Id
@Column(name = "HJID")
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getHjid() {
return hjid;
}
/**
* Gets the id.
*
* @return id
*/
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "content_project_seq")
@SequenceGenerator(name = "content_project_seq", sequenceName = "suse_ct_project_seq", allocationSize = 1)
public Long getId() {
return id;
}
/**
* @return Returns the id.
*/
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "nmsg_seq")
@SequenceGenerator(name = "nmsg_seq", sequenceName = "suse_notif_message_id_seq",
allocationSize = 1)
public Long getId() {
return id;
}
/**
* @return the id
*/
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "imginfo_seq")
@SequenceGenerator(name = "imginfo_seq", sequenceName = "suse_imginfo_imgid_seq",
allocationSize = 1)
public Long getId() {
return id;
}
/**
* Gets the hjid.
*
* @return the hjid
*/
@Id
@Column(name = "HJID")
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getHjid() {
return hjid;
}
/**
* @return id to get
*/
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "clust_seq")
@SequenceGenerator(name = "clust_seq", sequenceName = "suse_cluster_id_seq",
allocationSize = 1)
public long getId() {
return id;
}
/**
* Gets the hjid.
*
* @return the hjid
*/
@Id
@Column(name = "HJID")
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getHjid() {
return hjid;
}
/**
* Gets the hjid.
*
* @return the hjid
*/
@Id
@Column(name = "HJID")
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getHjid() {
return hjid;
}
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ID", unique = true, nullable = false, scale = 0)
public long getId() {
return id;
}
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
public Integer getId() {
return id;
}
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
public Long getId() {
return this.id;
}
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
public Long getId() {
return this.id;
}