KickJava   Java API By Example, From Geeks To Geeks.

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


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="contact")
9 public class Contact {
10   /**
11    * CREATE TABLE `contact` (
12    * `cid` int(10) unsigned NOT NULL auto_increment,
13    * `category` varchar(255) NOT NULL default '',
14    * `recipients` longtext NOT NULL,
15    * `reply` longtext NOT NULL,
16    * `weight` tinyint(3) NOT NULL default '0',
17    * `selected` tinyint(1) NOT NULL default '0',
18    * PRIMARY KEY (`cid`),
19    * UNIQUE KEY `category` (`category`)
20    * );
21    */

22
23   @Id
24   private int cid;
25   private String JavaDoc category;
26   private String JavaDoc recipients;
27   private String JavaDoc reply;
28   private int weight;
29   private int selected;
30 }
31
32
Popular Tags