KickJava   Java API By Example, From Geeks To Geeks.

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


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

20
21   @Id
22   private int nid;
23
24   // XXX: relationship
25
private int vid;
26
27   // XXX: relationship
28
private int tid;
29 }
30
Popular Tags