本文整理匯總了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();