KickJava   Java API By Example, From Geeks To Geeks.

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


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="cache")
9 public class Cache {
10   /**
11    * CREATE TABLE `cache` (
12    * `cid` varchar(255) NOT NULL default '',
13    * `data` longblob,
14    * `expire` int(11) NOT NULL default '0',
15    * `created` int(11) NOT NULL default '0',
16    * `headers` text,
17    * PRIMARY KEY (`cid`),
18    * KEY `expire` (`expire`)
19    * );
20    */

21
22   @Id
23   private String JavaDoc cid;
24   private byte[] data;
25   private int expire;
26   private int created;
27   private String JavaDoc headers;
28 }
29
Popular Tags