Skip to content

Instantly share code, notes, and snippets.

@yusufcakmak
Last active August 29, 2015 14:26
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 yusufcakmak/5e12a03571280ca13df3 to your computer and use it in GitHub Desktop.
Save yusufcakmak/5e12a03571280ca13df3 to your computer and use it in GitHub Desktop.
package co.mobiwise.hibernate.model;
import javax.persistence.*;
import java.util.Date;
/**
* Created by yusufcakmak on 8/3/15.
*/
@Entity
@Table(name="book",uniqueConstraints={@UniqueConstraint(columnNames={"id"})})
public class Book1 {
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name="id",nullable=false, unique=true, length=11)
private int id;
@Column(name="bookName",nullable=true)
private String bookName;
@Column(name="bookDesc",nullable=true)
private String bookDesc;
@Column(name="insert_time",nullable=true)
private Date insertTime;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getBookName() {
return bookName;
}
public void setBookName(String bookName) {
this.bookName = bookName;
}
public String getBookDesc() {
return bookDesc;
}
public void setBookDesc(String bookDesc) {
this.bookDesc = bookDesc;
}
public Date getInsertTime() {
return insertTime;
}
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment