KickJava   Java API By Example, From Geeks To Geeks.

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


1 package demo.drupal.persistence;
2
3 import javax.persistence.Entity;
4 import javax.persistence.Id;
5 import javax.persistence.Table;
6
7 @Entity
8 @Table(name="node_counter")
9 public class NodeCounter {
10   /**
11    * CREATE TABLE `node_counter` (
12    * `nid` int(11) NOT NULL default '0',
13    * `totalcount` bigint(20) unsigned NOT NULL default '0',
14    * `daycount` mediumint(8) unsigned NOT NULL default '0',
15    * `timestamp` int(11) unsigned NOT NULL default '0',
16    * PRIMARY KEY (`nid`),
17    * KEY `totalcount` (`totalcount`),
18    * KEY `daycount` (`daycount`),
19    * KEY `timestamp` (`timestamp`)
20    * );
21    */

22
23   @Id
24   private int nid;
25   private long totalcount;
26   private int daycount;
27   private int timestamp;
28 }
29
Popular Tags