Skip to content

Instantly share code, notes, and snippets.

@detsam
Created July 14, 2011 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save detsam/1082742 to your computer and use it in GitHub Desktop.
Save detsam/1082742 to your computer and use it in GitHub Desktop.
@MappedSuperclass
public abstract class BaseEntity {
private Long id;
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}
@Entity
@Table(name="slot_id")
public class SlotId extends BaseEntity {
private String slotId;
public void setSlotId(String slotId) {
this.slotId = slotId;
}
public String getSlotId() {
return slotId;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment