Example usage for javax.persistence GenerationType SEQUENCE

List of usage examples for javax.persistence GenerationType SEQUENCE

Introduction

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

Prototype

GenerationType SEQUENCE

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

Click Source Link

Document

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

Usage

From source file:org.dspace.orm.entity.MetadataSchemaRegistry.java

@Id
@Column(name = "metadata_schema_id")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "metadataschemaregistry_gen")
public int getID() {
    return id;/* w  ww.  j a  v  a 2  s  .  c om*/
}

From source file:org.dspace.orm.entity.RegistrationData.java

@Id
@Column(name = "registrationdata_id")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "registrationdata_gen")
public int getID() {
    return id;//w w w . j a  va  2  s  .com
}

From source file:org.dspace.orm.entity.BitstreamFormat.java

@Id
@Column(name = "bitstream_format_id")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "bitstreamformatregistry_gen")
public int getID() {
    return id;//from  ww w . ja v a 2  s .  c  o m
}

From source file:org.dspace.orm.entity.FileExtension.java

@Id
@Column(name = "file_extension_id")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "fileextension_gen")
public int getID() {
    return id;//w ww  . j  a  v a2 s  .  com
}

From source file:org.dspace.orm.entity.MetadataFieldRegistry.java

@Id
@Column(name = "metadata_field_id")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "metadatafieldregistry_gen")
public int getID() {
    return id;//  w  w w .  j  a v  a2  s  .  c  om
}

From source file:org.dspace.orm.entity.Handle.java

@Id
@Column(name = "handle_id")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "handle_gen")
public int getID() {
    return id;//from ww w . java2s  . co m
}

From source file:org.dspace.orm.entity.VersionItem.java

@Id
@Column(name = "versionitem_id")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "versionitem_gen")
public int getID() {
    return id;/*www  .  java  2s. c o m*/
}

From source file:org.dspace.orm.entity.MetadataValue.java

@Id
@Column(name = "metadata_value_id")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "metadatavalue_gen")
public int getID() {
    return id;/*ww  w . j av a 2 s .c  om*/
}

From source file:org.dspace.orm.entity.HarvestedCollection.java

@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "harvested_collection_gen")
public int getID() {
    return id;//from   w  w w.  ja  v  a  2 s .co m
}

From source file:org.dspace.orm.entity.WorkFlowItem.java

@Id
@Column(name = "workflow_id")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "workflowitem_gen")
public int getID() {
    return id;/*from  w  ww . ja  v a 2s  .c  o m*/
}