new persistence work

This commit is contained in:
eugenp
2013-08-13 13:01:06 +03:00
parent 2fcc1187e2
commit ec9b16694e
3 changed files with 78 additions and 0 deletions
@@ -0,0 +1,31 @@
package org.baeldung.ex.mappingexception.cause4.persistence.model;
import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class Foo implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
public Foo() {
super();
}
// API
public long getId() {
return id;
}
public void setId(final long id) {
this.id = id;
}
}