KickJava   Java API By Example, From Geeks To Geeks.

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


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="boxes")
9 public class Box {
10   /**
11    * CREATE TABLE `boxes` (
12    * `bid` tinyint(4) NOT NULL auto_increment,
13    * `title` varchar(64) NOT NULL default '',
14    * `body` longtext,
15    * `info` varchar(128) NOT NULL default '',
16    * `format` int(4) NOT NULL default '0',
17    * PRIMARY KEY (`bid`),
18    * UNIQUE KEY `info` (`info`)
19    * );
20    */

21
22   @Id
23   private int bid;
24   private String JavaDoc title;
25   private String JavaDoc body;
26   private String JavaDoc info;
27   private int format;
28 }
29
Popular Tags