KickJava   Java API By Example, From Geeks To Geeks.

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


1 package demo.drupal.persistence;
2
3 import javax.persistence.Id;
4 import javax.persistence.Entity;
5 import javax.persistence.Table;
6
7 import java.util.Date JavaDoc;
8
9 @Entity
10 @Table(name="watchdog")
11 public class Watchdog {
12   /**
13    * CREATE TABLE `watchdog` (
14    * `wid` int(5) NOT NULL auto_increment,
15    * `uid` int(10) NOT NULL default '0',
16    * `type` varchar(16) NOT NULL default '',
17    * `message` longtext NOT NULL,
18    * `severity` tinyint(3) unsigned NOT NULL default '0',
19    * `link` varchar(255) NOT NULL default '',
20    * `location` varchar(128) NOT NULL default '',
21    * `referer` varchar(128) NOT NULL default '',
22    * `hostname` varchar(128) NOT NULL default '',
23    * `timestamp` int(11) NOT NULL default '0',
24    * PRIMARY KEY (`wid`)
25    * );
26    */

27
28   @Id
29   private int wid;
30   private int uid;
31   private String JavaDoc type;
32   private String JavaDoc message;
33   private int severity;
34   private String JavaDoc link;
35   private String JavaDoc location;
36   private String JavaDoc referer;
37   private String JavaDoc hostname;
38   private Date JavaDoc timestamp;
39 }
40
Popular Tags