Skip to content

Instantly share code, notes, and snippets.

@craigew
Created September 22, 2013 12:56
Show Gist options
  • Save craigew/6659643 to your computer and use it in GitHub Desktop.
Save craigew/6659643 to your computer and use it in GitHub Desktop.
The BaseEntity extended by all entity classes
@MappedSuperclass
public class BaseEntity implements Identifier{
@Id
@GeneratedValue(strategy= GenerationType.SEQUENCE, generator="id_sequence_gen")
@SequenceGenerator(name="id_sequence_gen", sequenceName="id_sequence")
private long id;
public long getId() {
return id;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment