Created
July 14, 2011 16:00
-
-
Save detsam/1082742 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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