KickJava   Java API By Example, From Geeks To Geeks.

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


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="sessions")
9 public class Session {
10   /**
11    * CREATE TABLE `sessions` (
12    * `uid` int(10) unsigned NOT NULL default '0',
13    * `sid` varchar(32) NOT NULL default '',
14    * `hostname` varchar(128) NOT NULL default '',
15    * `timestamp` int(11) NOT NULL default '0',
16    * `cache` int(11) NOT NULL default '0',
17    * `session` longtext,
18    * PRIMARY KEY (`sid`),
19    * KEY `uid` (`uid`),
20    * KEY `timestamp` (`timestamp`)
21    * );
22    */

23
24   @Id
25   private String JavaDoc sid;
26   private int uid;
27   private String JavaDoc hostname;
28   private int timestamp;
29   private int cache;
30   private String JavaDoc session; // bytes[] ???
31
}
32
Popular Tags