KickJava   Java API By Example, From Geeks To Geeks.

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


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="node_revisions")
9 public class NodeRevision {
10   /**
11    * CREATE TABLE `node_revisions` (
12    * `nid` int(10) unsigned NOT NULL default '0',
13    * `vid` int(10) unsigned NOT NULL default '0',
14    * `uid` int(10) NOT NULL default '0',
15    * `title` varchar(128) NOT NULL default '',
16    * `body` longtext NOT NULL,
17    * `teaser` longtext NOT NULL,
18    * `log` longtext NOT NULL,
19    * `timestamp` int(11) NOT NULL default '0',
20    * `format` int(4) NOT NULL default '0',
21    * PRIMARY KEY (`nid`,`vid`),
22    * KEY `uid` (`uid`)
23    * );
24    */

25
26   @Id
27   private int nid;
28   @Id
29   private int vid;
30   private int uid;
31   private String JavaDoc title;
32   private String JavaDoc body;
33   private String JavaDoc teaser;
34   private String JavaDoc log;
35   private int timestamp;
36   private int format;
37 }
38
Popular Tags