KickJava   Java API By Example, From Geeks To Geeks.

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


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="comments")
9 public class Comment {
10   /**
11    * CREATE TABLE `comments` (
12    * `cid` int(10) NOT NULL auto_increment,
13    * `pid` int(10) NOT NULL default '0',
14    * `nid` int(10) NOT NULL default '0',
15    * `uid` int(10) NOT NULL default '0',
16    * `subject` varchar(64) NOT NULL default '',
17    * `comment` longtext NOT NULL,
18    * `hostname` varchar(128) NOT NULL default '',
19    * `timestamp` int(11) NOT NULL default '0',
20    * `score` mediumint(9) NOT NULL default '0',
21    * `status` tinyint(3) unsigned NOT NULL default '0',
22    * `format` int(4) NOT NULL default '0',
23    * `thread` varchar(255) NOT NULL default '',
24    * `users` longtext,
25    * `name` varchar(60) default NULL,
26    * `mail` varchar(64) default NULL,
27    * `homepage` varchar(255) default NULL,
28    * PRIMARY KEY (`cid`),
29    * KEY `lid` (`nid`)
30    * );
31    */

32
33   @Id
34   private int cid;
35   private int pid;
36   private int nid;
37   private int uid;
38   private String JavaDoc subject;
39   private String JavaDoc comment;
40   private String JavaDoc hostname;
41   private int timestamp;
42   private int score;
43   private int status;
44   private int format;
45   private String JavaDoc thread;
46   private String JavaDoc users;
47   private String JavaDoc name;
48   private String JavaDoc mail;
49   private String JavaDoc homepage;
50 }
51
Popular Tags