KickJava   Java API By Example, From Geeks To Geeks.

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


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="poll_choices")
9 public class PollChoice {
10   /**
11    * CREATE TABLE `poll_choices` (
12    * `chid` int(10) unsigned NOT NULL auto_increment,
13    * `nid` int(10) unsigned NOT NULL default '0',
14    * `chtext` varchar(128) NOT NULL default '',
15    * `chvotes` int(6) NOT NULL default '0',
16    * `chorder` int(2) NOT NULL default '0',
17    * PRIMARY KEY (`chid`),
18    * KEY `nid` (`nid`)
19    * );
20    */

21
22   @Id
23   private int chid;
24   private int nid;
25   private String JavaDoc chtext;
26   private int chvotes;
27   private int chorder;
28 }
29
Popular Tags