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:ch.systemsx.cisd.openbis.generic.shared.dto.FilterPE.java

@SequenceGenerator(name = SequenceNames.FILTER_SEQUENCE, sequenceName = SequenceNames.FILTER_SEQUENCE, allocationSize = 1)
@Id/* w w  w . java2  s.  c o m*/
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.FILTER_SEQUENCE)
public final Long getId() {
    return id;
}

From source file:ch.systemsx.cisd.openbis.generic.shared.dto.SampleTypePE.java

@SequenceGenerator(name = SequenceNames.SAMPLE_TYPE_SEQUENCE, sequenceName = SequenceNames.SAMPLE_TYPE_SEQUENCE, allocationSize = 1)
@Id//from   www  . j a v  a  2s  . c om
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.SAMPLE_TYPE_SEQUENCE)
public final Long getId() {
    return id;
}

From source file:ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE.java

@SequenceGenerator(name = SequenceNames.ROLE_ASSIGNMENT_SEQUENCE, sequenceName = SequenceNames.ROLE_ASSIGNMENT_SEQUENCE, allocationSize = 1)
@Id//w w w.  j a va  2s  .  c om
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.ROLE_ASSIGNMENT_SEQUENCE)
public final Long getId() {
    return id;
}

From source file:org.opennms.netmgt.model.OnmsIpInterface.java

@Id
@Column(nullable = false)//w ww. j a v  a 2 s  .c  om
@XmlTransient
@SequenceGenerator(name = "opennmsSequence", sequenceName = "opennmsNxtId")
@GeneratedValue(generator = "opennmsSequence", strategy = GenerationType.SEQUENCE)
public Integer getId() {
    return m_id;
}

From source file:org.opennms.netmgt.model.OnmsSnmpInterface.java

/**
 * Unique identifier for snmpInterface.//from ww w .j  a  v a 2 s.c o m
 *
 * @return a {@link java.lang.Integer} object.
 */
@Id
@Column(nullable = false)
@SequenceGenerator(name = "opennmsSequence", sequenceName = "opennmsNxtId")
@GeneratedValue(generator = "opennmsSequence", strategy = GenerationType.SEQUENCE)
@XmlAttribute(name = "id")
public Integer getId() {
    return m_id;
}

From source file:ch.systemsx.cisd.openbis.generic.shared.dto.MaterialPE.java

@Id
@SequenceGenerator(name = SequenceNames.MATERIAL_SEQUENCE, sequenceName = SequenceNames.MATERIAL_SEQUENCE, allocationSize = 1)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.MATERIAL_SEQUENCE)
@DocumentId/*w w  w  . j ava 2 s. com*/
public Long getId() {
    return id;
}

From source file:ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE.java

@Id
@SequenceGenerator(name = SequenceNames.EXPERIMENT_SEQUENCE, sequenceName = SequenceNames.EXPERIMENT_SEQUENCE, allocationSize = 1)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.EXPERIMENT_SEQUENCE)
@DocumentId/*from w  w w  . ja v a2  s  .c  o m*/
public Long getId() {
    return id;
}

From source file:org.opennms.netmgt.model.OnmsNotification.java

/**
 * <p>getNotifyId</p>//  w  ww  .  ja v  a 2s.  c  o  m
 *
 * @return a {@link java.lang.Integer} object.
 */

@Id
@Column(nullable = false)
@XmlAttribute(name = "id")
@SequenceGenerator(name = "notifySequence", sequenceName = "notifyNxtId")
@GeneratedValue(generator = "notifySequence", strategy = GenerationType.SEQUENCE)
public Integer getNotifyId() {
    return m_notifyId;
}

From source file:edu.harvard.med.screensaver.model.screenresults.ScreenResult.java

/**
 * Get the id for the screen result./*w  ww  .j a v a 2  s.  co m*/
 * @return the id for the screen result
 */
@Id
@org.hibernate.annotations.GenericGenerator(name = "screen_result_id_seq", strategy = "sequence", parameters = {
        @org.hibernate.annotations.Parameter(name = "sequence", value = "screen_result_id_seq") })
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "screen_result_id_seq")
public Integer getScreenResultId() {
    return getEntityId();
}

From source file:ch.systemsx.cisd.openbis.generic.shared.dto.VocabularyPE.java

@SequenceGenerator(name = SequenceNames.CONTROLLED_VOCABULARY_SEQUENCE, sequenceName = SequenceNames.CONTROLLED_VOCABULARY_SEQUENCE, allocationSize = 1)
@Id//from ww  w . j  a va2  s. com
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.CONTROLLED_VOCABULARY_SEQUENCE)
public final Long getId() {
    return id;
}