CREATE TABLE newsfeeds (
	newsfeed_id int NOT NULL,
	newsfeed_flags int NOT NULL,
	feed_url varchar (255) NULL,
	max_items varchar (4) NULL,
	item_separation_tag varchar (10) NULL,
 
	CONSTRAINT PK_newsfeeds PRIMARY KEY
	(
		newsfeed_id
	),
	CONSTRAINT FK_newsfeeds_to_resources FOREIGN KEY
	(
		newsfeed_id
	) REFERENCES resources (
		resource_id
	)
)
GO
 
INSERT INTO classes (type, super_type, db_name, table_name, java_class)
	VALUES(101, 10, null, 'newsfeeds', 'org.bodington.server.resources.NewsFeedResource');
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(101, 1, 'newsfeed_id', 'setNewsFeedId', 'getNewsFeedId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 1, null, null, null );
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(101, 2, 'newsfeed_flags', 'setNewsFeedFlags', 'getNewsFeedFlags', 'int', 'int', 0, null, null, null );
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(101, 3, 'feed_url', 'setFeedURL', 'getFeedURL', 'java.lang.String', 'java.lang.String', 0, null, null, null );
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(101, 4, 'max_items', 'setMaxNumberOfItems', 'getMaxNumberOfItems', 'java.lang.String', 'java.lang.String', 0, null, null, null );
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(101, 5, 'item_separation_tag', 'setItemSeparationTag', 'getItemSeparationTag', 'java.lang.String', 'java.lang.String', 0, null, null, null );
GO
