1 package demo.drupal.persistence;2 3 import javax.persistence.Id;4 import javax.persistence.Entity;5 import javax.persistence.Table;6 7 @Entity8 @Table(name="aggregator_category")9 public class AggregatorCategory {10 /**11 * CREATE TABLE `aggregator_category` (12 * `cid` int(10) NOT NULL auto_increment,13 * `title` varchar(255) NOT NULL default '',14 * `description` longtext NOT NULL,15 * `block` tinyint(2) NOT NULL default '0',16 * PRIMARY KEY (`cid`),17 * UNIQUE KEY `title` (`title`)18 * );19 */20 21 @Id22 private int cid;23 private String title;24 private String description;25 private int block;26 27 /**28 *29 DROP TABLE IF EXISTS `aggregator_category_feed`;30 CREATE TABLE `aggregator_category_feed` (31 `fid` int(10) NOT NULL default '0',32 `cid` int(10) NOT NULL default '0',33 PRIMARY KEY (`fid`,`cid`)34 );35 */36 37 /**38 DROP TABLE IF EXISTS `aggregator_category_item`;39 CREATE TABLE `aggregator_category_item` (40 `iid` int(10) NOT NULL default '0',41 `cid` int(10) NOT NULL default '0',42 PRIMARY KEY (`iid`,`cid`)43 );44 */45 46 }47