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.alibaba.dubbo.user.provider.model.IdEntity.java

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

From source file:br.gov.ms.saude.portalolapses.entity.AbstractEntity.java

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

From source file:com.mycompany.mavenproject.models.User.java

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

From source file:com.contact.Contact.java

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

From source file:au.org.ands.vocabs.toolkit.db.model.Version.java

/** Get the id.
 * @return The id/*from  ww  w .j a  v  a 2  s. c  o  m*/
 */
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", unique = true, nullable = false)
public Integer getId() {
    return this.id;
}

From source file:com.hrdb.Department.java

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "`DEPT_ID`", nullable = false, scale = 0, precision = 10)
public Integer getDeptId() {
    return this.deptId;
}

From source file:com.wiiyaya.framework.provider.tools.BaseEntity.java

@Id
//   @GeneratedValue(generator = FwConstants.SEQ_GEN_NAME)
@GeneratedValue(strategy = GenerationType.IDENTITY)
public PK getId() {

    return id;
}

From source file:it.redev.parco.model.rifornimenti.Distributore.java

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

From source file:com.jasperreports.hrdb.Employee.java

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "`EID`", nullable = false, scale = 0, precision = 10)
public Integer getEid() {
    return this.eid;
}

From source file:com.hrdb.Employee.java

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "`EMP_ID`", nullable = false, scale = 0, precision = 10)
public Integer getEmpId() {
    return this.empId;
}