CREATE TABLE questionnaire_questions (
	questionnaire_question_id int NOT NULL ,
	resource_id int NOT NULL ,
	introduction_big_string_id int NOT NULL ,
	statement_a_big_string_id int NOT NULL ,
	statement_b_big_string_id int NOT NULL ,
	statement_c_big_string_id int NOT NULL ,
	statement_d_big_string_id int NOT NULL ,
	statement_e_big_string_id int NOT NULL ,
	statement_f_big_string_id int NOT NULL ,
	statement_g_big_string_id int NOT NULL ,
	statement_h_big_string_id int NOT NULL ,
	statement_i_big_string_id int NOT NULL ,
	statement_j_big_string_id int NOT NULL ,
	ordinal int NOT NULL,
	flags tinyint NOT NULL,
	CONSTRAINT PK_questionnaire_questions PRIMARY KEY
	(
		questionnaire_question_id
	),
	CONSTRAINT FK_q_questions_to_objects FOREIGN KEY
	(
		questionnaire_question_id
	) REFERENCES objects (
		id
	),
	CONSTRAINT FK_q_questions_to_resources FOREIGN KEY
	(
		resource_id
	) REFERENCES resources (
		resource_id
	),
	CONSTRAINT FK_intro_to_big_strings FOREIGN KEY
	(
		introduction_big_string_id
	) REFERENCES big_strings (
		big_string_id
	),
	CONSTRAINT FK_q_sa_to_big_strings FOREIGN KEY
	(
		statement_a_big_string_id
	) REFERENCES big_strings (
		big_string_id
	),
	CONSTRAINT FK_q_sb_to_big_strings FOREIGN KEY
	(
		statement_b_big_string_id
	) REFERENCES big_strings (
		big_string_id
	),
	CONSTRAINT FK_q_sc_to_big_strings FOREIGN KEY
	(
		statement_c_big_string_id
	) REFERENCES big_strings (
		big_string_id
	),
	CONSTRAINT FK_q_sd_to_big_strings FOREIGN KEY
	(
		statement_d_big_string_id
	) REFERENCES big_strings (
		big_string_id
	),
	CONSTRAINT FK_q_se_to_big_strings FOREIGN KEY
	(
		statement_e_big_string_id
	) REFERENCES big_strings (
		big_string_id
	),
	CONSTRAINT FK_q_sf_to_big_strings FOREIGN KEY
	(
		statement_f_big_string_id
	) REFERENCES big_strings (
		big_string_id
	),
	CONSTRAINT FK_q_sg_to_big_strings FOREIGN KEY
	(
		statement_g_big_string_id
	) REFERENCES big_strings (
		big_string_id
	),
	CONSTRAINT FK_q_sh_to_big_strings FOREIGN KEY
	(
		statement_h_big_string_id
	) REFERENCES big_strings (
		big_string_id
	),
	CONSTRAINT FK_q_si_to_big_strings FOREIGN KEY
	(
		statement_i_big_string_id
	) REFERENCES big_strings (
		big_string_id
	),
	CONSTRAINT FK_q_sj_to_big_strings FOREIGN KEY
	(
		statement_j_big_string_id
	) REFERENCES big_strings (
		big_string_id
	)
)
GO


INSERT INTO classes (type, db_name, table_name, java_class)
	VALUES(38,	'building2', 'questionnaire_questions', 'org.bodington.assessment.QuestionnaireQuestion')
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(38, 1, 'questionnaire_question_id', 'setQuestionnaireQuestionId', 'getQuestionnaireQuestionId', '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(38, 2, 'resource_id', 'setResourceId', 'getResourceId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 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(38, 3, 'introduction_big_string_id', 'setIntroductionBigStringId', 'getIntroductionBigStringId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 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(38, 4, 'statement_a_big_string_id', 'setStatementABigStringId', 'getStatementABigStringId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 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(38, 5, 'statement_b_big_string_id', 'setStatementBBigStringId', 'getStatementBBigStringId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 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(38, 6, 'statement_c_big_string_id', 'setStatementCBigStringId', 'getStatementCBigStringId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 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(38, 7, 'statement_d_big_string_id', 'setStatementDBigStringId', 'getStatementDBigStringId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 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(38, 8, 'statement_e_big_string_id', 'setStatementEBigStringId', 'getStatementEBigStringId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 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(38, 9, 'statement_f_big_string_id', 'setStatementFBigStringId', 'getStatementFBigStringId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 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(38, 10, 'statement_g_big_string_id', 'setStatementGBigStringId', 'getStatementGBigStringId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 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(38, 11, 'statement_h_big_string_id', 'setStatementHBigStringId', 'getStatementHBigStringId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 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(38, 12, 'statement_i_big_string_id', 'setStatementIBigStringId', 'getStatementIBigStringId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 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(38, 13, 'statement_j_big_string_id', 'setStatementJBigStringId', 'getStatementJBigStringId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 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(38, 14, 'ordinal', 'setOrdinal', 'getOrdinal', '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(38, 15, 'flags', 'setFlags', 'getFlags', 'byte', 'byte', 0, null, null, null )
GO


