oracle - Java backend RESTful server application with CDI -
my task create javaee application restful
services using cdi
. have data oracle
database.
i have researched on internet on how make this, couldn't find project/guide using needed. have created entity class, can't figure out how deal data database, crud
database.
my entity class:
@entity @table(name = "books") public class book implements serializable { private int id; private string author; private string title; @id @generatedvalue(strategy = generationtype.identity) @column(name = "id", unique = true, nullable = false) public int getid() { return id; } public void setid(int id) { this.id = id; } @column(name = "author", unique = true, nullable = false) public string getauthor() { return author; } public void setauthor(string author) { this.author= author; } @column(name = "title", unique = true, nullable = false) public string gettitle() { return title; } public void settitle(string title) { this.title= title; } }
any help, or link guides appreciated. in advance!
what looking tutorial combines jpa jdbc. let jpa handle talking database, can focus on developing. suggest using spring.
here example uses spring.
this example using eclipse-link.
this how connect oracle database.
this great tutorial cobers whole shebang scratch adding , reading db.
wiki
Comments
Post a Comment