mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-16 08:58:49 +00:00
Added DAO pattern.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package com.iluwatar;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Version;
|
||||
|
||||
@Entity
|
||||
public class BaseEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
@Column(name = "ID")
|
||||
private Long id;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Version
|
||||
private Long version;
|
||||
}
|
||||
Reference in New Issue
Block a user