KickJava   Java API By Example, From Geeks To Geeks.

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


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="term_data")
9 public class TermData {
10   /**
11    * CREATE TABLE `term_data` (
12    * `tid` int(10) unsigned NOT NULL auto_increment,
13    * `vid` int(10) unsigned NOT NULL default '0',
14    * `name` varchar(255) NOT NULL default '',
15    * `description` longtext,
16    * `weight` tinyint(4) NOT NULL default '0',
17    * PRIMARY KEY (`tid`),
18    * KEY `vid` (`vid`)
19    * );
20    */

21
22   @Id
23   private int tid;
24   private int vid;
25   private String JavaDoc name;
26   private String JavaDoc description;
27   private int weight;
28 }
29 /**
30 DROP TABLE IF EXISTS `term_hierarchy`;
31 CREATE TABLE `term_hierarchy` (
32   `tid` int(10) unsigned NOT NULL default '0',
33   `parent` int(10) unsigned NOT NULL default '0',
34   KEY `tid` (`tid`),
35   KEY `parent` (`parent`)
36 );
37 */

38
39 /**
40 DROP TABLE IF EXISTS `term_node`;
41 CREATE TABLE `term_node` (
42   `nid` int(10) unsigned NOT NULL default '0',
43   `tid` int(10) unsigned NOT NULL default '0',
44   PRIMARY KEY (`tid`,`nid`),
45   KEY `nid` (`nid`),
46   KEY `tid` (`tid`)
47 );
48 */

49
50 /**
51 DROP TABLE IF EXISTS `term_relation`;
52 CREATE TABLE `term_relation` (
53   `tid1` int(10) unsigned NOT NULL default '0',
54   `tid2` int(10) unsigned NOT NULL default '0',
55   KEY `tid1` (`tid1`),
56   KEY `tid2` (`tid2`)
57 );
58 */

59
60 /**
61 DROP TABLE IF EXISTS `term_synonym`;
62 CREATE TABLE `term_synonym` (
63   `tid` int(10) unsigned NOT NULL default '0',
64   `name` varchar(255) NOT NULL default '',
65   KEY `tid` (`tid`),
66   KEY `name` (`name`(3))
67 );
68 */

69
70
Popular Tags