KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > demo > drupal > persistence > Book


1 package demo.drupal.persistence;
2
3 import javax.persistence.Id;
4 import javax.persistence.Entity;
5 import javax.persistence.Table;
6
7 @Entity
8 @Table(name="book")
9 public class Book {
10   /**
11    * CREATE TABLE `book` (
12    * `vid` int(10) unsigned NOT NULL default '0',
13    * `nid` int(10) unsigned NOT NULL default '0',
14    * `parent` int(10) NOT NULL default '0',
15    * `weight` tinyint(3) NOT NULL default '0',
16    * PRIMARY KEY (`vid`),
17    * KEY `nid` (`nid`),
18    * KEY `parent` (`parent`)
19    * );
20    */

21
22   @Id
23   private int vid;
24   private int nid;
25   private int parent;
26   private int weight;
27 }
28
Popular Tags