KickJava   Java API By Example, From Geeks To Geeks.

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


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="node_access")
9 public class NodeAccess {
10   /**
11    * CREATE TABLE `node_access` (
12    * `nid` int(10) unsigned NOT NULL default '0',
13    * `gid` int(10) unsigned NOT NULL default '0',
14    * `realm` varchar(255) NOT NULL default '',
15    * `grant_view` tinyint(1) unsigned NOT NULL default '0',
16    * `grant_update` tinyint(1) unsigned NOT NULL default '0',
17    * `grant_delete` tinyint(1) unsigned NOT NULL default '0',
18    * PRIMARY KEY (`nid`,`gid`,`realm`)
19    * );
20    */

21
22   @Id
23   private int nid;
24   @Id
25   private int gid;
26   @Id
27   private String JavaDoc realm;
28   private int grant_view;
29   private int grant_update;
30   private int grant_delete;
31 }
32
Popular Tags