Example usage for javax.persistence GenerationType IDENTITY

List of usage examples for javax.persistence GenerationType IDENTITY

Introduction

In this page you can find the example usage for javax.persistence GenerationType IDENTITY.

Prototype

GenerationType IDENTITY

To view the source code for javax.persistence GenerationType IDENTITY.

Click Source Link

Document

Indicates that the persistence provider must assign primary keys for the entity using a database identity column.

Usage

From source file:com.hedgehog.outletss.domain.SysSystemInfo.java

/**       
 *      *            @hibernate.id//from  ww w. j  a va 2s .c  om
 *             generator-class="assigned"
 *             type="java.lang.String"
 *             column="SystemID"
 *         
 */

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "SystemID", unique = true, nullable = false)
public Integer getSystemId() {
    return this.systemId;
}

From source file:com.webfileanalyzer.domain.FileStatistic.java

@JsonProperty("internalId")
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(nullable = false, name = "id")
public Long getId() {
    return id;
}

From source file:example.Child.java

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public long getId() {
    return id;
}

From source file:com.aistor.modules.sys.entity.Role.java

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
//   @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_sys_role")
//   @SequenceGenerator(name = "seq_sys_role", sequenceName = "seq_sys_role")
public Long getId() {
    return id;//w  ww .j av  a 2  s.c  om
}

From source file:org.mitre.oauth2.model.AuthorizationCodeEntity.java

/**
 * @return the id
 */
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
public Long getId() {
    return id;
}

From source file:org.atomsphere.management.model.authentication.User.java

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long getId() {
    return super.getId();
}

From source file:com.aistor.modules.cms.entity.Article.java

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
//   @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_cms_article")
//   @SequenceGenerator(name = "seq_cms_article", sequenceName = "seq_cms_article")
public Long getId() {
    return id;/*from   ww  w .j  av a 2 s  . com*/
}

From source file:org.mitre.oauth2.model.AuthenticationHolderEntity.java

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
public Long getId() {
    return id;
}

From source file:io.cfp.entity.User.java

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public int getId() {
    return id;
}

From source file:com.cognitivabrasil.repositorio.data.entities.User.java

/**
 * @return the id
 */
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Integer getId() {
    return id;
}