本文整理汇总了Java中javax.persistence.GenerationType.AUTO属性的典型用法代码示例。如果您正苦于以下问题:Java GenerationType.AUTO属性的具体用法?Java GenerationType.AUTO怎么用?Java GenerationType.AUTO使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javax.persistence.GenerationType
的用法示例。
在下文中一共展示了GenerationType.AUTO属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getId
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = COLUMN_NAME__ID)
public long getId() {
if (idProperty == null) {
return _id;
} else {
return idProperty.get();
}
}
示例2: getId
@Override
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
public long getId()
{
return id;
}
示例3: getId
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.AUTO)
@Override
public Long getId() {
return id;
}
示例4: getId
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
//@GeneratedValue(strategy = GenerationType.AUTO, generator = "uuid-string")
//@GeneratedValue(generator = "system-uuid")
//@GenericGenerator(name = "system-uuid", strategy = "uuid")
//@Column(length = 32)
public Long getId() {
return id;
}
示例5: getId
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = COLUMN_NAME__ID)
public long getId() {
if (this.idProperty == null) {
return _id;
} else {
return idProperty.get();
}
}
示例6: getId
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id")
public long getId() {
if (this.idProperty == null) {
return _id;
} else {
return idProperty.get();
}
}
示例7: getId
/**
* 获取ID
*
* @return ID
*/
@JsonProperty
@DocumentId
@Id
// MySQL/SQLServer: @GeneratedValue(strategy = GenerationType.AUTO)
// Oracle: @GeneratedValue(strategy = GenerationType.AUTO, generator = "sequenceGenerator")
@GeneratedValue(strategy = GenerationType.AUTO, generator = "sequenceGenerator")
public Long getId() {
return id;
}
示例8: getId
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getId() {
return id;
}
示例9: getId
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getId() {
return id;
}
示例10: getId
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
public Integer getId() {
return id;
}
示例11: getId
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
public Long getId() {
return id;
}
示例12: getBookID
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "bookID",length = 11,nullable = false,unique = true)
public int getBookID() {
return bookID;
}
示例13: getId
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
public Long getId() {
return this.id;
}
示例14: getId
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "identifier")
public int getId() {
return identifier;
}
示例15: getId
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = IConfiguration.COLUMN_NAME__ID)
public long getId();