當前位置: 首頁>>代碼示例>>Java>>正文


Java GenerationType.AUTO屬性代碼示例

本文整理匯總了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();
    }
}
 
開發者ID:Naoghuman,項目名稱:Incubator,代碼行數:10,代碼來源:CategoryModel.java

示例2: getId

@Override
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
public long getId()
{
	return id;
}
 
開發者ID:equella,項目名稱:Equella,代碼行數:7,代碼來源:LanguageBundle.java

示例3: getId

@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.AUTO)
@Override
public Long getId() {
    return id;
}
 
開發者ID:bcgov,項目名稱:sbc-qsystem,代碼行數:7,代碼來源:QUser.java

示例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;
}
 
開發者ID:wkeyuan,項目名稱:DWSurvey,代碼行數:9,代碼來源:IdLongEntity.java

示例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();
    }
}
 
開發者ID:Naoghuman,項目名稱:Incubator,代碼行數:10,代碼來源:ProjectModel.java

示例6: getId

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id")
public long getId() {
    if (this.idProperty == null) {
        return _id;
    } else {
        return idProperty.get();
    }
}
 
開發者ID:Naoghuman,項目名稱:Incubator,代碼行數:10,代碼來源:Map.java

示例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;
}
 
開發者ID:justinbaby,項目名稱:my-paper,代碼行數:14,代碼來源:BaseEntity.java

示例8: getId

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getId() {
    return id;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:5,代碼來源:Order.java

示例9: getId

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getId() {
	return id;
}
 
開發者ID:SergioColetto,項目名稱:borabeber-api,代碼行數:5,代碼來源:Usuario.java

示例10: getId

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
public Integer getId() {
	return id;
}
 
開發者ID:PacktPublishing,項目名稱:Spring-5.0-Cookbook,代碼行數:5,代碼來源:Employee.java

示例11: getId

@Id
   @GeneratedValue(strategy=GenerationType.AUTO)
public Long getId() {
	return id;
}
 
開發者ID:m4rciosouza,項目名稱:ponto-inteligente-api,代碼行數:5,代碼來源:Lancamento.java

示例12: getBookID

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "bookID",length = 11,nullable = false,unique = true)
public int getBookID() {
	return bookID;
}
 
開發者ID:zhangjikai,項目名稱:sdudoc,代碼行數:6,代碼來源:BookContent.java

示例13: getId

@Id
@GeneratedValue(strategy=GenerationType.AUTO)
public Long getId() {
	return this.id;
}
 
開發者ID:muzili90,項目名稱:SpringBBS,代碼行數:5,代碼來源:Section.java

示例14: getId

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "identifier")
public int getId() {
    return identifier;
}
 
開發者ID:ArneLimburg,項目名稱:jpasecurity,代碼行數:6,代碼來源:MethodAccessAnnotationTestBean.java

示例15: getId

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = IConfiguration.COLUMN_NAME__ID)
public long getId();
 
開發者ID:Naoghuman,項目名稱:Incubator,代碼行數:4,代碼來源:ICardModel.java


注:本文中的javax.persistence.GenerationType.AUTO屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。