Commit 595c3bd1 by Harsh Shah

BO Changes (Table renamed, IDSpace added)

parent 435b6daa
......@@ -4,13 +4,16 @@
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">answer</tableName>
<tableName factory="String">rs_answer</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="answer_number" type="Long" nullable="true"/>
<column name="section_number" type="Long" length="11" nullable="true"/>
<column name="candidate_id" type="Long" length="11" nullable="true"/>
<column name="quest_number" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="rs_answer" indexName="idx_rs_answer_candidate_id" isUnique="false"><column name="candidate_id"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
......@@ -4,27 +4,14 @@
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">candidate</tableName>
<tableName factory="String">rs_candidate</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="first_name" type="String" nullable="true" length="30"/>
<column name="middle_name" type="String" nullable="true" length="30"/>
<column name="last_name" type="String" nullable="true" length="30"/>
<column name="preferred_name" type="String" nullable="true" length="30"/>
<column name="salutation" type="String" nullable="true" length="10"/>
<column name="position" type="String" nullable="true" length="30"/>
<column name="date_of_birth" type="Date" nullable="true"/>
<column name="date_registered" type="Date" nullable="true"/>
<column name="gender" type="String" nullable="true" length="10"/>
<column name="password" type="String" nullable="true" length="15"/>
<column name="date_taken" type="Date" nullable="true"/>
<column name="location" type="String" nullable="true" length="80"/>
<column name="contact_phone" type="String" nullable="true" length="80"/>
<column name="email" type="String" nullable="true" length="60"/>
<column name="test_input_id" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="candidate" indexName="idx_candidate_test_input_id" isUnique="false"><column name="test_input_id"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="rs_candidate" indexName="idx_rs_candidate_test_input_id" isUnique="false"><column name="test_input_id"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
......@@ -4,7 +4,7 @@
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">factor</tableName>
<tableName factory="String">rs_factor</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
......
......@@ -4,7 +4,7 @@
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">factor_hdr</tableName>
<tableName factory="String">rs_factor_hdr</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
......@@ -18,8 +18,8 @@
<column name="factor_number" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="factor_hdr" indexName="idx_factor_hdr_level_number" isUnique="false"><column name="level_number"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="rs_factor_hdr" indexName="idx_rs_factor_hdr_level_number" isUnique="false"><column name="level_number"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="factor_hdr" indexName="idx_factor_hdr_factor_number" isUnique="false"><column name="factor_number"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="rs_factor_hdr" indexName="idx_rs_factor_hdr_factor_number" isUnique="false"><column name="factor_number"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
......@@ -4,7 +4,7 @@
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">factor_lin</tableName>
<tableName factory="String">rs_factor_lin</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
......@@ -13,8 +13,8 @@
<column name="quest_number" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="factor_lin" indexName="idx_factor_lin_factor_number" isUnique="false"><column name="factor_number"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="rs_factor_lin" indexName="idx_rs_factor_lin_factor_number" isUnique="false"><column name="factor_number"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="factor_lin" indexName="idx_factor_lin_quest_number" isUnique="false"><column name="quest_number"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="rs_factor_lin" indexName="idx_rs_factor_lin_quest_number" isUnique="false"><column name="quest_number"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
......@@ -4,15 +4,19 @@
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">score</tableName>
<tableName factory="String">rs_score</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="score_number" type="Long" nullable="true"/>
<column name="test_analysis_id" type="Long" length="11" nullable="true"/>
<column name="factor_number" type="Long" length="11" nullable="true"/>
<column name="level_number" type="Long" length="11" nullable="true"/>
<column name="narrative_id" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="score" indexName="idx_score_test_analysis_id" isUnique="false"><column name="test_analysis_id"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="rs_score" indexName="idx_rs_score_test_analysis_id" isUnique="false"><column name="test_analysis_id"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="rs_score" indexName="idx_rs_score_narrative_id" isUnique="false"><column name="narrative_id"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
......@@ -4,7 +4,7 @@
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">level_factor</tableName>
<tableName factory="String">rs_level_factor</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
......@@ -16,10 +16,10 @@
<column name="narrative_id" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="level_factor" indexName="idx_level_factor_factor_number" isUnique="false"><column name="factor_number"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="rs_level_factor" indexName="idx_rs_level_factor_factor_number" isUnique="false"><column name="factor_number"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="level_factor" indexName="idx_level_factor_level_number" isUnique="false"><column name="level_number"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="rs_level_factor" indexName="idx_rs_level_factor_level_number" isUnique="false"><column name="level_number"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="level_factor" indexName="idx_level_factor_narrative_id" isUnique="false"><column name="narrative_id"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="rs_level_factor" indexName="idx_rs_level_factor_narrative_id" isUnique="false"><column name="narrative_id"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
......@@ -4,7 +4,7 @@
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">level</tableName>
<tableName factory="String">rs_level</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
......
......@@ -4,7 +4,7 @@
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">narrative</tableName>
<tableName factory="String">rs_narrative</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
......@@ -18,5 +18,7 @@
<column name="question" type="CLOB" nullable="true"/>
<column name="level_number" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="rs_narrative" indexName="idx_rs_narrative_level_number" isUnique="false"><column name="level_number"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
......@@ -4,7 +4,7 @@
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">quest_lin</tableName>
<tableName factory="String">rs_quest_lin</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
......@@ -12,6 +12,6 @@
<column name="section_number" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="quest_lin" indexName="idx_quest_lin_section_number" isUnique="false"><column name="section_number"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="rs_quest_lin" indexName="idx_rs_quest_lin_section_number" isUnique="false"><column name="section_number"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
......@@ -4,7 +4,7 @@
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">quest_hdr</tableName>
<tableName factory="String">rs_quest_hdr</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
......
......@@ -4,12 +4,16 @@
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">test_analysis</tableName>
<tableName factory="String">rs_test_analysis</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="level_id" type="Long" length="11" nullable="true"/>
<column name="candidate_id" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="rs_test_analysis" indexName="idx_rs_test_analysis_level_id" isUnique="false"><column name="level_id"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="rs_test_analysis" indexName="idx_rs_test_analysis_candidate_id" isUnique="false"><column name="candidate_id"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">it_does_not_matter</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="xxxx" type="BLOB" nullable="false"/>
</NODE>
</NODE></OBJECTS>
\ No newline at end of file
-- DROP TABLE answer;
-- DROP TABLE rs_answer;
CREATE TABLE answer (
CREATE TABLE rs_answer (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
answer_number numeric(12) NULL,
section_number numeric(12) NULL,
candidate_id numeric(12) NULL,
quest_number numeric(12) NULL
);
ALTER TABLE answer ADD
CONSTRAINT PK_answer PRIMARY KEY
ALTER TABLE rs_answer ADD
CONSTRAINT PK_rs_answer PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
CREATE INDEX idx_rs_answer_candidate_id
ON rs_answer (candidate_id);
-- DROP TABLE candidate;
-- DROP TABLE rs_candidate;
CREATE TABLE candidate (
CREATE TABLE rs_candidate (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
first_name varchar(30) NULL,
middle_name varchar(30) NULL,
last_name varchar(30) NULL,
preferred_name varchar(30) NULL,
salutation varchar(10) NULL,
position varchar(30) NULL,
date_of_birth datetime NULL,
date_registered datetime NULL,
gender varchar(10) NULL,
password varchar(15) NULL,
date_taken datetime NULL,
location varchar(80) NULL,
contact_phone varchar(80) NULL,
email varchar(60) NULL,
test_input_id numeric(12) NULL
);
ALTER TABLE candidate ADD
CONSTRAINT PK_candidate PRIMARY KEY
ALTER TABLE rs_candidate ADD
CONSTRAINT PK_rs_candidate PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_candidate_test_input_id
ON candidate (test_input_id);
CREATE INDEX idx_rs_candidate_test_input_id
ON rs_candidate (test_input_id);
-- DROP TABLE factor;
-- DROP TABLE rs_factor;
CREATE TABLE factor (
CREATE TABLE rs_factor (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
......@@ -13,8 +13,8 @@ CREATE TABLE factor (
ALTER TABLE factor ADD
CONSTRAINT PK_factor PRIMARY KEY
ALTER TABLE rs_factor ADD
CONSTRAINT PK_rs_factor PRIMARY KEY
(
object_id
) ;
......
-- DROP TABLE factor_hdr;
-- DROP TABLE rs_factor_hdr;
CREATE TABLE factor_hdr (
CREATE TABLE rs_factor_hdr (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
......@@ -20,16 +20,16 @@ CREATE TABLE factor_hdr (
ALTER TABLE factor_hdr ADD
CONSTRAINT PK_factor_hdr PRIMARY KEY
ALTER TABLE rs_factor_hdr ADD
CONSTRAINT PK_rs_factor_hdr PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_factor_hdr_level_number
ON factor_hdr (level_number);
CREATE INDEX idx_rs_factor_hdr_level_number
ON rs_factor_hdr (level_number);
CREATE INDEX idx_factor_hdr_factor_number
ON factor_hdr (factor_number);
CREATE INDEX idx_rs_factor_hdr_factor_number
ON rs_factor_hdr (factor_number);
-- DROP TABLE factor_lin;
-- DROP TABLE rs_factor_lin;
CREATE TABLE factor_lin (
CREATE TABLE rs_factor_lin (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
......@@ -15,16 +15,16 @@ CREATE TABLE factor_lin (
ALTER TABLE factor_lin ADD
CONSTRAINT PK_factor_lin PRIMARY KEY
ALTER TABLE rs_factor_lin ADD
CONSTRAINT PK_rs_factor_lin PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_factor_lin_factor_number
ON factor_lin (factor_number);
CREATE INDEX idx_rs_factor_lin_factor_number
ON rs_factor_lin (factor_number);
CREATE INDEX idx_factor_lin_quest_number
ON factor_lin (quest_number);
CREATE INDEX idx_rs_factor_lin_quest_number
ON rs_factor_lin (quest_number);
-- DROP TABLE score;
-- DROP TABLE rs_score;
CREATE TABLE score (
CREATE TABLE rs_score (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
score_number numeric(12) NULL,
test_analysis_id numeric(12) NULL,
factor_number numeric(12) NULL
factor_number numeric(12) NULL,
level_number numeric(12) NULL,
narrative_id numeric(12) NULL
);
ALTER TABLE score ADD
CONSTRAINT PK_score PRIMARY KEY
ALTER TABLE rs_score ADD
CONSTRAINT PK_rs_score PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_score_test_analysis_id
ON score (test_analysis_id);
CREATE INDEX idx_rs_score_test_analysis_id
ON rs_score (test_analysis_id);
CREATE INDEX idx_rs_score_narrative_id
ON rs_score (narrative_id);
-- DROP TABLE level_factor;
-- DROP TABLE rs_level_factor;
CREATE TABLE level_factor (
CREATE TABLE rs_level_factor (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
......@@ -18,19 +18,19 @@ CREATE TABLE level_factor (
ALTER TABLE level_factor ADD
CONSTRAINT PK_level_factor PRIMARY KEY
ALTER TABLE rs_level_factor ADD
CONSTRAINT PK_rs_level_factor PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_level_factor_factor_number
ON level_factor (factor_number);
CREATE INDEX idx_rs_level_factor_factor_number
ON rs_level_factor (factor_number);
CREATE INDEX idx_level_factor_level_number
ON level_factor (level_number);
CREATE INDEX idx_rs_level_factor_level_number
ON rs_level_factor (level_number);
CREATE INDEX idx_level_factor_narrative_id
ON level_factor (narrative_id);
CREATE INDEX idx_rs_level_factor_narrative_id
ON rs_level_factor (narrative_id);
-- DROP TABLE level;
-- DROP TABLE rs_level;
CREATE TABLE level (
CREATE TABLE rs_level (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
......@@ -15,8 +15,8 @@ CREATE TABLE level (
ALTER TABLE level ADD
CONSTRAINT PK_level PRIMARY KEY
ALTER TABLE rs_level ADD
CONSTRAINT PK_rs_level PRIMARY KEY
(
object_id
) ;
......
-- DROP TABLE narrative;
-- DROP TABLE rs_narrative;
CREATE TABLE narrative (
CREATE TABLE rs_narrative (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
......@@ -21,11 +21,13 @@ CREATE TABLE narrative (
ALTER TABLE narrative ADD
CONSTRAINT PK_narrative PRIMARY KEY
ALTER TABLE rs_narrative ADD
CONSTRAINT PK_rs_narrative PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
CREATE INDEX idx_rs_narrative_level_number
ON rs_narrative (level_number);
-- DROP TABLE quest_lin;
-- DROP TABLE rs_quest_lin;
CREATE TABLE quest_lin (
CREATE TABLE rs_quest_lin (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
......@@ -14,13 +14,13 @@ CREATE TABLE quest_lin (
ALTER TABLE quest_lin ADD
CONSTRAINT PK_quest_lin PRIMARY KEY
ALTER TABLE rs_quest_lin ADD
CONSTRAINT PK_rs_quest_lin PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_quest_lin_section_number
ON quest_lin (section_number);
CREATE INDEX idx_rs_quest_lin_section_number
ON rs_quest_lin (section_number);
-- DROP TABLE quest_hdr;
-- DROP TABLE rs_quest_hdr;
CREATE TABLE quest_hdr (
CREATE TABLE rs_quest_hdr (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
......@@ -14,8 +14,8 @@ CREATE TABLE quest_hdr (
ALTER TABLE quest_hdr ADD
CONSTRAINT PK_quest_hdr PRIMARY KEY
ALTER TABLE rs_quest_hdr ADD
CONSTRAINT PK_rs_quest_hdr PRIMARY KEY
(
object_id
) ;
......
-- DROP TABLE test_analysis;
-- DROP TABLE rs_test_analysis;
CREATE TABLE test_analysis (
CREATE TABLE rs_test_analysis (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
......@@ -14,11 +14,16 @@ CREATE TABLE test_analysis (
ALTER TABLE test_analysis ADD
CONSTRAINT PK_test_analysis PRIMARY KEY
ALTER TABLE rs_test_analysis ADD
CONSTRAINT PK_rs_test_analysis PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
CREATE INDEX idx_rs_test_analysis_level_id
ON rs_test_analysis (level_id);
CREATE INDEX idx_rs_test_analysis_candidate_id
ON rs_test_analysis (candidate_id);
-- DROP TABLE it_does_not_matter;
CREATE TABLE it_does_not_matter (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
xxxx image NOT NULL
);
ALTER TABLE it_does_not_matter ADD
CONSTRAINT PK_it_does_not_matter PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
-- DROP TABLE answer;
-- DROP TABLE rs_answer;
CREATE TABLE answer (
CREATE TABLE rs_answer (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
answer_number number(12) NULL,
section_number number(12) NULL,
candidate_id number(12) NULL,
quest_number number(12) NULL
);
ALTER TABLE answer ADD
CONSTRAINT PK_answer PRIMARY KEY
ALTER TABLE rs_answer ADD
CONSTRAINT PK_rs_answer PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
CREATE INDEX idx_rs_answer_candidate_id
ON rs_answer (candidate_id);
-- DROP TABLE candidate;
-- DROP TABLE rs_candidate;
CREATE TABLE candidate (
CREATE TABLE rs_candidate (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
first_name varchar2(30) NULL,
middle_name varchar2(30) NULL,
last_name varchar2(30) NULL,
preferred_name varchar2(30) NULL,
salutation varchar2(10) NULL,
position varchar2(30) NULL,
date_of_birth date NULL,
date_registered date NULL,
gender varchar2(10) NULL,
password varchar2(15) NULL,
date_taken date NULL,
location varchar2(80) NULL,
contact_phone varchar2(80) NULL,
email varchar2(60) NULL,
test_input_id number(12) NULL
);
ALTER TABLE candidate ADD
CONSTRAINT PK_candidate PRIMARY KEY
ALTER TABLE rs_candidate ADD
CONSTRAINT PK_rs_candidate PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_candidate_test_input_id
ON candidate (test_input_id);
CREATE INDEX idx_rs_candidate_test_input_id
ON rs_candidate (test_input_id);
-- DROP TABLE factor;
-- DROP TABLE rs_factor;
CREATE TABLE factor (
CREATE TABLE rs_factor (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
......@@ -14,8 +14,8 @@ CREATE TABLE factor (
ALTER TABLE factor ADD
CONSTRAINT PK_factor PRIMARY KEY
ALTER TABLE rs_factor ADD
CONSTRAINT PK_rs_factor PRIMARY KEY
(
object_id
) ;
......
-- DROP TABLE factor_hdr;
-- DROP TABLE rs_factor_hdr;
CREATE TABLE factor_hdr (
CREATE TABLE rs_factor_hdr (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
......@@ -21,16 +21,16 @@ CREATE TABLE factor_hdr (
ALTER TABLE factor_hdr ADD
CONSTRAINT PK_factor_hdr PRIMARY KEY
ALTER TABLE rs_factor_hdr ADD
CONSTRAINT PK_rs_factor_hdr PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_factor_hdr_level_number
ON factor_hdr (level_number);
CREATE INDEX idx_rs_factor_hdr_level_number
ON rs_factor_hdr (level_number);
CREATE INDEX idx_factor_hdr_factor_number
ON factor_hdr (factor_number);
CREATE INDEX idx_rs_factor_hdr_factor_number
ON rs_factor_hdr (factor_number);
-- DROP TABLE factor_lin;
-- DROP TABLE rs_factor_lin;
CREATE TABLE factor_lin (
CREATE TABLE rs_factor_lin (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
......@@ -16,16 +16,16 @@ CREATE TABLE factor_lin (
ALTER TABLE factor_lin ADD
CONSTRAINT PK_factor_lin PRIMARY KEY
ALTER TABLE rs_factor_lin ADD
CONSTRAINT PK_rs_factor_lin PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_factor_lin_factor_number
ON factor_lin (factor_number);
CREATE INDEX idx_rs_factor_lin_factor_number
ON rs_factor_lin (factor_number);
CREATE INDEX idx_factor_lin_quest_number
ON factor_lin (quest_number);
CREATE INDEX idx_rs_factor_lin_quest_number
ON rs_factor_lin (quest_number);
-- DROP TABLE score;
-- DROP TABLE rs_score;
CREATE TABLE score (
CREATE TABLE rs_score (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
score_number number(12) NULL,
test_analysis_id number(12) NULL,
factor_number number(12) NULL
factor_number number(12) NULL,
level_number number(12) NULL,
narrative_id number(12) NULL
);
ALTER TABLE score ADD
CONSTRAINT PK_score PRIMARY KEY
ALTER TABLE rs_score ADD
CONSTRAINT PK_rs_score PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_score_test_analysis_id
ON score (test_analysis_id);
CREATE INDEX idx_rs_score_test_analysis_id
ON rs_score (test_analysis_id);
CREATE INDEX idx_rs_score_narrative_id
ON rs_score (narrative_id);
-- DROP TABLE level_factor;
-- DROP TABLE rs_level_factor;
CREATE TABLE level_factor (
CREATE TABLE rs_level_factor (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
......@@ -19,19 +19,19 @@ CREATE TABLE level_factor (
ALTER TABLE level_factor ADD
CONSTRAINT PK_level_factor PRIMARY KEY
ALTER TABLE rs_level_factor ADD
CONSTRAINT PK_rs_level_factor PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_level_factor_factor_number
ON level_factor (factor_number);
CREATE INDEX idx_rs_level_factor_factor_number
ON rs_level_factor (factor_number);
CREATE INDEX idx_level_factor_level_number
ON level_factor (level_number);
CREATE INDEX idx_rs_level_factor_level_number
ON rs_level_factor (level_number);
CREATE INDEX idx_level_factor_narrative_id
ON level_factor (narrative_id);
CREATE INDEX idx_rs_level_factor_narrative_id
ON rs_level_factor (narrative_id);
-- DROP TABLE level;
-- DROP TABLE rs_level;
CREATE TABLE level (
CREATE TABLE rs_level (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
......@@ -16,8 +16,8 @@ CREATE TABLE level (
ALTER TABLE level ADD
CONSTRAINT PK_level PRIMARY KEY
ALTER TABLE rs_level ADD
CONSTRAINT PK_rs_level PRIMARY KEY
(
object_id
) ;
......
-- DROP TABLE narrative;
-- DROP TABLE rs_narrative;
CREATE TABLE narrative (
CREATE TABLE rs_narrative (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
......@@ -22,11 +22,13 @@ CREATE TABLE narrative (
ALTER TABLE narrative ADD
CONSTRAINT PK_narrative PRIMARY KEY
ALTER TABLE rs_narrative ADD
CONSTRAINT PK_rs_narrative PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
CREATE INDEX idx_rs_narrative_level_number
ON rs_narrative (level_number);
-- DROP TABLE quest_lin;
-- DROP TABLE rs_quest_lin;
CREATE TABLE quest_lin (
CREATE TABLE rs_quest_lin (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
......@@ -15,13 +15,13 @@ CREATE TABLE quest_lin (
ALTER TABLE quest_lin ADD
CONSTRAINT PK_quest_lin PRIMARY KEY
ALTER TABLE rs_quest_lin ADD
CONSTRAINT PK_rs_quest_lin PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_quest_lin_section_number
ON quest_lin (section_number);
CREATE INDEX idx_rs_quest_lin_section_number
ON rs_quest_lin (section_number);
-- DROP TABLE quest_hdr;
-- DROP TABLE rs_quest_hdr;
CREATE TABLE quest_hdr (
CREATE TABLE rs_quest_hdr (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
......@@ -15,8 +15,8 @@ CREATE TABLE quest_hdr (
ALTER TABLE quest_hdr ADD
CONSTRAINT PK_quest_hdr PRIMARY KEY
ALTER TABLE rs_quest_hdr ADD
CONSTRAINT PK_rs_quest_hdr PRIMARY KEY
(
object_id
) ;
......
-- DROP TABLE test_analysis;
-- DROP TABLE rs_test_analysis;
CREATE TABLE test_analysis (
CREATE TABLE rs_test_analysis (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
......@@ -15,11 +15,16 @@ CREATE TABLE test_analysis (
ALTER TABLE test_analysis ADD
CONSTRAINT PK_test_analysis PRIMARY KEY
ALTER TABLE rs_test_analysis ADD
CONSTRAINT PK_rs_test_analysis PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
CREATE INDEX idx_rs_test_analysis_level_id
ON rs_test_analysis (level_id);
CREATE INDEX idx_rs_test_analysis_candidate_id
ON rs_test_analysis (candidate_id);
-- DROP TABLE it_does_not_matter;
CREATE TABLE it_does_not_matter (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
xxxx blob NOT NULL
);
ALTER TABLE it_does_not_matter ADD
CONSTRAINT PK_it_does_not_matter PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
-- @AutoRun
-- drop table answer;
-- drop table rs_answer;
CREATE TABLE answer (
CREATE TABLE rs_answer (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
answer_number numeric(12) NULL,
section_number numeric(12) NULL,
candidate_id numeric(12) NULL,
quest_number numeric(12) NULL
);
ALTER TABLE answer ADD
CONSTRAINT pk_answer PRIMARY KEY
ALTER TABLE rs_answer ADD
CONSTRAINT pk_rs_answer PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
CREATE INDEX idx_rs_answer_candidate_id
ON rs_answer (candidate_id);
-- @AutoRun
-- drop table candidate;
-- drop table rs_candidate;
CREATE TABLE candidate (
CREATE TABLE rs_candidate (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
first_name varchar(30) NULL,
middle_name varchar(30) NULL,
last_name varchar(30) NULL,
preferred_name varchar(30) NULL,
salutation varchar(10) NULL,
position varchar(30) NULL,
date_of_birth timestamp NULL,
date_registered timestamp NULL,
gender varchar(10) NULL,
password varchar(15) NULL,
date_taken timestamp NULL,
location varchar(80) NULL,
contact_phone varchar(80) NULL,
email varchar(60) NULL,
test_input_id numeric(12) NULL
);
ALTER TABLE candidate ADD
CONSTRAINT pk_candidate PRIMARY KEY
ALTER TABLE rs_candidate ADD
CONSTRAINT pk_rs_candidate PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_candidate_test_input_id
ON candidate (test_input_id);
CREATE INDEX idx_rs_candidate_test_input_id
ON rs_candidate (test_input_id);
-- @AutoRun
-- drop table factor;
-- drop table rs_factor;
CREATE TABLE factor (
CREATE TABLE rs_factor (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
......@@ -14,8 +14,8 @@ CREATE TABLE factor (
ALTER TABLE factor ADD
CONSTRAINT pk_factor PRIMARY KEY
ALTER TABLE rs_factor ADD
CONSTRAINT pk_rs_factor PRIMARY KEY
(
object_id
) ;
......
-- @AutoRun
-- drop table factor_hdr;
-- drop table rs_factor_hdr;
CREATE TABLE factor_hdr (
CREATE TABLE rs_factor_hdr (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
......@@ -21,16 +21,16 @@ CREATE TABLE factor_hdr (
ALTER TABLE factor_hdr ADD
CONSTRAINT pk_factor_hdr PRIMARY KEY
ALTER TABLE rs_factor_hdr ADD
CONSTRAINT pk_rs_factor_hdr PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_factor_hdr_level_number
ON factor_hdr (level_number);
CREATE INDEX idx_rs_factor_hdr_level_number
ON rs_factor_hdr (level_number);
CREATE INDEX idx_factor_hdr_factor_number
ON factor_hdr (factor_number);
CREATE INDEX idx_rs_factor_hdr_factor_number
ON rs_factor_hdr (factor_number);
-- @AutoRun
-- drop table factor_lin;
-- drop table rs_factor_lin;
CREATE TABLE factor_lin (
CREATE TABLE rs_factor_lin (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
......@@ -16,16 +16,16 @@ CREATE TABLE factor_lin (
ALTER TABLE factor_lin ADD
CONSTRAINT pk_factor_lin PRIMARY KEY
ALTER TABLE rs_factor_lin ADD
CONSTRAINT pk_rs_factor_lin PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_factor_lin_factor_number
ON factor_lin (factor_number);
CREATE INDEX idx_rs_factor_lin_factor_number
ON rs_factor_lin (factor_number);
CREATE INDEX idx_factor_lin_quest_number
ON factor_lin (quest_number);
CREATE INDEX idx_rs_factor_lin_quest_number
ON rs_factor_lin (quest_number);
-- @AutoRun
-- drop table score;
-- drop table rs_score;
CREATE TABLE score (
CREATE TABLE rs_score (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
score_number numeric(12) NULL,
test_analysis_id numeric(12) NULL,
factor_number numeric(12) NULL
factor_number numeric(12) NULL,
level_number numeric(12) NULL,
narrative_id numeric(12) NULL
);
ALTER TABLE score ADD
CONSTRAINT pk_score PRIMARY KEY
ALTER TABLE rs_score ADD
CONSTRAINT pk_rs_score PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_score_test_analysis_id
ON score (test_analysis_id);
CREATE INDEX idx_rs_score_test_analysis_id
ON rs_score (test_analysis_id);
CREATE INDEX idx_rs_score_narrative_id
ON rs_score (narrative_id);
-- @AutoRun
-- drop table level_factor;
-- drop table rs_level_factor;
CREATE TABLE level_factor (
CREATE TABLE rs_level_factor (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
......@@ -19,19 +19,19 @@ CREATE TABLE level_factor (
ALTER TABLE level_factor ADD
CONSTRAINT pk_level_factor PRIMARY KEY
ALTER TABLE rs_level_factor ADD
CONSTRAINT pk_rs_level_factor PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_level_factor_factor_number
ON level_factor (factor_number);
CREATE INDEX idx_rs_level_factor_factor_number
ON rs_level_factor (factor_number);
CREATE INDEX idx_level_factor_level_number
ON level_factor (level_number);
CREATE INDEX idx_rs_level_factor_level_number
ON rs_level_factor (level_number);
CREATE INDEX idx_level_factor_narrative_id
ON level_factor (narrative_id);
CREATE INDEX idx_rs_level_factor_narrative_id
ON rs_level_factor (narrative_id);
-- @AutoRun
-- drop table level;
-- drop table rs_level;
CREATE TABLE level (
CREATE TABLE rs_level (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
......@@ -16,8 +16,8 @@ CREATE TABLE level (
ALTER TABLE level ADD
CONSTRAINT pk_level PRIMARY KEY
ALTER TABLE rs_level ADD
CONSTRAINT pk_rs_level PRIMARY KEY
(
object_id
) ;
......
-- @AutoRun
-- drop table narrative;
-- drop table rs_narrative;
CREATE TABLE narrative (
CREATE TABLE rs_narrative (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
......@@ -22,11 +22,13 @@ CREATE TABLE narrative (
ALTER TABLE narrative ADD
CONSTRAINT pk_narrative PRIMARY KEY
ALTER TABLE rs_narrative ADD
CONSTRAINT pk_rs_narrative PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
CREATE INDEX idx_rs_narrative_level_number
ON rs_narrative (level_number);
-- @AutoRun
-- drop table quest_lin;
-- drop table rs_quest_lin;
CREATE TABLE quest_lin (
CREATE TABLE rs_quest_lin (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
......@@ -15,13 +15,13 @@ CREATE TABLE quest_lin (
ALTER TABLE quest_lin ADD
CONSTRAINT pk_quest_lin PRIMARY KEY
ALTER TABLE rs_quest_lin ADD
CONSTRAINT pk_rs_quest_lin PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_quest_lin_section_number
ON quest_lin (section_number);
CREATE INDEX idx_rs_quest_lin_section_number
ON rs_quest_lin (section_number);
-- @AutoRun
-- drop table quest_hdr;
-- drop table rs_quest_hdr;
CREATE TABLE quest_hdr (
CREATE TABLE rs_quest_hdr (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
......@@ -15,8 +15,8 @@ CREATE TABLE quest_hdr (
ALTER TABLE quest_hdr ADD
CONSTRAINT pk_quest_hdr PRIMARY KEY
ALTER TABLE rs_quest_hdr ADD
CONSTRAINT pk_rs_quest_hdr PRIMARY KEY
(
object_id
) ;
......
-- @AutoRun
-- drop table test_analysis;
-- drop table rs_test_analysis;
CREATE TABLE test_analysis (
CREATE TABLE rs_test_analysis (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
......@@ -15,11 +15,16 @@ CREATE TABLE test_analysis (
ALTER TABLE test_analysis ADD
CONSTRAINT pk_test_analysis PRIMARY KEY
ALTER TABLE rs_test_analysis ADD
CONSTRAINT pk_rs_test_analysis PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
CREATE INDEX idx_rs_test_analysis_level_id
ON rs_test_analysis (level_id);
CREATE INDEX idx_rs_test_analysis_candidate_id
ON rs_test_analysis (candidate_id);
-- @AutoRun
-- drop table it_does_not_matter;
CREATE TABLE it_does_not_matter (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
xxxx bytea NOT NULL
);
ALTER TABLE it_does_not_matter ADD
CONSTRAINT pk_it_does_not_matter PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
......@@ -10,4 +10,10 @@ public class Answer extends BaseAnswer
{
// Do not add any code to this, always put it in initialiseNewObject
}
@Override
public String getObjectIDSpace()
{
return "Answer";
}
}
\ No newline at end of file
......@@ -4,17 +4,17 @@
<BUSINESSCLASS name="Answer" package="performa.orm">
<TABLE name="answer" tablePrefix="object" polymorphic="FALSE">
<TABLE name="rs_answer" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="AnswerNo" type="Integer" dbcol="answer_number"/>
<!--<SINGLEREFERENCE name="Section" type="Section" dbcol="section_number" />-->
<SINGLEREFERENCE name="Candidate" type="Candidate" dbcol="candidate_id" />
<SINGLEREFERENCE name="Question" type="Question" dbcol="quest_number" />
<SINGLEREFERENCE name="Section" type="Section" dbcol="section_number" />
<SINGLEREFERENCE name="Candidate" type="Candidate" dbcol="candidate_id" backreferenceName="Answers"/>
<SINGLEREFERENCE name="Question" type="Question" dbcol="quest_number" />
</TABLE>
<SEARCH type="All" paramFilter="answer.object_id is not null" orderBy="answer.object_id" />
<SEARCH type="All" paramFilter="rs_answer.object_id is not null" orderBy="rs_answer.object_id" />
</BUSINESSCLASS>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -923,7 +923,7 @@ public abstract class BaseFactor extends BaseBusinessClass
public String getBaseSetName ()
{
return "factor";
return "rs_factor";
}
......@@ -944,10 +944,10 @@ public abstract class BaseFactor extends BaseBusinessClass
super.getPersistentSets (allSets);
PersistentSet factorPSet = allSets.getPersistentSet (myID, "factor", myPSetStatus);
PersistentSet rs_factorPSet = allSets.getPersistentSet (myID, "rs_factor", myPSetStatus);
factorPSet.setAttrib (FIELD_ObjectID, myID);
factorPSet.setAttrib (FIELD_Description, HELPER_Description.toObject (_Description)); //
rs_factorPSet.setAttrib (FIELD_ObjectID, myID);
rs_factorPSet.setAttrib (FIELD_Description, HELPER_Description.toObject (_Description)); //
}
......@@ -960,9 +960,9 @@ public abstract class BaseFactor extends BaseBusinessClass
super.setFromPersistentSets (objectID, allSets);
PersistentSet factorPSet = allSets.getPersistentSet (objectID, "factor");
PersistentSet rs_factorPSet = allSets.getPersistentSet (objectID, "rs_factor");
_Description = (String)(HELPER_Description.fromObject (_Description, factorPSet.getAttrib (FIELD_Description))); //
_Description = (String)(HELPER_Description.fromObject (_Description, rs_factorPSet.getAttrib (FIELD_Description))); //
}
......@@ -1186,26 +1186,26 @@ public abstract class BaseFactor extends BaseBusinessClass
public SearchAll andObjectID (QueryFilter<Long> filter)
{
filter.addFilter (context, "factor.object_id", FIELD_ObjectID);
filter.addFilter (context, "rs_factor.object_id", FIELD_ObjectID);
return this;
}
public SearchAll andObjectCreated (QueryFilter<Date> filter)
{
filter.addFilter (context, "factor.object_created_date", FIELD_ObjectCreated);
filter.addFilter (context, "rs_factor.object_created_date", FIELD_ObjectCreated);
return this;
}
public SearchAll andObjectLastModified (QueryFilter<Date> filter)
{
filter.addFilter (context, "factor.object_last_updated_date", FIELD_ObjectLastModified);
filter.addFilter (context, "rs_factor.object_last_updated_date", FIELD_ObjectLastModified);
return this;
}
public SearchAll andDescription (QueryFilter<String> filter)
{
filter.addFilter (context, "factor.factor_hdr_desc", "Description");
filter.addFilter (context, "rs_factor.factor_hdr_desc", "Description");
return this;
}
......
......@@ -308,8 +308,8 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
{
super._initialiseAssociations ();
_Level = new SingleAssociation<FactorLevelLink, Level> (this, SINGLEREFERENCE_Level, Level.MULTIPLEREFERENCE_Factors, Level.REFERENCE_Level, "factor_hdr");
_Factor = new SingleAssociation<FactorLevelLink, Factor> (this, SINGLEREFERENCE_Factor, Factor.MULTIPLEREFERENCE_Levels, Factor.REFERENCE_Factor, "factor_hdr");
_Level = new SingleAssociation<FactorLevelLink, Level> (this, SINGLEREFERENCE_Level, Level.MULTIPLEREFERENCE_Factors, Level.REFERENCE_Level, "rs_factor_hdr");
_Factor = new SingleAssociation<FactorLevelLink, Factor> (this, SINGLEREFERENCE_Factor, Factor.MULTIPLEREFERENCE_Levels, Factor.REFERENCE_Factor, "rs_factor_hdr");
}
......@@ -319,8 +319,8 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
{
super.initialiseReference ();
_Level = new SingleAssociation<FactorLevelLink, Level> (this, SINGLEREFERENCE_Level, Level.MULTIPLEREFERENCE_Factors, Level.REFERENCE_Level, "factor_hdr");
_Factor = new SingleAssociation<FactorLevelLink, Factor> (this, SINGLEREFERENCE_Factor, Factor.MULTIPLEREFERENCE_Levels, Factor.REFERENCE_Factor, "factor_hdr");
_Level = new SingleAssociation<FactorLevelLink, Level> (this, SINGLEREFERENCE_Level, Level.MULTIPLEREFERENCE_Factors, Level.REFERENCE_Level, "rs_factor_hdr");
_Factor = new SingleAssociation<FactorLevelLink, Factor> (this, SINGLEREFERENCE_Factor, Factor.MULTIPLEREFERENCE_Levels, Factor.REFERENCE_Factor, "rs_factor_hdr");
return this;
......@@ -1432,7 +1432,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
public String getBaseSetName ()
{
return "factor_hdr";
return "rs_factor_hdr";
}
......@@ -1453,15 +1453,15 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
super.getPersistentSets (allSets);
PersistentSet factor_hdrPSet = allSets.getPersistentSet (myID, "factor_hdr", myPSetStatus);
PersistentSet rs_factor_hdrPSet = allSets.getPersistentSet (myID, "rs_factor_hdr", myPSetStatus);
factor_hdrPSet.setAttrib (FIELD_ObjectID, myID);
factor_hdrPSet.setAttrib (FIELD_ClassCode, HELPER_ClassCode.toObject (_ClassCode)); //
factor_hdrPSet.setAttrib (FIELD_Notes, HELPER_Notes.toObject (_Notes)); //
factor_hdrPSet.setAttrib (FIELD_LeftAnnot, HELPER_LeftAnnot.toObject (_LeftAnnot)); //
factor_hdrPSet.setAttrib (FIELD_RightAnnot, HELPER_RightAnnot.toObject (_RightAnnot)); //
factor_hdrPSet.setAttrib (FIELD_ZScoreWeight, HELPER_ZScoreWeight.toObject (_ZScoreWeight)); //
factor_hdrPSet.setAttrib (FIELD_ZScoreWeight2, HELPER_ZScoreWeight2.toObject (_ZScoreWeight2)); //
rs_factor_hdrPSet.setAttrib (FIELD_ObjectID, myID);
rs_factor_hdrPSet.setAttrib (FIELD_ClassCode, HELPER_ClassCode.toObject (_ClassCode)); //
rs_factor_hdrPSet.setAttrib (FIELD_Notes, HELPER_Notes.toObject (_Notes)); //
rs_factor_hdrPSet.setAttrib (FIELD_LeftAnnot, HELPER_LeftAnnot.toObject (_LeftAnnot)); //
rs_factor_hdrPSet.setAttrib (FIELD_RightAnnot, HELPER_RightAnnot.toObject (_RightAnnot)); //
rs_factor_hdrPSet.setAttrib (FIELD_ZScoreWeight, HELPER_ZScoreWeight.toObject (_ZScoreWeight)); //
rs_factor_hdrPSet.setAttrib (FIELD_ZScoreWeight2, HELPER_ZScoreWeight2.toObject (_ZScoreWeight2)); //
_Level.getPersistentSets (allSets);
_Factor.getPersistentSets (allSets);
......@@ -1476,14 +1476,14 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
super.setFromPersistentSets (objectID, allSets);
PersistentSet factor_hdrPSet = allSets.getPersistentSet (objectID, "factor_hdr");
PersistentSet rs_factor_hdrPSet = allSets.getPersistentSet (objectID, "rs_factor_hdr");
_ClassCode = (String)(HELPER_ClassCode.fromObject (_ClassCode, factor_hdrPSet.getAttrib (FIELD_ClassCode))); //
_Notes = (String)(HELPER_Notes.fromObject (_Notes, factor_hdrPSet.getAttrib (FIELD_Notes))); //
_LeftAnnot = (String)(HELPER_LeftAnnot.fromObject (_LeftAnnot, factor_hdrPSet.getAttrib (FIELD_LeftAnnot))); //
_RightAnnot = (String)(HELPER_RightAnnot.fromObject (_RightAnnot, factor_hdrPSet.getAttrib (FIELD_RightAnnot))); //
_ZScoreWeight = (Double)(HELPER_ZScoreWeight.fromObject (_ZScoreWeight, factor_hdrPSet.getAttrib (FIELD_ZScoreWeight))); //
_ZScoreWeight2 = (Double)(HELPER_ZScoreWeight2.fromObject (_ZScoreWeight2, factor_hdrPSet.getAttrib (FIELD_ZScoreWeight2))); //
_ClassCode = (String)(HELPER_ClassCode.fromObject (_ClassCode, rs_factor_hdrPSet.getAttrib (FIELD_ClassCode))); //
_Notes = (String)(HELPER_Notes.fromObject (_Notes, rs_factor_hdrPSet.getAttrib (FIELD_Notes))); //
_LeftAnnot = (String)(HELPER_LeftAnnot.fromObject (_LeftAnnot, rs_factor_hdrPSet.getAttrib (FIELD_LeftAnnot))); //
_RightAnnot = (String)(HELPER_RightAnnot.fromObject (_RightAnnot, rs_factor_hdrPSet.getAttrib (FIELD_RightAnnot))); //
_ZScoreWeight = (Double)(HELPER_ZScoreWeight.fromObject (_ZScoreWeight, rs_factor_hdrPSet.getAttrib (FIELD_ZScoreWeight))); //
_ZScoreWeight2 = (Double)(HELPER_ZScoreWeight2.fromObject (_ZScoreWeight2, rs_factor_hdrPSet.getAttrib (FIELD_ZScoreWeight2))); //
_Level.setFromPersistentSets (objectID, allSets);
_Factor.setFromPersistentSets (objectID, allSets);
......@@ -1813,68 +1813,68 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
public SearchAll andObjectID (QueryFilter<Long> filter)
{
filter.addFilter (context, "factor_hdr.object_id", FIELD_ObjectID);
filter.addFilter (context, "rs_factor_hdr.object_id", FIELD_ObjectID);
return this;
}
public SearchAll andObjectCreated (QueryFilter<Date> filter)
{
filter.addFilter (context, "factor_hdr.object_created_date", FIELD_ObjectCreated);
filter.addFilter (context, "rs_factor_hdr.object_created_date", FIELD_ObjectCreated);
return this;
}
public SearchAll andObjectLastModified (QueryFilter<Date> filter)
{
filter.addFilter (context, "factor_hdr.object_last_updated_date", FIELD_ObjectLastModified);
filter.addFilter (context, "rs_factor_hdr.object_last_updated_date", FIELD_ObjectLastModified);
return this;
}
public SearchAll andClassCode (QueryFilter<String> filter)
{
filter.addFilter (context, "factor_hdr.class_code", "ClassCode");
filter.addFilter (context, "rs_factor_hdr.class_code", "ClassCode");
return this;
}
public SearchAll andNotes (QueryFilter<String> filter)
{
filter.addFilter (context, "factor_hdr.factor_hdr_notes", "Notes");
filter.addFilter (context, "rs_factor_hdr.factor_hdr_notes", "Notes");
return this;
}
public SearchAll andLeftAnnot (QueryFilter<String> filter)
{
filter.addFilter (context, "factor_hdr.left_annot", "LeftAnnot");
filter.addFilter (context, "rs_factor_hdr.left_annot", "LeftAnnot");
return this;
}
public SearchAll andRightAnnot (QueryFilter<String> filter)
{
filter.addFilter (context, "factor_hdr.right_annot", "RightAnnot");
filter.addFilter (context, "rs_factor_hdr.right_annot", "RightAnnot");
return this;
}
public SearchAll andZScoreWeight (QueryFilter<Double> filter)
{
filter.addFilter (context, "factor_hdr.z_score_wght", "ZScoreWeight");
filter.addFilter (context, "rs_factor_hdr.z_score_wght", "ZScoreWeight");
return this;
}
public SearchAll andZScoreWeight2 (QueryFilter<Double> filter)
{
filter.addFilter (context, "factor_hdr.z_score_wght_2", "ZScoreWeight2");
filter.addFilter (context, "rs_factor_hdr.z_score_wght_2", "ZScoreWeight2");
return this;
}
public SearchAll andLevel (QueryFilter<Level> filter)
{
filter.addFilter (context, "factor_hdr.level_number", "Level");
filter.addFilter (context, "rs_factor_hdr.level_number", "Level");
return this;
}
public SearchAll andFactor (QueryFilter<Factor> filter)
{
filter.addFilter (context, "factor_hdr.factor_number", "Factor");
filter.addFilter (context, "rs_factor_hdr.factor_number", "Factor");
return this;
}
......
......@@ -185,8 +185,8 @@ public abstract class BaseFactorQuestionLink extends BaseBusinessClass
{
super._initialiseAssociations ();
_Factor = new SingleAssociation<FactorQuestionLink, Factor> (this, SINGLEREFERENCE_Factor, Factor.MULTIPLEREFERENCE_Questions, Factor.REFERENCE_Factor, "factor_lin");
_Question = new SingleAssociation<FactorQuestionLink, Question> (this, SINGLEREFERENCE_Question, Question.MULTIPLEREFERENCE_Factors, Question.REFERENCE_Question, "factor_lin");
_Factor = new SingleAssociation<FactorQuestionLink, Factor> (this, SINGLEREFERENCE_Factor, Factor.MULTIPLEREFERENCE_Questions, Factor.REFERENCE_Factor, "rs_factor_lin");
_Question = new SingleAssociation<FactorQuestionLink, Question> (this, SINGLEREFERENCE_Question, Question.MULTIPLEREFERENCE_Factors, Question.REFERENCE_Question, "rs_factor_lin");
}
......@@ -196,8 +196,8 @@ public abstract class BaseFactorQuestionLink extends BaseBusinessClass
{
super.initialiseReference ();
_Factor = new SingleAssociation<FactorQuestionLink, Factor> (this, SINGLEREFERENCE_Factor, Factor.MULTIPLEREFERENCE_Questions, Factor.REFERENCE_Factor, "factor_lin");
_Question = new SingleAssociation<FactorQuestionLink, Question> (this, SINGLEREFERENCE_Question, Question.MULTIPLEREFERENCE_Factors, Question.REFERENCE_Question, "factor_lin");
_Factor = new SingleAssociation<FactorQuestionLink, Factor> (this, SINGLEREFERENCE_Factor, Factor.MULTIPLEREFERENCE_Questions, Factor.REFERENCE_Factor, "rs_factor_lin");
_Question = new SingleAssociation<FactorQuestionLink, Question> (this, SINGLEREFERENCE_Question, Question.MULTIPLEREFERENCE_Factors, Question.REFERENCE_Question, "rs_factor_lin");
return this;
......@@ -819,7 +819,7 @@ public abstract class BaseFactorQuestionLink extends BaseBusinessClass
public String getBaseSetName ()
{
return "factor_lin";
return "rs_factor_lin";
}
......@@ -840,10 +840,10 @@ public abstract class BaseFactorQuestionLink extends BaseBusinessClass
super.getPersistentSets (allSets);
PersistentSet factor_linPSet = allSets.getPersistentSet (myID, "factor_lin", myPSetStatus);
PersistentSet rs_factor_linPSet = allSets.getPersistentSet (myID, "rs_factor_lin", myPSetStatus);
factor_linPSet.setAttrib (FIELD_ObjectID, myID);
factor_linPSet.setAttrib (FIELD_ReverseScore, HELPER_ReverseScore.toObject (_ReverseScore)); //
rs_factor_linPSet.setAttrib (FIELD_ObjectID, myID);
rs_factor_linPSet.setAttrib (FIELD_ReverseScore, HELPER_ReverseScore.toObject (_ReverseScore)); //
_Factor.getPersistentSets (allSets);
_Question.getPersistentSets (allSets);
......@@ -858,9 +858,9 @@ public abstract class BaseFactorQuestionLink extends BaseBusinessClass
super.setFromPersistentSets (objectID, allSets);
PersistentSet factor_linPSet = allSets.getPersistentSet (objectID, "factor_lin");
PersistentSet rs_factor_linPSet = allSets.getPersistentSet (objectID, "rs_factor_lin");
_ReverseScore = (Boolean)(HELPER_ReverseScore.fromObject (_ReverseScore, factor_linPSet.getAttrib (FIELD_ReverseScore))); //
_ReverseScore = (Boolean)(HELPER_ReverseScore.fromObject (_ReverseScore, rs_factor_linPSet.getAttrib (FIELD_ReverseScore))); //
_Factor.setFromPersistentSets (objectID, allSets);
_Question.setFromPersistentSets (objectID, allSets);
......@@ -1085,38 +1085,38 @@ public abstract class BaseFactorQuestionLink extends BaseBusinessClass
public SearchAll andObjectID (QueryFilter<Long> filter)
{
filter.addFilter (context, "factor_lin.object_id", FIELD_ObjectID);
filter.addFilter (context, "rs_factor_lin.object_id", FIELD_ObjectID);
return this;
}
public SearchAll andObjectCreated (QueryFilter<Date> filter)
{
filter.addFilter (context, "factor_lin.object_created_date", FIELD_ObjectCreated);
filter.addFilter (context, "rs_factor_lin.object_created_date", FIELD_ObjectCreated);
return this;
}
public SearchAll andObjectLastModified (QueryFilter<Date> filter)
{
filter.addFilter (context, "factor_lin.object_last_updated_date", FIELD_ObjectLastModified);
filter.addFilter (context, "rs_factor_lin.object_last_updated_date", FIELD_ObjectLastModified);
return this;
}
public SearchAll andReverseScore (QueryFilter<Boolean> filter)
{
filter.addFilter (context, "factor_lin.reverse_score_flag", "ReverseScore");
filter.addFilter (context, "rs_factor_lin.reverse_score_flag", "ReverseScore");
return this;
}
public SearchAll andFactor (QueryFilter<Factor> filter)
{
filter.addFilter (context, "factor_lin.factor_number", "Factor");
filter.addFilter (context, "rs_factor_lin.factor_number", "Factor");
return this;
}
public SearchAll andQuestion (QueryFilter<Question> filter)
{
filter.addFilter (context, "factor_lin.quest_number", "Question");
filter.addFilter (context, "rs_factor_lin.quest_number", "Question");
return this;
}
......
......@@ -185,7 +185,7 @@ public abstract class BaseQuestion extends BaseBusinessClass
{
super._initialiseAssociations ();
_Section = new SingleAssociation<Question, Section> (this, SINGLEREFERENCE_Section, Section.MULTIPLEREFERENCE_Questions, Section.REFERENCE_Section, "quest_lin");
_Section = new SingleAssociation<Question, Section> (this, SINGLEREFERENCE_Section, Section.MULTIPLEREFERENCE_Questions, Section.REFERENCE_Section, "rs_quest_lin");
_Factors = new MultipleAssociation<Question, FactorQuestionLink> (this, MULTIPLEREFERENCE_Factors, FactorQuestionLink.SINGLEREFERENCE_Question, FactorQuestionLink.REFERENCE_FactorQuestionLink);
}
......@@ -196,7 +196,7 @@ public abstract class BaseQuestion extends BaseBusinessClass
{
super.initialiseReference ();
_Section = new SingleAssociation<Question, Section> (this, SINGLEREFERENCE_Section, Section.MULTIPLEREFERENCE_Questions, Section.REFERENCE_Section, "quest_lin");
_Section = new SingleAssociation<Question, Section> (this, SINGLEREFERENCE_Section, Section.MULTIPLEREFERENCE_Questions, Section.REFERENCE_Section, "rs_quest_lin");
_Factors = new MultipleAssociation<Question, FactorQuestionLink> (this, MULTIPLEREFERENCE_Factors, FactorQuestionLink.SINGLEREFERENCE_Question, FactorQuestionLink.REFERENCE_FactorQuestionLink);
......@@ -800,7 +800,7 @@ public abstract class BaseQuestion extends BaseBusinessClass
public String getBaseSetName ()
{
return "quest_lin";
return "rs_quest_lin";
}
......@@ -821,10 +821,10 @@ public abstract class BaseQuestion extends BaseBusinessClass
super.getPersistentSets (allSets);
PersistentSet quest_linPSet = allSets.getPersistentSet (myID, "quest_lin", myPSetStatus);
PersistentSet rs_quest_linPSet = allSets.getPersistentSet (myID, "rs_quest_lin", myPSetStatus);
quest_linPSet.setAttrib (FIELD_ObjectID, myID);
quest_linPSet.setAttrib (FIELD_Description, HELPER_Description.toObject (_Description)); //
rs_quest_linPSet.setAttrib (FIELD_ObjectID, myID);
rs_quest_linPSet.setAttrib (FIELD_Description, HELPER_Description.toObject (_Description)); //
_Section.getPersistentSets (allSets);
}
......@@ -838,9 +838,9 @@ public abstract class BaseQuestion extends BaseBusinessClass
super.setFromPersistentSets (objectID, allSets);
PersistentSet quest_linPSet = allSets.getPersistentSet (objectID, "quest_lin");
PersistentSet rs_quest_linPSet = allSets.getPersistentSet (objectID, "rs_quest_lin");
_Description = (String)(HELPER_Description.fromObject (_Description, quest_linPSet.getAttrib (FIELD_Description))); //
_Description = (String)(HELPER_Description.fromObject (_Description, rs_quest_linPSet.getAttrib (FIELD_Description))); //
_Section.setFromPersistentSets (objectID, allSets);
}
......@@ -1060,32 +1060,32 @@ public abstract class BaseQuestion extends BaseBusinessClass
public SearchAll andObjectID (QueryFilter<Long> filter)
{
filter.addFilter (context, "quest_lin.object_id", FIELD_ObjectID);
filter.addFilter (context, "rs_quest_lin.object_id", FIELD_ObjectID);
return this;
}
public SearchAll andObjectCreated (QueryFilter<Date> filter)
{
filter.addFilter (context, "quest_lin.object_created_date", FIELD_ObjectCreated);
filter.addFilter (context, "rs_quest_lin.object_created_date", FIELD_ObjectCreated);
return this;
}
public SearchAll andObjectLastModified (QueryFilter<Date> filter)
{
filter.addFilter (context, "quest_lin.object_last_updated_date", FIELD_ObjectLastModified);
filter.addFilter (context, "rs_quest_lin.object_last_updated_date", FIELD_ObjectLastModified);
return this;
}
public SearchAll andDescription (QueryFilter<String> filter)
{
filter.addFilter (context, "quest_lin.left_quest", "Description");
filter.addFilter (context, "rs_quest_lin.left_quest", "Description");
return this;
}
public SearchAll andSection (QueryFilter<Section> filter)
{
filter.addFilter (context, "quest_lin.section_number", "Section");
filter.addFilter (context, "rs_quest_lin.section_number", "Section");
return this;
}
......
......@@ -762,7 +762,7 @@ public abstract class BaseSection extends BaseBusinessClass
public String getBaseSetName ()
{
return "quest_hdr";
return "rs_quest_hdr";
}
......@@ -783,11 +783,11 @@ public abstract class BaseSection extends BaseBusinessClass
super.getPersistentSets (allSets);
PersistentSet quest_hdrPSet = allSets.getPersistentSet (myID, "quest_hdr", myPSetStatus);
PersistentSet rs_quest_hdrPSet = allSets.getPersistentSet (myID, "rs_quest_hdr", myPSetStatus);
quest_hdrPSet.setAttrib (FIELD_ObjectID, myID);
quest_hdrPSet.setAttrib (FIELD_Description, HELPER_Description.toObject (_Description)); //
quest_hdrPSet.setAttrib (FIELD_QuestionType, HELPER_QuestionType.toObject (_QuestionType)); //
rs_quest_hdrPSet.setAttrib (FIELD_ObjectID, myID);
rs_quest_hdrPSet.setAttrib (FIELD_Description, HELPER_Description.toObject (_Description)); //
rs_quest_hdrPSet.setAttrib (FIELD_QuestionType, HELPER_QuestionType.toObject (_QuestionType)); //
}
......@@ -800,10 +800,10 @@ public abstract class BaseSection extends BaseBusinessClass
super.setFromPersistentSets (objectID, allSets);
PersistentSet quest_hdrPSet = allSets.getPersistentSet (objectID, "quest_hdr");
PersistentSet rs_quest_hdrPSet = allSets.getPersistentSet (objectID, "rs_quest_hdr");
_Description = (String)(HELPER_Description.fromObject (_Description, quest_hdrPSet.getAttrib (FIELD_Description))); //
_QuestionType = (QuestionType)(HELPER_QuestionType.fromObject (_QuestionType, quest_hdrPSet.getAttrib (FIELD_QuestionType))); //
_Description = (String)(HELPER_Description.fromObject (_Description, rs_quest_hdrPSet.getAttrib (FIELD_Description))); //
_QuestionType = (QuestionType)(HELPER_QuestionType.fromObject (_QuestionType, rs_quest_hdrPSet.getAttrib (FIELD_QuestionType))); //
}
......@@ -1030,32 +1030,32 @@ public abstract class BaseSection extends BaseBusinessClass
public SearchAll andObjectID (QueryFilter<Long> filter)
{
filter.addFilter (context, "quest_hdr.object_id", FIELD_ObjectID);
filter.addFilter (context, "rs_quest_hdr.object_id", FIELD_ObjectID);
return this;
}
public SearchAll andObjectCreated (QueryFilter<Date> filter)
{
filter.addFilter (context, "quest_hdr.object_created_date", FIELD_ObjectCreated);
filter.addFilter (context, "rs_quest_hdr.object_created_date", FIELD_ObjectCreated);
return this;
}
public SearchAll andObjectLastModified (QueryFilter<Date> filter)
{
filter.addFilter (context, "quest_hdr.object_last_updated_date", FIELD_ObjectLastModified);
filter.addFilter (context, "rs_quest_hdr.object_last_updated_date", FIELD_ObjectLastModified);
return this;
}
public SearchAll andDescription (QueryFilter<String> filter)
{
filter.addFilter (context, "quest_hdr.quest_hdr_desc", "Description");
filter.addFilter (context, "rs_quest_hdr.quest_hdr_desc", "Description");
return this;
}
public SearchAll andQuestionType (QueryFilter<QuestionType> filter)
{
filter.addFilter (context, "quest_hdr.quest_type_flag", "QuestionType");
filter.addFilter (context, "rs_quest_hdr.quest_type_flag", "QuestionType");
return this;
}
......
......@@ -28,6 +28,7 @@ import oneit.utils.parsers.FieldException;
import oneit.servlets.orm.*;
// __#BUILD_NO_TABLE_NAME#: No table name == No persistence manager and scripts required.
public abstract class BaseTestInput extends NonPersistentBO
{
......@@ -119,7 +120,6 @@ public abstract class BaseTestInput extends NonPersistentBO
metaInfo.put ("attribHelper", "BLOBAttributeHelper");
metaInfo.put ("attribHelperInstance", "BLOBAttributeHelper.INSTANCE");
metaInfo.put ("binaryHandler", "loggedin");
metaInfo.put ("dbcol", "xxxx");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "CSV");
metaInfo.put ("type", "BinaryContent");
......@@ -642,7 +642,7 @@ public abstract class BaseTestInput extends NonPersistentBO
public String getBaseSetName ()
{
return "it_does_not_matter";
return "";
}
......@@ -663,10 +663,10 @@ public abstract class BaseTestInput extends NonPersistentBO
super.getPersistentSets (allSets);
PersistentSet it_does_not_matterPSet = allSets.getPersistentSet (myID, "it_does_not_matter", myPSetStatus);
PersistentSet PSet = allSets.getPersistentSet (myID, "", myPSetStatus);
it_does_not_matterPSet.setAttrib (FIELD_ObjectID, myID);
it_does_not_matterPSet.setAttrib (FIELD_CSV, HELPER_CSV.toObject (_CSV)); //
PSet.setAttrib (FIELD_ObjectID, myID);
PSet.setAttrib (FIELD_CSV, HELPER_CSV.toObject (_CSV)); //
}
......@@ -679,9 +679,9 @@ public abstract class BaseTestInput extends NonPersistentBO
super.setFromPersistentSets (objectID, allSets);
PersistentSet it_does_not_matterPSet = allSets.getPersistentSet (objectID, "it_does_not_matter");
PersistentSet PSet = allSets.getPersistentSet (objectID, "");
_CSV = (BinaryContent)(HELPER_CSV.fromObject (_CSV, it_does_not_matterPSet.getAttrib (FIELD_CSV))); //
_CSV = (BinaryContent)(HELPER_CSV.fromObject (_CSV, PSet.getAttrib (FIELD_CSV))); //
}
......@@ -973,6 +973,13 @@ public abstract class BaseTestInput extends NonPersistentBO
super.putUnwriteable (fields);
}
// This generally means there's no specific persistence manager and we don't read or write from a table
public boolean hasNoTable()
{
return true;
}
public List<AbstractAttribute> getAttributes ()
{
List result = super.getAttributes ();
......
......@@ -10,4 +10,10 @@ public class Candidate extends BaseCandidate
{
// Do not add any code to this, always put it in initialiseNewObject
}
@Override
public String getObjectIDSpace()
{
return "Candidate";
}
}
\ No newline at end of file
......@@ -4,28 +4,17 @@
<BUSINESSCLASS name="Candidate" package="performa.orm">
<TABLE name="candidate" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="FirstName" type="String" dbcol="first_name" length="30"/>
<ATTRIB name="MiddleName" type="String" dbcol="middle_name" length="30"/>
<ATTRIB name="LastName" type="String" dbcol="last_name" length="30"/>
<ATTRIB name="PreferredName" type="String" dbcol="preferred_name" length="30"/>
<ATTRIB name="Salutation" type="String" dbcol="salutation" length="10"/>
<ATTRIB name="Position" type="String" dbcol="position" length="30"/>
<ATTRIB name="DateOfBirth" type="Date" dbcol="date_of_birth"/>
<ATTRIB name="DateRegistered" type="Date" dbcol="date_registered"/>
<ATTRIB name="Gender" type="String" dbcol="gender" length="10"/>
<ATTRIB name="Password" type="String" dbcol="password" length="15"/>
<ATTRIB name="DateTaken" type="Date" dbcol="date_taken"/>
<ATTRIB name="Location" type="String" dbcol="location" length="80"/>
<ATTRIB name="Phone" type="String" dbcol="contact_phone" length="80"/>
<ATTRIB name="Email" type="String" dbcol="email" length="60"/>
<MULTIPLEREFERENCE name="TestAnalysises" type="TestAnalysis" backreferenceName="Candidate" />
<MULTIPLEREFERENCE name="Answers" type="Answer" backreferenceName="Candidate" />
<TABLE name="rs_candidate" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="FirstName" type="String" dbcol="first_name" length="30"/>
<SINGLEREFERENCE name="TestInput" type="TestInput" dbcol="test_input_id" backreferenceName="Candidates"/>
</TABLE>
<SEARCH type="All" paramFilter="candidate.object_id is not null" orderBy="candidate.object_id" />
<SEARCH type="All" paramFilter="rs_candidate.object_id is not null" orderBy="rs_candidate.object_id" />
</BUSINESSCLASS>
......
......@@ -10,4 +10,10 @@ public class Factor extends BaseFactor
{
// Do not add any code to this, always put it in initialiseNewObject
}
@Override
public String getObjectIDSpace()
{
return "Factor";
}
}
\ No newline at end of file
......@@ -8,13 +8,13 @@
<MULTIPLEREFERENCE name="Questions" type="FactorQuestionLink" backreferenceName="Factor" />
<MULTIPLEREFERENCE name="Results" type="FactorScoreResult" backreferenceName="Factor" />
<TABLE name="factor" tablePrefix="object" polymorphic="FALSE">
<TABLE name="rs_factor" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="Description" type="String" dbcol="factor_hdr_desc" length="30"/>
</TABLE>
<SEARCH type="All" paramFilter="factor.object_id is not null" orderBy="factor.object_id" />
<SEARCH type="All" paramFilter="rs_factor.object_id is not null" orderBy="rs_factor.object_id" />
</BUSINESSCLASS>
......
......@@ -10,4 +10,10 @@ public class FactorLevelLink extends BaseFactorLevelLink
{
// Do not add any code to this, always put it in initialiseNewObject
}
@Override
public String getObjectIDSpace()
{
return "FactorLevelLink";
}
}
\ No newline at end of file
......@@ -4,7 +4,7 @@
<BUSINESSCLASS name="FactorLevelLink" package="performa.orm">
<TABLE name="factor_hdr" tablePrefix="object" polymorphic="FALSE">
<TABLE name="rs_factor_hdr" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="ClassCode" type="String" dbcol="class_code" length="15"/>
<ATTRIB name="Notes" type="String" dbcol="factor_hdr_notes"/>
......@@ -18,7 +18,7 @@
</TABLE>
<SEARCH type="All" paramFilter="factor_hdr.object_id is not null" orderBy="factor_hdr.object_id" />
<SEARCH type="All" paramFilter="rs_factor_hdr.object_id is not null" orderBy="factor_hdr.object_id" />
</BUSINESSCLASS>
......
......@@ -10,4 +10,10 @@ public class FactorQuestionLink extends BaseFactorQuestionLink
{
// Do not add any code to this, always put it in initialiseNewObject
}
@Override
public String getObjectIDSpace()
{
return "FactorQuestionLink";
}
}
\ No newline at end of file
......@@ -4,7 +4,7 @@
<BUSINESSCLASS name="FactorQuestionLink" package="performa.orm">
<TABLE name="factor_lin" tablePrefix="object" polymorphic="FALSE">
<TABLE name="rs_factor_lin" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="ReverseScore" type="Boolean" dbcol="reverse_score_flag"/>
......@@ -13,7 +13,7 @@
</TABLE>
<SEARCH type="All" paramFilter="factor_lin.object_id is not null" orderBy="factor_lin.object_id" />
<SEARCH type="All" paramFilter="rs_factor_lin.object_id is not null" orderBy="rs_factor_lin.object_id" />
</BUSINESSCLASS>
......
......@@ -10,4 +10,10 @@ public class FactorScore extends BaseFactorScore
{
// Do not add any code to this, always put it in initialiseNewObject
}
@Override
public String getObjectIDSpace()
{
return "FactorScore";
}
}
\ No newline at end of file
......@@ -4,16 +4,18 @@
<BUSINESSCLASS name="FactorScore" package="performa.orm">
<TABLE name="score" tablePrefix="object" polymorphic="FALSE">
<TABLE name="rs_score" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="Score" type="Integer" dbcol="score_number"/>
<SINGLEREFERENCE name="TestAnalysis" type="TestAnalysis" dbcol="test_analysis_id" backreferenceName="FactorScores"/>
<SINGLEREFERENCE name="Factor" type="Factor" dbcol="factor_number"/>
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_number"/>
<SINGLEREFERENCE name="Narrative" type="Narrative" dbcol="narrative_id" backreferenceName="FactorScores"/>
</TABLE>
<SEARCH type="All" paramFilter="score.object_id is not null" orderBy="score.object_id" />
<SEARCH type="All" paramFilter="rs_score.object_id is not null" orderBy="rs_score.object_id" />
</BUSINESSCLASS>
......
......@@ -10,4 +10,10 @@ public class FactorScoreResult extends BaseFactorScoreResult
{
// Do not add any code to this, always put it in initialiseNewObject
}
@Override
public String getObjectIDSpace()
{
return "FactorScoreResult";
}
}
\ No newline at end of file
......@@ -5,7 +5,7 @@
<BUSINESSCLASS name="FactorScoreResult" package="performa.orm">
<IMPORT value="performa.orm.types.*"/>
<TABLE name="level_factor" tablePrefix="object" polymorphic="FALSE">
<TABLE name="rs_level_factor" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="FromScore" type="Integer" dbcol="from_score"/>
<ATTRIB name="ToScore" type="Integer" dbcol="to_score"/>
......@@ -17,9 +17,9 @@
</TABLE>
<SEARCH type="All" paramFilter="level_factor.object_id is not null" orderBy="level_factor.object_id" />
<SEARCH type="All" paramFilter="rs_level_factor.object_id is not null" orderBy="rs_level_factor.object_id" />
<SEARCH type="FactorScore" paramFilter="level_factor.object_id is not null" singleton="TRUE"/>
<SEARCH type="FactorScore" paramFilter="rs_level_factor.object_id is not null" singleton="TRUE"/>
</BUSINESSCLASS>
......
......@@ -10,4 +10,10 @@ public class Level extends BaseLevel
{
// Do not add any code to this, always put it in initialiseNewObject
}
@Override
public String getObjectIDSpace()
{
return "Level";
}
}
\ No newline at end of file
......@@ -4,10 +4,12 @@
<BUSINESSCLASS name="Level" package="performa.orm">
<MULTIPLEREFERENCE name="Factors" type="FactorLevelLink" backreferenceName="Level" />
<MULTIPLEREFERENCE name="Results" type="FactorScoreResult" backreferenceName="Level" />
<MULTIPLEREFERENCE name="Factors" type="FactorLevelLink" backreferenceName="Level" />
<MULTIPLEREFERENCE name="Results" type="FactorScoreResult" backreferenceName="Level" />
<MULTIPLEREFERENCE name="Narratives" type="Narrative" backreferenceName="Level" />
<MULTIPLEREFERENCE name="TestAnalysises" type="TestAnalysis" backreferenceName="Level" />
<TABLE name="level" tablePrefix="object" polymorphic="FALSE">
<TABLE name="rs_level" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="LevelDescription" type="String" dbcol="level_desc" length="30"/>
<ATTRIB name="LevelNotes" type="String" dbcol="level_notes"/>
......@@ -15,7 +17,7 @@
</TABLE>
<SEARCH type="All" paramFilter="level.object_id is not null" orderBy="level.object_id" />
<SEARCH type="All" paramFilter="rs_level.object_id is not null" orderBy="rs_level.object_id" />
</BUSINESSCLASS>
......
......@@ -10,4 +10,10 @@ public class Narrative extends BaseNarrative
{
// Do not add any code to this, always put it in initialiseNewObject
}
@Override
public String getObjectIDSpace()
{
return "Narrative";
}
}
\ No newline at end of file
......@@ -4,9 +4,10 @@
<BUSINESSCLASS name="Narrative" package="performa.orm">
<MULTIPLEREFERENCE name="Results" type="FactorScoreResult" backreferenceName="Narrative" />
<MULTIPLEREFERENCE name="Results" type="FactorScoreResult" backreferenceName="Narrative" />
<MULTIPLEREFERENCE name="FactorScores" type="FactorScore" backreferenceName="Narrative" />
<TABLE name="narrative" tablePrefix="object" polymorphic="FALSE">
<TABLE name="rs_narrative" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="NarrativeCode" type="String" dbcol="narrative_code" length="15" mandatory="true"/>
<ATTRIB name="Description" type="String" dbcol="narrative_desc" length="30"/>
......@@ -17,11 +18,11 @@
<ATTRIB name="DevelNarrative" type="String" dbcol="devel_narrative" length="128"/>
<ATTRIB name="Question" type="String" dbcol="question"/>
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_number"/>
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_number" backreferenceName="Narratives"/>
</TABLE>
<SEARCH type="All" paramFilter="narrative.object_id is not null" orderBy="narrative.object_id" />
<SEARCH type="All" paramFilter="rs_narrative.object_id is not null" orderBy="rs_narrative.object_id" />
</BUSINESSCLASS>
......
......@@ -10,4 +10,10 @@ public class Question extends BaseQuestion
{
// Do not add any code to this, always put it in initialiseNewObject
}
@Override
public String getObjectIDSpace()
{
return "Question";
}
}
\ No newline at end of file
......@@ -6,7 +6,7 @@
<MULTIPLEREFERENCE name="Factors" type="FactorQuestionLink" backreferenceName="Question" />
<TABLE name="quest_lin" tablePrefix="object" polymorphic="FALSE">
<TABLE name="rs_quest_lin" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="Description" type="String" dbcol="left_quest" length="80"/>
......@@ -14,7 +14,7 @@
</TABLE>
<SEARCH type="All" paramFilter="quest_lin.object_id is not null" orderBy="quest_lin.object_id" />
<SEARCH type="All" paramFilter="rs_quest_lin.object_id is not null" orderBy="rs_quest_lin.object_id" />
</BUSINESSCLASS>
......
......@@ -10,4 +10,10 @@ public class Section extends BaseSection
{
// Do not add any code to this, always put it in initialiseNewObject
}
@Override
public String getObjectIDSpace()
{
return "Section";
}
}
\ No newline at end of file
......@@ -7,14 +7,14 @@
<MULTIPLEREFERENCE name="Questions" type="Question" backreferenceName="Section" />
<TABLE name="quest_hdr" tablePrefix="object" polymorphic="FALSE">
<TABLE name="rs_quest_hdr" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="Description" type="String" dbcol="quest_hdr_desc" length="30"/>
<ATTRIB name="QuestionType" type="QuestionType" dbcol="quest_type_flag" attribHelper="EnumeratedAttributeHelper" />
</TABLE>
<SEARCH type="All" paramFilter="quest_hdr.object_id is not null" orderBy="quest_hdr.object_id" />
<SEARCH type="All" paramFilter="rs_quest_hdr.object_id is not null" orderBy="rs_quest_hdr.object_id" />
</BUSINESSCLASS>
......
......@@ -10,4 +10,10 @@ public class TestAnalysis extends BaseTestAnalysis
{
// Do not add any code to this, always put it in initialiseNewObject
}
@Override
public String getObjectIDSpace()
{
return "TestAnalysis";
}
}
\ No newline at end of file
......@@ -6,14 +6,14 @@
<MULTIPLEREFERENCE name="FactorScores" type="FactorScore" backreferenceName="TestAnalysis" />
<TABLE name="test_analysis" tablePrefix="object" polymorphic="FALSE">
<TABLE name="rs_test_analysis" tablePrefix="object" polymorphic="FALSE">
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_id"/>
<SINGLEREFERENCE name="Candidate" type="Candidate" dbcol="candidate_id"/>
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_id" backreferenceName="TestAnalysises"/>
<SINGLEREFERENCE name="Candidate" type="Candidate" dbcol="candidate_id" backreferenceName="TestAnalysises"/>
</TABLE>
<SEARCH type="All" paramFilter="test_analysis.object_id is not null" orderBy="test_analysis.object_id" />
<SEARCH type="All" paramFilter="rs_test_analysis.object_id is not null" orderBy="rs_test_analysis.object_id" />
</BUSINESSCLASS>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment