Commit 49462698 by Harsh Shah

Role Fit algorithm implementation

parent 82d310da
<?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">tl_candidate_class_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="class_score" type="Long" nullable="true"/>
<column name="wghtd_class_score" type="Long" nullable="true"/>
<column name="max_wghtd_class_score" type="Long" nullable="true"/>
<column name="color_code" type="String" nullable="true" length="200"/>
<column name="wghtd_color_code" type="String" nullable="true" length="200"/>
<column name="factor_class" type="String" nullable="false" length="200"/>
<column name="test_analysis_id" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_candidate_class_score" indexName="idx_tl_candidate_class_score_test_analysis_id" isUnique="false"><column name="test_analysis_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">tl_class_norm</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="class_code" type="String" nullable="true" length="200"/>
<column name="mean_score" type="Double" nullable="true"/>
<column name="max_score" type="Double" nullable="true"/>
<column name="min_score" type="Double" nullable="true"/>
<column name="stddev_score" type="Double" nullable="true"/>
<column name="left_mean_score" type="Double" nullable="true"/>
<column name="right_mean_score" type="Double" nullable="true"/>
<column name="wght_mean_score" type="Double" nullable="true"/>
<column name="wght_stddev_score" type="Double" nullable="true"/>
<column name="wght_left_mean_score" type="Double" nullable="true"/>
<column name="wght_right_mean_score" type="Double" nullable="true"/>
<column name="level_number" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_class_norm" indexName="idx_tl_class_norm_level_number" isUnique="false"><column name="level_number"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<column name="object_id" type="Long" nullable="false" length="11"/> <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_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/> <column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="class_code" type="String" nullable="true" length="15"/> <column name="class_code" type="String" nullable="true" length="200"/>
<column name="factor_hdr_notes" type="CLOB" nullable="true"/> <column name="factor_hdr_notes" type="CLOB" nullable="true"/>
<column name="left_annot" type="String" nullable="true" length="60"/> <column name="left_annot" type="String" nullable="true" length="60"/>
<column name="right_annot" type="String" nullable="true" length="60"/> <column name="right_annot" type="String" nullable="true" length="60"/>
......
...@@ -15,13 +15,10 @@ ...@@ -15,13 +15,10 @@
<column name="factor_number" 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="level_number" type="Long" length="11" nullable="true"/>
<column name="narrative_id" type="Long" length="11" nullable="true"/> <column name="narrative_id" type="Long" length="11" nullable="true"/>
<column name="candidate_id" type="Long" length="11" nullable="true"/>
</NODE> </NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_score" indexName="idx_tl_score_test_analysis_id" isUnique="false"><column name="test_analysis_id"/></NODE> <NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_score" indexName="idx_tl_score_test_analysis_id" isUnique="false"><column name="test_analysis_id"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_score" indexName="idx_tl_score_narrative_id" isUnique="false"><column name="narrative_id"/></NODE> <NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_score" indexName="idx_tl_score_narrative_id" isUnique="false"><column name="narrative_id"/></NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_score" indexName="idx_tl_score_candidate_id" isUnique="false"><column name="candidate_id"/></NODE>
</NODE></OBJECTS> </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">tl_level_class_criteria</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="weighting" type="String" nullable="false" length="200"/>
<column name="class_code" type="String" nullable="false" length="200"/>
<column name="level_number" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_level_class_criteria" indexName="idx_tl_level_class_criteria_level_number" isUnique="false"><column name="level_number"/></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">tl_level_norm</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="mean_score" type="Double" nullable="true"/>
<column name="max_score" type="Double" nullable="true"/>
<column name="min_score" type="Double" nullable="true"/>
<column name="stddev_score" type="Double" nullable="true"/>
<column name="left_mean_score" type="Double" nullable="true"/>
<column name="right_mean_score" type="Double" nullable="true"/>
<column name="wght_mean_score" type="Double" nullable="true"/>
<column name="wght_stddev_score" type="Double" nullable="true"/>
<column name="wght_left_mean_score" type="Double" nullable="true"/>
<column name="wght_right_mean_score" type="Double" nullable="true"/>
<column name="mean_wght_z_score" type="Double" nullable="true"/>
<column name="mean_wght_z_score_2" type="Double" nullable="true"/>
<column name="stddev_wght_z_score" type="Double" nullable="true"/>
<column name="stddev_wght_z_score_2" type="Double" nullable="true"/>
<column name="level_number" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_level_norm" indexName="idx_tl_level_norm_level_number" isUnique="false"><column name="level_number"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
<column name="object_id" type="Long" nullable="false" length="11"/> <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_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/> <column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="job_id" type="Long" length="11" nullable="true"/>
<column name="level_id" type="Long" length="11" nullable="true"/> <column name="level_id" type="Long" length="11" nullable="true"/>
<column name="candidate_id" type="Long" length="11" nullable="true"/> <column name="candidate_id" type="Long" length="11" nullable="true"/>
</NODE> </NODE>
......
-- DROP TABLE tl_candidate_class_score;
CREATE TABLE tl_candidate_class_score (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
class_score numeric(12) NULL,
wghtd_class_score numeric(12) NULL,
max_wghtd_class_score numeric(12) NULL,
color_code varchar(200) NULL,
wghtd_color_code varchar(200) NULL,
factor_class varchar(200) NOT NULL,
test_analysis_id numeric(12) NULL
);
ALTER TABLE tl_candidate_class_score ADD
CONSTRAINT PK_tl_candidate_class_score PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_candidate_class_score_test_analysis_id
ON tl_candidate_class_score (test_analysis_id);
-- DROP TABLE tl_class_norm;
CREATE TABLE tl_class_norm (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
class_code varchar(200) NULL,
mean_score numeric(20,5) NULL,
max_score numeric(20,5) NULL,
min_score numeric(20,5) NULL,
stddev_score numeric(20,5) NULL,
left_mean_score numeric(20,5) NULL,
right_mean_score numeric(20,5) NULL,
wght_mean_score numeric(20,5) NULL,
wght_stddev_score numeric(20,5) NULL,
wght_left_mean_score numeric(20,5) NULL,
wght_right_mean_score numeric(20,5) NULL,
level_number numeric(12) NULL
);
ALTER TABLE tl_class_norm ADD
CONSTRAINT PK_tl_class_norm PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_class_norm_level_number
ON tl_class_norm (level_number);
...@@ -8,7 +8,7 @@ CREATE TABLE tl_factor_hdr ( ...@@ -8,7 +8,7 @@ CREATE TABLE tl_factor_hdr (
object_last_updated_date datetime DEFAULT getdate() NOT NULL , object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL object_created_date datetime DEFAULT getdate() NOT NULL
, ,
class_code varchar(15) NULL, class_code varchar(200) NULL,
factor_hdr_notes text NULL, factor_hdr_notes text NULL,
left_annot varchar(60) NULL, left_annot varchar(60) NULL,
right_annot varchar(60) NULL, right_annot varchar(60) NULL,
......
...@@ -14,8 +14,7 @@ CREATE TABLE tl_score ( ...@@ -14,8 +14,7 @@ CREATE TABLE tl_score (
test_analysis_id numeric(12) NULL, test_analysis_id numeric(12) NULL,
factor_number numeric(12) NULL, factor_number numeric(12) NULL,
level_number numeric(12) NULL, level_number numeric(12) NULL,
narrative_id numeric(12) NULL, narrative_id numeric(12) NULL
candidate_id numeric(12) NULL
); );
...@@ -33,6 +32,3 @@ ALTER TABLE tl_score ADD ...@@ -33,6 +32,3 @@ ALTER TABLE tl_score ADD
CREATE INDEX idx_tl_score_narrative_id CREATE INDEX idx_tl_score_narrative_id
ON tl_score (narrative_id); ON tl_score (narrative_id);
CREATE INDEX idx_tl_score_candidate_id
ON tl_score (candidate_id);
-- DROP TABLE tl_level_class_criteria;
CREATE TABLE tl_level_class_criteria (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
weighting varchar(200) NOT NULL,
class_code varchar(200) NOT NULL,
level_number numeric(12) NULL
);
ALTER TABLE tl_level_class_criteria ADD
CONSTRAINT PK_tl_level_class_criteria PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_level_class_criteria_level_number
ON tl_level_class_criteria (level_number);
-- DROP TABLE tl_level_norm;
CREATE TABLE tl_level_norm (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
mean_score numeric(20,5) NULL,
max_score numeric(20,5) NULL,
min_score numeric(20,5) NULL,
stddev_score numeric(20,5) NULL,
left_mean_score numeric(20,5) NULL,
right_mean_score numeric(20,5) NULL,
wght_mean_score numeric(20,5) NULL,
wght_stddev_score numeric(20,5) NULL,
wght_left_mean_score numeric(20,5) NULL,
wght_right_mean_score numeric(20,5) NULL,
mean_wght_z_score numeric(20,5) NULL,
mean_wght_z_score_2 numeric(20,5) NULL,
stddev_wght_z_score numeric(20,5) NULL,
stddev_wght_z_score_2 numeric(20,5) NULL,
level_number numeric(12) NULL
);
ALTER TABLE tl_level_norm ADD
CONSTRAINT PK_tl_level_norm PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_level_norm_level_number
ON tl_level_norm (level_number);
...@@ -8,7 +8,6 @@ CREATE TABLE tl_test_analysis ( ...@@ -8,7 +8,6 @@ CREATE TABLE tl_test_analysis (
object_last_updated_date datetime DEFAULT getdate() NOT NULL , object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL object_created_date datetime DEFAULT getdate() NOT NULL
, ,
job_id numeric(12) NULL,
level_id numeric(12) NULL, level_id numeric(12) NULL,
candidate_id numeric(12) NULL candidate_id numeric(12) NULL
); );
......
-- DROP TABLE tl_candidate_class_score;
CREATE TABLE tl_candidate_class_score (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
class_score number(12) NULL,
wghtd_class_score number(12) NULL,
max_wghtd_class_score number(12) NULL,
color_code varchar2(200) NULL,
wghtd_color_code varchar2(200) NULL,
factor_class varchar2(200) NOT NULL,
test_analysis_id number(12) NULL
);
ALTER TABLE tl_candidate_class_score ADD
CONSTRAINT PK_tl_candidate_class_score PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_candidate_class_score_test_analysis_id
ON tl_candidate_class_score (test_analysis_id);
-- DROP TABLE tl_class_norm;
CREATE TABLE tl_class_norm (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
class_code varchar2(200) NULL,
mean_score number(20,5) NULL,
max_score number(20,5) NULL,
min_score number(20,5) NULL,
stddev_score number(20,5) NULL,
left_mean_score number(20,5) NULL,
right_mean_score number(20,5) NULL,
wght_mean_score number(20,5) NULL,
wght_stddev_score number(20,5) NULL,
wght_left_mean_score number(20,5) NULL,
wght_right_mean_score number(20,5) NULL,
level_number number(12) NULL
);
ALTER TABLE tl_class_norm ADD
CONSTRAINT PK_tl_class_norm PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_class_norm_level_number
ON tl_class_norm (level_number);
...@@ -9,7 +9,7 @@ CREATE TABLE tl_factor_hdr ( ...@@ -9,7 +9,7 @@ CREATE TABLE tl_factor_hdr (
object_last_updated_date date DEFAULT SYSDATE NOT NULL , object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL object_created_date date DEFAULT SYSDATE NOT NULL
, ,
class_code varchar2(15) NULL, class_code varchar2(200) NULL,
factor_hdr_notes clob NULL, factor_hdr_notes clob NULL,
left_annot varchar2(60) NULL, left_annot varchar2(60) NULL,
right_annot varchar2(60) NULL, right_annot varchar2(60) NULL,
......
...@@ -15,8 +15,7 @@ CREATE TABLE tl_score ( ...@@ -15,8 +15,7 @@ CREATE TABLE tl_score (
test_analysis_id number(12) NULL, test_analysis_id number(12) NULL,
factor_number number(12) NULL, factor_number number(12) NULL,
level_number number(12) NULL, level_number number(12) NULL,
narrative_id number(12) NULL, narrative_id number(12) NULL
candidate_id number(12) NULL
); );
...@@ -34,6 +33,3 @@ ALTER TABLE tl_score ADD ...@@ -34,6 +33,3 @@ ALTER TABLE tl_score ADD
CREATE INDEX idx_tl_score_narrative_id CREATE INDEX idx_tl_score_narrative_id
ON tl_score (narrative_id); ON tl_score (narrative_id);
CREATE INDEX idx_tl_score_candidate_id
ON tl_score (candidate_id);
-- DROP TABLE tl_level_class_criteria;
CREATE TABLE tl_level_class_criteria (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
weighting varchar2(200) NOT NULL,
class_code varchar2(200) NOT NULL,
level_number number(12) NULL
);
ALTER TABLE tl_level_class_criteria ADD
CONSTRAINT PK_tl_level_class_criteria PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_level_class_criteria_level_number
ON tl_level_class_criteria (level_number);
-- DROP TABLE tl_level_norm;
CREATE TABLE tl_level_norm (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
mean_score number(20,5) NULL,
max_score number(20,5) NULL,
min_score number(20,5) NULL,
stddev_score number(20,5) NULL,
left_mean_score number(20,5) NULL,
right_mean_score number(20,5) NULL,
wght_mean_score number(20,5) NULL,
wght_stddev_score number(20,5) NULL,
wght_left_mean_score number(20,5) NULL,
wght_right_mean_score number(20,5) NULL,
mean_wght_z_score number(20,5) NULL,
mean_wght_z_score_2 number(20,5) NULL,
stddev_wght_z_score number(20,5) NULL,
stddev_wght_z_score_2 number(20,5) NULL,
level_number number(12) NULL
);
ALTER TABLE tl_level_norm ADD
CONSTRAINT PK_tl_level_norm PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_level_norm_level_number
ON tl_level_norm (level_number);
...@@ -9,7 +9,6 @@ CREATE TABLE tl_test_analysis ( ...@@ -9,7 +9,6 @@ CREATE TABLE tl_test_analysis (
object_last_updated_date date DEFAULT SYSDATE NOT NULL , object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL object_created_date date DEFAULT SYSDATE NOT NULL
, ,
job_id number(12) NULL,
level_id number(12) NULL, level_id number(12) NULL,
candidate_id number(12) NULL candidate_id number(12) NULL
); );
......
-- @AutoRun
-- drop table tl_candidate_class_score;
CREATE TABLE tl_candidate_class_score (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
class_score numeric(12) NULL,
wghtd_class_score numeric(12) NULL,
max_wghtd_class_score numeric(12) NULL,
color_code varchar(200) NULL,
wghtd_color_code varchar(200) NULL,
factor_class varchar(200) NOT NULL,
test_analysis_id numeric(12) NULL
);
ALTER TABLE tl_candidate_class_score ADD
CONSTRAINT pk_tl_candidate_class_score PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_candidate_class_score_test_analysis_id
ON tl_candidate_class_score (test_analysis_id);
-- @AutoRun
-- drop table tl_class_norm;
CREATE TABLE tl_class_norm (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
class_code varchar(200) NULL,
mean_score numeric(20,5) NULL,
max_score numeric(20,5) NULL,
min_score numeric(20,5) NULL,
stddev_score numeric(20,5) NULL,
left_mean_score numeric(20,5) NULL,
right_mean_score numeric(20,5) NULL,
wght_mean_score numeric(20,5) NULL,
wght_stddev_score numeric(20,5) NULL,
wght_left_mean_score numeric(20,5) NULL,
wght_right_mean_score numeric(20,5) NULL,
level_number numeric(12) NULL
);
ALTER TABLE tl_class_norm ADD
CONSTRAINT pk_tl_class_norm PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_class_norm_level_number
ON tl_class_norm (level_number);
...@@ -9,7 +9,7 @@ CREATE TABLE tl_factor_hdr ( ...@@ -9,7 +9,7 @@ CREATE TABLE tl_factor_hdr (
object_last_updated_date timestamp DEFAULT NOW() NOT NULL , object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL object_created_date timestamp DEFAULT NOW() NOT NULL
, ,
class_code varchar(15) NULL, class_code varchar(200) NULL,
factor_hdr_notes text NULL, factor_hdr_notes text NULL,
left_annot varchar(60) NULL, left_annot varchar(60) NULL,
right_annot varchar(60) NULL, right_annot varchar(60) NULL,
......
...@@ -15,8 +15,7 @@ CREATE TABLE tl_score ( ...@@ -15,8 +15,7 @@ CREATE TABLE tl_score (
test_analysis_id numeric(12) NULL, test_analysis_id numeric(12) NULL,
factor_number numeric(12) NULL, factor_number numeric(12) NULL,
level_number numeric(12) NULL, level_number numeric(12) NULL,
narrative_id numeric(12) NULL, narrative_id numeric(12) NULL
candidate_id numeric(12) NULL
); );
...@@ -34,6 +33,3 @@ ALTER TABLE tl_score ADD ...@@ -34,6 +33,3 @@ ALTER TABLE tl_score ADD
CREATE INDEX idx_tl_score_narrative_id CREATE INDEX idx_tl_score_narrative_id
ON tl_score (narrative_id); ON tl_score (narrative_id);
CREATE INDEX idx_tl_score_candidate_id
ON tl_score (candidate_id);
-- @AutoRun
-- drop table tl_level_class_criteria;
CREATE TABLE tl_level_class_criteria (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
weighting varchar(200) NOT NULL,
class_code varchar(200) NOT NULL,
level_number numeric(12) NULL
);
ALTER TABLE tl_level_class_criteria ADD
CONSTRAINT pk_tl_level_class_criteria PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_level_class_criteria_level_number
ON tl_level_class_criteria (level_number);
-- @AutoRun
-- drop table tl_level_norm;
CREATE TABLE tl_level_norm (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
mean_score numeric(20,5) NULL,
max_score numeric(20,5) NULL,
min_score numeric(20,5) NULL,
stddev_score numeric(20,5) NULL,
left_mean_score numeric(20,5) NULL,
right_mean_score numeric(20,5) NULL,
wght_mean_score numeric(20,5) NULL,
wght_stddev_score numeric(20,5) NULL,
wght_left_mean_score numeric(20,5) NULL,
wght_right_mean_score numeric(20,5) NULL,
mean_wght_z_score numeric(20,5) NULL,
mean_wght_z_score_2 numeric(20,5) NULL,
stddev_wght_z_score numeric(20,5) NULL,
stddev_wght_z_score_2 numeric(20,5) NULL,
level_number numeric(12) NULL
);
ALTER TABLE tl_level_norm ADD
CONSTRAINT pk_tl_level_norm PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_tl_level_norm_level_number
ON tl_level_norm (level_number);
...@@ -9,7 +9,6 @@ CREATE TABLE tl_test_analysis ( ...@@ -9,7 +9,6 @@ CREATE TABLE tl_test_analysis (
object_last_updated_date timestamp DEFAULT NOW() NOT NULL , object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL object_created_date timestamp DEFAULT NOW() NOT NULL
, ,
job_id numeric(12) NULL,
level_id numeric(12) NULL, level_id numeric(12) NULL,
candidate_id numeric(12) NULL candidate_id numeric(12) NULL
); );
......
...@@ -24,7 +24,7 @@ public class CompleteApplicationFP extends SaveFP ...@@ -24,7 +24,7 @@ public class CompleteApplicationFP extends SaveFP
jobApplication.setApplicationStatus(ApplicationStatus.SUBMITTED); jobApplication.setApplicationStatus(ApplicationStatus.SUBMITTED);
jobApplication.setSubmittedDate(new Date()); jobApplication.setSubmittedDate(new Date());
AnalysisEngine.analyseAnswers(jobApplication); AnalysisEngine.analyseAnswers(jobApplication.getCandidate(), jobApplication.getJob().getLevel(), jobApplication.getCompletedAnswers());
//TODO: set application status as UNSUITABLE if not scored //TODO: set application status as UNSUITABLE if not scored
......
...@@ -50,8 +50,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -50,8 +50,6 @@ public abstract class BaseCandidate extends SecUserExtension
public static final String BACKREF_TestAnalysises = ""; public static final String BACKREF_TestAnalysises = "";
public static final String MULTIPLEREFERENCE_JobApplications = "JobApplications"; public static final String MULTIPLEREFERENCE_JobApplications = "JobApplications";
public static final String BACKREF_JobApplications = ""; public static final String BACKREF_JobApplications = "";
public static final String MULTIPLEREFERENCE_FactorScores = "FactorScores";
public static final String BACKREF_FactorScores = "";
// Static constants corresponding to searches // Static constants corresponding to searches
public static final String SEARCH_All = "All"; public static final String SEARCH_All = "All";
...@@ -79,7 +77,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -79,7 +77,6 @@ public abstract class BaseCandidate extends SecUserExtension
// Private attributes corresponding to multiple references // Private attributes corresponding to multiple references
private MultipleAssociation<Candidate, TestAnalysis> _TestAnalysises; private MultipleAssociation<Candidate, TestAnalysis> _TestAnalysises;
private MultipleAssociation<Candidate, JobApplication> _JobApplications; private MultipleAssociation<Candidate, JobApplication> _JobApplications;
private MultipleAssociation<Candidate, FactorScore> _FactorScores;
// Map of maps of metadata // Map of maps of metadata
...@@ -102,14 +99,12 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -102,14 +99,12 @@ public abstract class BaseCandidate extends SecUserExtension
String tmp_TestAnalysises = TestAnalysis.BACKREF_Candidate; String tmp_TestAnalysises = TestAnalysis.BACKREF_Candidate;
String tmp_JobApplications = JobApplication.BACKREF_Candidate; String tmp_JobApplications = JobApplication.BACKREF_Candidate;
String tmp_FactorScores = FactorScore.BACKREF_Candidate;
String tmp_TestInput = TestInput.BACKREF_Candidates; String tmp_TestInput = TestInput.BACKREF_Candidates;
Map validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping")); Map validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping"));
setupAssocMetaData_TestAnalysises(); setupAssocMetaData_TestAnalysises();
setupAssocMetaData_JobApplications(); setupAssocMetaData_JobApplications();
setupAssocMetaData_FactorScores();
setupAssocMetaData_TestInput(); setupAssocMetaData_TestInput();
FIELD_Phone_Validators = (AttributeValidator[])setupAttribMetaData_Phone(validatorMapping).toArray (new AttributeValidator[0]); FIELD_Phone_Validators = (AttributeValidator[])setupAttribMetaData_Phone(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_VerificationMailSendDate_Validators = (AttributeValidator[])setupAttribMetaData_VerificationMailSendDate(validatorMapping).toArray (new AttributeValidator[0]); FIELD_VerificationMailSendDate_Validators = (AttributeValidator[])setupAttribMetaData_VerificationMailSendDate(validatorMapping).toArray (new AttributeValidator[0]);
...@@ -158,20 +153,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -158,20 +153,6 @@ public abstract class BaseCandidate extends SecUserExtension
// Meta Info setup // Meta Info setup
private static void setupAssocMetaData_FactorScores()
{
Map metaInfo = new HashMap ();
metaInfo.put ("backreferenceName", "Candidate");
metaInfo.put ("name", "FactorScores");
metaInfo.put ("type", "FactorScore");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Candidate.FactorScores:", metaInfo);
ATTRIBUTES_METADATA_Candidate.put (MULTIPLEREFERENCE_FactorScores, Collections.unmodifiableMap (metaInfo));
}
// Meta Info setup
private static void setupAssocMetaData_TestInput() private static void setupAssocMetaData_TestInput()
{ {
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
...@@ -303,7 +284,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -303,7 +284,6 @@ public abstract class BaseCandidate extends SecUserExtension
_TestInput = new SingleAssociation<Candidate, TestInput> (this, SINGLEREFERENCE_TestInput, TestInput.MULTIPLEREFERENCE_Candidates, TestInput.REFERENCE_TestInput, "oneit_sec_user_extension"); _TestInput = new SingleAssociation<Candidate, TestInput> (this, SINGLEREFERENCE_TestInput, TestInput.MULTIPLEREFERENCE_Candidates, TestInput.REFERENCE_TestInput, "oneit_sec_user_extension");
_TestAnalysises = new MultipleAssociation<Candidate, TestAnalysis> (this, MULTIPLEREFERENCE_TestAnalysises, TestAnalysis.SINGLEREFERENCE_Candidate, TestAnalysis.REFERENCE_TestAnalysis); _TestAnalysises = new MultipleAssociation<Candidate, TestAnalysis> (this, MULTIPLEREFERENCE_TestAnalysises, TestAnalysis.SINGLEREFERENCE_Candidate, TestAnalysis.REFERENCE_TestAnalysis);
_JobApplications = new MultipleAssociation<Candidate, JobApplication> (this, MULTIPLEREFERENCE_JobApplications, JobApplication.SINGLEREFERENCE_Candidate, JobApplication.REFERENCE_JobApplication); _JobApplications = new MultipleAssociation<Candidate, JobApplication> (this, MULTIPLEREFERENCE_JobApplications, JobApplication.SINGLEREFERENCE_Candidate, JobApplication.REFERENCE_JobApplication);
_FactorScores = new MultipleAssociation<Candidate, FactorScore> (this, MULTIPLEREFERENCE_FactorScores, FactorScore.SINGLEREFERENCE_Candidate, FactorScore.REFERENCE_FactorScore);
} }
...@@ -316,7 +296,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -316,7 +296,6 @@ public abstract class BaseCandidate extends SecUserExtension
_TestInput = new SingleAssociation<Candidate, TestInput> (this, SINGLEREFERENCE_TestInput, TestInput.MULTIPLEREFERENCE_Candidates, TestInput.REFERENCE_TestInput, "oneit_sec_user_extension"); _TestInput = new SingleAssociation<Candidate, TestInput> (this, SINGLEREFERENCE_TestInput, TestInput.MULTIPLEREFERENCE_Candidates, TestInput.REFERENCE_TestInput, "oneit_sec_user_extension");
_TestAnalysises = new MultipleAssociation<Candidate, TestAnalysis> (this, MULTIPLEREFERENCE_TestAnalysises, TestAnalysis.SINGLEREFERENCE_Candidate, TestAnalysis.REFERENCE_TestAnalysis); _TestAnalysises = new MultipleAssociation<Candidate, TestAnalysis> (this, MULTIPLEREFERENCE_TestAnalysises, TestAnalysis.SINGLEREFERENCE_Candidate, TestAnalysis.REFERENCE_TestAnalysis);
_JobApplications = new MultipleAssociation<Candidate, JobApplication> (this, MULTIPLEREFERENCE_JobApplications, JobApplication.SINGLEREFERENCE_Candidate, JobApplication.REFERENCE_JobApplication); _JobApplications = new MultipleAssociation<Candidate, JobApplication> (this, MULTIPLEREFERENCE_JobApplications, JobApplication.SINGLEREFERENCE_Candidate, JobApplication.REFERENCE_JobApplication);
_FactorScores = new MultipleAssociation<Candidate, FactorScore> (this, MULTIPLEREFERENCE_FactorScores, FactorScore.SINGLEREFERENCE_Candidate, FactorScore.REFERENCE_FactorScore);
return this; return this;
...@@ -955,8 +934,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -955,8 +934,6 @@ public abstract class BaseCandidate extends SecUserExtension
result.add("JobApplications"); result.add("JobApplications");
result.add("FactorScores");
return result; return result;
} }
...@@ -978,11 +955,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -978,11 +955,6 @@ public abstract class BaseCandidate extends SecUserExtension
return JobApplication.REFERENCE_JobApplication ; return JobApplication.REFERENCE_JobApplication ;
} }
if (MULTIPLEREFERENCE_FactorScores.equals(attribName))
{
return FactorScore.REFERENCE_FactorScore ;
}
return super.getMultiAssocReferenceInstance(attribName); return super.getMultiAssocReferenceInstance(attribName);
} }
...@@ -1001,11 +973,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -1001,11 +973,6 @@ public abstract class BaseCandidate extends SecUserExtension
return JobApplication.SINGLEREFERENCE_Candidate ; return JobApplication.SINGLEREFERENCE_Candidate ;
} }
if (MULTIPLEREFERENCE_FactorScores.equals(attribName))
{
return FactorScore.SINGLEREFERENCE_Candidate ;
}
return super.getMultiAssocBackReference(attribName); return super.getMultiAssocBackReference(attribName);
} }
...@@ -1027,11 +994,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -1027,11 +994,6 @@ public abstract class BaseCandidate extends SecUserExtension
return this.getJobApplicationsCount(); return this.getJobApplicationsCount();
} }
if (MULTIPLEREFERENCE_FactorScores.equals(attribName))
{
return this.getFactorScoresCount();
}
return super.getMultiAssocCount(attribName); return super.getMultiAssocCount(attribName);
} }
...@@ -1053,11 +1015,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -1053,11 +1015,6 @@ public abstract class BaseCandidate extends SecUserExtension
return this.getJobApplicationsAt(index); return this.getJobApplicationsAt(index);
} }
if (MULTIPLEREFERENCE_FactorScores.equals(attribName))
{
return this.getFactorScoresAt(index);
}
return super.getMultiAssocAt(attribName, index); return super.getMultiAssocAt(attribName, index);
} }
...@@ -1083,13 +1040,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -1083,13 +1040,6 @@ public abstract class BaseCandidate extends SecUserExtension
return; return;
} }
if (MULTIPLEREFERENCE_FactorScores.equals(attribName))
{
addToFactorScores((FactorScore)newElement);
return;
}
super.addToMultiAssoc(attribName, newElement); super.addToMultiAssoc(attribName, newElement);
} }
...@@ -1114,13 +1064,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -1114,13 +1064,6 @@ public abstract class BaseCandidate extends SecUserExtension
return; return;
} }
if (MULTIPLEREFERENCE_FactorScores.equals(attribName))
{
removeFromFactorScores((FactorScore)oldElement);
return;
}
super.removeFromMultiAssoc(attribName, oldElement); super.removeFromMultiAssoc(attribName, oldElement);
} }
...@@ -1141,12 +1084,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -1141,12 +1084,6 @@ public abstract class BaseCandidate extends SecUserExtension
return; return;
} }
if (MULTIPLEREFERENCE_FactorScores.equals(attribName))
{
_FactorScores.__loadAssociation (elements);
return;
}
super.__loadMultiAssoc(attribName, elements); super.__loadMultiAssoc(attribName, elements);
} }
...@@ -1165,11 +1102,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -1165,11 +1102,6 @@ public abstract class BaseCandidate extends SecUserExtension
return _JobApplications.isLoaded (); return _JobApplications.isLoaded ();
} }
if (MULTIPLEREFERENCE_FactorScores.equals(attribName))
{
return _FactorScores.isLoaded ();
}
return super.__isMultiAssocLoaded(attribName); return super.__isMultiAssocLoaded(attribName);
} }
...@@ -1314,75 +1246,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -1314,75 +1246,6 @@ public abstract class BaseCandidate extends SecUserExtension
return _JobApplications.getSet (); return _JobApplications.getSet ();
} }
public FieldWriteability getWriteability_FactorScores ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
public int getFactorScoresCount () throws StorageException
{
assertValid();
return _FactorScores.getReferencedObjectsCount ();
}
public void addToFactorScores (FactorScore newElement) throws StorageException
{
if (_FactorScores.wouldAddChange (newElement))
{
assertValid();
Debug.assertion (getWriteability_FactorScores () != FieldWriteability.FALSE, "MultiAssoc FactorScores is not writeable (add)");
_FactorScores.appendElement (newElement);
try
{
if (newElement.getCandidate () != this)
{
newElement.setCandidate ((Candidate)(this));
}
}
catch (Exception e)
{
throw NestedException.wrap(e);
}
}
}
public void removeFromFactorScores (FactorScore elementToRemove) throws StorageException
{
if (_FactorScores.wouldRemoveChange (elementToRemove))
{
assertValid();
Debug.assertion (getWriteability_FactorScores () != FieldWriteability.FALSE, "MultiAssoc FactorScores is not writeable (remove)");
_FactorScores.removeElement (elementToRemove);
try
{
if (elementToRemove.getCandidate () != null)
{
elementToRemove.setCandidate (null);
}
}
catch (Exception e)
{
throw NestedException.wrap(e);
}
}
}
public FactorScore getFactorScoresAt (int index) throws StorageException
{
return (FactorScore)(_FactorScores.getElementAt (index));
}
public SortedSet<FactorScore> getFactorScoresSet () throws StorageException
{
return _FactorScores.getSet ();
}
public void onDelete () public void onDelete ()
...@@ -1415,12 +1278,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -1415,12 +1278,6 @@ public abstract class BaseCandidate extends SecUserExtension
referenced.setCandidate(null); referenced.setCandidate(null);
} }
for(FactorScore referenced : CollectionUtils.reverse(getFactorScoresSet()))
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null Candidate from ", getObjectID (), " to ", referenced.getObjectID ());
referenced.setCandidate(null);
}
} }
catch (Exception e) catch (Exception e)
{ {
...@@ -1610,7 +1467,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -1610,7 +1467,6 @@ public abstract class BaseCandidate extends SecUserExtension
_TestAnalysises.copyFrom (sourceCandidate._TestAnalysises, linkToGhosts); _TestAnalysises.copyFrom (sourceCandidate._TestAnalysises, linkToGhosts);
_JobApplications.copyFrom (sourceCandidate._JobApplications, linkToGhosts); _JobApplications.copyFrom (sourceCandidate._JobApplications, linkToGhosts);
_FactorScores.copyFrom (sourceCandidate._FactorScores, linkToGhosts);
} }
} }
...@@ -1638,7 +1494,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -1638,7 +1494,6 @@ public abstract class BaseCandidate extends SecUserExtension
_TestInput.readExternalData(vals.get(SINGLEREFERENCE_TestInput)); _TestInput.readExternalData(vals.get(SINGLEREFERENCE_TestInput));
_TestAnalysises.readExternalData(vals.get(MULTIPLEREFERENCE_TestAnalysises)); _TestAnalysises.readExternalData(vals.get(MULTIPLEREFERENCE_TestAnalysises));
_JobApplications.readExternalData(vals.get(MULTIPLEREFERENCE_JobApplications)); _JobApplications.readExternalData(vals.get(MULTIPLEREFERENCE_JobApplications));
_FactorScores.readExternalData(vals.get(MULTIPLEREFERENCE_FactorScores));
} }
...@@ -1657,7 +1512,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -1657,7 +1512,6 @@ public abstract class BaseCandidate extends SecUserExtension
vals.put (SINGLEREFERENCE_TestInput, _TestInput.writeExternalData()); vals.put (SINGLEREFERENCE_TestInput, _TestInput.writeExternalData());
vals.put (MULTIPLEREFERENCE_TestAnalysises, _TestAnalysises.writeExternalData()); vals.put (MULTIPLEREFERENCE_TestAnalysises, _TestAnalysises.writeExternalData());
vals.put (MULTIPLEREFERENCE_JobApplications, _JobApplications.writeExternalData()); vals.put (MULTIPLEREFERENCE_JobApplications, _JobApplications.writeExternalData());
vals.put (MULTIPLEREFERENCE_FactorScores, _FactorScores.writeExternalData());
} }
...@@ -1695,7 +1549,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -1695,7 +1549,6 @@ public abstract class BaseCandidate extends SecUserExtension
// Compare multiple assocs // Compare multiple assocs
_TestAnalysises.compare (otherCandidate._TestAnalysises, listener); _TestAnalysises.compare (otherCandidate._TestAnalysises, listener);
_JobApplications.compare (otherCandidate._JobApplications, listener); _JobApplications.compare (otherCandidate._JobApplications, listener);
_FactorScores.compare (otherCandidate._FactorScores, listener);
} }
} }
...@@ -1720,7 +1573,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -1720,7 +1573,6 @@ public abstract class BaseCandidate extends SecUserExtension
visitor.visitAssociation (_TestInput); visitor.visitAssociation (_TestInput);
visitor.visitAssociation (_TestAnalysises); visitor.visitAssociation (_TestAnalysises);
visitor.visitAssociation (_JobApplications); visitor.visitAssociation (_JobApplications);
visitor.visitAssociation (_FactorScores);
} }
...@@ -1741,10 +1593,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -1741,10 +1593,6 @@ public abstract class BaseCandidate extends SecUserExtension
{ {
visitor.visit (_JobApplications); visitor.visit (_JobApplications);
} }
if (scope.includes (_FactorScores))
{
visitor.visit (_FactorScores);
}
} }
...@@ -2109,10 +1957,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -2109,10 +1957,6 @@ public abstract class BaseCandidate extends SecUserExtension
{ {
return getWriteability_JobApplications (); return getWriteability_JobApplications ();
} }
else if (fieldName.equals (MULTIPLEREFERENCE_FactorScores))
{
return getWriteability_FactorScores ();
}
else if (fieldName.equals (SINGLEREFERENCE_TestInput)) else if (fieldName.equals (SINGLEREFERENCE_TestInput))
{ {
return getWriteability_TestInput (); return getWriteability_TestInput ();
...@@ -2342,10 +2186,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -2342,10 +2186,6 @@ public abstract class BaseCandidate extends SecUserExtension
{ {
return toJobApplications (); return toJobApplications ();
} }
if (name.equals ("FactorScores"))
{
return toFactorScores ();
}
if (name.equals ("Phone")) if (name.equals ("Phone"))
{ {
return toPhone (); return toPhone ();
...@@ -2397,12 +2237,6 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -2397,12 +2237,6 @@ public abstract class BaseCandidate extends SecUserExtension
{ {
return JobApplication.REFERENCE_JobApplication.new JobApplicationPipeLineFactory<From, JobApplication> (this, new ORMMultiAssocPipe<Me, JobApplication>(MULTIPLEREFERENCE_JobApplications, filter)); return JobApplication.REFERENCE_JobApplication.new JobApplicationPipeLineFactory<From, JobApplication> (this, new ORMMultiAssocPipe<Me, JobApplication>(MULTIPLEREFERENCE_JobApplications, filter));
} }
public FactorScore.FactorScorePipeLineFactory<From, FactorScore> toFactorScores () { return toFactorScores(Filter.ALL); }
public FactorScore.FactorScorePipeLineFactory<From, FactorScore> toFactorScores (Filter<FactorScore> filter)
{
return FactorScore.REFERENCE_FactorScore.new FactorScorePipeLineFactory<From, FactorScore> (this, new ORMMultiAssocPipe<Me, FactorScore>(MULTIPLEREFERENCE_FactorScores, filter));
}
} }
...@@ -2482,23 +2316,6 @@ class DummyCandidate extends Candidate ...@@ -2482,23 +2316,6 @@ class DummyCandidate extends Candidate
return new TreeSet(); return new TreeSet();
} }
public int getFactorScoresCount () throws StorageException
{
return 0;
}
public FactorScore getFactorScoresAt (int index) throws StorageException
{
throw new RuntimeException ("No elements in a dummy object in association FactorScores");
}
public SortedSet getFactorScoresSet () throws StorageException
{
return new TreeSet();
}
} }
/*
* IMPORTANT!!!! XSL Autogenerated class, DO NOT EDIT!!!!!
* Template: Infrastructure8.2 rev3 [oneit.objstore.BusinessObjectTemplate.xsl]
*
* Version: 1.0
* Vendor: Apache Software Foundation (Xalan XSLTC)
* Vendor URL: http://xml.apache.org/xalan-j
*/
package performa.orm;
import java.io.*;
import java.util.*;
import oneit.appservices.config.*;
import oneit.logging.*;
import oneit.objstore.*;
import oneit.objstore.assocs.*;
import oneit.objstore.attributes.*;
import oneit.objstore.rdbms.filters.*;
import oneit.objstore.parser.*;
import oneit.objstore.validator.*;
import oneit.objstore.utils.*;
import oneit.utils.*;
import oneit.utils.filter.Filter;
import oneit.utils.transform.*;
import oneit.utils.parsers.FieldException;
import performa.orm.types.*;
public abstract class BaseCandidateClassScore extends BaseBusinessClass
{
// Reference instance for the object
public static final CandidateClassScore REFERENCE_CandidateClassScore = new CandidateClassScore ();
// Reference instance for the object
public static final CandidateClassScore DUMMY_CandidateClassScore = new DummyCandidateClassScore ();
// Static constants corresponding to field names
public static final String FIELD_ClassScore = "ClassScore";
public static final String FIELD_WghtdClassScore = "WghtdClassScore";
public static final String FIELD_MaxWghtdClassScore = "MaxWghtdClassScore";
public static final String FIELD_ColorCode = "ColorCode";
public static final String FIELD_WghtdColorCode = "WghtdColorCode";
public static final String FIELD_FactorClass = "FactorClass";
public static final String SINGLEREFERENCE_TestAnalysis = "TestAnalysis";
public static final String BACKREF_TestAnalysis = "";
// Static constants corresponding to searches
public static final String SEARCH_All = "All";
// Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper<CandidateClassScore> HELPER_ClassScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<CandidateClassScore> HELPER_WghtdClassScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<CandidateClassScore> HELPER_MaxWghtdClassScore = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper<CandidateClassScore, ColorCode> HELPER_ColorCode = new EnumeratedAttributeHelper<CandidateClassScore, ColorCode> (ColorCode.FACTORY_ColorCode);
private static final EnumeratedAttributeHelper<CandidateClassScore, ColorCode> HELPER_WghtdColorCode = new EnumeratedAttributeHelper<CandidateClassScore, ColorCode> (ColorCode.FACTORY_ColorCode);
private static final EnumeratedAttributeHelper<CandidateClassScore, FactorClass> HELPER_FactorClass = new EnumeratedAttributeHelper<CandidateClassScore, FactorClass> (FactorClass.FACTORY_FactorClass);
// Private attributes corresponding to business object data
private Integer _ClassScore;
private Integer _WghtdClassScore;
private Integer _MaxWghtdClassScore;
private ColorCode _ColorCode;
private ColorCode _WghtdColorCode;
private FactorClass _FactorClass;
// Private attributes corresponding to single references
private SingleAssociation<CandidateClassScore, TestAnalysis> _TestAnalysis;
// Private attributes corresponding to multiple references
// Map of maps of metadata
private static final Map ATTRIBUTES_METADATA_CandidateClassScore = new HashMap ();
// Arrays of validators for each attribute
private static final AttributeValidator[] FIELD_ClassScore_Validators;
private static final AttributeValidator[] FIELD_WghtdClassScore_Validators;
private static final AttributeValidator[] FIELD_MaxWghtdClassScore_Validators;
private static final AttributeValidator[] FIELD_ColorCode_Validators;
private static final AttributeValidator[] FIELD_WghtdColorCode_Validators;
private static final AttributeValidator[] FIELD_FactorClass_Validators;
// Arrays of behaviour decorators
private static final CandidateClassScoreBehaviourDecorator[] CandidateClassScore_BehaviourDecorators;
static
{
try
{
String tmp_TestAnalysis = TestAnalysis.BACKREF_CandidateClassScores;
Map validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping"));
setupAssocMetaData_TestAnalysis();
FIELD_ClassScore_Validators = (AttributeValidator[])setupAttribMetaData_ClassScore(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_WghtdClassScore_Validators = (AttributeValidator[])setupAttribMetaData_WghtdClassScore(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_MaxWghtdClassScore_Validators = (AttributeValidator[])setupAttribMetaData_MaxWghtdClassScore(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_ColorCode_Validators = (AttributeValidator[])setupAttribMetaData_ColorCode(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_WghtdColorCode_Validators = (AttributeValidator[])setupAttribMetaData_WghtdColorCode(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_FactorClass_Validators = (AttributeValidator[])setupAttribMetaData_FactorClass(validatorMapping).toArray (new AttributeValidator[0]);
REFERENCE_CandidateClassScore.initialiseReference ();
DUMMY_CandidateClassScore.initialiseReference ();
CandidateClassScore_BehaviourDecorators = BaseBusinessClass.getBBCBehaviours(CandidateClassScore.class).toArray(new CandidateClassScoreBehaviourDecorator[0]);
}
catch (RuntimeException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR1, e, "Error initialising");
throw e;
}
}
// Meta Info setup
private static void setupAssocMetaData_TestAnalysis()
{
Map metaInfo = new HashMap ();
metaInfo.put ("backreferenceName", "CandidateClassScores");
metaInfo.put ("dbcol", "test_analysis_id");
metaInfo.put ("name", "TestAnalysis");
metaInfo.put ("type", "TestAnalysis");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for CandidateClassScore.TestAnalysis:", metaInfo);
ATTRIBUTES_METADATA_CandidateClassScore.put (SINGLEREFERENCE_TestAnalysis, Collections.unmodifiableMap (metaInfo));
}
// Meta Info setup
private static List setupAttribMetaData_ClassScore(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "class_score");
metaInfo.put ("name", "ClassScore");
metaInfo.put ("type", "Integer");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for CandidateClassScore.ClassScore:", metaInfo);
ATTRIBUTES_METADATA_CandidateClassScore.put (FIELD_ClassScore, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(CandidateClassScore.class, "ClassScore", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for CandidateClassScore.ClassScore:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_WghtdClassScore(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "wghtd_class_score");
metaInfo.put ("name", "WghtdClassScore");
metaInfo.put ("type", "Integer");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for CandidateClassScore.WghtdClassScore:", metaInfo);
ATTRIBUTES_METADATA_CandidateClassScore.put (FIELD_WghtdClassScore, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(CandidateClassScore.class, "WghtdClassScore", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for CandidateClassScore.WghtdClassScore:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_MaxWghtdClassScore(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "max_wghtd_class_score");
metaInfo.put ("name", "MaxWghtdClassScore");
metaInfo.put ("type", "Integer");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for CandidateClassScore.MaxWghtdClassScore:", metaInfo);
ATTRIBUTES_METADATA_CandidateClassScore.put (FIELD_MaxWghtdClassScore, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(CandidateClassScore.class, "MaxWghtdClassScore", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for CandidateClassScore.MaxWghtdClassScore:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_ColorCode(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("dbcol", "color_code");
metaInfo.put ("name", "ColorCode");
metaInfo.put ("type", "ColorCode");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for CandidateClassScore.ColorCode:", metaInfo);
ATTRIBUTES_METADATA_CandidateClassScore.put (FIELD_ColorCode, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(CandidateClassScore.class, "ColorCode", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for CandidateClassScore.ColorCode:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_WghtdColorCode(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("dbcol", "wghtd_color_code");
metaInfo.put ("name", "WghtdColorCode");
metaInfo.put ("type", "ColorCode");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for CandidateClassScore.WghtdColorCode:", metaInfo);
ATTRIBUTES_METADATA_CandidateClassScore.put (FIELD_WghtdColorCode, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(CandidateClassScore.class, "WghtdColorCode", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for CandidateClassScore.WghtdColorCode:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_FactorClass(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("dbcol", "factor_class");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "FactorClass");
metaInfo.put ("type", "FactorClass");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for CandidateClassScore.FactorClass:", metaInfo);
ATTRIBUTES_METADATA_CandidateClassScore.put (FIELD_FactorClass, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(CandidateClassScore.class, "FactorClass", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for CandidateClassScore.FactorClass:", validators);
return validators;
}
// END OF STATIC METADATA DEFINITION
// This constructor should not be called
protected BaseCandidateClassScore ()
{
}
protected BBCBehaviourDecorator[] getBehaviours()
{
return CandidateClassScore_BehaviourDecorators;
}
// Initialise the attributes
protected void _initialiseNewObjAttributes (ObjectTransaction transaction) throws StorageException
{
super._initialiseNewObjAttributes (transaction);
_ClassScore = (Integer)(HELPER_ClassScore.initialise (_ClassScore));
_WghtdClassScore = (Integer)(HELPER_WghtdClassScore.initialise (_WghtdClassScore));
_MaxWghtdClassScore = (Integer)(HELPER_MaxWghtdClassScore.initialise (_MaxWghtdClassScore));
_ColorCode = (ColorCode)(HELPER_ColorCode.initialise (_ColorCode));
_WghtdColorCode = (ColorCode)(HELPER_WghtdColorCode.initialise (_WghtdColorCode));
_FactorClass = (FactorClass)(HELPER_FactorClass.initialise (_FactorClass));
}
// Initialise the associations
protected void _initialiseAssociations ()
{
super._initialiseAssociations ();
_TestAnalysis = new SingleAssociation<CandidateClassScore, TestAnalysis> (this, SINGLEREFERENCE_TestAnalysis, TestAnalysis.MULTIPLEREFERENCE_CandidateClassScores, TestAnalysis.REFERENCE_TestAnalysis, "tl_candidate_class_score");
}
// Initialise the associations
protected BaseBusinessClass initialiseReference ()
{
super.initialiseReference ();
_TestAnalysis = new SingleAssociation<CandidateClassScore, TestAnalysis> (this, SINGLEREFERENCE_TestAnalysis, TestAnalysis.MULTIPLEREFERENCE_CandidateClassScores, TestAnalysis.REFERENCE_TestAnalysis, "tl_candidate_class_score");
return this;
}
/**
* Get the attribute ClassScore
*/
public Integer getClassScore ()
{
assertValid();
Integer valToReturn = _ClassScore;
for (CandidateClassScoreBehaviourDecorator bhd : CandidateClassScore_BehaviourDecorators)
{
valToReturn = bhd.getClassScore ((CandidateClassScore)this, valToReturn);
}
return valToReturn;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preClassScoreChange (Integer newClassScore) throws FieldException
{
}
/**
* Called after the attribute changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postClassScoreChange () throws FieldException
{
}
public FieldWriteability getWriteability_ClassScore ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute ClassScore. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setClassScore (Integer newClassScore) throws FieldException
{
boolean oldAndNewIdentical = HELPER_ClassScore.compare (_ClassScore, newClassScore);
try
{
for (CandidateClassScoreBehaviourDecorator bhd : CandidateClassScore_BehaviourDecorators)
{
newClassScore = bhd.setClassScore ((CandidateClassScore)this, newClassScore);
oldAndNewIdentical = HELPER_ClassScore.compare (_ClassScore, newClassScore);
}
if (FIELD_ClassScore_Validators.length > 0)
{
Object newClassScoreObj = HELPER_ClassScore.toObject (newClassScore);
if (newClassScoreObj != null)
{
int loopMax = FIELD_ClassScore_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_CandidateClassScore.get (FIELD_ClassScore);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_ClassScore_Validators[v].checkAttribute (this, FIELD_ClassScore, metadata, newClassScoreObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_ClassScore () != FieldWriteability.FALSE, "Field ClassScore is not writeable");
preClassScoreChange (newClassScore);
markFieldChange (FIELD_ClassScore);
_ClassScore = newClassScore;
postFieldChange (FIELD_ClassScore);
postClassScoreChange ();
}
}
/**
* Get the attribute WghtdClassScore
*/
public Integer getWghtdClassScore ()
{
assertValid();
Integer valToReturn = _WghtdClassScore;
for (CandidateClassScoreBehaviourDecorator bhd : CandidateClassScore_BehaviourDecorators)
{
valToReturn = bhd.getWghtdClassScore ((CandidateClassScore)this, valToReturn);
}
return valToReturn;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preWghtdClassScoreChange (Integer newWghtdClassScore) throws FieldException
{
}
/**
* Called after the attribute changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postWghtdClassScoreChange () throws FieldException
{
}
public FieldWriteability getWriteability_WghtdClassScore ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute WghtdClassScore. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setWghtdClassScore (Integer newWghtdClassScore) throws FieldException
{
boolean oldAndNewIdentical = HELPER_WghtdClassScore.compare (_WghtdClassScore, newWghtdClassScore);
try
{
for (CandidateClassScoreBehaviourDecorator bhd : CandidateClassScore_BehaviourDecorators)
{
newWghtdClassScore = bhd.setWghtdClassScore ((CandidateClassScore)this, newWghtdClassScore);
oldAndNewIdentical = HELPER_WghtdClassScore.compare (_WghtdClassScore, newWghtdClassScore);
}
if (FIELD_WghtdClassScore_Validators.length > 0)
{
Object newWghtdClassScoreObj = HELPER_WghtdClassScore.toObject (newWghtdClassScore);
if (newWghtdClassScoreObj != null)
{
int loopMax = FIELD_WghtdClassScore_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_CandidateClassScore.get (FIELD_WghtdClassScore);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_WghtdClassScore_Validators[v].checkAttribute (this, FIELD_WghtdClassScore, metadata, newWghtdClassScoreObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_WghtdClassScore () != FieldWriteability.FALSE, "Field WghtdClassScore is not writeable");
preWghtdClassScoreChange (newWghtdClassScore);
markFieldChange (FIELD_WghtdClassScore);
_WghtdClassScore = newWghtdClassScore;
postFieldChange (FIELD_WghtdClassScore);
postWghtdClassScoreChange ();
}
}
/**
* Get the attribute MaxWghtdClassScore
*/
public Integer getMaxWghtdClassScore ()
{
assertValid();
Integer valToReturn = _MaxWghtdClassScore;
for (CandidateClassScoreBehaviourDecorator bhd : CandidateClassScore_BehaviourDecorators)
{
valToReturn = bhd.getMaxWghtdClassScore ((CandidateClassScore)this, valToReturn);
}
return valToReturn;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preMaxWghtdClassScoreChange (Integer newMaxWghtdClassScore) throws FieldException
{
}
/**
* Called after the attribute changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postMaxWghtdClassScoreChange () throws FieldException
{
}
public FieldWriteability getWriteability_MaxWghtdClassScore ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute MaxWghtdClassScore. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setMaxWghtdClassScore (Integer newMaxWghtdClassScore) throws FieldException
{
boolean oldAndNewIdentical = HELPER_MaxWghtdClassScore.compare (_MaxWghtdClassScore, newMaxWghtdClassScore);
try
{
for (CandidateClassScoreBehaviourDecorator bhd : CandidateClassScore_BehaviourDecorators)
{
newMaxWghtdClassScore = bhd.setMaxWghtdClassScore ((CandidateClassScore)this, newMaxWghtdClassScore);
oldAndNewIdentical = HELPER_MaxWghtdClassScore.compare (_MaxWghtdClassScore, newMaxWghtdClassScore);
}
if (FIELD_MaxWghtdClassScore_Validators.length > 0)
{
Object newMaxWghtdClassScoreObj = HELPER_MaxWghtdClassScore.toObject (newMaxWghtdClassScore);
if (newMaxWghtdClassScoreObj != null)
{
int loopMax = FIELD_MaxWghtdClassScore_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_CandidateClassScore.get (FIELD_MaxWghtdClassScore);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_MaxWghtdClassScore_Validators[v].checkAttribute (this, FIELD_MaxWghtdClassScore, metadata, newMaxWghtdClassScoreObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_MaxWghtdClassScore () != FieldWriteability.FALSE, "Field MaxWghtdClassScore is not writeable");
preMaxWghtdClassScoreChange (newMaxWghtdClassScore);
markFieldChange (FIELD_MaxWghtdClassScore);
_MaxWghtdClassScore = newMaxWghtdClassScore;
postFieldChange (FIELD_MaxWghtdClassScore);
postMaxWghtdClassScoreChange ();
}
}
/**
* Get the attribute ColorCode
*/
public ColorCode getColorCode ()
{
assertValid();
ColorCode valToReturn = _ColorCode;
for (CandidateClassScoreBehaviourDecorator bhd : CandidateClassScore_BehaviourDecorators)
{
valToReturn = bhd.getColorCode ((CandidateClassScore)this, valToReturn);
}
return valToReturn;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preColorCodeChange (ColorCode newColorCode) throws FieldException
{
}
/**
* Called after the attribute changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postColorCodeChange () throws FieldException
{
}
public FieldWriteability getWriteability_ColorCode ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute ColorCode. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setColorCode (ColorCode newColorCode) throws FieldException
{
boolean oldAndNewIdentical = HELPER_ColorCode.compare (_ColorCode, newColorCode);
try
{
for (CandidateClassScoreBehaviourDecorator bhd : CandidateClassScore_BehaviourDecorators)
{
newColorCode = bhd.setColorCode ((CandidateClassScore)this, newColorCode);
oldAndNewIdentical = HELPER_ColorCode.compare (_ColorCode, newColorCode);
}
if (FIELD_ColorCode_Validators.length > 0)
{
Object newColorCodeObj = HELPER_ColorCode.toObject (newColorCode);
if (newColorCodeObj != null)
{
int loopMax = FIELD_ColorCode_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_CandidateClassScore.get (FIELD_ColorCode);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_ColorCode_Validators[v].checkAttribute (this, FIELD_ColorCode, metadata, newColorCodeObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_ColorCode () != FieldWriteability.FALSE, "Field ColorCode is not writeable");
preColorCodeChange (newColorCode);
markFieldChange (FIELD_ColorCode);
_ColorCode = newColorCode;
postFieldChange (FIELD_ColorCode);
postColorCodeChange ();
}
}
/**
* Get the attribute WghtdColorCode
*/
public ColorCode getWghtdColorCode ()
{
assertValid();
ColorCode valToReturn = _WghtdColorCode;
for (CandidateClassScoreBehaviourDecorator bhd : CandidateClassScore_BehaviourDecorators)
{
valToReturn = bhd.getWghtdColorCode ((CandidateClassScore)this, valToReturn);
}
return valToReturn;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preWghtdColorCodeChange (ColorCode newWghtdColorCode) throws FieldException
{
}
/**
* Called after the attribute changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postWghtdColorCodeChange () throws FieldException
{
}
public FieldWriteability getWriteability_WghtdColorCode ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute WghtdColorCode. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setWghtdColorCode (ColorCode newWghtdColorCode) throws FieldException
{
boolean oldAndNewIdentical = HELPER_WghtdColorCode.compare (_WghtdColorCode, newWghtdColorCode);
try
{
for (CandidateClassScoreBehaviourDecorator bhd : CandidateClassScore_BehaviourDecorators)
{
newWghtdColorCode = bhd.setWghtdColorCode ((CandidateClassScore)this, newWghtdColorCode);
oldAndNewIdentical = HELPER_WghtdColorCode.compare (_WghtdColorCode, newWghtdColorCode);
}
if (FIELD_WghtdColorCode_Validators.length > 0)
{
Object newWghtdColorCodeObj = HELPER_WghtdColorCode.toObject (newWghtdColorCode);
if (newWghtdColorCodeObj != null)
{
int loopMax = FIELD_WghtdColorCode_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_CandidateClassScore.get (FIELD_WghtdColorCode);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_WghtdColorCode_Validators[v].checkAttribute (this, FIELD_WghtdColorCode, metadata, newWghtdColorCodeObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_WghtdColorCode () != FieldWriteability.FALSE, "Field WghtdColorCode is not writeable");
preWghtdColorCodeChange (newWghtdColorCode);
markFieldChange (FIELD_WghtdColorCode);
_WghtdColorCode = newWghtdColorCode;
postFieldChange (FIELD_WghtdColorCode);
postWghtdColorCodeChange ();
}
}
/**
* Get the attribute FactorClass
*/
public FactorClass getFactorClass ()
{
assertValid();
FactorClass valToReturn = _FactorClass;
for (CandidateClassScoreBehaviourDecorator bhd : CandidateClassScore_BehaviourDecorators)
{
valToReturn = bhd.getFactorClass ((CandidateClassScore)this, valToReturn);
}
return valToReturn;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preFactorClassChange (FactorClass newFactorClass) throws FieldException
{
}
/**
* Called after the attribute changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postFactorClassChange () throws FieldException
{
}
public FieldWriteability getWriteability_FactorClass ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute FactorClass. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setFactorClass (FactorClass newFactorClass) throws FieldException
{
boolean oldAndNewIdentical = HELPER_FactorClass.compare (_FactorClass, newFactorClass);
try
{
for (CandidateClassScoreBehaviourDecorator bhd : CandidateClassScore_BehaviourDecorators)
{
newFactorClass = bhd.setFactorClass ((CandidateClassScore)this, newFactorClass);
oldAndNewIdentical = HELPER_FactorClass.compare (_FactorClass, newFactorClass);
}
BusinessObjectParser.assertFieldCondition (newFactorClass != null, this, FIELD_FactorClass, "mandatory");
if (FIELD_FactorClass_Validators.length > 0)
{
Object newFactorClassObj = HELPER_FactorClass.toObject (newFactorClass);
if (newFactorClassObj != null)
{
int loopMax = FIELD_FactorClass_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_CandidateClassScore.get (FIELD_FactorClass);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_FactorClass_Validators[v].checkAttribute (this, FIELD_FactorClass, metadata, newFactorClassObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_FactorClass () != FieldWriteability.FALSE, "Field FactorClass is not writeable");
preFactorClassChange (newFactorClass);
markFieldChange (FIELD_FactorClass);
_FactorClass = newFactorClass;
postFieldChange (FIELD_FactorClass);
postFactorClassChange ();
}
}
/**
* A list of multi assoc names e.g. list of strings.
*/
public List<String> getSingleAssocs()
{
List result = super.getSingleAssocs ();
result.add("TestAnalysis");
return result;
}
public BaseBusinessClass getSingleAssocReferenceInstance (String assocName)
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_TestAnalysis))
{
return _TestAnalysis.getReferencedType ();
}
else
{
return super.getSingleAssocReferenceInstance (assocName);
}
}
public String getSingleAssocBackReference(String assocName)
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_TestAnalysis))
{
return TestAnalysis.MULTIPLEREFERENCE_CandidateClassScores ;
}
else
{
return super.getSingleAssocBackReference (assocName);
}
}
public BaseBusinessClass getSingleAssoc (String assocName) throws StorageException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_TestAnalysis))
{
return getTestAnalysis ();
}
else
{
return super.getSingleAssoc (assocName);
}
}
public BaseBusinessClass getSingleAssoc (String assocName, Get getType) throws StorageException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_TestAnalysis))
{
return getTestAnalysis (getType);
}
else
{
return super.getSingleAssoc (assocName, getType);
}
}
public Long getSingleAssocID (String assocName) throws StorageException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_TestAnalysis))
{
return getTestAnalysisID ();
}
else
{
return super.getSingleAssocID (assocName);
}
}
public void setSingleAssoc (String assocName, BaseBusinessClass newValue) throws StorageException, FieldException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_TestAnalysis))
{
setTestAnalysis ((TestAnalysis)(newValue));
}
else
{
super.setSingleAssoc (assocName, newValue);
}
}
/**
* Get the reference TestAnalysis
*/
public TestAnalysis getTestAnalysis () throws StorageException
{
assertValid();
try
{
return (TestAnalysis)(_TestAnalysis.get ());
}
catch (ClassCastException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in CandidateClassScore:", this.getObjectID (), ", was trying to get TestAnalysis:", getTestAnalysisID ());
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _TestAnalysis.get ().getClass ());
throw e;
}
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public TestAnalysis getTestAnalysis (Get getType) throws StorageException
{
assertValid();
return _TestAnalysis.get(getType);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getTestAnalysisID ()
{
assertValid();
if (_TestAnalysis == null)
{
return null;
}
else
{
return _TestAnalysis.getID ();
}
}
/**
* Called prior to the assoc changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preTestAnalysisChange (TestAnalysis newTestAnalysis) throws FieldException
{
}
/**
* Called after the assoc changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postTestAnalysisChange () throws FieldException
{
}
public FieldWriteability getWriteability_TestAnalysis ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the reference TestAnalysis. Checks to ensure a new value
* has been supplied. If so, marks the reference as altered and sets it.
*/
public void setTestAnalysis (TestAnalysis newTestAnalysis) throws StorageException, FieldException
{
if (_TestAnalysis.wouldReferencedChange (newTestAnalysis))
{
assertValid();
Debug.assertion (getWriteability_TestAnalysis () != FieldWriteability.FALSE, "Assoc TestAnalysis is not writeable");
preTestAnalysisChange (newTestAnalysis);
TestAnalysis oldTestAnalysis = getTestAnalysis ();
if (oldTestAnalysis != null)
{
// This is to stop validation from triggering when we are removed
_TestAnalysis.set (null);
oldTestAnalysis.removeFromCandidateClassScores ((CandidateClassScore)(this));
}
_TestAnalysis.set (newTestAnalysis);
if (newTestAnalysis != null)
{
newTestAnalysis.addToCandidateClassScores ((CandidateClassScore)(this));
}
postTestAnalysisChange ();
}
}
/**
* A list of multi assoc names e.g. list of strings.
*/
public List<String> getMultiAssocs()
{
List result = super.getMultiAssocs ();
return result;
}
/**
* Get the reference instance for the multi assoc name.
*/
public BaseBusinessClass getMultiAssocReferenceInstance(String attribName)
{
return super.getMultiAssocReferenceInstance(attribName);
}
public String getMultiAssocBackReference(String attribName)
{
return super.getMultiAssocBackReference(attribName);
}
/**
* Get the assoc count for the multi assoc name.
*/
public int getMultiAssocCount(String attribName) throws StorageException
{
return super.getMultiAssocCount(attribName);
}
/**
* Get the assoc at a particular index
*/
public BaseBusinessClass getMultiAssocAt(String attribName, int index) throws StorageException
{
return super.getMultiAssocAt(attribName, index);
}
/**
* Add to a multi assoc by attribute name
*/
public void addToMultiAssoc(String attribName, BaseBusinessClass newElement) throws StorageException
{
super.addToMultiAssoc(attribName, newElement);
}
/**
* Remove from a multi assoc by attribute name
*/
public void removeFromMultiAssoc(String attribName, BaseBusinessClass oldElement) throws StorageException
{
super.removeFromMultiAssoc(attribName, oldElement);
}
protected void __loadMultiAssoc (String attribName, BaseBusinessClass[] elements)
{
super.__loadMultiAssoc(attribName, elements);
}
protected boolean __isMultiAssocLoaded (String attribName)
{
return super.__isMultiAssocLoaded(attribName);
}
public void onDelete ()
{
try
{
// Ensure we are removed from any loaded multi-associations that aren't mandatory
if (_TestAnalysis.isLoaded () || getTransaction ().isObjectLoaded (_TestAnalysis.getReferencedType (), getTestAnalysisID ()))
{
TestAnalysis referenced = getTestAnalysis ();
if (referenced != null)
{
// Stop the callback
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null CandidateClassScores from ", getObjectID (), " to ", referenced.getObjectID ());
_TestAnalysis.set (null);
referenced.removeFromCandidateClassScores ((CandidateClassScore)this);
}
}
}
catch (Exception e)
{
throw NestedException.wrap(e);
}
super.onDelete ();
}
public CandidateClassScore newInstance ()
{
return new CandidateClassScore ();
}
public CandidateClassScore referenceInstance ()
{
return REFERENCE_CandidateClassScore;
}
public CandidateClassScore getInTransaction (ObjectTransaction t) throws StorageException
{
return getCandidateClassScoreByID (t, getObjectID());
}
public BaseBusinessClass dummyInstance ()
{
return DUMMY_CandidateClassScore;
}
public String getBaseSetName ()
{
return "tl_candidate_class_score";
}
/**
* This is where an object returns the Persistent sets that will
* store it into the database.
* The should be entered into allSets
*/
public void getPersistentSets (PersistentSetCollection allSets)
{
ObjectStatus myStatus = getStatus ();
PersistentSetStatus myPSetStatus = myStatus.getPSetStatus();
ObjectID myID = getID();
super.getPersistentSets (allSets);
PersistentSet tl_candidate_class_scorePSet = allSets.getPersistentSet (myID, "tl_candidate_class_score", myPSetStatus);
tl_candidate_class_scorePSet.setAttrib (FIELD_ObjectID, myID);
tl_candidate_class_scorePSet.setAttrib (FIELD_ClassScore, HELPER_ClassScore.toObject (_ClassScore)); //
tl_candidate_class_scorePSet.setAttrib (FIELD_WghtdClassScore, HELPER_WghtdClassScore.toObject (_WghtdClassScore)); //
tl_candidate_class_scorePSet.setAttrib (FIELD_MaxWghtdClassScore, HELPER_MaxWghtdClassScore.toObject (_MaxWghtdClassScore)); //
tl_candidate_class_scorePSet.setAttrib (FIELD_ColorCode, HELPER_ColorCode.toObject (_ColorCode)); //
tl_candidate_class_scorePSet.setAttrib (FIELD_WghtdColorCode, HELPER_WghtdColorCode.toObject (_WghtdColorCode)); //
tl_candidate_class_scorePSet.setAttrib (FIELD_FactorClass, HELPER_FactorClass.toObject (_FactorClass)); //
_TestAnalysis.getPersistentSets (allSets);
}
/**
* Sets the objects state based on Persistent sets.
*/
public void setFromPersistentSets (ObjectID objectID, PersistentSetCollection allSets)
{
super.setFromPersistentSets (objectID, allSets);
PersistentSet tl_candidate_class_scorePSet = allSets.getPersistentSet (objectID, "tl_candidate_class_score");
_ClassScore = (Integer)(HELPER_ClassScore.fromObject (_ClassScore, tl_candidate_class_scorePSet.getAttrib (FIELD_ClassScore))); //
_WghtdClassScore = (Integer)(HELPER_WghtdClassScore.fromObject (_WghtdClassScore, tl_candidate_class_scorePSet.getAttrib (FIELD_WghtdClassScore))); //
_MaxWghtdClassScore = (Integer)(HELPER_MaxWghtdClassScore.fromObject (_MaxWghtdClassScore, tl_candidate_class_scorePSet.getAttrib (FIELD_MaxWghtdClassScore))); //
_ColorCode = (ColorCode)(HELPER_ColorCode.fromObject (_ColorCode, tl_candidate_class_scorePSet.getAttrib (FIELD_ColorCode))); //
_WghtdColorCode = (ColorCode)(HELPER_WghtdColorCode.fromObject (_WghtdColorCode, tl_candidate_class_scorePSet.getAttrib (FIELD_WghtdColorCode))); //
_FactorClass = (FactorClass)(HELPER_FactorClass.fromObject (_FactorClass, tl_candidate_class_scorePSet.getAttrib (FIELD_FactorClass))); //
_TestAnalysis.setFromPersistentSets (objectID, allSets);
}
public void setAttributesFrom (BaseBusinessClass other, MultiException e)
{
super.setAttributesFrom (other, e);
if (other instanceof CandidateClassScore)
{
CandidateClassScore otherCandidateClassScore = (CandidateClassScore)other;
try
{
setClassScore (otherCandidateClassScore.getClassScore ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setWghtdClassScore (otherCandidateClassScore.getWghtdClassScore ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setMaxWghtdClassScore (otherCandidateClassScore.getMaxWghtdClassScore ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setColorCode (otherCandidateClassScore.getColorCode ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setWghtdColorCode (otherCandidateClassScore.getWghtdColorCode ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setFactorClass (otherCandidateClassScore.getFactorClass ());
}
catch (FieldException ex)
{
e.addException (ex);
}
}
}
/**
* Set the attributes in this to copies of the attributes in source.
*/
public void copyAttributesFrom (BaseBusinessClass source)
{
super.copyAttributesFrom (source);
if (source instanceof BaseCandidateClassScore)
{
BaseCandidateClassScore sourceCandidateClassScore = (BaseCandidateClassScore)(source);
_ClassScore = sourceCandidateClassScore._ClassScore;
_WghtdClassScore = sourceCandidateClassScore._WghtdClassScore;
_MaxWghtdClassScore = sourceCandidateClassScore._MaxWghtdClassScore;
_ColorCode = sourceCandidateClassScore._ColorCode;
_WghtdColorCode = sourceCandidateClassScore._WghtdColorCode;
_FactorClass = sourceCandidateClassScore._FactorClass;
}
}
/**
* Set the associations in this to copies of the attributes in source.
*/
public void copySingleAssociationsFrom (BaseBusinessClass source, boolean linkToGhosts)
{
super.copySingleAssociationsFrom (source, linkToGhosts);
if (source instanceof BaseCandidateClassScore)
{
BaseCandidateClassScore sourceCandidateClassScore = (BaseCandidateClassScore)(source);
_TestAnalysis.copyFrom (sourceCandidateClassScore._TestAnalysis, linkToGhosts);
}
}
/**
* Set the associations in this to copies of the attributes in source.
*/
public void copyAssociationsFrom (BaseBusinessClass source, boolean linkToGhosts)
{
super.copyAssociationsFrom (source, linkToGhosts);
if (source instanceof BaseCandidateClassScore)
{
BaseCandidateClassScore sourceCandidateClassScore = (BaseCandidateClassScore)(source);
}
}
public void validate (ValidationContext context)
{
super.validate (context);
}
/**
* Subclasses must override this to read in their attributes
*/
protected void readExternalData(Map<String, Object> vals) throws IOException, ClassNotFoundException
{
super.readExternalData(vals);
_ClassScore = (Integer)(HELPER_ClassScore.readExternal (_ClassScore, vals.get(FIELD_ClassScore))); //
_WghtdClassScore = (Integer)(HELPER_WghtdClassScore.readExternal (_WghtdClassScore, vals.get(FIELD_WghtdClassScore))); //
_MaxWghtdClassScore = (Integer)(HELPER_MaxWghtdClassScore.readExternal (_MaxWghtdClassScore, vals.get(FIELD_MaxWghtdClassScore))); //
_ColorCode = (ColorCode)(HELPER_ColorCode.readExternal (_ColorCode, vals.get(FIELD_ColorCode))); //
_WghtdColorCode = (ColorCode)(HELPER_WghtdColorCode.readExternal (_WghtdColorCode, vals.get(FIELD_WghtdColorCode))); //
_FactorClass = (FactorClass)(HELPER_FactorClass.readExternal (_FactorClass, vals.get(FIELD_FactorClass))); //
_TestAnalysis.readExternalData(vals.get(SINGLEREFERENCE_TestAnalysis));
}
/**
* Subclasses must override this to write out their attributes
*/
protected void writeExternalData(Map<String, Object> vals) throws IOException
{
super.writeExternalData(vals);
vals.put (FIELD_ClassScore, HELPER_ClassScore.writeExternal (_ClassScore));
vals.put (FIELD_WghtdClassScore, HELPER_WghtdClassScore.writeExternal (_WghtdClassScore));
vals.put (FIELD_MaxWghtdClassScore, HELPER_MaxWghtdClassScore.writeExternal (_MaxWghtdClassScore));
vals.put (FIELD_ColorCode, HELPER_ColorCode.writeExternal (_ColorCode));
vals.put (FIELD_WghtdColorCode, HELPER_WghtdColorCode.writeExternal (_WghtdColorCode));
vals.put (FIELD_FactorClass, HELPER_FactorClass.writeExternal (_FactorClass));
vals.put (SINGLEREFERENCE_TestAnalysis, _TestAnalysis.writeExternalData());
}
public void compare (BaseBusinessClass other, AttributeChangeListener listener) throws StorageException
{
super.compare (other, listener);
if (other instanceof BaseCandidateClassScore)
{
BaseCandidateClassScore otherCandidateClassScore = (BaseCandidateClassScore)(other);
if (!HELPER_ClassScore.compare(this._ClassScore, otherCandidateClassScore._ClassScore))
{
listener.notifyFieldChange(this, other, FIELD_ClassScore, HELPER_ClassScore.toObject(this._ClassScore), HELPER_ClassScore.toObject(otherCandidateClassScore._ClassScore));
}
if (!HELPER_WghtdClassScore.compare(this._WghtdClassScore, otherCandidateClassScore._WghtdClassScore))
{
listener.notifyFieldChange(this, other, FIELD_WghtdClassScore, HELPER_WghtdClassScore.toObject(this._WghtdClassScore), HELPER_WghtdClassScore.toObject(otherCandidateClassScore._WghtdClassScore));
}
if (!HELPER_MaxWghtdClassScore.compare(this._MaxWghtdClassScore, otherCandidateClassScore._MaxWghtdClassScore))
{
listener.notifyFieldChange(this, other, FIELD_MaxWghtdClassScore, HELPER_MaxWghtdClassScore.toObject(this._MaxWghtdClassScore), HELPER_MaxWghtdClassScore.toObject(otherCandidateClassScore._MaxWghtdClassScore));
}
if (!HELPER_ColorCode.compare(this._ColorCode, otherCandidateClassScore._ColorCode))
{
listener.notifyFieldChange(this, other, FIELD_ColorCode, HELPER_ColorCode.toObject(this._ColorCode), HELPER_ColorCode.toObject(otherCandidateClassScore._ColorCode));
}
if (!HELPER_WghtdColorCode.compare(this._WghtdColorCode, otherCandidateClassScore._WghtdColorCode))
{
listener.notifyFieldChange(this, other, FIELD_WghtdColorCode, HELPER_WghtdColorCode.toObject(this._WghtdColorCode), HELPER_WghtdColorCode.toObject(otherCandidateClassScore._WghtdColorCode));
}
if (!HELPER_FactorClass.compare(this._FactorClass, otherCandidateClassScore._FactorClass))
{
listener.notifyFieldChange(this, other, FIELD_FactorClass, HELPER_FactorClass.toObject(this._FactorClass), HELPER_FactorClass.toObject(otherCandidateClassScore._FactorClass));
}
// Compare single assocs
_TestAnalysis.compare (otherCandidateClassScore._TestAnalysis, listener);
// Compare multiple assocs
}
}
public void visitTransients (AttributeVisitor visitor) throws StorageException
{
super.visitAttributes (visitor);
}
public void visitAttributes (AttributeVisitor visitor) throws StorageException
{
super.visitAttributes (visitor);
visitor.visitField(this, FIELD_ClassScore, HELPER_ClassScore.toObject(getClassScore()));
visitor.visitField(this, FIELD_WghtdClassScore, HELPER_WghtdClassScore.toObject(getWghtdClassScore()));
visitor.visitField(this, FIELD_MaxWghtdClassScore, HELPER_MaxWghtdClassScore.toObject(getMaxWghtdClassScore()));
visitor.visitField(this, FIELD_ColorCode, HELPER_ColorCode.toObject(getColorCode()));
visitor.visitField(this, FIELD_WghtdColorCode, HELPER_WghtdColorCode.toObject(getWghtdColorCode()));
visitor.visitField(this, FIELD_FactorClass, HELPER_FactorClass.toObject(getFactorClass()));
visitor.visitAssociation (_TestAnalysis);
}
public void visitAssociations (AssociationVisitor visitor, AssociatedScope scope) throws StorageException
{
super.visitAssociations (visitor, scope);
if (scope.includes (_TestAnalysis))
{
visitor.visit (_TestAnalysis);
}
}
public static CandidateClassScore createCandidateClassScore (ObjectTransaction transaction) throws StorageException
{
CandidateClassScore result = new CandidateClassScore ();
result.initialiseNewObject (transaction);
return result;
}
public static CandidateClassScore getCandidateClassScoreByID (ObjectTransaction transaction, Long objectID) throws StorageException
{
return (CandidateClassScore)(transaction.getObjectByID (REFERENCE_CandidateClassScore, objectID));
}
public boolean testFilter (String attribName, QueryFilter filter) throws StorageException
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_ClassScore))
{
return filter.matches (getClassScore ());
}
else if (attribName.equals (FIELD_WghtdClassScore))
{
return filter.matches (getWghtdClassScore ());
}
else if (attribName.equals (FIELD_MaxWghtdClassScore))
{
return filter.matches (getMaxWghtdClassScore ());
}
else if (attribName.equals (FIELD_ColorCode))
{
return filter.matches (getColorCode ());
}
else if (attribName.equals (FIELD_WghtdColorCode))
{
return filter.matches (getWghtdColorCode ());
}
else if (attribName.equals (FIELD_FactorClass))
{
return filter.matches (getFactorClass ());
}
else if (attribName.equals (SINGLEREFERENCE_TestAnalysis))
{
return filter.matches (getTestAnalysis ());
}
else
{
return super.testFilter (attribName, filter);
}
}
public static SearchAll SearchByAll () { return new SearchAll (); }
public static class SearchAll extends SearchObject<CandidateClassScore>
{
public SearchAll andObjectID (QueryFilter<Long> filter)
{
filter.addFilter (context, "tl_candidate_class_score.object_id", FIELD_ObjectID);
return this;
}
public SearchAll andObjectCreated (QueryFilter<Date> filter)
{
filter.addFilter (context, "tl_candidate_class_score.object_created_date", FIELD_ObjectCreated);
return this;
}
public SearchAll andObjectLastModified (QueryFilter<Date> filter)
{
filter.addFilter (context, "tl_candidate_class_score.object_last_updated_date", FIELD_ObjectLastModified);
return this;
}
public SearchAll andClassScore (QueryFilter<Integer> filter)
{
filter.addFilter (context, "tl_candidate_class_score.class_score", "ClassScore");
return this;
}
public SearchAll andWghtdClassScore (QueryFilter<Integer> filter)
{
filter.addFilter (context, "tl_candidate_class_score.wghtd_class_score", "WghtdClassScore");
return this;
}
public SearchAll andMaxWghtdClassScore (QueryFilter<Integer> filter)
{
filter.addFilter (context, "tl_candidate_class_score.max_wghtd_class_score", "MaxWghtdClassScore");
return this;
}
public SearchAll andColorCode (QueryFilter<ColorCode> filter)
{
filter.addFilter (context, "tl_candidate_class_score.color_code", "ColorCode");
return this;
}
public SearchAll andWghtdColorCode (QueryFilter<ColorCode> filter)
{
filter.addFilter (context, "tl_candidate_class_score.wghtd_color_code", "WghtdColorCode");
return this;
}
public SearchAll andFactorClass (QueryFilter<FactorClass> filter)
{
filter.addFilter (context, "tl_candidate_class_score.factor_class", "FactorClass");
return this;
}
public SearchAll andTestAnalysis (QueryFilter<TestAnalysis> filter)
{
filter.addFilter (context, "tl_candidate_class_score.test_analysis_id", "TestAnalysis");
return this;
}
public CandidateClassScore[]
search (ObjectTransaction transaction) throws StorageException
{
BaseBusinessClass[] results = super.search (transaction, REFERENCE_CandidateClassScore, SEARCH_All, criteria);
Set<CandidateClassScore> typedResults = new LinkedHashSet <CandidateClassScore> ();
for (BaseBusinessClass bbcResult : results)
{
CandidateClassScore aResult = (CandidateClassScore)bbcResult;
typedResults.add (aResult);
}
return ObjstoreUtils.removeDeleted(transaction, typedResults).toArray (new CandidateClassScore[0]);
}
}
public static CandidateClassScore[]
searchAll (ObjectTransaction transaction) throws StorageException
{
return SearchByAll ()
.search (transaction);
}
public Object getAttribute (String attribName)
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_ClassScore))
{
return HELPER_ClassScore.toObject (getClassScore ());
}
else if (attribName.equals (FIELD_WghtdClassScore))
{
return HELPER_WghtdClassScore.toObject (getWghtdClassScore ());
}
else if (attribName.equals (FIELD_MaxWghtdClassScore))
{
return HELPER_MaxWghtdClassScore.toObject (getMaxWghtdClassScore ());
}
else if (attribName.equals (FIELD_ColorCode))
{
return HELPER_ColorCode.toObject (getColorCode ());
}
else if (attribName.equals (FIELD_WghtdColorCode))
{
return HELPER_WghtdColorCode.toObject (getWghtdColorCode ());
}
else if (attribName.equals (FIELD_FactorClass))
{
return HELPER_FactorClass.toObject (getFactorClass ());
}
else
{
return super.getAttribute (attribName);
}
}
public AttributeHelper getAttributeHelper (String attribName)
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_ClassScore))
{
return HELPER_ClassScore;
}
else if (attribName.equals (FIELD_WghtdClassScore))
{
return HELPER_WghtdClassScore;
}
else if (attribName.equals (FIELD_MaxWghtdClassScore))
{
return HELPER_MaxWghtdClassScore;
}
else if (attribName.equals (FIELD_ColorCode))
{
return HELPER_ColorCode;
}
else if (attribName.equals (FIELD_WghtdColorCode))
{
return HELPER_WghtdColorCode;
}
else if (attribName.equals (FIELD_FactorClass))
{
return HELPER_FactorClass;
}
else
{
return super.getAttributeHelper (attribName);
}
}
public void setAttribute (String attribName, Object attribValue) throws FieldException
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_ClassScore))
{
setClassScore ((Integer)(HELPER_ClassScore.fromObject (_ClassScore, attribValue)));
}
else if (attribName.equals (FIELD_WghtdClassScore))
{
setWghtdClassScore ((Integer)(HELPER_WghtdClassScore.fromObject (_WghtdClassScore, attribValue)));
}
else if (attribName.equals (FIELD_MaxWghtdClassScore))
{
setMaxWghtdClassScore ((Integer)(HELPER_MaxWghtdClassScore.fromObject (_MaxWghtdClassScore, attribValue)));
}
else if (attribName.equals (FIELD_ColorCode))
{
setColorCode ((ColorCode)(HELPER_ColorCode.fromObject (_ColorCode, attribValue)));
}
else if (attribName.equals (FIELD_WghtdColorCode))
{
setWghtdColorCode ((ColorCode)(HELPER_WghtdColorCode.fromObject (_WghtdColorCode, attribValue)));
}
else if (attribName.equals (FIELD_FactorClass))
{
setFactorClass ((FactorClass)(HELPER_FactorClass.fromObject (_FactorClass, attribValue)));
}
else
{
super.setAttribute (attribName, attribValue);
}
}
public boolean isWriteable (String fieldName)
{
return getWriteable (fieldName) == FieldWriteability.TRUE;
}
public FieldWriteability getWriteable (String fieldName)
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (fieldName.equals (FIELD_ClassScore))
{
return getWriteability_ClassScore ();
}
else if (fieldName.equals (FIELD_WghtdClassScore))
{
return getWriteability_WghtdClassScore ();
}
else if (fieldName.equals (FIELD_MaxWghtdClassScore))
{
return getWriteability_MaxWghtdClassScore ();
}
else if (fieldName.equals (FIELD_ColorCode))
{
return getWriteability_ColorCode ();
}
else if (fieldName.equals (FIELD_WghtdColorCode))
{
return getWriteability_WghtdColorCode ();
}
else if (fieldName.equals (FIELD_FactorClass))
{
return getWriteability_FactorClass ();
}
else if (fieldName.equals (SINGLEREFERENCE_TestAnalysis))
{
return getWriteability_TestAnalysis ();
}
else
{
return super.getWriteable (fieldName);
}
}
public void putUnwriteable (Set<String> fields)
{
if (getWriteability_ClassScore () != FieldWriteability.TRUE)
{
fields.add (FIELD_ClassScore);
}
if (getWriteability_WghtdClassScore () != FieldWriteability.TRUE)
{
fields.add (FIELD_WghtdClassScore);
}
if (getWriteability_MaxWghtdClassScore () != FieldWriteability.TRUE)
{
fields.add (FIELD_MaxWghtdClassScore);
}
if (getWriteability_ColorCode () != FieldWriteability.TRUE)
{
fields.add (FIELD_ColorCode);
}
if (getWriteability_WghtdColorCode () != FieldWriteability.TRUE)
{
fields.add (FIELD_WghtdColorCode);
}
if (getWriteability_FactorClass () != FieldWriteability.TRUE)
{
fields.add (FIELD_FactorClass);
}
super.putUnwriteable (fields);
}
public List<AbstractAttribute> getAttributes ()
{
List result = super.getAttributes ();
result.add(HELPER_ClassScore.getAttribObject (getClass (), _ClassScore, false, FIELD_ClassScore));
result.add(HELPER_WghtdClassScore.getAttribObject (getClass (), _WghtdClassScore, false, FIELD_WghtdClassScore));
result.add(HELPER_MaxWghtdClassScore.getAttribObject (getClass (), _MaxWghtdClassScore, false, FIELD_MaxWghtdClassScore));
result.add(HELPER_ColorCode.getAttribObject (getClass (), _ColorCode, false, FIELD_ColorCode));
result.add(HELPER_WghtdColorCode.getAttribObject (getClass (), _WghtdColorCode, false, FIELD_WghtdColorCode));
result.add(HELPER_FactorClass.getAttribObject (getClass (), _FactorClass, true, FIELD_FactorClass));
return result;
}
public Map getAttributeMetadata (String attribute)
{
if (ATTRIBUTES_METADATA_CandidateClassScore.containsKey (attribute))
{
return (Map)ATTRIBUTES_METADATA_CandidateClassScore.get (attribute);
}
else
{
return super.getAttributeMetadata (attribute);
}
}
public Object getAttributeMetadata (String attribute, String metadata)
{
if (ATTRIBUTES_METADATA_CandidateClassScore.containsKey (attribute))
{
return ((Map)ATTRIBUTES_METADATA_CandidateClassScore.get (attribute)).get(metadata);
}
else
{
return super.getAttributeMetadata (attribute, metadata);
}
}
public void preCommit (boolean willBeStored) throws Exception
{
super.preCommit(willBeStored);
if(willBeStored)
{
}
}
public oneit.servlets.objstore.binary.BinaryContentHandler getBinaryContentHandler(String attribName)
{
return super.getBinaryContentHandler(attribName);
}
public static class CandidateClassScoreBehaviourDecorator extends BaseBusinessClass.BBCBehaviourDecorator<CandidateClassScore>
{
/**
* Get the attribute ClassScore
*/
public Integer getClassScore (CandidateClassScore obj, Integer original)
{
return original;
}
/**
* Change the value set for attribute ClassScore.
* May modify the field beforehand
* Occurs before validation.
*/
public Integer setClassScore (CandidateClassScore obj, Integer newClassScore) throws FieldException
{
return newClassScore;
}
/**
* Get the attribute WghtdClassScore
*/
public Integer getWghtdClassScore (CandidateClassScore obj, Integer original)
{
return original;
}
/**
* Change the value set for attribute WghtdClassScore.
* May modify the field beforehand
* Occurs before validation.
*/
public Integer setWghtdClassScore (CandidateClassScore obj, Integer newWghtdClassScore) throws FieldException
{
return newWghtdClassScore;
}
/**
* Get the attribute MaxWghtdClassScore
*/
public Integer getMaxWghtdClassScore (CandidateClassScore obj, Integer original)
{
return original;
}
/**
* Change the value set for attribute MaxWghtdClassScore.
* May modify the field beforehand
* Occurs before validation.
*/
public Integer setMaxWghtdClassScore (CandidateClassScore obj, Integer newMaxWghtdClassScore) throws FieldException
{
return newMaxWghtdClassScore;
}
/**
* Get the attribute ColorCode
*/
public ColorCode getColorCode (CandidateClassScore obj, ColorCode original)
{
return original;
}
/**
* Change the value set for attribute ColorCode.
* May modify the field beforehand
* Occurs before validation.
*/
public ColorCode setColorCode (CandidateClassScore obj, ColorCode newColorCode) throws FieldException
{
return newColorCode;
}
/**
* Get the attribute WghtdColorCode
*/
public ColorCode getWghtdColorCode (CandidateClassScore obj, ColorCode original)
{
return original;
}
/**
* Change the value set for attribute WghtdColorCode.
* May modify the field beforehand
* Occurs before validation.
*/
public ColorCode setWghtdColorCode (CandidateClassScore obj, ColorCode newWghtdColorCode) throws FieldException
{
return newWghtdColorCode;
}
/**
* Get the attribute FactorClass
*/
public FactorClass getFactorClass (CandidateClassScore obj, FactorClass original)
{
return original;
}
/**
* Change the value set for attribute FactorClass.
* May modify the field beforehand
* Occurs before validation.
*/
public FactorClass setFactorClass (CandidateClassScore obj, FactorClass newFactorClass) throws FieldException
{
return newFactorClass;
}
}
public ORMPipeLine pipes()
{
return new CandidateClassScorePipeLineFactory<CandidateClassScore, CandidateClassScore> ((CandidateClassScore)this);
}
/**
* Use this instead of pipes() to get rid of type casting.
*/
public CandidateClassScorePipeLineFactory<CandidateClassScore, CandidateClassScore> pipelineCandidateClassScore()
{
return (CandidateClassScorePipeLineFactory<CandidateClassScore, CandidateClassScore>) pipes();
}
public static CandidateClassScorePipeLineFactory<CandidateClassScore, CandidateClassScore> pipesCandidateClassScore(Collection<CandidateClassScore> items)
{
return REFERENCE_CandidateClassScore.new CandidateClassScorePipeLineFactory<CandidateClassScore, CandidateClassScore> (items);
}
public static CandidateClassScorePipeLineFactory<CandidateClassScore, CandidateClassScore> pipesCandidateClassScore(CandidateClassScore[] _items)
{
return pipesCandidateClassScore(Arrays.asList (_items));
}
public static CandidateClassScorePipeLineFactory<CandidateClassScore, CandidateClassScore> pipesCandidateClassScore()
{
return pipesCandidateClassScore((Collection)null);
}
public class CandidateClassScorePipeLineFactory<From extends BaseBusinessClass, Me extends CandidateClassScore> extends BaseBusinessClass.ORMPipeLine<From, Me>
{
public <Prev> CandidateClassScorePipeLineFactory (PipeLine<From, Prev> pipeLine, Pipe<Prev, Me> nextPipe)
{
super (pipeLine, nextPipe);
}
public CandidateClassScorePipeLineFactory (From seed)
{
super(seed);
}
public CandidateClassScorePipeLineFactory (Collection<From> seed)
{
super(seed);
}
public PipeLine<From, ? extends Object> to(String name)
{
if (name.equals ("ClassScore"))
{
return toClassScore ();
}
if (name.equals ("WghtdClassScore"))
{
return toWghtdClassScore ();
}
if (name.equals ("MaxWghtdClassScore"))
{
return toMaxWghtdClassScore ();
}
if (name.equals ("ColorCode"))
{
return toColorCode ();
}
if (name.equals ("WghtdColorCode"))
{
return toWghtdColorCode ();
}
if (name.equals ("FactorClass"))
{
return toFactorClass ();
}
if (name.equals ("TestAnalysis"))
{
return toTestAnalysis ();
}
return super.to(name);
}
public PipeLine<From, Integer> toClassScore () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_ClassScore)); }
public PipeLine<From, Integer> toWghtdClassScore () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_WghtdClassScore)); }
public PipeLine<From, Integer> toMaxWghtdClassScore () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_MaxWghtdClassScore)); }
public PipeLine<From, ColorCode> toColorCode () { return pipe(new ORMAttributePipe<Me, ColorCode>(FIELD_ColorCode)); }
public PipeLine<From, ColorCode> toWghtdColorCode () { return pipe(new ORMAttributePipe<Me, ColorCode>(FIELD_WghtdColorCode)); }
public PipeLine<From, FactorClass> toFactorClass () { return pipe(new ORMAttributePipe<Me, FactorClass>(FIELD_FactorClass)); }
public TestAnalysis.TestAnalysisPipeLineFactory<From, TestAnalysis> toTestAnalysis () { return toTestAnalysis (Filter.ALL); }
public TestAnalysis.TestAnalysisPipeLineFactory<From, TestAnalysis> toTestAnalysis (Filter<TestAnalysis> filter)
{
return TestAnalysis.REFERENCE_TestAnalysis.new TestAnalysisPipeLineFactory<From, TestAnalysis> (this, new ORMSingleAssocPipe<Me, TestAnalysis>(SINGLEREFERENCE_TestAnalysis, filter));
}
}
public boolean isTransientAttrib(String attribName)
{
return super.isTransientAttrib(attribName);
}
public boolean isTransientSingleReference(String assocName)
{
return super.isTransientSingleReference(assocName);
}
}
class DummyCandidateClassScore extends CandidateClassScore
{
// Default constructor primarily to support Externalisable
public DummyCandidateClassScore()
{
super();
}
public void assertValid ()
{
}
public TestAnalysis getTestAnalysis () throws StorageException
{
return (TestAnalysis)(TestAnalysis.DUMMY_TestAnalysis);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getTestAnalysisID ()
{
return TestAnalysis.DUMMY_TestAnalysis.getObjectID();
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -26,6 +26,8 @@ import oneit.utils.filter.Filter; ...@@ -26,6 +26,8 @@ import oneit.utils.filter.Filter;
import oneit.utils.transform.*; import oneit.utils.transform.*;
import oneit.utils.parsers.FieldException; import oneit.utils.parsers.FieldException;
import performa.orm.types.*;
public abstract class BaseFactorLevelLink extends BaseBusinessClass public abstract class BaseFactorLevelLink extends BaseBusinessClass
...@@ -38,7 +40,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -38,7 +40,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
// Static constants corresponding to field names // Static constants corresponding to field names
public static final String FIELD_ClassCode = "ClassCode"; public static final String FIELD_FactorClass = "FactorClass";
public static final String FIELD_Notes = "Notes"; public static final String FIELD_Notes = "Notes";
public static final String FIELD_LeftAnnot = "LeftAnnot"; public static final String FIELD_LeftAnnot = "LeftAnnot";
public static final String FIELD_RightAnnot = "RightAnnot"; public static final String FIELD_RightAnnot = "RightAnnot";
...@@ -54,7 +56,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -54,7 +56,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
// Static constants corresponding to attribute helpers // Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper<FactorLevelLink> HELPER_ClassCode = DefaultAttributeHelper.INSTANCE; private static final EnumeratedAttributeHelper<FactorLevelLink, FactorClass> HELPER_FactorClass = new EnumeratedAttributeHelper<FactorLevelLink, FactorClass> (FactorClass.FACTORY_FactorClass);
private static final DefaultAttributeHelper<FactorLevelLink> HELPER_Notes = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<FactorLevelLink> HELPER_Notes = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<FactorLevelLink> HELPER_LeftAnnot = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<FactorLevelLink> HELPER_LeftAnnot = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<FactorLevelLink> HELPER_RightAnnot = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<FactorLevelLink> HELPER_RightAnnot = DefaultAttributeHelper.INSTANCE;
...@@ -63,7 +65,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -63,7 +65,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
// Private attributes corresponding to business object data // Private attributes corresponding to business object data
private String _ClassCode; private FactorClass _FactorClass;
private String _Notes; private String _Notes;
private String _LeftAnnot; private String _LeftAnnot;
private String _RightAnnot; private String _RightAnnot;
...@@ -83,7 +85,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -83,7 +85,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
private static final Map ATTRIBUTES_METADATA_FactorLevelLink = new HashMap (); private static final Map ATTRIBUTES_METADATA_FactorLevelLink = new HashMap ();
// Arrays of validators for each attribute // Arrays of validators for each attribute
private static final AttributeValidator[] FIELD_ClassCode_Validators; private static final AttributeValidator[] FIELD_FactorClass_Validators;
private static final AttributeValidator[] FIELD_Notes_Validators; private static final AttributeValidator[] FIELD_Notes_Validators;
private static final AttributeValidator[] FIELD_LeftAnnot_Validators; private static final AttributeValidator[] FIELD_LeftAnnot_Validators;
private static final AttributeValidator[] FIELD_RightAnnot_Validators; private static final AttributeValidator[] FIELD_RightAnnot_Validators;
...@@ -106,7 +108,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -106,7 +108,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
setupAssocMetaData_Level(); setupAssocMetaData_Level();
setupAssocMetaData_Factor(); setupAssocMetaData_Factor();
FIELD_ClassCode_Validators = (AttributeValidator[])setupAttribMetaData_ClassCode(validatorMapping).toArray (new AttributeValidator[0]); FIELD_FactorClass_Validators = (AttributeValidator[])setupAttribMetaData_FactorClass(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_Notes_Validators = (AttributeValidator[])setupAttribMetaData_Notes(validatorMapping).toArray (new AttributeValidator[0]); FIELD_Notes_Validators = (AttributeValidator[])setupAttribMetaData_Notes(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_LeftAnnot_Validators = (AttributeValidator[])setupAttribMetaData_LeftAnnot(validatorMapping).toArray (new AttributeValidator[0]); FIELD_LeftAnnot_Validators = (AttributeValidator[])setupAttribMetaData_LeftAnnot(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_RightAnnot_Validators = (AttributeValidator[])setupAttribMetaData_RightAnnot(validatorMapping).toArray (new AttributeValidator[0]); FIELD_RightAnnot_Validators = (AttributeValidator[])setupAttribMetaData_RightAnnot(validatorMapping).toArray (new AttributeValidator[0]);
...@@ -157,20 +159,20 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -157,20 +159,20 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
// Meta Info setup // Meta Info setup
private static List setupAttribMetaData_ClassCode(Map validatorMapping) private static List setupAttribMetaData_FactorClass(Map validatorMapping)
{ {
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("dbcol", "class_code"); metaInfo.put ("dbcol", "class_code");
metaInfo.put ("length", "15"); metaInfo.put ("name", "FactorClass");
metaInfo.put ("name", "ClassCode"); metaInfo.put ("type", "FactorClass");
metaInfo.put ("type", "String");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for FactorLevelLink.ClassCode:", metaInfo); LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for FactorLevelLink.FactorClass:", metaInfo);
ATTRIBUTES_METADATA_FactorLevelLink.put (FIELD_ClassCode, Collections.unmodifiableMap (metaInfo)); ATTRIBUTES_METADATA_FactorLevelLink.put (FIELD_FactorClass, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(FactorLevelLink.class, "ClassCode", metaInfo, validatorMapping); List validators = BaseBusinessClass.getAttribValidators(FactorLevelLink.class, "FactorClass", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for FactorLevelLink.ClassCode:", validators); LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for FactorLevelLink.FactorClass:", validators);
return validators; return validators;
} }
...@@ -294,7 +296,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -294,7 +296,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
super._initialiseNewObjAttributes (transaction); super._initialiseNewObjAttributes (transaction);
_ClassCode = (String)(HELPER_ClassCode.initialise (_ClassCode)); _FactorClass = (FactorClass)(HELPER_FactorClass.initialise (_FactorClass));
_Notes = (String)(HELPER_Notes.initialise (_Notes)); _Notes = (String)(HELPER_Notes.initialise (_Notes));
_LeftAnnot = (String)(HELPER_LeftAnnot.initialise (_LeftAnnot)); _LeftAnnot = (String)(HELPER_LeftAnnot.initialise (_LeftAnnot));
_RightAnnot = (String)(HELPER_RightAnnot.initialise (_RightAnnot)); _RightAnnot = (String)(HELPER_RightAnnot.initialise (_RightAnnot));
...@@ -329,16 +331,16 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -329,16 +331,16 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
/** /**
* Get the attribute ClassCode * Get the attribute FactorClass
*/ */
public String getClassCode () public FactorClass getFactorClass ()
{ {
assertValid(); assertValid();
String valToReturn = _ClassCode; FactorClass valToReturn = _FactorClass;
for (FactorLevelLinkBehaviourDecorator bhd : FactorLevelLink_BehaviourDecorators) for (FactorLevelLinkBehaviourDecorator bhd : FactorLevelLink_BehaviourDecorators)
{ {
valToReturn = bhd.getClassCode ((FactorLevelLink)this, valToReturn); valToReturn = bhd.getFactorClass ((FactorLevelLink)this, valToReturn);
} }
return valToReturn; return valToReturn;
...@@ -350,7 +352,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -350,7 +352,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
* Called prior to the attribute changing. Subclasses need not call super. If a field exception * Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value. * is thrown, the attribute change will fail. The new value is different to the old value.
*/ */
protected void preClassCodeChange (String newClassCode) throws FieldException protected void preFactorClassChange (FactorClass newFactorClass) throws FieldException
{ {
} }
...@@ -360,46 +362,46 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -360,46 +362,46 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
* If a field exception is thrown, the value is still changed, however it * If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back * may lead to the TX being rolled back
*/ */
protected void postClassCodeChange () throws FieldException protected void postFactorClassChange () throws FieldException
{ {
} }
public FieldWriteability getWriteability_ClassCode () public FieldWriteability getWriteability_FactorClass ()
{ {
return getFieldWritabilityUtil (FieldWriteability.TRUE); return getFieldWritabilityUtil (FieldWriteability.TRUE);
} }
/** /**
* Set the attribute ClassCode. Checks to ensure a new value * Set the attribute FactorClass. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute. * has been supplied. If so, marks the field as altered and sets the attribute.
*/ */
public void setClassCode (String newClassCode) throws FieldException public void setFactorClass (FactorClass newFactorClass) throws FieldException
{ {
boolean oldAndNewIdentical = HELPER_ClassCode.compare (_ClassCode, newClassCode); boolean oldAndNewIdentical = HELPER_FactorClass.compare (_FactorClass, newFactorClass);
try try
{ {
for (FactorLevelLinkBehaviourDecorator bhd : FactorLevelLink_BehaviourDecorators) for (FactorLevelLinkBehaviourDecorator bhd : FactorLevelLink_BehaviourDecorators)
{ {
newClassCode = bhd.setClassCode ((FactorLevelLink)this, newClassCode); newFactorClass = bhd.setFactorClass ((FactorLevelLink)this, newFactorClass);
oldAndNewIdentical = HELPER_ClassCode.compare (_ClassCode, newClassCode); oldAndNewIdentical = HELPER_FactorClass.compare (_FactorClass, newFactorClass);
} }
if (FIELD_ClassCode_Validators.length > 0) if (FIELD_FactorClass_Validators.length > 0)
{ {
Object newClassCodeObj = HELPER_ClassCode.toObject (newClassCode); Object newFactorClassObj = HELPER_FactorClass.toObject (newFactorClass);
if (newClassCodeObj != null) if (newFactorClassObj != null)
{ {
int loopMax = FIELD_ClassCode_Validators.length; int loopMax = FIELD_FactorClass_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_FactorLevelLink.get (FIELD_ClassCode); Map metadata = (Map)ATTRIBUTES_METADATA_FactorLevelLink.get (FIELD_FactorClass);
for (int v = 0 ; v < loopMax ; ++v) for (int v = 0 ; v < loopMax ; ++v)
{ {
FIELD_ClassCode_Validators[v].checkAttribute (this, FIELD_ClassCode, metadata, newClassCodeObj); FIELD_FactorClass_Validators[v].checkAttribute (this, FIELD_FactorClass, metadata, newFactorClassObj);
} }
} }
} }
...@@ -417,12 +419,12 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -417,12 +419,12 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
if (!oldAndNewIdentical) if (!oldAndNewIdentical)
{ {
assertValid(); assertValid();
Debug.assertion (getWriteability_ClassCode () != FieldWriteability.FALSE, "Field ClassCode is not writeable"); Debug.assertion (getWriteability_FactorClass () != FieldWriteability.FALSE, "Field FactorClass is not writeable");
preClassCodeChange (newClassCode); preFactorClassChange (newFactorClass);
markFieldChange (FIELD_ClassCode); markFieldChange (FIELD_FactorClass);
_ClassCode = newClassCode; _FactorClass = newFactorClass;
postFieldChange (FIELD_ClassCode); postFieldChange (FIELD_FactorClass);
postClassCodeChange (); postFactorClassChange ();
} }
} }
...@@ -1456,7 +1458,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -1456,7 +1458,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
PersistentSet tl_factor_hdrPSet = allSets.getPersistentSet (myID, "tl_factor_hdr", myPSetStatus); PersistentSet tl_factor_hdrPSet = allSets.getPersistentSet (myID, "tl_factor_hdr", myPSetStatus);
tl_factor_hdrPSet.setAttrib (FIELD_ObjectID, myID); tl_factor_hdrPSet.setAttrib (FIELD_ObjectID, myID);
tl_factor_hdrPSet.setAttrib (FIELD_ClassCode, HELPER_ClassCode.toObject (_ClassCode)); // tl_factor_hdrPSet.setAttrib (FIELD_FactorClass, HELPER_FactorClass.toObject (_FactorClass)); //
tl_factor_hdrPSet.setAttrib (FIELD_Notes, HELPER_Notes.toObject (_Notes)); // tl_factor_hdrPSet.setAttrib (FIELD_Notes, HELPER_Notes.toObject (_Notes)); //
tl_factor_hdrPSet.setAttrib (FIELD_LeftAnnot, HELPER_LeftAnnot.toObject (_LeftAnnot)); // tl_factor_hdrPSet.setAttrib (FIELD_LeftAnnot, HELPER_LeftAnnot.toObject (_LeftAnnot)); //
tl_factor_hdrPSet.setAttrib (FIELD_RightAnnot, HELPER_RightAnnot.toObject (_RightAnnot)); // tl_factor_hdrPSet.setAttrib (FIELD_RightAnnot, HELPER_RightAnnot.toObject (_RightAnnot)); //
...@@ -1478,7 +1480,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -1478,7 +1480,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
PersistentSet tl_factor_hdrPSet = allSets.getPersistentSet (objectID, "tl_factor_hdr"); PersistentSet tl_factor_hdrPSet = allSets.getPersistentSet (objectID, "tl_factor_hdr");
_ClassCode = (String)(HELPER_ClassCode.fromObject (_ClassCode, tl_factor_hdrPSet.getAttrib (FIELD_ClassCode))); // _FactorClass = (FactorClass)(HELPER_FactorClass.fromObject (_FactorClass, tl_factor_hdrPSet.getAttrib (FIELD_FactorClass))); //
_Notes = (String)(HELPER_Notes.fromObject (_Notes, tl_factor_hdrPSet.getAttrib (FIELD_Notes))); // _Notes = (String)(HELPER_Notes.fromObject (_Notes, tl_factor_hdrPSet.getAttrib (FIELD_Notes))); //
_LeftAnnot = (String)(HELPER_LeftAnnot.fromObject (_LeftAnnot, tl_factor_hdrPSet.getAttrib (FIELD_LeftAnnot))); // _LeftAnnot = (String)(HELPER_LeftAnnot.fromObject (_LeftAnnot, tl_factor_hdrPSet.getAttrib (FIELD_LeftAnnot))); //
_RightAnnot = (String)(HELPER_RightAnnot.fromObject (_RightAnnot, tl_factor_hdrPSet.getAttrib (FIELD_RightAnnot))); // _RightAnnot = (String)(HELPER_RightAnnot.fromObject (_RightAnnot, tl_factor_hdrPSet.getAttrib (FIELD_RightAnnot))); //
...@@ -1503,7 +1505,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -1503,7 +1505,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
try try
{ {
setClassCode (otherFactorLevelLink.getClassCode ()); setFactorClass (otherFactorLevelLink.getFactorClass ());
} }
catch (FieldException ex) catch (FieldException ex)
{ {
...@@ -1570,7 +1572,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -1570,7 +1572,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
{ {
BaseFactorLevelLink sourceFactorLevelLink = (BaseFactorLevelLink)(source); BaseFactorLevelLink sourceFactorLevelLink = (BaseFactorLevelLink)(source);
_ClassCode = sourceFactorLevelLink._ClassCode; _FactorClass = sourceFactorLevelLink._FactorClass;
_Notes = sourceFactorLevelLink._Notes; _Notes = sourceFactorLevelLink._Notes;
_LeftAnnot = sourceFactorLevelLink._LeftAnnot; _LeftAnnot = sourceFactorLevelLink._LeftAnnot;
_RightAnnot = sourceFactorLevelLink._RightAnnot; _RightAnnot = sourceFactorLevelLink._RightAnnot;
...@@ -1630,7 +1632,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -1630,7 +1632,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
{ {
super.readExternalData(vals); super.readExternalData(vals);
_ClassCode = (String)(HELPER_ClassCode.readExternal (_ClassCode, vals.get(FIELD_ClassCode))); // _FactorClass = (FactorClass)(HELPER_FactorClass.readExternal (_FactorClass, vals.get(FIELD_FactorClass))); //
_Notes = (String)(HELPER_Notes.readExternal (_Notes, vals.get(FIELD_Notes))); // _Notes = (String)(HELPER_Notes.readExternal (_Notes, vals.get(FIELD_Notes))); //
_LeftAnnot = (String)(HELPER_LeftAnnot.readExternal (_LeftAnnot, vals.get(FIELD_LeftAnnot))); // _LeftAnnot = (String)(HELPER_LeftAnnot.readExternal (_LeftAnnot, vals.get(FIELD_LeftAnnot))); //
_RightAnnot = (String)(HELPER_RightAnnot.readExternal (_RightAnnot, vals.get(FIELD_RightAnnot))); // _RightAnnot = (String)(HELPER_RightAnnot.readExternal (_RightAnnot, vals.get(FIELD_RightAnnot))); //
...@@ -1649,7 +1651,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -1649,7 +1651,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
{ {
super.writeExternalData(vals); super.writeExternalData(vals);
vals.put (FIELD_ClassCode, HELPER_ClassCode.writeExternal (_ClassCode)); vals.put (FIELD_FactorClass, HELPER_FactorClass.writeExternal (_FactorClass));
vals.put (FIELD_Notes, HELPER_Notes.writeExternal (_Notes)); vals.put (FIELD_Notes, HELPER_Notes.writeExternal (_Notes));
vals.put (FIELD_LeftAnnot, HELPER_LeftAnnot.writeExternal (_LeftAnnot)); vals.put (FIELD_LeftAnnot, HELPER_LeftAnnot.writeExternal (_LeftAnnot));
vals.put (FIELD_RightAnnot, HELPER_RightAnnot.writeExternal (_RightAnnot)); vals.put (FIELD_RightAnnot, HELPER_RightAnnot.writeExternal (_RightAnnot));
...@@ -1670,9 +1672,9 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -1670,9 +1672,9 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
BaseFactorLevelLink otherFactorLevelLink = (BaseFactorLevelLink)(other); BaseFactorLevelLink otherFactorLevelLink = (BaseFactorLevelLink)(other);
if (!HELPER_ClassCode.compare(this._ClassCode, otherFactorLevelLink._ClassCode)) if (!HELPER_FactorClass.compare(this._FactorClass, otherFactorLevelLink._FactorClass))
{ {
listener.notifyFieldChange(this, other, FIELD_ClassCode, HELPER_ClassCode.toObject(this._ClassCode), HELPER_ClassCode.toObject(otherFactorLevelLink._ClassCode)); listener.notifyFieldChange(this, other, FIELD_FactorClass, HELPER_FactorClass.toObject(this._FactorClass), HELPER_FactorClass.toObject(otherFactorLevelLink._FactorClass));
} }
if (!HELPER_Notes.compare(this._Notes, otherFactorLevelLink._Notes)) if (!HELPER_Notes.compare(this._Notes, otherFactorLevelLink._Notes))
{ {
...@@ -1718,7 +1720,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -1718,7 +1720,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
{ {
super.visitAttributes (visitor); super.visitAttributes (visitor);
visitor.visitField(this, FIELD_ClassCode, HELPER_ClassCode.toObject(getClassCode())); visitor.visitField(this, FIELD_FactorClass, HELPER_FactorClass.toObject(getFactorClass()));
visitor.visitField(this, FIELD_Notes, HELPER_Notes.toObject(getNotes())); visitor.visitField(this, FIELD_Notes, HELPER_Notes.toObject(getNotes()));
visitor.visitField(this, FIELD_LeftAnnot, HELPER_LeftAnnot.toObject(getLeftAnnot())); visitor.visitField(this, FIELD_LeftAnnot, HELPER_LeftAnnot.toObject(getLeftAnnot()));
visitor.visitField(this, FIELD_RightAnnot, HELPER_RightAnnot.toObject(getRightAnnot())); visitor.visitField(this, FIELD_RightAnnot, HELPER_RightAnnot.toObject(getRightAnnot()));
...@@ -1767,9 +1769,9 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -1767,9 +1769,9 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over man!!"); throw new RuntimeException ("Game over man!!");
} }
else if (attribName.equals (FIELD_ClassCode)) else if (attribName.equals (FIELD_FactorClass))
{ {
return filter.matches (getClassCode ()); return filter.matches (getFactorClass ());
} }
else if (attribName.equals (FIELD_Notes)) else if (attribName.equals (FIELD_Notes))
{ {
...@@ -1830,9 +1832,9 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -1830,9 +1832,9 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
} }
public SearchAll andClassCode (QueryFilter<String> filter) public SearchAll andFactorClass (QueryFilter<FactorClass> filter)
{ {
filter.addFilter (context, "tl_factor_hdr.class_code", "ClassCode"); filter.addFilter (context, "tl_factor_hdr.class_code", "FactorClass");
return this; return this;
} }
...@@ -1913,9 +1915,9 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -1913,9 +1915,9 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over man!!"); throw new RuntimeException ("Game over man!!");
} }
else if (attribName.equals (FIELD_ClassCode)) else if (attribName.equals (FIELD_FactorClass))
{ {
return HELPER_ClassCode.toObject (getClassCode ()); return HELPER_FactorClass.toObject (getFactorClass ());
} }
else if (attribName.equals (FIELD_Notes)) else if (attribName.equals (FIELD_Notes))
{ {
...@@ -1950,9 +1952,9 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -1950,9 +1952,9 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over man!!"); throw new RuntimeException ("Game over man!!");
} }
else if (attribName.equals (FIELD_ClassCode)) else if (attribName.equals (FIELD_FactorClass))
{ {
return HELPER_ClassCode; return HELPER_FactorClass;
} }
else if (attribName.equals (FIELD_Notes)) else if (attribName.equals (FIELD_Notes))
{ {
...@@ -1987,9 +1989,9 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -1987,9 +1989,9 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over man!!"); throw new RuntimeException ("Game over man!!");
} }
else if (attribName.equals (FIELD_ClassCode)) else if (attribName.equals (FIELD_FactorClass))
{ {
setClassCode ((String)(HELPER_ClassCode.fromObject (_ClassCode, attribValue))); setFactorClass ((FactorClass)(HELPER_FactorClass.fromObject (_FactorClass, attribValue)));
} }
else if (attribName.equals (FIELD_Notes)) else if (attribName.equals (FIELD_Notes))
{ {
...@@ -2031,9 +2033,9 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -2031,9 +2033,9 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over man!!"); throw new RuntimeException ("Game over man!!");
} }
else if (fieldName.equals (FIELD_ClassCode)) else if (fieldName.equals (FIELD_FactorClass))
{ {
return getWriteability_ClassCode (); return getWriteability_FactorClass ();
} }
else if (fieldName.equals (FIELD_Notes)) else if (fieldName.equals (FIELD_Notes))
{ {
...@@ -2073,9 +2075,9 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -2073,9 +2075,9 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
public void putUnwriteable (Set<String> fields) public void putUnwriteable (Set<String> fields)
{ {
if (getWriteability_ClassCode () != FieldWriteability.TRUE) if (getWriteability_FactorClass () != FieldWriteability.TRUE)
{ {
fields.add (FIELD_ClassCode); fields.add (FIELD_FactorClass);
} }
if (getWriteability_Notes () != FieldWriteability.TRUE) if (getWriteability_Notes () != FieldWriteability.TRUE)
...@@ -2112,7 +2114,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -2112,7 +2114,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
List result = super.getAttributes (); List result = super.getAttributes ();
result.add(HELPER_ClassCode.getAttribObject (getClass (), _ClassCode, false, FIELD_ClassCode)); result.add(HELPER_FactorClass.getAttribObject (getClass (), _FactorClass, false, FIELD_FactorClass));
result.add(HELPER_Notes.getAttribObject (getClass (), _Notes, false, FIELD_Notes)); result.add(HELPER_Notes.getAttribObject (getClass (), _Notes, false, FIELD_Notes));
result.add(HELPER_LeftAnnot.getAttribObject (getClass (), _LeftAnnot, false, FIELD_LeftAnnot)); result.add(HELPER_LeftAnnot.getAttribObject (getClass (), _LeftAnnot, false, FIELD_LeftAnnot));
result.add(HELPER_RightAnnot.getAttribObject (getClass (), _RightAnnot, false, FIELD_RightAnnot)); result.add(HELPER_RightAnnot.getAttribObject (getClass (), _RightAnnot, false, FIELD_RightAnnot));
...@@ -2169,21 +2171,21 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -2169,21 +2171,21 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
{ {
/** /**
* Get the attribute ClassCode * Get the attribute FactorClass
*/ */
public String getClassCode (FactorLevelLink obj, String original) public FactorClass getFactorClass (FactorLevelLink obj, FactorClass original)
{ {
return original; return original;
} }
/** /**
* Change the value set for attribute ClassCode. * Change the value set for attribute FactorClass.
* May modify the field beforehand * May modify the field beforehand
* Occurs before validation. * Occurs before validation.
*/ */
public String setClassCode (FactorLevelLink obj, String newClassCode) throws FieldException public FactorClass setFactorClass (FactorLevelLink obj, FactorClass newFactorClass) throws FieldException
{ {
return newClassCode; return newFactorClass;
} }
/** /**
...@@ -2328,9 +2330,9 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -2328,9 +2330,9 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
public PipeLine<From, ? extends Object> to(String name) public PipeLine<From, ? extends Object> to(String name)
{ {
if (name.equals ("ClassCode")) if (name.equals ("FactorClass"))
{ {
return toClassCode (); return toFactorClass ();
} }
if (name.equals ("Notes")) if (name.equals ("Notes"))
{ {
...@@ -2366,7 +2368,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass ...@@ -2366,7 +2368,7 @@ public abstract class BaseFactorLevelLink extends BaseBusinessClass
} }
public PipeLine<From, String> toClassCode () { return pipe(new ORMAttributePipe<Me, String>(FIELD_ClassCode)); } public PipeLine<From, FactorClass> toFactorClass () { return pipe(new ORMAttributePipe<Me, FactorClass>(FIELD_FactorClass)); }
public PipeLine<From, String> toNotes () { return pipe(new ORMAttributePipe<Me, String>(FIELD_Notes)); } public PipeLine<From, String> toNotes () { return pipe(new ORMAttributePipe<Me, String>(FIELD_Notes)); }
......
...@@ -50,8 +50,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -50,8 +50,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
public static final String SINGLEREFERENCE_Level = "Level"; public static final String SINGLEREFERENCE_Level = "Level";
public static final String SINGLEREFERENCE_Narrative = "Narrative"; public static final String SINGLEREFERENCE_Narrative = "Narrative";
public static final String BACKREF_Narrative = ""; public static final String BACKREF_Narrative = "";
public static final String SINGLEREFERENCE_Candidate = "Candidate";
public static final String BACKREF_Candidate = "";
// Static constants corresponding to searches // Static constants corresponding to searches
public static final String SEARCH_All = "All"; public static final String SEARCH_All = "All";
...@@ -76,7 +74,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -76,7 +74,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
private SingleAssociation<FactorScore, Factor> _Factor; private SingleAssociation<FactorScore, Factor> _Factor;
private SingleAssociation<FactorScore, Level> _Level; private SingleAssociation<FactorScore, Level> _Level;
private SingleAssociation<FactorScore, Narrative> _Narrative; private SingleAssociation<FactorScore, Narrative> _Narrative;
private SingleAssociation<FactorScore, Candidate> _Candidate;
// Private attributes corresponding to multiple references // Private attributes corresponding to multiple references
...@@ -102,7 +99,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -102,7 +99,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
String tmp_TestAnalysis = TestAnalysis.BACKREF_FactorScores; String tmp_TestAnalysis = TestAnalysis.BACKREF_FactorScores;
String tmp_Narrative = Narrative.BACKREF_FactorScores; String tmp_Narrative = Narrative.BACKREF_FactorScores;
String tmp_Candidate = Candidate.BACKREF_FactorScores;
Map validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping")); Map validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping"));
...@@ -110,7 +106,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -110,7 +106,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
setupAssocMetaData_Factor(); setupAssocMetaData_Factor();
setupAssocMetaData_Level(); setupAssocMetaData_Level();
setupAssocMetaData_Narrative(); setupAssocMetaData_Narrative();
setupAssocMetaData_Candidate();
FIELD_ColorCode_Validators = (AttributeValidator[])setupAttribMetaData_ColorCode(validatorMapping).toArray (new AttributeValidator[0]); FIELD_ColorCode_Validators = (AttributeValidator[])setupAttribMetaData_ColorCode(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_Score_Validators = (AttributeValidator[])setupAttribMetaData_Score(validatorMapping).toArray (new AttributeValidator[0]); FIELD_Score_Validators = (AttributeValidator[])setupAttribMetaData_Score(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_ColorRank_Validators = (AttributeValidator[])setupAttribMetaData_ColorRank(validatorMapping).toArray (new AttributeValidator[0]); FIELD_ColorRank_Validators = (AttributeValidator[])setupAttribMetaData_ColorRank(validatorMapping).toArray (new AttributeValidator[0]);
...@@ -188,21 +183,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -188,21 +183,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
// Meta Info setup // Meta Info setup
private static void setupAssocMetaData_Candidate()
{
Map metaInfo = new HashMap ();
metaInfo.put ("backreferenceName", "FactorScores");
metaInfo.put ("dbcol", "candidate_id");
metaInfo.put ("name", "Candidate");
metaInfo.put ("type", "Candidate");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for FactorScore.Candidate:", metaInfo);
ATTRIBUTES_METADATA_FactorScore.put (SINGLEREFERENCE_Candidate, Collections.unmodifiableMap (metaInfo));
}
// Meta Info setup
private static List setupAttribMetaData_ColorCode(Map validatorMapping) private static List setupAttribMetaData_ColorCode(Map validatorMapping)
{ {
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
...@@ -317,7 +297,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -317,7 +297,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
_Factor = new SingleAssociation<FactorScore, Factor> (this, SINGLEREFERENCE_Factor, null, Factor.REFERENCE_Factor, "tl_score"); _Factor = new SingleAssociation<FactorScore, Factor> (this, SINGLEREFERENCE_Factor, null, Factor.REFERENCE_Factor, "tl_score");
_Level = new SingleAssociation<FactorScore, Level> (this, SINGLEREFERENCE_Level, null, Level.REFERENCE_Level, "tl_score"); _Level = new SingleAssociation<FactorScore, Level> (this, SINGLEREFERENCE_Level, null, Level.REFERENCE_Level, "tl_score");
_Narrative = new SingleAssociation<FactorScore, Narrative> (this, SINGLEREFERENCE_Narrative, Narrative.MULTIPLEREFERENCE_FactorScores, Narrative.REFERENCE_Narrative, "tl_score"); _Narrative = new SingleAssociation<FactorScore, Narrative> (this, SINGLEREFERENCE_Narrative, Narrative.MULTIPLEREFERENCE_FactorScores, Narrative.REFERENCE_Narrative, "tl_score");
_Candidate = new SingleAssociation<FactorScore, Candidate> (this, SINGLEREFERENCE_Candidate, Candidate.MULTIPLEREFERENCE_FactorScores, Candidate.REFERENCE_Candidate, "tl_score");
} }
...@@ -331,7 +310,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -331,7 +310,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
_Factor = new SingleAssociation<FactorScore, Factor> (this, SINGLEREFERENCE_Factor, null, Factor.REFERENCE_Factor, "tl_score"); _Factor = new SingleAssociation<FactorScore, Factor> (this, SINGLEREFERENCE_Factor, null, Factor.REFERENCE_Factor, "tl_score");
_Level = new SingleAssociation<FactorScore, Level> (this, SINGLEREFERENCE_Level, null, Level.REFERENCE_Level, "tl_score"); _Level = new SingleAssociation<FactorScore, Level> (this, SINGLEREFERENCE_Level, null, Level.REFERENCE_Level, "tl_score");
_Narrative = new SingleAssociation<FactorScore, Narrative> (this, SINGLEREFERENCE_Narrative, Narrative.MULTIPLEREFERENCE_FactorScores, Narrative.REFERENCE_Narrative, "tl_score"); _Narrative = new SingleAssociation<FactorScore, Narrative> (this, SINGLEREFERENCE_Narrative, Narrative.MULTIPLEREFERENCE_FactorScores, Narrative.REFERENCE_Narrative, "tl_score");
_Candidate = new SingleAssociation<FactorScore, Candidate> (this, SINGLEREFERENCE_Candidate, Candidate.MULTIPLEREFERENCE_FactorScores, Candidate.REFERENCE_Candidate, "tl_score");
return this; return this;
...@@ -749,8 +727,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -749,8 +727,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
result.add("Narrative"); result.add("Narrative");
result.add("Candidate");
return result; return result;
} }
...@@ -774,9 +750,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -774,9 +750,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
}else if (assocName.equals (SINGLEREFERENCE_Narrative)) }else if (assocName.equals (SINGLEREFERENCE_Narrative))
{ {
return _Narrative.getReferencedType (); return _Narrative.getReferencedType ();
}else if (assocName.equals (SINGLEREFERENCE_Candidate))
{
return _Candidate.getReferencedType ();
} }
else else
{ {
...@@ -803,9 +776,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -803,9 +776,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
}else if (assocName.equals (SINGLEREFERENCE_Narrative)) }else if (assocName.equals (SINGLEREFERENCE_Narrative))
{ {
return Narrative.MULTIPLEREFERENCE_FactorScores ; return Narrative.MULTIPLEREFERENCE_FactorScores ;
}else if (assocName.equals (SINGLEREFERENCE_Candidate))
{
return Candidate.MULTIPLEREFERENCE_FactorScores ;
} }
else else
{ {
...@@ -832,9 +802,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -832,9 +802,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
}else if (assocName.equals (SINGLEREFERENCE_Narrative)) }else if (assocName.equals (SINGLEREFERENCE_Narrative))
{ {
return getNarrative (); return getNarrative ();
}else if (assocName.equals (SINGLEREFERENCE_Candidate))
{
return getCandidate ();
} }
else else
{ {
...@@ -861,9 +828,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -861,9 +828,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
}else if (assocName.equals (SINGLEREFERENCE_Narrative)) }else if (assocName.equals (SINGLEREFERENCE_Narrative))
{ {
return getNarrative (getType); return getNarrative (getType);
}else if (assocName.equals (SINGLEREFERENCE_Candidate))
{
return getCandidate (getType);
} }
else else
{ {
...@@ -890,9 +854,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -890,9 +854,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
}else if (assocName.equals (SINGLEREFERENCE_Narrative)) }else if (assocName.equals (SINGLEREFERENCE_Narrative))
{ {
return getNarrativeID (); return getNarrativeID ();
}else if (assocName.equals (SINGLEREFERENCE_Candidate))
{
return getCandidateID ();
} }
else else
{ {
...@@ -919,9 +880,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -919,9 +880,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
}else if (assocName.equals (SINGLEREFERENCE_Narrative)) }else if (assocName.equals (SINGLEREFERENCE_Narrative))
{ {
setNarrative ((Narrative)(newValue)); setNarrative ((Narrative)(newValue));
}else if (assocName.equals (SINGLEREFERENCE_Candidate))
{
setCandidate ((Candidate)(newValue));
} }
else else
{ {
...@@ -1334,113 +1292,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -1334,113 +1292,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
} }
/** /**
* Get the reference Candidate
*/
public Candidate getCandidate () throws StorageException
{
assertValid();
try
{
return (Candidate)(_Candidate.get ());
}
catch (ClassCastException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in FactorScore:", this.getObjectID (), ", was trying to get Candidate:", getCandidateID ());
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _Candidate.get ().getClass ());
throw e;
}
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Candidate getCandidate (Get getType) throws StorageException
{
assertValid();
return _Candidate.get(getType);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getCandidateID ()
{
assertValid();
if (_Candidate == null)
{
return null;
}
else
{
return _Candidate.getID ();
}
}
/**
* Called prior to the assoc changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preCandidateChange (Candidate newCandidate) throws FieldException
{
}
/**
* Called after the assoc changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postCandidateChange () throws FieldException
{
}
public FieldWriteability getWriteability_Candidate ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the reference Candidate. Checks to ensure a new value
* has been supplied. If so, marks the reference as altered and sets it.
*/
public void setCandidate (Candidate newCandidate) throws StorageException, FieldException
{
if (_Candidate.wouldReferencedChange (newCandidate))
{
assertValid();
Debug.assertion (getWriteability_Candidate () != FieldWriteability.FALSE, "Assoc Candidate is not writeable");
preCandidateChange (newCandidate);
Candidate oldCandidate = getCandidate ();
if (oldCandidate != null)
{
// This is to stop validation from triggering when we are removed
_Candidate.set (null);
oldCandidate.removeFromFactorScores ((FactorScore)(this));
}
_Candidate.set (newCandidate);
if (newCandidate != null)
{
newCandidate.addToFactorScores ((FactorScore)(this));
}
postCandidateChange ();
}
}
/**
* A list of multi assoc names e.g. list of strings. * A list of multi assoc names e.g. list of strings.
*/ */
public List<String> getMultiAssocs() public List<String> getMultiAssocs()
...@@ -1566,20 +1417,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -1566,20 +1417,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
} }
} }
// Ensure we are removed from any loaded multi-associations that aren't mandatory
if (_Candidate.isLoaded () || getTransaction ().isObjectLoaded (_Candidate.getReferencedType (), getCandidateID ()))
{
Candidate referenced = getCandidate ();
if (referenced != null)
{
// Stop the callback
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null FactorScores from ", getObjectID (), " to ", referenced.getObjectID ());
_Candidate.set (null);
referenced.removeFromFactorScores ((FactorScore)this);
}
}
} }
catch (Exception e) catch (Exception e)
{ {
...@@ -1647,7 +1484,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -1647,7 +1484,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
_Factor.getPersistentSets (allSets); _Factor.getPersistentSets (allSets);
_Level.getPersistentSets (allSets); _Level.getPersistentSets (allSets);
_Narrative.getPersistentSets (allSets); _Narrative.getPersistentSets (allSets);
_Candidate.getPersistentSets (allSets);
} }
...@@ -1669,7 +1505,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -1669,7 +1505,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
_Factor.setFromPersistentSets (objectID, allSets); _Factor.setFromPersistentSets (objectID, allSets);
_Level.setFromPersistentSets (objectID, allSets); _Level.setFromPersistentSets (objectID, allSets);
_Narrative.setFromPersistentSets (objectID, allSets); _Narrative.setFromPersistentSets (objectID, allSets);
_Candidate.setFromPersistentSets (objectID, allSets);
} }
...@@ -1751,7 +1586,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -1751,7 +1586,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
_Factor.copyFrom (sourceFactorScore._Factor, linkToGhosts); _Factor.copyFrom (sourceFactorScore._Factor, linkToGhosts);
_Level.copyFrom (sourceFactorScore._Level, linkToGhosts); _Level.copyFrom (sourceFactorScore._Level, linkToGhosts);
_Narrative.copyFrom (sourceFactorScore._Narrative, linkToGhosts); _Narrative.copyFrom (sourceFactorScore._Narrative, linkToGhosts);
_Candidate.copyFrom (sourceFactorScore._Candidate, linkToGhosts);
} }
} }
...@@ -1796,7 +1630,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -1796,7 +1630,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
_Factor.readExternalData(vals.get(SINGLEREFERENCE_Factor)); _Factor.readExternalData(vals.get(SINGLEREFERENCE_Factor));
_Level.readExternalData(vals.get(SINGLEREFERENCE_Level)); _Level.readExternalData(vals.get(SINGLEREFERENCE_Level));
_Narrative.readExternalData(vals.get(SINGLEREFERENCE_Narrative)); _Narrative.readExternalData(vals.get(SINGLEREFERENCE_Narrative));
_Candidate.readExternalData(vals.get(SINGLEREFERENCE_Candidate));
} }
...@@ -1816,7 +1649,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -1816,7 +1649,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
vals.put (SINGLEREFERENCE_Factor, _Factor.writeExternalData()); vals.put (SINGLEREFERENCE_Factor, _Factor.writeExternalData());
vals.put (SINGLEREFERENCE_Level, _Level.writeExternalData()); vals.put (SINGLEREFERENCE_Level, _Level.writeExternalData());
vals.put (SINGLEREFERENCE_Narrative, _Narrative.writeExternalData()); vals.put (SINGLEREFERENCE_Narrative, _Narrative.writeExternalData());
vals.put (SINGLEREFERENCE_Candidate, _Candidate.writeExternalData());
} }
...@@ -1848,7 +1680,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -1848,7 +1680,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
_Factor.compare (otherFactorScore._Factor, listener); _Factor.compare (otherFactorScore._Factor, listener);
_Level.compare (otherFactorScore._Level, listener); _Level.compare (otherFactorScore._Level, listener);
_Narrative.compare (otherFactorScore._Narrative, listener); _Narrative.compare (otherFactorScore._Narrative, listener);
_Candidate.compare (otherFactorScore._Candidate, listener);
// Compare multiple assocs // Compare multiple assocs
...@@ -1877,7 +1708,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -1877,7 +1708,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
visitor.visitAssociation (_Factor); visitor.visitAssociation (_Factor);
visitor.visitAssociation (_Level); visitor.visitAssociation (_Level);
visitor.visitAssociation (_Narrative); visitor.visitAssociation (_Narrative);
visitor.visitAssociation (_Candidate);
} }
...@@ -1902,10 +1732,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -1902,10 +1732,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
{ {
visitor.visit (_Narrative); visitor.visit (_Narrative);
} }
if (scope.includes (_Candidate))
{
visitor.visit (_Candidate);
}
} }
...@@ -1959,10 +1785,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -1959,10 +1785,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
{ {
return filter.matches (getNarrative ()); return filter.matches (getNarrative ());
} }
else if (attribName.equals (SINGLEREFERENCE_Candidate))
{
return filter.matches (getCandidate ());
}
else else
{ {
return super.testFilter (attribName, filter); return super.testFilter (attribName, filter);
...@@ -2036,12 +1858,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -2036,12 +1858,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
return this; return this;
} }
public SearchAll andCandidate (QueryFilter<Candidate> filter)
{
filter.addFilter (context, "tl_score.candidate_id", "Candidate");
return this;
}
public FactorScore[] public FactorScore[]
search (ObjectTransaction transaction) throws StorageException search (ObjectTransaction transaction) throws StorageException
{ {
...@@ -2199,10 +2015,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -2199,10 +2015,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
{ {
return getWriteability_Narrative (); return getWriteability_Narrative ();
} }
else if (fieldName.equals (SINGLEREFERENCE_Candidate))
{
return getWriteability_Candidate ();
}
else if (fieldName.equals (FIELD_ColorCode)) else if (fieldName.equals (FIELD_ColorCode))
{ {
return getWriteability_ColorCode (); return getWriteability_ColorCode ();
...@@ -2456,10 +2268,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -2456,10 +2268,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
{ {
return toNarrative (); return toNarrative ();
} }
if (name.equals ("Candidate"))
{
return toCandidate ();
}
return super.to(name); return super.to(name);
...@@ -2497,12 +2305,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass ...@@ -2497,12 +2305,6 @@ public abstract class BaseFactorScore extends BaseBusinessClass
{ {
return Narrative.REFERENCE_Narrative.new NarrativePipeLineFactory<From, Narrative> (this, new ORMSingleAssocPipe<Me, Narrative>(SINGLEREFERENCE_Narrative, filter)); return Narrative.REFERENCE_Narrative.new NarrativePipeLineFactory<From, Narrative> (this, new ORMSingleAssocPipe<Me, Narrative>(SINGLEREFERENCE_Narrative, filter));
} }
public Candidate.CandidatePipeLineFactory<From, Candidate> toCandidate () { return toCandidate (Filter.ALL); }
public Candidate.CandidatePipeLineFactory<From, Candidate> toCandidate (Filter<Candidate> filter)
{
return Candidate.REFERENCE_Candidate.new CandidatePipeLineFactory<From, Candidate> (this, new ORMSingleAssocPipe<Me, Candidate>(SINGLEREFERENCE_Candidate, filter));
}
} }
...@@ -2595,20 +2397,6 @@ class DummyFactorScore extends FactorScore ...@@ -2595,20 +2397,6 @@ class DummyFactorScore extends FactorScore
return Narrative.DUMMY_Narrative.getObjectID(); return Narrative.DUMMY_Narrative.getObjectID();
} }
public Candidate getCandidate () throws StorageException
{
return (Candidate)(Candidate.DUMMY_Candidate);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getCandidateID ()
{
return Candidate.DUMMY_Candidate.getObjectID();
}
} }
...@@ -51,6 +51,12 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -51,6 +51,12 @@ public abstract class BaseLevel extends BaseBusinessClass
public static final String BACKREF_TestAnalysises = ""; public static final String BACKREF_TestAnalysises = "";
public static final String MULTIPLEREFERENCE_LevelFactorTypes = "LevelFactorTypes"; public static final String MULTIPLEREFERENCE_LevelFactorTypes = "LevelFactorTypes";
public static final String BACKREF_LevelFactorTypes = ""; public static final String BACKREF_LevelFactorTypes = "";
public static final String MULTIPLEREFERENCE_LevelClassCriterias = "LevelClassCriterias";
public static final String BACKREF_LevelClassCriterias = "";
public static final String MULTIPLEREFERENCE_LevelNormalisations = "LevelNormalisations";
public static final String BACKREF_LevelNormalisations = "";
public static final String MULTIPLEREFERENCE_ClassNormalisations = "ClassNormalisations";
public static final String BACKREF_ClassNormalisations = "";
// Static constants corresponding to searches // Static constants corresponding to searches
public static final String SEARCH_All = "All"; public static final String SEARCH_All = "All";
...@@ -78,6 +84,9 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -78,6 +84,9 @@ public abstract class BaseLevel extends BaseBusinessClass
private MultipleAssociation<Level, Narrative> _Narratives; private MultipleAssociation<Level, Narrative> _Narratives;
private MultipleAssociation<Level, TestAnalysis> _TestAnalysises; private MultipleAssociation<Level, TestAnalysis> _TestAnalysises;
private MultipleAssociation<Level, LevelFactorType> _LevelFactorTypes; private MultipleAssociation<Level, LevelFactorType> _LevelFactorTypes;
private MultipleAssociation<Level, LevelClassCriteria> _LevelClassCriterias;
private MultipleAssociation<Level, LevelNormalisation> _LevelNormalisations;
private MultipleAssociation<Level, ClassNormalisation> _ClassNormalisations;
// Map of maps of metadata // Map of maps of metadata
...@@ -102,6 +111,9 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -102,6 +111,9 @@ public abstract class BaseLevel extends BaseBusinessClass
String tmp_Narratives = Narrative.BACKREF_Level; String tmp_Narratives = Narrative.BACKREF_Level;
String tmp_TestAnalysises = TestAnalysis.BACKREF_Level; String tmp_TestAnalysises = TestAnalysis.BACKREF_Level;
String tmp_LevelFactorTypes = LevelFactorType.BACKREF_Level; String tmp_LevelFactorTypes = LevelFactorType.BACKREF_Level;
String tmp_LevelClassCriterias = LevelClassCriteria.BACKREF_Level;
String tmp_LevelNormalisations = LevelNormalisation.BACKREF_Level;
String tmp_ClassNormalisations = ClassNormalisation.BACKREF_Level;
Map validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping")); Map validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping"));
...@@ -110,6 +122,9 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -110,6 +122,9 @@ public abstract class BaseLevel extends BaseBusinessClass
setupAssocMetaData_Narratives(); setupAssocMetaData_Narratives();
setupAssocMetaData_TestAnalysises(); setupAssocMetaData_TestAnalysises();
setupAssocMetaData_LevelFactorTypes(); setupAssocMetaData_LevelFactorTypes();
setupAssocMetaData_LevelClassCriterias();
setupAssocMetaData_LevelNormalisations();
setupAssocMetaData_ClassNormalisations();
FIELD_LevelDescription_Validators = (AttributeValidator[])setupAttribMetaData_LevelDescription(validatorMapping).toArray (new AttributeValidator[0]); FIELD_LevelDescription_Validators = (AttributeValidator[])setupAttribMetaData_LevelDescription(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_LevelNotes_Validators = (AttributeValidator[])setupAttribMetaData_LevelNotes(validatorMapping).toArray (new AttributeValidator[0]); FIELD_LevelNotes_Validators = (AttributeValidator[])setupAttribMetaData_LevelNotes(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_ReportHeader_Validators = (AttributeValidator[])setupAttribMetaData_ReportHeader(validatorMapping).toArray (new AttributeValidator[0]); FIELD_ReportHeader_Validators = (AttributeValidator[])setupAttribMetaData_ReportHeader(validatorMapping).toArray (new AttributeValidator[0]);
...@@ -198,6 +213,48 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -198,6 +213,48 @@ public abstract class BaseLevel extends BaseBusinessClass
// Meta Info setup // Meta Info setup
private static void setupAssocMetaData_LevelClassCriterias()
{
Map metaInfo = new HashMap ();
metaInfo.put ("backreferenceName", "Level");
metaInfo.put ("name", "LevelClassCriterias");
metaInfo.put ("type", "LevelClassCriteria");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Level.LevelClassCriterias:", metaInfo);
ATTRIBUTES_METADATA_Level.put (MULTIPLEREFERENCE_LevelClassCriterias, Collections.unmodifiableMap (metaInfo));
}
// Meta Info setup
private static void setupAssocMetaData_LevelNormalisations()
{
Map metaInfo = new HashMap ();
metaInfo.put ("backreferenceName", "Level");
metaInfo.put ("name", "LevelNormalisations");
metaInfo.put ("type", "LevelNormalisation");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Level.LevelNormalisations:", metaInfo);
ATTRIBUTES_METADATA_Level.put (MULTIPLEREFERENCE_LevelNormalisations, Collections.unmodifiableMap (metaInfo));
}
// Meta Info setup
private static void setupAssocMetaData_ClassNormalisations()
{
Map metaInfo = new HashMap ();
metaInfo.put ("backreferenceName", "Level");
metaInfo.put ("name", "ClassNormalisations");
metaInfo.put ("type", "ClassNormalisation");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Level.ClassNormalisations:", metaInfo);
ATTRIBUTES_METADATA_Level.put (MULTIPLEREFERENCE_ClassNormalisations, Collections.unmodifiableMap (metaInfo));
}
// Meta Info setup
private static List setupAttribMetaData_LevelDescription(Map validatorMapping) private static List setupAttribMetaData_LevelDescription(Map validatorMapping)
{ {
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
...@@ -295,6 +352,9 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -295,6 +352,9 @@ public abstract class BaseLevel extends BaseBusinessClass
_Narratives = new MultipleAssociation<Level, Narrative> (this, MULTIPLEREFERENCE_Narratives, Narrative.SINGLEREFERENCE_Level, Narrative.REFERENCE_Narrative); _Narratives = new MultipleAssociation<Level, Narrative> (this, MULTIPLEREFERENCE_Narratives, Narrative.SINGLEREFERENCE_Level, Narrative.REFERENCE_Narrative);
_TestAnalysises = new MultipleAssociation<Level, TestAnalysis> (this, MULTIPLEREFERENCE_TestAnalysises, TestAnalysis.SINGLEREFERENCE_Level, TestAnalysis.REFERENCE_TestAnalysis); _TestAnalysises = new MultipleAssociation<Level, TestAnalysis> (this, MULTIPLEREFERENCE_TestAnalysises, TestAnalysis.SINGLEREFERENCE_Level, TestAnalysis.REFERENCE_TestAnalysis);
_LevelFactorTypes = new MultipleAssociation<Level, LevelFactorType> (this, MULTIPLEREFERENCE_LevelFactorTypes, LevelFactorType.SINGLEREFERENCE_Level, LevelFactorType.REFERENCE_LevelFactorType); _LevelFactorTypes = new MultipleAssociation<Level, LevelFactorType> (this, MULTIPLEREFERENCE_LevelFactorTypes, LevelFactorType.SINGLEREFERENCE_Level, LevelFactorType.REFERENCE_LevelFactorType);
_LevelClassCriterias = new MultipleAssociation<Level, LevelClassCriteria> (this, MULTIPLEREFERENCE_LevelClassCriterias, LevelClassCriteria.SINGLEREFERENCE_Level, LevelClassCriteria.REFERENCE_LevelClassCriteria);
_LevelNormalisations = new MultipleAssociation<Level, LevelNormalisation> (this, MULTIPLEREFERENCE_LevelNormalisations, LevelNormalisation.SINGLEREFERENCE_Level, LevelNormalisation.REFERENCE_LevelNormalisation);
_ClassNormalisations = new MultipleAssociation<Level, ClassNormalisation> (this, MULTIPLEREFERENCE_ClassNormalisations, ClassNormalisation.SINGLEREFERENCE_Level, ClassNormalisation.REFERENCE_ClassNormalisation);
} }
...@@ -309,6 +369,9 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -309,6 +369,9 @@ public abstract class BaseLevel extends BaseBusinessClass
_Narratives = new MultipleAssociation<Level, Narrative> (this, MULTIPLEREFERENCE_Narratives, Narrative.SINGLEREFERENCE_Level, Narrative.REFERENCE_Narrative); _Narratives = new MultipleAssociation<Level, Narrative> (this, MULTIPLEREFERENCE_Narratives, Narrative.SINGLEREFERENCE_Level, Narrative.REFERENCE_Narrative);
_TestAnalysises = new MultipleAssociation<Level, TestAnalysis> (this, MULTIPLEREFERENCE_TestAnalysises, TestAnalysis.SINGLEREFERENCE_Level, TestAnalysis.REFERENCE_TestAnalysis); _TestAnalysises = new MultipleAssociation<Level, TestAnalysis> (this, MULTIPLEREFERENCE_TestAnalysises, TestAnalysis.SINGLEREFERENCE_Level, TestAnalysis.REFERENCE_TestAnalysis);
_LevelFactorTypes = new MultipleAssociation<Level, LevelFactorType> (this, MULTIPLEREFERENCE_LevelFactorTypes, LevelFactorType.SINGLEREFERENCE_Level, LevelFactorType.REFERENCE_LevelFactorType); _LevelFactorTypes = new MultipleAssociation<Level, LevelFactorType> (this, MULTIPLEREFERENCE_LevelFactorTypes, LevelFactorType.SINGLEREFERENCE_Level, LevelFactorType.REFERENCE_LevelFactorType);
_LevelClassCriterias = new MultipleAssociation<Level, LevelClassCriteria> (this, MULTIPLEREFERENCE_LevelClassCriterias, LevelClassCriteria.SINGLEREFERENCE_Level, LevelClassCriteria.REFERENCE_LevelClassCriteria);
_LevelNormalisations = new MultipleAssociation<Level, LevelNormalisation> (this, MULTIPLEREFERENCE_LevelNormalisations, LevelNormalisation.SINGLEREFERENCE_Level, LevelNormalisation.REFERENCE_LevelNormalisation);
_ClassNormalisations = new MultipleAssociation<Level, ClassNormalisation> (this, MULTIPLEREFERENCE_ClassNormalisations, ClassNormalisation.SINGLEREFERENCE_Level, ClassNormalisation.REFERENCE_ClassNormalisation);
return this; return this;
...@@ -728,6 +791,12 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -728,6 +791,12 @@ public abstract class BaseLevel extends BaseBusinessClass
result.add("LevelFactorTypes"); result.add("LevelFactorTypes");
result.add("LevelClassCriterias");
result.add("LevelNormalisations");
result.add("ClassNormalisations");
return result; return result;
} }
...@@ -764,6 +833,21 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -764,6 +833,21 @@ public abstract class BaseLevel extends BaseBusinessClass
return LevelFactorType.REFERENCE_LevelFactorType ; return LevelFactorType.REFERENCE_LevelFactorType ;
} }
if (MULTIPLEREFERENCE_LevelClassCriterias.equals(attribName))
{
return LevelClassCriteria.REFERENCE_LevelClassCriteria ;
}
if (MULTIPLEREFERENCE_LevelNormalisations.equals(attribName))
{
return LevelNormalisation.REFERENCE_LevelNormalisation ;
}
if (MULTIPLEREFERENCE_ClassNormalisations.equals(attribName))
{
return ClassNormalisation.REFERENCE_ClassNormalisation ;
}
return super.getMultiAssocReferenceInstance(attribName); return super.getMultiAssocReferenceInstance(attribName);
} }
...@@ -797,6 +881,21 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -797,6 +881,21 @@ public abstract class BaseLevel extends BaseBusinessClass
return LevelFactorType.SINGLEREFERENCE_Level ; return LevelFactorType.SINGLEREFERENCE_Level ;
} }
if (MULTIPLEREFERENCE_LevelClassCriterias.equals(attribName))
{
return LevelClassCriteria.SINGLEREFERENCE_Level ;
}
if (MULTIPLEREFERENCE_LevelNormalisations.equals(attribName))
{
return LevelNormalisation.SINGLEREFERENCE_Level ;
}
if (MULTIPLEREFERENCE_ClassNormalisations.equals(attribName))
{
return ClassNormalisation.SINGLEREFERENCE_Level ;
}
return super.getMultiAssocBackReference(attribName); return super.getMultiAssocBackReference(attribName);
} }
...@@ -833,6 +932,21 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -833,6 +932,21 @@ public abstract class BaseLevel extends BaseBusinessClass
return this.getLevelFactorTypesCount(); return this.getLevelFactorTypesCount();
} }
if (MULTIPLEREFERENCE_LevelClassCriterias.equals(attribName))
{
return this.getLevelClassCriteriasCount();
}
if (MULTIPLEREFERENCE_LevelNormalisations.equals(attribName))
{
return this.getLevelNormalisationsCount();
}
if (MULTIPLEREFERENCE_ClassNormalisations.equals(attribName))
{
return this.getClassNormalisationsCount();
}
return super.getMultiAssocCount(attribName); return super.getMultiAssocCount(attribName);
} }
...@@ -869,6 +983,21 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -869,6 +983,21 @@ public abstract class BaseLevel extends BaseBusinessClass
return this.getLevelFactorTypesAt(index); return this.getLevelFactorTypesAt(index);
} }
if (MULTIPLEREFERENCE_LevelClassCriterias.equals(attribName))
{
return this.getLevelClassCriteriasAt(index);
}
if (MULTIPLEREFERENCE_LevelNormalisations.equals(attribName))
{
return this.getLevelNormalisationsAt(index);
}
if (MULTIPLEREFERENCE_ClassNormalisations.equals(attribName))
{
return this.getClassNormalisationsAt(index);
}
return super.getMultiAssocAt(attribName, index); return super.getMultiAssocAt(attribName, index);
} }
...@@ -915,6 +1044,27 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -915,6 +1044,27 @@ public abstract class BaseLevel extends BaseBusinessClass
return; return;
} }
if (MULTIPLEREFERENCE_LevelClassCriterias.equals(attribName))
{
addToLevelClassCriterias((LevelClassCriteria)newElement);
return;
}
if (MULTIPLEREFERENCE_LevelNormalisations.equals(attribName))
{
addToLevelNormalisations((LevelNormalisation)newElement);
return;
}
if (MULTIPLEREFERENCE_ClassNormalisations.equals(attribName))
{
addToClassNormalisations((ClassNormalisation)newElement);
return;
}
super.addToMultiAssoc(attribName, newElement); super.addToMultiAssoc(attribName, newElement);
} }
...@@ -960,6 +1110,27 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -960,6 +1110,27 @@ public abstract class BaseLevel extends BaseBusinessClass
return; return;
} }
if (MULTIPLEREFERENCE_LevelClassCriterias.equals(attribName))
{
removeFromLevelClassCriterias((LevelClassCriteria)oldElement);
return;
}
if (MULTIPLEREFERENCE_LevelNormalisations.equals(attribName))
{
removeFromLevelNormalisations((LevelNormalisation)oldElement);
return;
}
if (MULTIPLEREFERENCE_ClassNormalisations.equals(attribName))
{
removeFromClassNormalisations((ClassNormalisation)oldElement);
return;
}
super.removeFromMultiAssoc(attribName, oldElement); super.removeFromMultiAssoc(attribName, oldElement);
} }
...@@ -998,6 +1169,24 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -998,6 +1169,24 @@ public abstract class BaseLevel extends BaseBusinessClass
return; return;
} }
if (MULTIPLEREFERENCE_LevelClassCriterias.equals(attribName))
{
_LevelClassCriterias.__loadAssociation (elements);
return;
}
if (MULTIPLEREFERENCE_LevelNormalisations.equals(attribName))
{
_LevelNormalisations.__loadAssociation (elements);
return;
}
if (MULTIPLEREFERENCE_ClassNormalisations.equals(attribName))
{
_ClassNormalisations.__loadAssociation (elements);
return;
}
super.__loadMultiAssoc(attribName, elements); super.__loadMultiAssoc(attribName, elements);
} }
...@@ -1031,6 +1220,21 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -1031,6 +1220,21 @@ public abstract class BaseLevel extends BaseBusinessClass
return _LevelFactorTypes.isLoaded (); return _LevelFactorTypes.isLoaded ();
} }
if (MULTIPLEREFERENCE_LevelClassCriterias.equals(attribName))
{
return _LevelClassCriterias.isLoaded ();
}
if (MULTIPLEREFERENCE_LevelNormalisations.equals(attribName))
{
return _LevelNormalisations.isLoaded ();
}
if (MULTIPLEREFERENCE_ClassNormalisations.equals(attribName))
{
return _ClassNormalisations.isLoaded ();
}
return super.__isMultiAssocLoaded(attribName); return super.__isMultiAssocLoaded(attribName);
} }
...@@ -1382,6 +1586,213 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -1382,6 +1586,213 @@ public abstract class BaseLevel extends BaseBusinessClass
return _LevelFactorTypes.getSet (); return _LevelFactorTypes.getSet ();
} }
public FieldWriteability getWriteability_LevelClassCriterias ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
public int getLevelClassCriteriasCount () throws StorageException
{
assertValid();
return _LevelClassCriterias.getReferencedObjectsCount ();
}
public void addToLevelClassCriterias (LevelClassCriteria newElement) throws StorageException
{
if (_LevelClassCriterias.wouldAddChange (newElement))
{
assertValid();
Debug.assertion (getWriteability_LevelClassCriterias () != FieldWriteability.FALSE, "MultiAssoc LevelClassCriterias is not writeable (add)");
_LevelClassCriterias.appendElement (newElement);
try
{
if (newElement.getLevel () != this)
{
newElement.setLevel ((Level)(this));
}
}
catch (Exception e)
{
throw NestedException.wrap(e);
}
}
}
public void removeFromLevelClassCriterias (LevelClassCriteria elementToRemove) throws StorageException
{
if (_LevelClassCriterias.wouldRemoveChange (elementToRemove))
{
assertValid();
Debug.assertion (getWriteability_LevelClassCriterias () != FieldWriteability.FALSE, "MultiAssoc LevelClassCriterias is not writeable (remove)");
_LevelClassCriterias.removeElement (elementToRemove);
try
{
if (elementToRemove.getLevel () != null)
{
elementToRemove.setLevel (null);
}
}
catch (Exception e)
{
throw NestedException.wrap(e);
}
}
}
public LevelClassCriteria getLevelClassCriteriasAt (int index) throws StorageException
{
return (LevelClassCriteria)(_LevelClassCriterias.getElementAt (index));
}
public SortedSet<LevelClassCriteria> getLevelClassCriteriasSet () throws StorageException
{
return _LevelClassCriterias.getSet ();
}
public FieldWriteability getWriteability_LevelNormalisations ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
public int getLevelNormalisationsCount () throws StorageException
{
assertValid();
return _LevelNormalisations.getReferencedObjectsCount ();
}
public void addToLevelNormalisations (LevelNormalisation newElement) throws StorageException
{
if (_LevelNormalisations.wouldAddChange (newElement))
{
assertValid();
Debug.assertion (getWriteability_LevelNormalisations () != FieldWriteability.FALSE, "MultiAssoc LevelNormalisations is not writeable (add)");
_LevelNormalisations.appendElement (newElement);
try
{
if (newElement.getLevel () != this)
{
newElement.setLevel ((Level)(this));
}
}
catch (Exception e)
{
throw NestedException.wrap(e);
}
}
}
public void removeFromLevelNormalisations (LevelNormalisation elementToRemove) throws StorageException
{
if (_LevelNormalisations.wouldRemoveChange (elementToRemove))
{
assertValid();
Debug.assertion (getWriteability_LevelNormalisations () != FieldWriteability.FALSE, "MultiAssoc LevelNormalisations is not writeable (remove)");
_LevelNormalisations.removeElement (elementToRemove);
try
{
if (elementToRemove.getLevel () != null)
{
elementToRemove.setLevel (null);
}
}
catch (Exception e)
{
throw NestedException.wrap(e);
}
}
}
public LevelNormalisation getLevelNormalisationsAt (int index) throws StorageException
{
return (LevelNormalisation)(_LevelNormalisations.getElementAt (index));
}
public SortedSet<LevelNormalisation> getLevelNormalisationsSet () throws StorageException
{
return _LevelNormalisations.getSet ();
}
public FieldWriteability getWriteability_ClassNormalisations ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
public int getClassNormalisationsCount () throws StorageException
{
assertValid();
return _ClassNormalisations.getReferencedObjectsCount ();
}
public void addToClassNormalisations (ClassNormalisation newElement) throws StorageException
{
if (_ClassNormalisations.wouldAddChange (newElement))
{
assertValid();
Debug.assertion (getWriteability_ClassNormalisations () != FieldWriteability.FALSE, "MultiAssoc ClassNormalisations is not writeable (add)");
_ClassNormalisations.appendElement (newElement);
try
{
if (newElement.getLevel () != this)
{
newElement.setLevel ((Level)(this));
}
}
catch (Exception e)
{
throw NestedException.wrap(e);
}
}
}
public void removeFromClassNormalisations (ClassNormalisation elementToRemove) throws StorageException
{
if (_ClassNormalisations.wouldRemoveChange (elementToRemove))
{
assertValid();
Debug.assertion (getWriteability_ClassNormalisations () != FieldWriteability.FALSE, "MultiAssoc ClassNormalisations is not writeable (remove)");
_ClassNormalisations.removeElement (elementToRemove);
try
{
if (elementToRemove.getLevel () != null)
{
elementToRemove.setLevel (null);
}
}
catch (Exception e)
{
throw NestedException.wrap(e);
}
}
}
public ClassNormalisation getClassNormalisationsAt (int index) throws StorageException
{
return (ClassNormalisation)(_ClassNormalisations.getElementAt (index));
}
public SortedSet<ClassNormalisation> getClassNormalisationsSet () throws StorageException
{
return _ClassNormalisations.getSet ();
}
public void onDelete () public void onDelete ()
...@@ -1418,6 +1829,24 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -1418,6 +1829,24 @@ public abstract class BaseLevel extends BaseBusinessClass
referenced.setLevel(null); referenced.setLevel(null);
} }
for(LevelClassCriteria referenced : CollectionUtils.reverse(getLevelClassCriteriasSet()))
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null Level from ", getObjectID (), " to ", referenced.getObjectID ());
referenced.setLevel(null);
}
for(LevelNormalisation referenced : CollectionUtils.reverse(getLevelNormalisationsSet()))
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null Level from ", getObjectID (), " to ", referenced.getObjectID ());
referenced.setLevel(null);
}
for(ClassNormalisation referenced : CollectionUtils.reverse(getClassNormalisationsSet()))
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null Level from ", getObjectID (), " to ", referenced.getObjectID ());
referenced.setLevel(null);
}
} }
catch (Exception e) catch (Exception e)
{ {
...@@ -1595,6 +2024,9 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -1595,6 +2024,9 @@ public abstract class BaseLevel extends BaseBusinessClass
_Narratives.copyFrom (sourceLevel._Narratives, linkToGhosts); _Narratives.copyFrom (sourceLevel._Narratives, linkToGhosts);
_TestAnalysises.copyFrom (sourceLevel._TestAnalysises, linkToGhosts); _TestAnalysises.copyFrom (sourceLevel._TestAnalysises, linkToGhosts);
_LevelFactorTypes.copyFrom (sourceLevel._LevelFactorTypes, linkToGhosts); _LevelFactorTypes.copyFrom (sourceLevel._LevelFactorTypes, linkToGhosts);
_LevelClassCriterias.copyFrom (sourceLevel._LevelClassCriterias, linkToGhosts);
_LevelNormalisations.copyFrom (sourceLevel._LevelNormalisations, linkToGhosts);
_ClassNormalisations.copyFrom (sourceLevel._ClassNormalisations, linkToGhosts);
} }
} }
...@@ -1623,6 +2055,9 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -1623,6 +2055,9 @@ public abstract class BaseLevel extends BaseBusinessClass
_Narratives.readExternalData(vals.get(MULTIPLEREFERENCE_Narratives)); _Narratives.readExternalData(vals.get(MULTIPLEREFERENCE_Narratives));
_TestAnalysises.readExternalData(vals.get(MULTIPLEREFERENCE_TestAnalysises)); _TestAnalysises.readExternalData(vals.get(MULTIPLEREFERENCE_TestAnalysises));
_LevelFactorTypes.readExternalData(vals.get(MULTIPLEREFERENCE_LevelFactorTypes)); _LevelFactorTypes.readExternalData(vals.get(MULTIPLEREFERENCE_LevelFactorTypes));
_LevelClassCriterias.readExternalData(vals.get(MULTIPLEREFERENCE_LevelClassCriterias));
_LevelNormalisations.readExternalData(vals.get(MULTIPLEREFERENCE_LevelNormalisations));
_ClassNormalisations.readExternalData(vals.get(MULTIPLEREFERENCE_ClassNormalisations));
} }
...@@ -1642,6 +2077,9 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -1642,6 +2077,9 @@ public abstract class BaseLevel extends BaseBusinessClass
vals.put (MULTIPLEREFERENCE_Narratives, _Narratives.writeExternalData()); vals.put (MULTIPLEREFERENCE_Narratives, _Narratives.writeExternalData());
vals.put (MULTIPLEREFERENCE_TestAnalysises, _TestAnalysises.writeExternalData()); vals.put (MULTIPLEREFERENCE_TestAnalysises, _TestAnalysises.writeExternalData());
vals.put (MULTIPLEREFERENCE_LevelFactorTypes, _LevelFactorTypes.writeExternalData()); vals.put (MULTIPLEREFERENCE_LevelFactorTypes, _LevelFactorTypes.writeExternalData());
vals.put (MULTIPLEREFERENCE_LevelClassCriterias, _LevelClassCriterias.writeExternalData());
vals.put (MULTIPLEREFERENCE_LevelNormalisations, _LevelNormalisations.writeExternalData());
vals.put (MULTIPLEREFERENCE_ClassNormalisations, _ClassNormalisations.writeExternalData());
} }
...@@ -1677,6 +2115,9 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -1677,6 +2115,9 @@ public abstract class BaseLevel extends BaseBusinessClass
_Narratives.compare (otherLevel._Narratives, listener); _Narratives.compare (otherLevel._Narratives, listener);
_TestAnalysises.compare (otherLevel._TestAnalysises, listener); _TestAnalysises.compare (otherLevel._TestAnalysises, listener);
_LevelFactorTypes.compare (otherLevel._LevelFactorTypes, listener); _LevelFactorTypes.compare (otherLevel._LevelFactorTypes, listener);
_LevelClassCriterias.compare (otherLevel._LevelClassCriterias, listener);
_LevelNormalisations.compare (otherLevel._LevelNormalisations, listener);
_ClassNormalisations.compare (otherLevel._ClassNormalisations, listener);
} }
} }
...@@ -1702,6 +2143,9 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -1702,6 +2143,9 @@ public abstract class BaseLevel extends BaseBusinessClass
visitor.visitAssociation (_Narratives); visitor.visitAssociation (_Narratives);
visitor.visitAssociation (_TestAnalysises); visitor.visitAssociation (_TestAnalysises);
visitor.visitAssociation (_LevelFactorTypes); visitor.visitAssociation (_LevelFactorTypes);
visitor.visitAssociation (_LevelClassCriterias);
visitor.visitAssociation (_LevelNormalisations);
visitor.visitAssociation (_ClassNormalisations);
} }
...@@ -1730,6 +2174,18 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -1730,6 +2174,18 @@ public abstract class BaseLevel extends BaseBusinessClass
{ {
visitor.visit (_LevelFactorTypes); visitor.visit (_LevelFactorTypes);
} }
if (scope.includes (_LevelClassCriterias))
{
visitor.visit (_LevelClassCriterias);
}
if (scope.includes (_LevelNormalisations))
{
visitor.visit (_LevelNormalisations);
}
if (scope.includes (_ClassNormalisations))
{
visitor.visit (_ClassNormalisations);
}
} }
...@@ -2039,6 +2495,18 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -2039,6 +2495,18 @@ public abstract class BaseLevel extends BaseBusinessClass
{ {
return getWriteability_LevelFactorTypes (); return getWriteability_LevelFactorTypes ();
} }
else if (fieldName.equals (MULTIPLEREFERENCE_LevelClassCriterias))
{
return getWriteability_LevelClassCriterias ();
}
else if (fieldName.equals (MULTIPLEREFERENCE_LevelNormalisations))
{
return getWriteability_LevelNormalisations ();
}
else if (fieldName.equals (MULTIPLEREFERENCE_ClassNormalisations))
{
return getWriteability_ClassNormalisations ();
}
else else
{ {
return super.getWriteable (fieldName); return super.getWriteable (fieldName);
...@@ -2252,6 +2720,18 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -2252,6 +2720,18 @@ public abstract class BaseLevel extends BaseBusinessClass
{ {
return toLevelFactorTypes (); return toLevelFactorTypes ();
} }
if (name.equals ("LevelClassCriterias"))
{
return toLevelClassCriterias ();
}
if (name.equals ("LevelNormalisations"))
{
return toLevelNormalisations ();
}
if (name.equals ("ClassNormalisations"))
{
return toClassNormalisations ();
}
if (name.equals ("LevelDescription")) if (name.equals ("LevelDescription"))
{ {
return toLevelDescription (); return toLevelDescription ();
...@@ -2305,6 +2785,24 @@ public abstract class BaseLevel extends BaseBusinessClass ...@@ -2305,6 +2785,24 @@ public abstract class BaseLevel extends BaseBusinessClass
{ {
return LevelFactorType.REFERENCE_LevelFactorType.new LevelFactorTypePipeLineFactory<From, LevelFactorType> (this, new ORMMultiAssocPipe<Me, LevelFactorType>(MULTIPLEREFERENCE_LevelFactorTypes, filter)); return LevelFactorType.REFERENCE_LevelFactorType.new LevelFactorTypePipeLineFactory<From, LevelFactorType> (this, new ORMMultiAssocPipe<Me, LevelFactorType>(MULTIPLEREFERENCE_LevelFactorTypes, filter));
} }
public LevelClassCriteria.LevelClassCriteriaPipeLineFactory<From, LevelClassCriteria> toLevelClassCriterias () { return toLevelClassCriterias(Filter.ALL); }
public LevelClassCriteria.LevelClassCriteriaPipeLineFactory<From, LevelClassCriteria> toLevelClassCriterias (Filter<LevelClassCriteria> filter)
{
return LevelClassCriteria.REFERENCE_LevelClassCriteria.new LevelClassCriteriaPipeLineFactory<From, LevelClassCriteria> (this, new ORMMultiAssocPipe<Me, LevelClassCriteria>(MULTIPLEREFERENCE_LevelClassCriterias, filter));
}
public LevelNormalisation.LevelNormalisationPipeLineFactory<From, LevelNormalisation> toLevelNormalisations () { return toLevelNormalisations(Filter.ALL); }
public LevelNormalisation.LevelNormalisationPipeLineFactory<From, LevelNormalisation> toLevelNormalisations (Filter<LevelNormalisation> filter)
{
return LevelNormalisation.REFERENCE_LevelNormalisation.new LevelNormalisationPipeLineFactory<From, LevelNormalisation> (this, new ORMMultiAssocPipe<Me, LevelNormalisation>(MULTIPLEREFERENCE_LevelNormalisations, filter));
}
public ClassNormalisation.ClassNormalisationPipeLineFactory<From, ClassNormalisation> toClassNormalisations () { return toClassNormalisations(Filter.ALL); }
public ClassNormalisation.ClassNormalisationPipeLineFactory<From, ClassNormalisation> toClassNormalisations (Filter<ClassNormalisation> filter)
{
return ClassNormalisation.REFERENCE_ClassNormalisation.new ClassNormalisationPipeLineFactory<From, ClassNormalisation> (this, new ORMMultiAssocPipe<Me, ClassNormalisation>(MULTIPLEREFERENCE_ClassNormalisations, filter));
}
} }
...@@ -2421,6 +2919,57 @@ class DummyLevel extends Level ...@@ -2421,6 +2919,57 @@ class DummyLevel extends Level
return new TreeSet(); return new TreeSet();
} }
public int getLevelClassCriteriasCount () throws StorageException
{
return 0;
}
public LevelClassCriteria getLevelClassCriteriasAt (int index) throws StorageException
{
throw new RuntimeException ("No elements in a dummy object in association LevelClassCriterias");
}
public SortedSet getLevelClassCriteriasSet () throws StorageException
{
return new TreeSet();
}
public int getLevelNormalisationsCount () throws StorageException
{
return 0;
}
public LevelNormalisation getLevelNormalisationsAt (int index) throws StorageException
{
throw new RuntimeException ("No elements in a dummy object in association LevelNormalisations");
}
public SortedSet getLevelNormalisationsSet () throws StorageException
{
return new TreeSet();
}
public int getClassNormalisationsCount () throws StorageException
{
return 0;
}
public ClassNormalisation getClassNormalisationsAt (int index) throws StorageException
{
throw new RuntimeException ("No elements in a dummy object in association ClassNormalisations");
}
public SortedSet getClassNormalisationsSet () throws StorageException
{
return new TreeSet();
}
} }
/*
* IMPORTANT!!!! XSL Autogenerated class, DO NOT EDIT!!!!!
* Template: Infrastructure8.2 rev3 [oneit.objstore.BusinessObjectTemplate.xsl]
*
* Version: 1.0
* Vendor: Apache Software Foundation (Xalan XSLTC)
* Vendor URL: http://xml.apache.org/xalan-j
*/
package performa.orm;
import java.io.*;
import java.util.*;
import oneit.appservices.config.*;
import oneit.logging.*;
import oneit.objstore.*;
import oneit.objstore.assocs.*;
import oneit.objstore.attributes.*;
import oneit.objstore.rdbms.filters.*;
import oneit.objstore.parser.*;
import oneit.objstore.validator.*;
import oneit.objstore.utils.*;
import oneit.utils.*;
import oneit.utils.filter.Filter;
import oneit.utils.transform.*;
import oneit.utils.parsers.FieldException;
import performa.orm.types.*;
public abstract class BaseLevelClassCriteria extends BaseBusinessClass
{
// Reference instance for the object
public static final LevelClassCriteria REFERENCE_LevelClassCriteria = new LevelClassCriteria ();
// Reference instance for the object
public static final LevelClassCriteria DUMMY_LevelClassCriteria = new DummyLevelClassCriteria ();
// Static constants corresponding to field names
public static final String FIELD_Importance = "Importance";
public static final String FIELD_FactorClass = "FactorClass";
public static final String SINGLEREFERENCE_Level = "Level";
public static final String BACKREF_Level = "";
// Static constants corresponding to searches
public static final String SEARCH_All = "All";
// Static constants corresponding to attribute helpers
private static final EnumeratedAttributeHelper<LevelClassCriteria, Importance> HELPER_Importance = new EnumeratedAttributeHelper<LevelClassCriteria, Importance> (Importance.FACTORY_Importance);
private static final EnumeratedAttributeHelper<LevelClassCriteria, FactorClass> HELPER_FactorClass = new EnumeratedAttributeHelper<LevelClassCriteria, FactorClass> (FactorClass.FACTORY_FactorClass);
// Private attributes corresponding to business object data
private Importance _Importance;
private FactorClass _FactorClass;
// Private attributes corresponding to single references
private SingleAssociation<LevelClassCriteria, Level> _Level;
// Private attributes corresponding to multiple references
// Map of maps of metadata
private static final Map ATTRIBUTES_METADATA_LevelClassCriteria = new HashMap ();
// Arrays of validators for each attribute
private static final AttributeValidator[] FIELD_Importance_Validators;
private static final AttributeValidator[] FIELD_FactorClass_Validators;
// Arrays of behaviour decorators
private static final LevelClassCriteriaBehaviourDecorator[] LevelClassCriteria_BehaviourDecorators;
static
{
try
{
String tmp_Level = Level.BACKREF_LevelClassCriterias;
Map validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping"));
setupAssocMetaData_Level();
FIELD_Importance_Validators = (AttributeValidator[])setupAttribMetaData_Importance(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_FactorClass_Validators = (AttributeValidator[])setupAttribMetaData_FactorClass(validatorMapping).toArray (new AttributeValidator[0]);
REFERENCE_LevelClassCriteria.initialiseReference ();
DUMMY_LevelClassCriteria.initialiseReference ();
LevelClassCriteria_BehaviourDecorators = BaseBusinessClass.getBBCBehaviours(LevelClassCriteria.class).toArray(new LevelClassCriteriaBehaviourDecorator[0]);
}
catch (RuntimeException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR1, e, "Error initialising");
throw e;
}
}
// Meta Info setup
private static void setupAssocMetaData_Level()
{
Map metaInfo = new HashMap ();
metaInfo.put ("backreferenceName", "LevelClassCriterias");
metaInfo.put ("dbcol", "level_number");
metaInfo.put ("name", "Level");
metaInfo.put ("type", "Level");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for LevelClassCriteria.Level:", metaInfo);
ATTRIBUTES_METADATA_LevelClassCriteria.put (SINGLEREFERENCE_Level, Collections.unmodifiableMap (metaInfo));
}
// Meta Info setup
private static List setupAttribMetaData_Importance(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("dbcol", "weighting");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "Importance");
metaInfo.put ("type", "Importance");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for LevelClassCriteria.Importance:", metaInfo);
ATTRIBUTES_METADATA_LevelClassCriteria.put (FIELD_Importance, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(LevelClassCriteria.class, "Importance", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for LevelClassCriteria.Importance:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_FactorClass(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("dbcol", "class_code");
metaInfo.put ("mandatory", "true");
metaInfo.put ("name", "FactorClass");
metaInfo.put ("type", "FactorClass");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for LevelClassCriteria.FactorClass:", metaInfo);
ATTRIBUTES_METADATA_LevelClassCriteria.put (FIELD_FactorClass, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(LevelClassCriteria.class, "FactorClass", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for LevelClassCriteria.FactorClass:", validators);
return validators;
}
// END OF STATIC METADATA DEFINITION
// This constructor should not be called
protected BaseLevelClassCriteria ()
{
}
protected BBCBehaviourDecorator[] getBehaviours()
{
return LevelClassCriteria_BehaviourDecorators;
}
// Initialise the attributes
protected void _initialiseNewObjAttributes (ObjectTransaction transaction) throws StorageException
{
super._initialiseNewObjAttributes (transaction);
_Importance = (Importance)(HELPER_Importance.initialise (_Importance));
_FactorClass = (FactorClass)(HELPER_FactorClass.initialise (_FactorClass));
}
// Initialise the associations
protected void _initialiseAssociations ()
{
super._initialiseAssociations ();
_Level = new SingleAssociation<LevelClassCriteria, Level> (this, SINGLEREFERENCE_Level, Level.MULTIPLEREFERENCE_LevelClassCriterias, Level.REFERENCE_Level, "tl_level_class_criteria");
}
// Initialise the associations
protected BaseBusinessClass initialiseReference ()
{
super.initialiseReference ();
_Level = new SingleAssociation<LevelClassCriteria, Level> (this, SINGLEREFERENCE_Level, Level.MULTIPLEREFERENCE_LevelClassCriterias, Level.REFERENCE_Level, "tl_level_class_criteria");
return this;
}
/**
* Get the attribute Importance
*/
public Importance getImportance ()
{
assertValid();
Importance valToReturn = _Importance;
for (LevelClassCriteriaBehaviourDecorator bhd : LevelClassCriteria_BehaviourDecorators)
{
valToReturn = bhd.getImportance ((LevelClassCriteria)this, valToReturn);
}
return valToReturn;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preImportanceChange (Importance newImportance) throws FieldException
{
}
/**
* Called after the attribute changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postImportanceChange () throws FieldException
{
}
public FieldWriteability getWriteability_Importance ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute Importance. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setImportance (Importance newImportance) throws FieldException
{
boolean oldAndNewIdentical = HELPER_Importance.compare (_Importance, newImportance);
try
{
for (LevelClassCriteriaBehaviourDecorator bhd : LevelClassCriteria_BehaviourDecorators)
{
newImportance = bhd.setImportance ((LevelClassCriteria)this, newImportance);
oldAndNewIdentical = HELPER_Importance.compare (_Importance, newImportance);
}
BusinessObjectParser.assertFieldCondition (newImportance != null, this, FIELD_Importance, "mandatory");
if (FIELD_Importance_Validators.length > 0)
{
Object newImportanceObj = HELPER_Importance.toObject (newImportance);
if (newImportanceObj != null)
{
int loopMax = FIELD_Importance_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_LevelClassCriteria.get (FIELD_Importance);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_Importance_Validators[v].checkAttribute (this, FIELD_Importance, metadata, newImportanceObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_Importance () != FieldWriteability.FALSE, "Field Importance is not writeable");
preImportanceChange (newImportance);
markFieldChange (FIELD_Importance);
_Importance = newImportance;
postFieldChange (FIELD_Importance);
postImportanceChange ();
}
}
/**
* Get the attribute FactorClass
*/
public FactorClass getFactorClass ()
{
assertValid();
FactorClass valToReturn = _FactorClass;
for (LevelClassCriteriaBehaviourDecorator bhd : LevelClassCriteria_BehaviourDecorators)
{
valToReturn = bhd.getFactorClass ((LevelClassCriteria)this, valToReturn);
}
return valToReturn;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preFactorClassChange (FactorClass newFactorClass) throws FieldException
{
}
/**
* Called after the attribute changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postFactorClassChange () throws FieldException
{
}
public FieldWriteability getWriteability_FactorClass ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute FactorClass. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setFactorClass (FactorClass newFactorClass) throws FieldException
{
boolean oldAndNewIdentical = HELPER_FactorClass.compare (_FactorClass, newFactorClass);
try
{
for (LevelClassCriteriaBehaviourDecorator bhd : LevelClassCriteria_BehaviourDecorators)
{
newFactorClass = bhd.setFactorClass ((LevelClassCriteria)this, newFactorClass);
oldAndNewIdentical = HELPER_FactorClass.compare (_FactorClass, newFactorClass);
}
BusinessObjectParser.assertFieldCondition (newFactorClass != null, this, FIELD_FactorClass, "mandatory");
if (FIELD_FactorClass_Validators.length > 0)
{
Object newFactorClassObj = HELPER_FactorClass.toObject (newFactorClass);
if (newFactorClassObj != null)
{
int loopMax = FIELD_FactorClass_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_LevelClassCriteria.get (FIELD_FactorClass);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_FactorClass_Validators[v].checkAttribute (this, FIELD_FactorClass, metadata, newFactorClassObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_FactorClass () != FieldWriteability.FALSE, "Field FactorClass is not writeable");
preFactorClassChange (newFactorClass);
markFieldChange (FIELD_FactorClass);
_FactorClass = newFactorClass;
postFieldChange (FIELD_FactorClass);
postFactorClassChange ();
}
}
/**
* A list of multi assoc names e.g. list of strings.
*/
public List<String> getSingleAssocs()
{
List result = super.getSingleAssocs ();
result.add("Level");
return result;
}
public BaseBusinessClass getSingleAssocReferenceInstance (String assocName)
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_Level))
{
return _Level.getReferencedType ();
}
else
{
return super.getSingleAssocReferenceInstance (assocName);
}
}
public String getSingleAssocBackReference(String assocName)
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_Level))
{
return Level.MULTIPLEREFERENCE_LevelClassCriterias ;
}
else
{
return super.getSingleAssocBackReference (assocName);
}
}
public BaseBusinessClass getSingleAssoc (String assocName) throws StorageException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_Level))
{
return getLevel ();
}
else
{
return super.getSingleAssoc (assocName);
}
}
public BaseBusinessClass getSingleAssoc (String assocName, Get getType) throws StorageException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_Level))
{
return getLevel (getType);
}
else
{
return super.getSingleAssoc (assocName, getType);
}
}
public Long getSingleAssocID (String assocName) throws StorageException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_Level))
{
return getLevelID ();
}
else
{
return super.getSingleAssocID (assocName);
}
}
public void setSingleAssoc (String assocName, BaseBusinessClass newValue) throws StorageException, FieldException
{
if (assocName == null)
{
throw new RuntimeException ("Game over == null!");
}
else if (assocName.equals (SINGLEREFERENCE_Level))
{
setLevel ((Level)(newValue));
}
else
{
super.setSingleAssoc (assocName, newValue);
}
}
/**
* Get the reference Level
*/
public Level getLevel () throws StorageException
{
assertValid();
try
{
return (Level)(_Level.get ());
}
catch (ClassCastException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in LevelClassCriteria:", this.getObjectID (), ", was trying to get Level:", getLevelID ());
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _Level.get ().getClass ());
throw e;
}
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Level getLevel (Get getType) throws StorageException
{
assertValid();
return _Level.get(getType);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getLevelID ()
{
assertValid();
if (_Level == null)
{
return null;
}
else
{
return _Level.getID ();
}
}
/**
* Called prior to the assoc changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preLevelChange (Level newLevel) throws FieldException
{
}
/**
* Called after the assoc changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postLevelChange () throws FieldException
{
}
public FieldWriteability getWriteability_Level ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the reference Level. Checks to ensure a new value
* has been supplied. If so, marks the reference as altered and sets it.
*/
public void setLevel (Level newLevel) throws StorageException, FieldException
{
if (_Level.wouldReferencedChange (newLevel))
{
assertValid();
Debug.assertion (getWriteability_Level () != FieldWriteability.FALSE, "Assoc Level is not writeable");
preLevelChange (newLevel);
Level oldLevel = getLevel ();
if (oldLevel != null)
{
// This is to stop validation from triggering when we are removed
_Level.set (null);
oldLevel.removeFromLevelClassCriterias ((LevelClassCriteria)(this));
}
_Level.set (newLevel);
if (newLevel != null)
{
newLevel.addToLevelClassCriterias ((LevelClassCriteria)(this));
}
postLevelChange ();
}
}
/**
* A list of multi assoc names e.g. list of strings.
*/
public List<String> getMultiAssocs()
{
List result = super.getMultiAssocs ();
return result;
}
/**
* Get the reference instance for the multi assoc name.
*/
public BaseBusinessClass getMultiAssocReferenceInstance(String attribName)
{
return super.getMultiAssocReferenceInstance(attribName);
}
public String getMultiAssocBackReference(String attribName)
{
return super.getMultiAssocBackReference(attribName);
}
/**
* Get the assoc count for the multi assoc name.
*/
public int getMultiAssocCount(String attribName) throws StorageException
{
return super.getMultiAssocCount(attribName);
}
/**
* Get the assoc at a particular index
*/
public BaseBusinessClass getMultiAssocAt(String attribName, int index) throws StorageException
{
return super.getMultiAssocAt(attribName, index);
}
/**
* Add to a multi assoc by attribute name
*/
public void addToMultiAssoc(String attribName, BaseBusinessClass newElement) throws StorageException
{
super.addToMultiAssoc(attribName, newElement);
}
/**
* Remove from a multi assoc by attribute name
*/
public void removeFromMultiAssoc(String attribName, BaseBusinessClass oldElement) throws StorageException
{
super.removeFromMultiAssoc(attribName, oldElement);
}
protected void __loadMultiAssoc (String attribName, BaseBusinessClass[] elements)
{
super.__loadMultiAssoc(attribName, elements);
}
protected boolean __isMultiAssocLoaded (String attribName)
{
return super.__isMultiAssocLoaded(attribName);
}
public void onDelete ()
{
try
{
// Ensure we are removed from any loaded multi-associations that aren't mandatory
if (_Level.isLoaded () || getTransaction ().isObjectLoaded (_Level.getReferencedType (), getLevelID ()))
{
Level referenced = getLevel ();
if (referenced != null)
{
// Stop the callback
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null LevelClassCriterias from ", getObjectID (), " to ", referenced.getObjectID ());
_Level.set (null);
referenced.removeFromLevelClassCriterias ((LevelClassCriteria)this);
}
}
}
catch (Exception e)
{
throw NestedException.wrap(e);
}
super.onDelete ();
}
public LevelClassCriteria newInstance ()
{
return new LevelClassCriteria ();
}
public LevelClassCriteria referenceInstance ()
{
return REFERENCE_LevelClassCriteria;
}
public LevelClassCriteria getInTransaction (ObjectTransaction t) throws StorageException
{
return getLevelClassCriteriaByID (t, getObjectID());
}
public BaseBusinessClass dummyInstance ()
{
return DUMMY_LevelClassCriteria;
}
public String getBaseSetName ()
{
return "tl_level_class_criteria";
}
/**
* This is where an object returns the Persistent sets that will
* store it into the database.
* The should be entered into allSets
*/
public void getPersistentSets (PersistentSetCollection allSets)
{
ObjectStatus myStatus = getStatus ();
PersistentSetStatus myPSetStatus = myStatus.getPSetStatus();
ObjectID myID = getID();
super.getPersistentSets (allSets);
PersistentSet tl_level_class_criteriaPSet = allSets.getPersistentSet (myID, "tl_level_class_criteria", myPSetStatus);
tl_level_class_criteriaPSet.setAttrib (FIELD_ObjectID, myID);
tl_level_class_criteriaPSet.setAttrib (FIELD_Importance, HELPER_Importance.toObject (_Importance)); //
tl_level_class_criteriaPSet.setAttrib (FIELD_FactorClass, HELPER_FactorClass.toObject (_FactorClass)); //
_Level.getPersistentSets (allSets);
}
/**
* Sets the objects state based on Persistent sets.
*/
public void setFromPersistentSets (ObjectID objectID, PersistentSetCollection allSets)
{
super.setFromPersistentSets (objectID, allSets);
PersistentSet tl_level_class_criteriaPSet = allSets.getPersistentSet (objectID, "tl_level_class_criteria");
_Importance = (Importance)(HELPER_Importance.fromObject (_Importance, tl_level_class_criteriaPSet.getAttrib (FIELD_Importance))); //
_FactorClass = (FactorClass)(HELPER_FactorClass.fromObject (_FactorClass, tl_level_class_criteriaPSet.getAttrib (FIELD_FactorClass))); //
_Level.setFromPersistentSets (objectID, allSets);
}
public void setAttributesFrom (BaseBusinessClass other, MultiException e)
{
super.setAttributesFrom (other, e);
if (other instanceof LevelClassCriteria)
{
LevelClassCriteria otherLevelClassCriteria = (LevelClassCriteria)other;
try
{
setImportance (otherLevelClassCriteria.getImportance ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setFactorClass (otherLevelClassCriteria.getFactorClass ());
}
catch (FieldException ex)
{
e.addException (ex);
}
}
}
/**
* Set the attributes in this to copies of the attributes in source.
*/
public void copyAttributesFrom (BaseBusinessClass source)
{
super.copyAttributesFrom (source);
if (source instanceof BaseLevelClassCriteria)
{
BaseLevelClassCriteria sourceLevelClassCriteria = (BaseLevelClassCriteria)(source);
_Importance = sourceLevelClassCriteria._Importance;
_FactorClass = sourceLevelClassCriteria._FactorClass;
}
}
/**
* Set the associations in this to copies of the attributes in source.
*/
public void copySingleAssociationsFrom (BaseBusinessClass source, boolean linkToGhosts)
{
super.copySingleAssociationsFrom (source, linkToGhosts);
if (source instanceof BaseLevelClassCriteria)
{
BaseLevelClassCriteria sourceLevelClassCriteria = (BaseLevelClassCriteria)(source);
_Level.copyFrom (sourceLevelClassCriteria._Level, linkToGhosts);
}
}
/**
* Set the associations in this to copies of the attributes in source.
*/
public void copyAssociationsFrom (BaseBusinessClass source, boolean linkToGhosts)
{
super.copyAssociationsFrom (source, linkToGhosts);
if (source instanceof BaseLevelClassCriteria)
{
BaseLevelClassCriteria sourceLevelClassCriteria = (BaseLevelClassCriteria)(source);
}
}
public void validate (ValidationContext context)
{
super.validate (context);
}
/**
* Subclasses must override this to read in their attributes
*/
protected void readExternalData(Map<String, Object> vals) throws IOException, ClassNotFoundException
{
super.readExternalData(vals);
_Importance = (Importance)(HELPER_Importance.readExternal (_Importance, vals.get(FIELD_Importance))); //
_FactorClass = (FactorClass)(HELPER_FactorClass.readExternal (_FactorClass, vals.get(FIELD_FactorClass))); //
_Level.readExternalData(vals.get(SINGLEREFERENCE_Level));
}
/**
* Subclasses must override this to write out their attributes
*/
protected void writeExternalData(Map<String, Object> vals) throws IOException
{
super.writeExternalData(vals);
vals.put (FIELD_Importance, HELPER_Importance.writeExternal (_Importance));
vals.put (FIELD_FactorClass, HELPER_FactorClass.writeExternal (_FactorClass));
vals.put (SINGLEREFERENCE_Level, _Level.writeExternalData());
}
public void compare (BaseBusinessClass other, AttributeChangeListener listener) throws StorageException
{
super.compare (other, listener);
if (other instanceof BaseLevelClassCriteria)
{
BaseLevelClassCriteria otherLevelClassCriteria = (BaseLevelClassCriteria)(other);
if (!HELPER_Importance.compare(this._Importance, otherLevelClassCriteria._Importance))
{
listener.notifyFieldChange(this, other, FIELD_Importance, HELPER_Importance.toObject(this._Importance), HELPER_Importance.toObject(otherLevelClassCriteria._Importance));
}
if (!HELPER_FactorClass.compare(this._FactorClass, otherLevelClassCriteria._FactorClass))
{
listener.notifyFieldChange(this, other, FIELD_FactorClass, HELPER_FactorClass.toObject(this._FactorClass), HELPER_FactorClass.toObject(otherLevelClassCriteria._FactorClass));
}
// Compare single assocs
_Level.compare (otherLevelClassCriteria._Level, listener);
// Compare multiple assocs
}
}
public void visitTransients (AttributeVisitor visitor) throws StorageException
{
super.visitAttributes (visitor);
}
public void visitAttributes (AttributeVisitor visitor) throws StorageException
{
super.visitAttributes (visitor);
visitor.visitField(this, FIELD_Importance, HELPER_Importance.toObject(getImportance()));
visitor.visitField(this, FIELD_FactorClass, HELPER_FactorClass.toObject(getFactorClass()));
visitor.visitAssociation (_Level);
}
public void visitAssociations (AssociationVisitor visitor, AssociatedScope scope) throws StorageException
{
super.visitAssociations (visitor, scope);
if (scope.includes (_Level))
{
visitor.visit (_Level);
}
}
public static LevelClassCriteria createLevelClassCriteria (ObjectTransaction transaction) throws StorageException
{
LevelClassCriteria result = new LevelClassCriteria ();
result.initialiseNewObject (transaction);
return result;
}
public static LevelClassCriteria getLevelClassCriteriaByID (ObjectTransaction transaction, Long objectID) throws StorageException
{
return (LevelClassCriteria)(transaction.getObjectByID (REFERENCE_LevelClassCriteria, objectID));
}
public boolean testFilter (String attribName, QueryFilter filter) throws StorageException
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_Importance))
{
return filter.matches (getImportance ());
}
else if (attribName.equals (FIELD_FactorClass))
{
return filter.matches (getFactorClass ());
}
else if (attribName.equals (SINGLEREFERENCE_Level))
{
return filter.matches (getLevel ());
}
else
{
return super.testFilter (attribName, filter);
}
}
public static SearchAll SearchByAll () { return new SearchAll (); }
public static class SearchAll extends SearchObject<LevelClassCriteria>
{
public SearchAll andObjectID (QueryFilter<Long> filter)
{
filter.addFilter (context, "tl_level_class_criteria.object_id", FIELD_ObjectID);
return this;
}
public SearchAll andObjectCreated (QueryFilter<Date> filter)
{
filter.addFilter (context, "tl_level_class_criteria.object_created_date", FIELD_ObjectCreated);
return this;
}
public SearchAll andObjectLastModified (QueryFilter<Date> filter)
{
filter.addFilter (context, "tl_level_class_criteria.object_last_updated_date", FIELD_ObjectLastModified);
return this;
}
public SearchAll andImportance (QueryFilter<Importance> filter)
{
filter.addFilter (context, "tl_level_class_criteria.weighting", "Importance");
return this;
}
public SearchAll andFactorClass (QueryFilter<FactorClass> filter)
{
filter.addFilter (context, "tl_level_class_criteria.class_code", "FactorClass");
return this;
}
public SearchAll andLevel (QueryFilter<Level> filter)
{
filter.addFilter (context, "tl_level_class_criteria.level_number", "Level");
return this;
}
public LevelClassCriteria[]
search (ObjectTransaction transaction) throws StorageException
{
BaseBusinessClass[] results = super.search (transaction, REFERENCE_LevelClassCriteria, SEARCH_All, criteria);
Set<LevelClassCriteria> typedResults = new LinkedHashSet <LevelClassCriteria> ();
for (BaseBusinessClass bbcResult : results)
{
LevelClassCriteria aResult = (LevelClassCriteria)bbcResult;
typedResults.add (aResult);
}
return ObjstoreUtils.removeDeleted(transaction, typedResults).toArray (new LevelClassCriteria[0]);
}
}
public static LevelClassCriteria[]
searchAll (ObjectTransaction transaction) throws StorageException
{
return SearchByAll ()
.search (transaction);
}
public Object getAttribute (String attribName)
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_Importance))
{
return HELPER_Importance.toObject (getImportance ());
}
else if (attribName.equals (FIELD_FactorClass))
{
return HELPER_FactorClass.toObject (getFactorClass ());
}
else
{
return super.getAttribute (attribName);
}
}
public AttributeHelper getAttributeHelper (String attribName)
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_Importance))
{
return HELPER_Importance;
}
else if (attribName.equals (FIELD_FactorClass))
{
return HELPER_FactorClass;
}
else
{
return super.getAttributeHelper (attribName);
}
}
public void setAttribute (String attribName, Object attribValue) throws FieldException
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (attribName.equals (FIELD_Importance))
{
setImportance ((Importance)(HELPER_Importance.fromObject (_Importance, attribValue)));
}
else if (attribName.equals (FIELD_FactorClass))
{
setFactorClass ((FactorClass)(HELPER_FactorClass.fromObject (_FactorClass, attribValue)));
}
else
{
super.setAttribute (attribName, attribValue);
}
}
public boolean isWriteable (String fieldName)
{
return getWriteable (fieldName) == FieldWriteability.TRUE;
}
public FieldWriteability getWriteable (String fieldName)
{
if (false)
{
throw new RuntimeException ("Game over man!!");
}
else if (fieldName.equals (FIELD_Importance))
{
return getWriteability_Importance ();
}
else if (fieldName.equals (FIELD_FactorClass))
{
return getWriteability_FactorClass ();
}
else if (fieldName.equals (SINGLEREFERENCE_Level))
{
return getWriteability_Level ();
}
else
{
return super.getWriteable (fieldName);
}
}
public void putUnwriteable (Set<String> fields)
{
if (getWriteability_Importance () != FieldWriteability.TRUE)
{
fields.add (FIELD_Importance);
}
if (getWriteability_FactorClass () != FieldWriteability.TRUE)
{
fields.add (FIELD_FactorClass);
}
super.putUnwriteable (fields);
}
public List<AbstractAttribute> getAttributes ()
{
List result = super.getAttributes ();
result.add(HELPER_Importance.getAttribObject (getClass (), _Importance, true, FIELD_Importance));
result.add(HELPER_FactorClass.getAttribObject (getClass (), _FactorClass, true, FIELD_FactorClass));
return result;
}
public Map getAttributeMetadata (String attribute)
{
if (ATTRIBUTES_METADATA_LevelClassCriteria.containsKey (attribute))
{
return (Map)ATTRIBUTES_METADATA_LevelClassCriteria.get (attribute);
}
else
{
return super.getAttributeMetadata (attribute);
}
}
public Object getAttributeMetadata (String attribute, String metadata)
{
if (ATTRIBUTES_METADATA_LevelClassCriteria.containsKey (attribute))
{
return ((Map)ATTRIBUTES_METADATA_LevelClassCriteria.get (attribute)).get(metadata);
}
else
{
return super.getAttributeMetadata (attribute, metadata);
}
}
public void preCommit (boolean willBeStored) throws Exception
{
super.preCommit(willBeStored);
if(willBeStored)
{
}
}
public oneit.servlets.objstore.binary.BinaryContentHandler getBinaryContentHandler(String attribName)
{
return super.getBinaryContentHandler(attribName);
}
public static class LevelClassCriteriaBehaviourDecorator extends BaseBusinessClass.BBCBehaviourDecorator<LevelClassCriteria>
{
/**
* Get the attribute Importance
*/
public Importance getImportance (LevelClassCriteria obj, Importance original)
{
return original;
}
/**
* Change the value set for attribute Importance.
* May modify the field beforehand
* Occurs before validation.
*/
public Importance setImportance (LevelClassCriteria obj, Importance newImportance) throws FieldException
{
return newImportance;
}
/**
* Get the attribute FactorClass
*/
public FactorClass getFactorClass (LevelClassCriteria obj, FactorClass original)
{
return original;
}
/**
* Change the value set for attribute FactorClass.
* May modify the field beforehand
* Occurs before validation.
*/
public FactorClass setFactorClass (LevelClassCriteria obj, FactorClass newFactorClass) throws FieldException
{
return newFactorClass;
}
}
public ORMPipeLine pipes()
{
return new LevelClassCriteriaPipeLineFactory<LevelClassCriteria, LevelClassCriteria> ((LevelClassCriteria)this);
}
/**
* Use this instead of pipes() to get rid of type casting.
*/
public LevelClassCriteriaPipeLineFactory<LevelClassCriteria, LevelClassCriteria> pipelineLevelClassCriteria()
{
return (LevelClassCriteriaPipeLineFactory<LevelClassCriteria, LevelClassCriteria>) pipes();
}
public static LevelClassCriteriaPipeLineFactory<LevelClassCriteria, LevelClassCriteria> pipesLevelClassCriteria(Collection<LevelClassCriteria> items)
{
return REFERENCE_LevelClassCriteria.new LevelClassCriteriaPipeLineFactory<LevelClassCriteria, LevelClassCriteria> (items);
}
public static LevelClassCriteriaPipeLineFactory<LevelClassCriteria, LevelClassCriteria> pipesLevelClassCriteria(LevelClassCriteria[] _items)
{
return pipesLevelClassCriteria(Arrays.asList (_items));
}
public static LevelClassCriteriaPipeLineFactory<LevelClassCriteria, LevelClassCriteria> pipesLevelClassCriteria()
{
return pipesLevelClassCriteria((Collection)null);
}
public class LevelClassCriteriaPipeLineFactory<From extends BaseBusinessClass, Me extends LevelClassCriteria> extends BaseBusinessClass.ORMPipeLine<From, Me>
{
public <Prev> LevelClassCriteriaPipeLineFactory (PipeLine<From, Prev> pipeLine, Pipe<Prev, Me> nextPipe)
{
super (pipeLine, nextPipe);
}
public LevelClassCriteriaPipeLineFactory (From seed)
{
super(seed);
}
public LevelClassCriteriaPipeLineFactory (Collection<From> seed)
{
super(seed);
}
public PipeLine<From, ? extends Object> to(String name)
{
if (name.equals ("Importance"))
{
return toImportance ();
}
if (name.equals ("FactorClass"))
{
return toFactorClass ();
}
if (name.equals ("Level"))
{
return toLevel ();
}
return super.to(name);
}
public PipeLine<From, Importance> toImportance () { return pipe(new ORMAttributePipe<Me, Importance>(FIELD_Importance)); }
public PipeLine<From, FactorClass> toFactorClass () { return pipe(new ORMAttributePipe<Me, FactorClass>(FIELD_FactorClass)); }
public Level.LevelPipeLineFactory<From, Level> toLevel () { return toLevel (Filter.ALL); }
public Level.LevelPipeLineFactory<From, Level> toLevel (Filter<Level> filter)
{
return Level.REFERENCE_Level.new LevelPipeLineFactory<From, Level> (this, new ORMSingleAssocPipe<Me, Level>(SINGLEREFERENCE_Level, filter));
}
}
public boolean isTransientAttrib(String attribName)
{
return super.isTransientAttrib(attribName);
}
public boolean isTransientSingleReference(String assocName)
{
return super.isTransientSingleReference(assocName);
}
}
class DummyLevelClassCriteria extends LevelClassCriteria
{
// Default constructor primarily to support Externalisable
public DummyLevelClassCriteria()
{
super();
}
public void assertValid ()
{
}
public Level getLevel () throws StorageException
{
return (Level)(Level.DUMMY_Level);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getLevelID ()
{
return Level.DUMMY_Level.getObjectID();
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -38,13 +38,14 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -38,13 +38,14 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
// Static constants corresponding to field names // Static constants corresponding to field names
public static final String SINGLEREFERENCE_Job = "Job";
public static final String SINGLEREFERENCE_Level = "Level"; public static final String SINGLEREFERENCE_Level = "Level";
public static final String BACKREF_Level = ""; public static final String BACKREF_Level = "";
public static final String SINGLEREFERENCE_Candidate = "Candidate"; public static final String SINGLEREFERENCE_Candidate = "Candidate";
public static final String BACKREF_Candidate = ""; public static final String BACKREF_Candidate = "";
public static final String MULTIPLEREFERENCE_FactorScores = "FactorScores"; public static final String MULTIPLEREFERENCE_FactorScores = "FactorScores";
public static final String BACKREF_FactorScores = ""; public static final String BACKREF_FactorScores = "";
public static final String MULTIPLEREFERENCE_CandidateClassScores = "CandidateClassScores";
public static final String BACKREF_CandidateClassScores = "";
// Static constants corresponding to searches // Static constants corresponding to searches
public static final String SEARCH_All = "All"; public static final String SEARCH_All = "All";
...@@ -57,13 +58,13 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -57,13 +58,13 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
// Private attributes corresponding to single references // Private attributes corresponding to single references
private SingleAssociation<TestAnalysis, Job> _Job;
private SingleAssociation<TestAnalysis, Level> _Level; private SingleAssociation<TestAnalysis, Level> _Level;
private SingleAssociation<TestAnalysis, Candidate> _Candidate; private SingleAssociation<TestAnalysis, Candidate> _Candidate;
// Private attributes corresponding to multiple references // Private attributes corresponding to multiple references
private MultipleAssociation<TestAnalysis, FactorScore> _FactorScores; private MultipleAssociation<TestAnalysis, FactorScore> _FactorScores;
private MultipleAssociation<TestAnalysis, CandidateClassScore> _CandidateClassScores;
// Map of maps of metadata // Map of maps of metadata
...@@ -81,13 +82,14 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -81,13 +82,14 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
{ {
String tmp_FactorScores = FactorScore.BACKREF_TestAnalysis; String tmp_FactorScores = FactorScore.BACKREF_TestAnalysis;
String tmp_CandidateClassScores = CandidateClassScore.BACKREF_TestAnalysis;
String tmp_Level = Level.BACKREF_TestAnalysises; String tmp_Level = Level.BACKREF_TestAnalysises;
String tmp_Candidate = Candidate.BACKREF_TestAnalysises; String tmp_Candidate = Candidate.BACKREF_TestAnalysises;
Map validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping")); Map validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping"));
setupAssocMetaData_FactorScores(); setupAssocMetaData_FactorScores();
setupAssocMetaData_Job(); setupAssocMetaData_CandidateClassScores();
setupAssocMetaData_Level(); setupAssocMetaData_Level();
setupAssocMetaData_Candidate(); setupAssocMetaData_Candidate();
...@@ -119,16 +121,16 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -119,16 +121,16 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
// Meta Info setup // Meta Info setup
private static void setupAssocMetaData_Job() private static void setupAssocMetaData_CandidateClassScores()
{ {
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "job_id"); metaInfo.put ("backreferenceName", "TestAnalysis");
metaInfo.put ("name", "Job"); metaInfo.put ("name", "CandidateClassScores");
metaInfo.put ("type", "Job"); metaInfo.put ("type", "CandidateClassScore");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for TestAnalysis.Job:", metaInfo); LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for TestAnalysis.CandidateClassScores:", metaInfo);
ATTRIBUTES_METADATA_TestAnalysis.put (SINGLEREFERENCE_Job, Collections.unmodifiableMap (metaInfo)); ATTRIBUTES_METADATA_TestAnalysis.put (MULTIPLEREFERENCE_CandidateClassScores, Collections.unmodifiableMap (metaInfo));
} }
...@@ -197,10 +199,10 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -197,10 +199,10 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
{ {
super._initialiseAssociations (); super._initialiseAssociations ();
_Job = new SingleAssociation<TestAnalysis, Job> (this, SINGLEREFERENCE_Job, null, Job.REFERENCE_Job, "tl_test_analysis");
_Level = new SingleAssociation<TestAnalysis, Level> (this, SINGLEREFERENCE_Level, Level.MULTIPLEREFERENCE_TestAnalysises, Level.REFERENCE_Level, "tl_test_analysis"); _Level = new SingleAssociation<TestAnalysis, Level> (this, SINGLEREFERENCE_Level, Level.MULTIPLEREFERENCE_TestAnalysises, Level.REFERENCE_Level, "tl_test_analysis");
_Candidate = new SingleAssociation<TestAnalysis, Candidate> (this, SINGLEREFERENCE_Candidate, Candidate.MULTIPLEREFERENCE_TestAnalysises, Candidate.REFERENCE_Candidate, "tl_test_analysis"); _Candidate = new SingleAssociation<TestAnalysis, Candidate> (this, SINGLEREFERENCE_Candidate, Candidate.MULTIPLEREFERENCE_TestAnalysises, Candidate.REFERENCE_Candidate, "tl_test_analysis");
_FactorScores = new MultipleAssociation<TestAnalysis, FactorScore> (this, MULTIPLEREFERENCE_FactorScores, FactorScore.SINGLEREFERENCE_TestAnalysis, FactorScore.REFERENCE_FactorScore); _FactorScores = new MultipleAssociation<TestAnalysis, FactorScore> (this, MULTIPLEREFERENCE_FactorScores, FactorScore.SINGLEREFERENCE_TestAnalysis, FactorScore.REFERENCE_FactorScore);
_CandidateClassScores = new MultipleAssociation<TestAnalysis, CandidateClassScore> (this, MULTIPLEREFERENCE_CandidateClassScores, CandidateClassScore.SINGLEREFERENCE_TestAnalysis, CandidateClassScore.REFERENCE_CandidateClassScore);
} }
...@@ -210,10 +212,10 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -210,10 +212,10 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
{ {
super.initialiseReference (); super.initialiseReference ();
_Job = new SingleAssociation<TestAnalysis, Job> (this, SINGLEREFERENCE_Job, null, Job.REFERENCE_Job, "tl_test_analysis");
_Level = new SingleAssociation<TestAnalysis, Level> (this, SINGLEREFERENCE_Level, Level.MULTIPLEREFERENCE_TestAnalysises, Level.REFERENCE_Level, "tl_test_analysis"); _Level = new SingleAssociation<TestAnalysis, Level> (this, SINGLEREFERENCE_Level, Level.MULTIPLEREFERENCE_TestAnalysises, Level.REFERENCE_Level, "tl_test_analysis");
_Candidate = new SingleAssociation<TestAnalysis, Candidate> (this, SINGLEREFERENCE_Candidate, Candidate.MULTIPLEREFERENCE_TestAnalysises, Candidate.REFERENCE_Candidate, "tl_test_analysis"); _Candidate = new SingleAssociation<TestAnalysis, Candidate> (this, SINGLEREFERENCE_Candidate, Candidate.MULTIPLEREFERENCE_TestAnalysises, Candidate.REFERENCE_Candidate, "tl_test_analysis");
_FactorScores = new MultipleAssociation<TestAnalysis, FactorScore> (this, MULTIPLEREFERENCE_FactorScores, FactorScore.SINGLEREFERENCE_TestAnalysis, FactorScore.REFERENCE_FactorScore); _FactorScores = new MultipleAssociation<TestAnalysis, FactorScore> (this, MULTIPLEREFERENCE_FactorScores, FactorScore.SINGLEREFERENCE_TestAnalysis, FactorScore.REFERENCE_FactorScore);
_CandidateClassScores = new MultipleAssociation<TestAnalysis, CandidateClassScore> (this, MULTIPLEREFERENCE_CandidateClassScores, CandidateClassScore.SINGLEREFERENCE_TestAnalysis, CandidateClassScore.REFERENCE_CandidateClassScore);
return this; return this;
...@@ -231,8 +233,6 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -231,8 +233,6 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
List result = super.getSingleAssocs (); List result = super.getSingleAssocs ();
result.add("Job");
result.add("Level"); result.add("Level");
result.add("Candidate"); result.add("Candidate");
...@@ -248,10 +248,7 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -248,10 +248,7 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over == null!"); throw new RuntimeException ("Game over == null!");
} }
else if (assocName.equals (SINGLEREFERENCE_Job)) else if (assocName.equals (SINGLEREFERENCE_Level))
{
return _Job.getReferencedType ();
}else if (assocName.equals (SINGLEREFERENCE_Level))
{ {
return _Level.getReferencedType (); return _Level.getReferencedType ();
}else if (assocName.equals (SINGLEREFERENCE_Candidate)) }else if (assocName.equals (SINGLEREFERENCE_Candidate))
...@@ -271,10 +268,7 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -271,10 +268,7 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over == null!"); throw new RuntimeException ("Game over == null!");
} }
else if (assocName.equals (SINGLEREFERENCE_Job)) else if (assocName.equals (SINGLEREFERENCE_Level))
{
return null ;
}else if (assocName.equals (SINGLEREFERENCE_Level))
{ {
return Level.MULTIPLEREFERENCE_TestAnalysises ; return Level.MULTIPLEREFERENCE_TestAnalysises ;
}else if (assocName.equals (SINGLEREFERENCE_Candidate)) }else if (assocName.equals (SINGLEREFERENCE_Candidate))
...@@ -294,10 +288,7 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -294,10 +288,7 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over == null!"); throw new RuntimeException ("Game over == null!");
} }
else if (assocName.equals (SINGLEREFERENCE_Job)) else if (assocName.equals (SINGLEREFERENCE_Level))
{
return getJob ();
}else if (assocName.equals (SINGLEREFERENCE_Level))
{ {
return getLevel (); return getLevel ();
}else if (assocName.equals (SINGLEREFERENCE_Candidate)) }else if (assocName.equals (SINGLEREFERENCE_Candidate))
...@@ -317,10 +308,7 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -317,10 +308,7 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over == null!"); throw new RuntimeException ("Game over == null!");
} }
else if (assocName.equals (SINGLEREFERENCE_Job)) else if (assocName.equals (SINGLEREFERENCE_Level))
{
return getJob (getType);
}else if (assocName.equals (SINGLEREFERENCE_Level))
{ {
return getLevel (getType); return getLevel (getType);
}else if (assocName.equals (SINGLEREFERENCE_Candidate)) }else if (assocName.equals (SINGLEREFERENCE_Candidate))
...@@ -340,10 +328,7 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -340,10 +328,7 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over == null!"); throw new RuntimeException ("Game over == null!");
} }
else if (assocName.equals (SINGLEREFERENCE_Job)) else if (assocName.equals (SINGLEREFERENCE_Level))
{
return getJobID ();
}else if (assocName.equals (SINGLEREFERENCE_Level))
{ {
return getLevelID (); return getLevelID ();
}else if (assocName.equals (SINGLEREFERENCE_Candidate)) }else if (assocName.equals (SINGLEREFERENCE_Candidate))
...@@ -363,10 +348,7 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -363,10 +348,7 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over == null!"); throw new RuntimeException ("Game over == null!");
} }
else if (assocName.equals (SINGLEREFERENCE_Job)) else if (assocName.equals (SINGLEREFERENCE_Level))
{
setJob ((Job)(newValue));
}else if (assocName.equals (SINGLEREFERENCE_Level))
{ {
setLevel ((Level)(newValue)); setLevel ((Level)(newValue));
}else if (assocName.equals (SINGLEREFERENCE_Candidate)) }else if (assocName.equals (SINGLEREFERENCE_Candidate))
...@@ -382,100 +364,6 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -382,100 +364,6 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
/** /**
* Get the reference Job
*/
public Job getJob () throws StorageException
{
assertValid();
try
{
return (Job)(_Job.get ());
}
catch (ClassCastException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in TestAnalysis:", this.getObjectID (), ", was trying to get Job:", getJobID ());
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _Job.get ().getClass ());
throw e;
}
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Job getJob (Get getType) throws StorageException
{
assertValid();
return _Job.get(getType);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getJobID ()
{
assertValid();
if (_Job == null)
{
return null;
}
else
{
return _Job.getID ();
}
}
/**
* Called prior to the assoc changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preJobChange (Job newJob) throws FieldException
{
}
/**
* Called after the assoc changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postJobChange () throws FieldException
{
}
public FieldWriteability getWriteability_Job ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the reference Job. Checks to ensure a new value
* has been supplied. If so, marks the reference as altered and sets it.
*/
public void setJob (Job newJob) throws StorageException, FieldException
{
if (_Job.wouldReferencedChange (newJob))
{
assertValid();
Debug.assertion (getWriteability_Job () != FieldWriteability.FALSE, "Assoc Job is not writeable");
preJobChange (newJob);
_Job.set (newJob);
postJobChange ();
}
}
/**
* Get the reference Level * Get the reference Level
*/ */
public Level getLevel () throws StorageException public Level getLevel () throws StorageException
...@@ -699,6 +587,8 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -699,6 +587,8 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
result.add("FactorScores"); result.add("FactorScores");
result.add("CandidateClassScores");
return result; return result;
} }
...@@ -715,6 +605,11 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -715,6 +605,11 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
return FactorScore.REFERENCE_FactorScore ; return FactorScore.REFERENCE_FactorScore ;
} }
if (MULTIPLEREFERENCE_CandidateClassScores.equals(attribName))
{
return CandidateClassScore.REFERENCE_CandidateClassScore ;
}
return super.getMultiAssocReferenceInstance(attribName); return super.getMultiAssocReferenceInstance(attribName);
} }
...@@ -728,6 +623,11 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -728,6 +623,11 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
return FactorScore.SINGLEREFERENCE_TestAnalysis ; return FactorScore.SINGLEREFERENCE_TestAnalysis ;
} }
if (MULTIPLEREFERENCE_CandidateClassScores.equals(attribName))
{
return CandidateClassScore.SINGLEREFERENCE_TestAnalysis ;
}
return super.getMultiAssocBackReference(attribName); return super.getMultiAssocBackReference(attribName);
} }
...@@ -744,6 +644,11 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -744,6 +644,11 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
return this.getFactorScoresCount(); return this.getFactorScoresCount();
} }
if (MULTIPLEREFERENCE_CandidateClassScores.equals(attribName))
{
return this.getCandidateClassScoresCount();
}
return super.getMultiAssocCount(attribName); return super.getMultiAssocCount(attribName);
} }
...@@ -760,6 +665,11 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -760,6 +665,11 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
return this.getFactorScoresAt(index); return this.getFactorScoresAt(index);
} }
if (MULTIPLEREFERENCE_CandidateClassScores.equals(attribName))
{
return this.getCandidateClassScoresAt(index);
}
return super.getMultiAssocAt(attribName, index); return super.getMultiAssocAt(attribName, index);
} }
...@@ -778,6 +688,13 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -778,6 +688,13 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
return; return;
} }
if (MULTIPLEREFERENCE_CandidateClassScores.equals(attribName))
{
addToCandidateClassScores((CandidateClassScore)newElement);
return;
}
super.addToMultiAssoc(attribName, newElement); super.addToMultiAssoc(attribName, newElement);
} }
...@@ -795,6 +712,13 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -795,6 +712,13 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
return; return;
} }
if (MULTIPLEREFERENCE_CandidateClassScores.equals(attribName))
{
removeFromCandidateClassScores((CandidateClassScore)oldElement);
return;
}
super.removeFromMultiAssoc(attribName, oldElement); super.removeFromMultiAssoc(attribName, oldElement);
} }
...@@ -809,6 +733,12 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -809,6 +733,12 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
return; return;
} }
if (MULTIPLEREFERENCE_CandidateClassScores.equals(attribName))
{
_CandidateClassScores.__loadAssociation (elements);
return;
}
super.__loadMultiAssoc(attribName, elements); super.__loadMultiAssoc(attribName, elements);
} }
...@@ -822,6 +752,11 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -822,6 +752,11 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
return _FactorScores.isLoaded (); return _FactorScores.isLoaded ();
} }
if (MULTIPLEREFERENCE_CandidateClassScores.equals(attribName))
{
return _CandidateClassScores.isLoaded ();
}
return super.__isMultiAssocLoaded(attribName); return super.__isMultiAssocLoaded(attribName);
} }
...@@ -897,6 +832,75 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -897,6 +832,75 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
return _FactorScores.getSet (); return _FactorScores.getSet ();
} }
public FieldWriteability getWriteability_CandidateClassScores ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
public int getCandidateClassScoresCount () throws StorageException
{
assertValid();
return _CandidateClassScores.getReferencedObjectsCount ();
}
public void addToCandidateClassScores (CandidateClassScore newElement) throws StorageException
{
if (_CandidateClassScores.wouldAddChange (newElement))
{
assertValid();
Debug.assertion (getWriteability_CandidateClassScores () != FieldWriteability.FALSE, "MultiAssoc CandidateClassScores is not writeable (add)");
_CandidateClassScores.appendElement (newElement);
try
{
if (newElement.getTestAnalysis () != this)
{
newElement.setTestAnalysis ((TestAnalysis)(this));
}
}
catch (Exception e)
{
throw NestedException.wrap(e);
}
}
}
public void removeFromCandidateClassScores (CandidateClassScore elementToRemove) throws StorageException
{
if (_CandidateClassScores.wouldRemoveChange (elementToRemove))
{
assertValid();
Debug.assertion (getWriteability_CandidateClassScores () != FieldWriteability.FALSE, "MultiAssoc CandidateClassScores is not writeable (remove)");
_CandidateClassScores.removeElement (elementToRemove);
try
{
if (elementToRemove.getTestAnalysis () != null)
{
elementToRemove.setTestAnalysis (null);
}
}
catch (Exception e)
{
throw NestedException.wrap(e);
}
}
}
public CandidateClassScore getCandidateClassScoresAt (int index) throws StorageException
{
return (CandidateClassScore)(_CandidateClassScores.getElementAt (index));
}
public SortedSet<CandidateClassScore> getCandidateClassScoresSet () throws StorageException
{
return _CandidateClassScores.getSet ();
}
public void onDelete () public void onDelete ()
...@@ -937,6 +941,12 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -937,6 +941,12 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
referenced.setTestAnalysis(null); referenced.setTestAnalysis(null);
} }
for(CandidateClassScore referenced : CollectionUtils.reverse(getCandidateClassScoresSet()))
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null TestAnalysis from ", getObjectID (), " to ", referenced.getObjectID ());
referenced.setTestAnalysis(null);
}
} }
catch (Exception e) catch (Exception e)
{ {
...@@ -997,7 +1007,6 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -997,7 +1007,6 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
PersistentSet tl_test_analysisPSet = allSets.getPersistentSet (myID, "tl_test_analysis", myPSetStatus); PersistentSet tl_test_analysisPSet = allSets.getPersistentSet (myID, "tl_test_analysis", myPSetStatus);
tl_test_analysisPSet.setAttrib (FIELD_ObjectID, myID); tl_test_analysisPSet.setAttrib (FIELD_ObjectID, myID);
_Job.getPersistentSets (allSets);
_Level.getPersistentSets (allSets); _Level.getPersistentSets (allSets);
_Candidate.getPersistentSets (allSets); _Candidate.getPersistentSets (allSets);
...@@ -1014,7 +1023,6 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -1014,7 +1023,6 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
PersistentSet tl_test_analysisPSet = allSets.getPersistentSet (objectID, "tl_test_analysis"); PersistentSet tl_test_analysisPSet = allSets.getPersistentSet (objectID, "tl_test_analysis");
_Job.setFromPersistentSets (objectID, allSets);
_Level.setFromPersistentSets (objectID, allSets); _Level.setFromPersistentSets (objectID, allSets);
_Candidate.setFromPersistentSets (objectID, allSets); _Candidate.setFromPersistentSets (objectID, allSets);
...@@ -1063,7 +1071,6 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -1063,7 +1071,6 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
{ {
BaseTestAnalysis sourceTestAnalysis = (BaseTestAnalysis)(source); BaseTestAnalysis sourceTestAnalysis = (BaseTestAnalysis)(source);
_Job.copyFrom (sourceTestAnalysis._Job, linkToGhosts);
_Level.copyFrom (sourceTestAnalysis._Level, linkToGhosts); _Level.copyFrom (sourceTestAnalysis._Level, linkToGhosts);
_Candidate.copyFrom (sourceTestAnalysis._Candidate, linkToGhosts); _Candidate.copyFrom (sourceTestAnalysis._Candidate, linkToGhosts);
...@@ -1083,6 +1090,7 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -1083,6 +1090,7 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
BaseTestAnalysis sourceTestAnalysis = (BaseTestAnalysis)(source); BaseTestAnalysis sourceTestAnalysis = (BaseTestAnalysis)(source);
_FactorScores.copyFrom (sourceTestAnalysis._FactorScores, linkToGhosts); _FactorScores.copyFrom (sourceTestAnalysis._FactorScores, linkToGhosts);
_CandidateClassScores.copyFrom (sourceTestAnalysis._CandidateClassScores, linkToGhosts);
} }
} }
...@@ -1103,10 +1111,10 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -1103,10 +1111,10 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
{ {
super.readExternalData(vals); super.readExternalData(vals);
_Job.readExternalData(vals.get(SINGLEREFERENCE_Job));
_Level.readExternalData(vals.get(SINGLEREFERENCE_Level)); _Level.readExternalData(vals.get(SINGLEREFERENCE_Level));
_Candidate.readExternalData(vals.get(SINGLEREFERENCE_Candidate)); _Candidate.readExternalData(vals.get(SINGLEREFERENCE_Candidate));
_FactorScores.readExternalData(vals.get(MULTIPLEREFERENCE_FactorScores)); _FactorScores.readExternalData(vals.get(MULTIPLEREFERENCE_FactorScores));
_CandidateClassScores.readExternalData(vals.get(MULTIPLEREFERENCE_CandidateClassScores));
} }
...@@ -1118,10 +1126,10 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -1118,10 +1126,10 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
{ {
super.writeExternalData(vals); super.writeExternalData(vals);
vals.put (SINGLEREFERENCE_Job, _Job.writeExternalData());
vals.put (SINGLEREFERENCE_Level, _Level.writeExternalData()); vals.put (SINGLEREFERENCE_Level, _Level.writeExternalData());
vals.put (SINGLEREFERENCE_Candidate, _Candidate.writeExternalData()); vals.put (SINGLEREFERENCE_Candidate, _Candidate.writeExternalData());
vals.put (MULTIPLEREFERENCE_FactorScores, _FactorScores.writeExternalData()); vals.put (MULTIPLEREFERENCE_FactorScores, _FactorScores.writeExternalData());
vals.put (MULTIPLEREFERENCE_CandidateClassScores, _CandidateClassScores.writeExternalData());
} }
...@@ -1137,13 +1145,13 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -1137,13 +1145,13 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
// Compare single assocs // Compare single assocs
_Job.compare (otherTestAnalysis._Job, listener);
_Level.compare (otherTestAnalysis._Level, listener); _Level.compare (otherTestAnalysis._Level, listener);
_Candidate.compare (otherTestAnalysis._Candidate, listener); _Candidate.compare (otherTestAnalysis._Candidate, listener);
// Compare multiple assocs // Compare multiple assocs
_FactorScores.compare (otherTestAnalysis._FactorScores, listener); _FactorScores.compare (otherTestAnalysis._FactorScores, listener);
_CandidateClassScores.compare (otherTestAnalysis._CandidateClassScores, listener);
} }
} }
...@@ -1161,10 +1169,10 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -1161,10 +1169,10 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
{ {
super.visitAttributes (visitor); super.visitAttributes (visitor);
visitor.visitAssociation (_Job);
visitor.visitAssociation (_Level); visitor.visitAssociation (_Level);
visitor.visitAssociation (_Candidate); visitor.visitAssociation (_Candidate);
visitor.visitAssociation (_FactorScores); visitor.visitAssociation (_FactorScores);
visitor.visitAssociation (_CandidateClassScores);
} }
...@@ -1173,10 +1181,6 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -1173,10 +1181,6 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
{ {
super.visitAssociations (visitor, scope); super.visitAssociations (visitor, scope);
if (scope.includes (_Job))
{
visitor.visit (_Job);
}
if (scope.includes (_Level)) if (scope.includes (_Level))
{ {
visitor.visit (_Level); visitor.visit (_Level);
...@@ -1189,6 +1193,10 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -1189,6 +1193,10 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
{ {
visitor.visit (_FactorScores); visitor.visit (_FactorScores);
} }
if (scope.includes (_CandidateClassScores))
{
visitor.visit (_CandidateClassScores);
}
} }
...@@ -1214,10 +1222,6 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -1214,10 +1222,6 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over man!!"); throw new RuntimeException ("Game over man!!");
} }
else if (attribName.equals (SINGLEREFERENCE_Job))
{
return filter.matches (getJob ());
}
else if (attribName.equals (SINGLEREFERENCE_Level)) else if (attribName.equals (SINGLEREFERENCE_Level))
{ {
return filter.matches (getLevel ()); return filter.matches (getLevel ());
...@@ -1257,12 +1261,6 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -1257,12 +1261,6 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
} }
public SearchAll andJob (QueryFilter<Job> filter)
{
filter.addFilter (context, "tl_test_analysis.job_id", "Job");
return this;
}
public SearchAll andLevel (QueryFilter<Level> filter) public SearchAll andLevel (QueryFilter<Level> filter)
{ {
filter.addFilter (context, "tl_test_analysis.level_id", "Level"); filter.addFilter (context, "tl_test_analysis.level_id", "Level");
...@@ -1360,9 +1358,9 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -1360,9 +1358,9 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
{ {
return getWriteability_FactorScores (); return getWriteability_FactorScores ();
} }
else if (fieldName.equals (SINGLEREFERENCE_Job)) else if (fieldName.equals (MULTIPLEREFERENCE_CandidateClassScores))
{ {
return getWriteability_Job (); return getWriteability_CandidateClassScores ();
} }
else if (fieldName.equals (SINGLEREFERENCE_Level)) else if (fieldName.equals (SINGLEREFERENCE_Level))
{ {
...@@ -1497,9 +1495,9 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -1497,9 +1495,9 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
{ {
return toFactorScores (); return toFactorScores ();
} }
if (name.equals ("Job")) if (name.equals ("CandidateClassScores"))
{ {
return toJob (); return toCandidateClassScores ();
} }
if (name.equals ("Level")) if (name.equals ("Level"))
{ {
...@@ -1514,12 +1512,6 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -1514,12 +1512,6 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
return super.to(name); return super.to(name);
} }
public Job.JobPipeLineFactory<From, Job> toJob () { return toJob (Filter.ALL); }
public Job.JobPipeLineFactory<From, Job> toJob (Filter<Job> filter)
{
return Job.REFERENCE_Job.new JobPipeLineFactory<From, Job> (this, new ORMSingleAssocPipe<Me, Job>(SINGLEREFERENCE_Job, filter));
}
public Level.LevelPipeLineFactory<From, Level> toLevel () { return toLevel (Filter.ALL); } public Level.LevelPipeLineFactory<From, Level> toLevel () { return toLevel (Filter.ALL); }
public Level.LevelPipeLineFactory<From, Level> toLevel (Filter<Level> filter) public Level.LevelPipeLineFactory<From, Level> toLevel (Filter<Level> filter)
...@@ -1538,6 +1530,12 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass ...@@ -1538,6 +1530,12 @@ public abstract class BaseTestAnalysis extends BaseBusinessClass
{ {
return FactorScore.REFERENCE_FactorScore.new FactorScorePipeLineFactory<From, FactorScore> (this, new ORMMultiAssocPipe<Me, FactorScore>(MULTIPLEREFERENCE_FactorScores, filter)); return FactorScore.REFERENCE_FactorScore.new FactorScorePipeLineFactory<From, FactorScore> (this, new ORMMultiAssocPipe<Me, FactorScore>(MULTIPLEREFERENCE_FactorScores, filter));
} }
public CandidateClassScore.CandidateClassScorePipeLineFactory<From, CandidateClassScore> toCandidateClassScores () { return toCandidateClassScores(Filter.ALL); }
public CandidateClassScore.CandidateClassScorePipeLineFactory<From, CandidateClassScore> toCandidateClassScores (Filter<CandidateClassScore> filter)
{
return CandidateClassScore.REFERENCE_CandidateClassScore.new CandidateClassScorePipeLineFactory<From, CandidateClassScore> (this, new ORMMultiAssocPipe<Me, CandidateClassScore>(MULTIPLEREFERENCE_CandidateClassScores, filter));
}
} }
...@@ -1569,20 +1567,6 @@ class DummyTestAnalysis extends TestAnalysis ...@@ -1569,20 +1567,6 @@ class DummyTestAnalysis extends TestAnalysis
} }
public Job getJob () throws StorageException
{
return (Job)(Job.DUMMY_Job);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getJobID ()
{
return Job.DUMMY_Job.getObjectID();
}
public Level getLevel () throws StorageException public Level getLevel () throws StorageException
{ {
return (Level)(Level.DUMMY_Level); return (Level)(Level.DUMMY_Level);
...@@ -1628,6 +1612,23 @@ class DummyTestAnalysis extends TestAnalysis ...@@ -1628,6 +1612,23 @@ class DummyTestAnalysis extends TestAnalysis
return new TreeSet(); return new TreeSet();
} }
public int getCandidateClassScoresCount () throws StorageException
{
return 0;
}
public CandidateClassScore getCandidateClassScoresAt (int index) throws StorageException
{
throw new RuntimeException ("No elements in a dummy object in association CandidateClassScores");
}
public SortedSet getCandidateClassScoresSet () throws StorageException
{
return new TreeSet();
}
} }
...@@ -5,11 +5,13 @@ import java.util.Date; ...@@ -5,11 +5,13 @@ import java.util.Date;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import oneit.objstore.MessageSource; import oneit.objstore.MessageSource;
import oneit.objstore.ObjectTransaction; import oneit.objstore.ObjectTransaction;
import oneit.objstore.rdbms.filters.EqualsFilter;
import oneit.servlets.objstore.MessageSourceDecorator; import oneit.servlets.objstore.MessageSourceDecorator;
import oneit.servlets.process.ORMProcessState; import oneit.servlets.process.ORMProcessState;
import oneit.utils.CollectionUtils; import oneit.utils.CollectionUtils;
import oneit.utils.DateDiff; import oneit.utils.DateDiff;
import oneit.utils.StringUtils; import oneit.utils.StringUtils;
import oneit.utils.filter.Filter;
public class Candidate extends BaseCandidate public class Candidate extends BaseCandidate
...@@ -75,4 +77,11 @@ public class Candidate extends BaseCandidate ...@@ -75,4 +77,11 @@ public class Candidate extends BaseCandidate
return errorMsg; return errorMsg;
} }
public TestAnalysis getTestAnalysisFor(Level level)
{
Filter<TestAnalysis> testAnalysisFilter = TestAnalysis.SearchByAll().andLevel(new EqualsFilter(level));
return pipelineCandidate().toTestAnalysises(testAnalysisFilter).val();
}
} }
\ No newline at end of file
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
<MULTIPLEREFERENCE name="TestAnalysises" type="TestAnalysis" backreferenceName="Candidate" /> <MULTIPLEREFERENCE name="TestAnalysises" type="TestAnalysis" backreferenceName="Candidate" />
<MULTIPLEREFERENCE name="JobApplications" type="JobApplication" backreferenceName="Candidate" /> <MULTIPLEREFERENCE name="JobApplications" type="JobApplication" backreferenceName="Candidate" />
<MULTIPLEREFERENCE name="FactorScores" type="FactorScore" backreferenceName="Candidate" />
<TABLE name="oneit_sec_user_extension" tablePrefix="object" polymorphic="TRUE"> <TABLE name="oneit_sec_user_extension" tablePrefix="object" polymorphic="TRUE">
......
package performa.orm;
public class CandidateClassScore extends BaseCandidateClassScore
{
private static final long serialVersionUID = 0L;
// This constructor should not be called
public CandidateClassScore ()
{
// Do not add any code to this, always put it in initialiseNewObject
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://www.oneit.com.au/schemas/5.2/BusinessObject.xsd'>
<BUSINESSCLASS name="CandidateClassScore" package="performa.orm">
<IMPORT value="performa.orm.types.*"/>
<TABLE name="tl_candidate_class_score" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="ClassScore" type="Integer" dbcol="class_score" />
<ATTRIB name="WghtdClassScore" type="Integer" dbcol="wghtd_class_score" />
<ATTRIB name="MaxWghtdClassScore" type="Integer" dbcol="max_wghtd_class_score" />
<ATTRIB name="ColorCode" type="ColorCode" dbcol="color_code" attribHelper="EnumeratedAttributeHelper"/><!-- Related to CANDIDATE_CLASS_PCT view - color_rank -->
<ATTRIB name="WghtdColorCode" type="ColorCode" dbcol="wghtd_color_code" attribHelper="EnumeratedAttributeHelper"/><!-- Related to CANDIDATE_CLASS_PCT view - wghtd_color_rank -->
<ATTRIB name="FactorClass" type="FactorClass" dbcol="factor_class" attribHelper="EnumeratedAttributeHelper" mandatory="true"/>
<SINGLEREFERENCE name="TestAnalysis" type="TestAnalysis" dbcol="test_analysis_id" backreferenceName="CandidateClassScores"/>
</TABLE>
<SEARCH type="All" paramFilter="tl_level_factor.object_id is not null" orderBy="tl_level_factor.object_id" />
</BUSINESSCLASS>
</ROOT>
package performa.orm;
import java.io.*;
import java.util.*;
import java.sql.ResultSet;
import java.sql.SQLException;
import oneit.logging.*;
import oneit.objstore.*;
import oneit.objstore.assocs.*;
import oneit.objstore.rdbms.*;
import oneit.objstore.utils.*;
import oneit.sql.*;
import oneit.utils.resource.*;
import oneit.utils.*;
import oneit.utils.threading.*;
import performa.orm.types.*;
/**
* IMPORTANT!!!! Autogenerated class, DO NOT EDIT!!!!!
* Template: Infrastructure8.2[oneit.objstore.PersistenceMgrTemplate.xsl]
*/
public class CandidateClassScorePersistenceMgr extends ObjectPersistenceMgr
{
private static final LoggingArea CandidateClassScorePersistence = LoggingArea.createLoggingArea(ObjectPersistenceMgr.OBJECT_PERSISTENCE, "CandidateClassScore");
// Private attributes corresponding to business object data
private Integer dummyClassScore;
private Integer dummyWghtdClassScore;
private Integer dummyMaxWghtdClassScore;
private ColorCode dummyColorCode;
private ColorCode dummyWghtdColorCode;
private FactorClass dummyFactorClass;
// Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper HELPER_ClassScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_WghtdClassScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_MaxWghtdClassScore = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper HELPER_ColorCode = new EnumeratedAttributeHelper (ColorCode.FACTORY_ColorCode);
private static final EnumeratedAttributeHelper HELPER_WghtdColorCode = new EnumeratedAttributeHelper (ColorCode.FACTORY_ColorCode);
private static final EnumeratedAttributeHelper HELPER_FactorClass = new EnumeratedAttributeHelper (FactorClass.FACTORY_FactorClass);
public CandidateClassScorePersistenceMgr ()
{
dummyClassScore = (Integer)(HELPER_ClassScore.initialise (dummyClassScore));
dummyWghtdClassScore = (Integer)(HELPER_WghtdClassScore.initialise (dummyWghtdClassScore));
dummyMaxWghtdClassScore = (Integer)(HELPER_MaxWghtdClassScore.initialise (dummyMaxWghtdClassScore));
dummyColorCode = (ColorCode)(HELPER_ColorCode.initialise (dummyColorCode));
dummyWghtdColorCode = (ColorCode)(HELPER_WghtdColorCode.initialise (dummyWghtdColorCode));
dummyFactorClass = (FactorClass)(HELPER_FactorClass.initialise (dummyFactorClass));
}
private String SELECT_COLUMNS = "{PREFIX}tl_candidate_class_score.object_id as id, {PREFIX}tl_candidate_class_score.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_candidate_class_score.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_candidate_class_score.class_score, {PREFIX}tl_candidate_class_score.wghtd_class_score, {PREFIX}tl_candidate_class_score.max_wghtd_class_score, {PREFIX}tl_candidate_class_score.color_code, {PREFIX}tl_candidate_class_score.wghtd_color_code, {PREFIX}tl_candidate_class_score.factor_class, {PREFIX}tl_candidate_class_score.test_analysis_id, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
Set<BaseBusinessClass> resultByIDs = fetchByIDs(Collections.singleton (id), allPSets, context, sqlMgr);
if (resultByIDs.isEmpty ())
{
return null;
}
else if (resultByIDs.size () > 1)
{
throw new StorageException ("Multiple results for id:" + id);
}
else
{
return resultByIDs.iterator ().next ();
}
}
public Set<BaseBusinessClass> fetchByIDs(Set<ObjectID> ids, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
Set<BaseBusinessClass> results = new HashSet ();
Set<Long> idsToFetch = new HashSet ();
for (ObjectID id : ids)
{
if (context.containsObject(id)) // Check for cached version
{
BaseBusinessClass objectToReturn = context.getObjectToReplace(id, CandidateClassScore.REFERENCE_CandidateClassScore);
if (objectToReturn instanceof CandidateClassScore)
{
LogMgr.log (CandidateClassScorePersistence, LogLevel.TRACE, "Cache hit for id:", id);
results.add (objectToReturn);
}
else
{
throw new StorageException ("Cache collision for id:" + id + " with object " + objectToReturn + "while fetching a CandidateClassScore");
}
}
PersistentSet tl_candidate_class_scorePSet = allPSets.getPersistentSet(id, "tl_candidate_class_score", PersistentSetStatus.FETCHED);
// Check for persistent sets already prefetched
if (false || !tl_candidate_class_scorePSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!tl_candidate_class_scorePSet.containsAttrib(CandidateClassScore.FIELD_ClassScore)||
!tl_candidate_class_scorePSet.containsAttrib(CandidateClassScore.FIELD_WghtdClassScore)||
!tl_candidate_class_scorePSet.containsAttrib(CandidateClassScore.FIELD_MaxWghtdClassScore)||
!tl_candidate_class_scorePSet.containsAttrib(CandidateClassScore.FIELD_ColorCode)||
!tl_candidate_class_scorePSet.containsAttrib(CandidateClassScore.FIELD_WghtdColorCode)||
!tl_candidate_class_scorePSet.containsAttrib(CandidateClassScore.FIELD_FactorClass)||
!tl_candidate_class_scorePSet.containsAttrib(CandidateClassScore.SINGLEREFERENCE_TestAnalysis))
{
// We will need to retrieve it
idsToFetch.add (id.longValue());
}
else
{
LogMgr.log (CandidateClassScorePersistence, LogLevel.DEBUG2, "Persistent set preloaded id:", id);
/* Non Polymorphic */
CandidateClassScore result = new CandidateClassScore ();
result.setFromPersistentSets(id, allPSets);
context.addRetrievedObject(result);
results.add (result);
}
}
if (idsToFetch.size () > 0)
{
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_candidate_class_score " +
"WHERE " + SELECT_JOINS + "{PREFIX}tl_candidate_class_score.object_id IN ?";
BaseBusinessClass[] resultsFetched = loadQuery (allPSets, sqlMgr, context, query, new Object[] { idsToFetch }, null, false);
for (BaseBusinessClass objFetched : resultsFetched)
{
results.add (objFetched);
}
}
return results;
}
public BaseBusinessClass[] getReferencedObjects(ObjectID _objectID, String refName, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
if (false)
{
throw new RuntimeException ();
}
else if (refName.equals (CandidateClassScore.SINGLEREFERENCE_TestAnalysis))
{
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_candidate_class_score " +
"WHERE " + SELECT_JOINS + "test_analysis_id = ?";
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, new Object[] { _objectID.longID () }, null, false);
return results;
}
else
{
throw new IllegalArgumentException ("Illegal reference type:" + refName);
}
}
public void update(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, ConcurrentUpdateConflictException, StorageException
{
EqualityResult test = EqualityResult.compare (obj, obj.getBackup ());
ObjectID objectID = obj.getID ();
if (!test.areAttributesEqual () || !test.areSingleAssocsEqual () || obj.getForcedSave())
{
PersistentSet tl_candidate_class_scorePSet = allPSets.getPersistentSet(objectID, "tl_candidate_class_score");
if (tl_candidate_class_scorePSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_candidate_class_scorePSet.getStatus () != PersistentSetStatus.DEFERRED)
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_candidate_class_score " +
"SET class_score = ?, wghtd_class_score = ?, max_wghtd_class_score = ?, color_code = ?, wghtd_color_code = ?, factor_class = ?, test_analysis_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_candidate_class_score.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_ClassScore.getForSQL(dummyClassScore, tl_candidate_class_scorePSet.getAttrib (CandidateClassScore.FIELD_ClassScore))).listEntry (HELPER_WghtdClassScore.getForSQL(dummyWghtdClassScore, tl_candidate_class_scorePSet.getAttrib (CandidateClassScore.FIELD_WghtdClassScore))).listEntry (HELPER_MaxWghtdClassScore.getForSQL(dummyMaxWghtdClassScore, tl_candidate_class_scorePSet.getAttrib (CandidateClassScore.FIELD_MaxWghtdClassScore))).listEntry (HELPER_ColorCode.getForSQL(dummyColorCode, tl_candidate_class_scorePSet.getAttrib (CandidateClassScore.FIELD_ColorCode))).listEntry (HELPER_WghtdColorCode.getForSQL(dummyWghtdColorCode, tl_candidate_class_scorePSet.getAttrib (CandidateClassScore.FIELD_WghtdColorCode))).listEntry (HELPER_FactorClass.getForSQL(dummyFactorClass, tl_candidate_class_scorePSet.getAttrib (CandidateClassScore.FIELD_FactorClass))).listEntry (SQLManager.CheckNull((Long)(tl_candidate_class_scorePSet.getAttrib (CandidateClassScore.SINGLEREFERENCE_TestAnalysis)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
// Error, either a concurrency error or a not-exists error
ResultSet r = executeQuery (sqlMgr,
"SELECT object_id, object_LAST_UPDATED_DATE FROM {PREFIX}tl_candidate_class_score WHERE object_id = ?",
new Object[] { objectID.longID () });
if (r.next ())
{
Date d = new java.util.Date (r.getTimestamp (2).getTime());
String errorMsg = QueryBuilder.buildQueryString ("Concurrent update error:[?] for row:[?] objDate:[?] dbDate:[?]",
new Object[] { "tl_candidate_class_score", objectID.longID (), obj.getObjectLastModified (), d },
sqlMgr.getPortabilityServices ());
LogMgr.log (CandidateClassScorePersistence, LogLevel.BUSINESS1, errorMsg);
throw new ConcurrentUpdateConflictException (obj, "tl_candidate_class_score");
}
else
{
String errorMsg = "Attempt to update nonexistent row in table:tl_candidate_class_score for row:" + objectID + " objDate:" + obj.getObjectLastModified ();
LogMgr.log (CandidateClassScorePersistence, LogLevel.BUSINESS1, errorMsg);
throw new RuntimeException (errorMsg);
}
}
tl_candidate_class_scorePSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
else
{
LogMgr.log (CandidateClassScorePersistence, LogLevel.DEBUG1, "Skipping update since no attribs or simple assocs changed on ", objectID);
}
}
public void delete(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, ConcurrentUpdateConflictException, StorageException
{
ObjectID objectID = obj.getID ();
PersistentSet tl_candidate_class_scorePSet = allPSets.getPersistentSet(objectID, "tl_candidate_class_score");
LogMgr.log (CandidateClassScorePersistence, LogLevel.DEBUG2, "Deleting:", objectID);
if (tl_candidate_class_scorePSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_candidate_class_scorePSet.getStatus () != PersistentSetStatus.DEFERRED)
{
int rowsDeleted = executeStatement (sqlMgr,
"DELETE " +
"FROM {PREFIX}tl_candidate_class_score " +
"WHERE tl_candidate_class_score.object_id = ? AND " + sqlMgr.getPortabilityServices ().getTruncatedTimestampColumn ("object_LAST_UPDATED_DATE") + " = " + sqlMgr.getPortabilityServices ().getTruncatedTimestampParam("?") + " ",
new Object[] { objectID.longID(), obj.getObjectLastModified () });
if (rowsDeleted != 1)
{
// Error, either a concurrency error or a not-exists error
ResultSet r = executeQuery (sqlMgr,
"SELECT object_id FROM {PREFIX}tl_candidate_class_score WHERE object_id = ?",
new Object[] { objectID.longID() });
if (r.next ())
{
throw new ConcurrentUpdateConflictException (obj, "tl_candidate_class_score");
}
else
{
String errorMsg = "Attempt to delete nonexistent row in table:tl_candidate_class_score for row:" + objectID;
LogMgr.log (CandidateClassScorePersistence, LogLevel.SYSTEMERROR1, errorMsg);
throw new RuntimeException (errorMsg);
}
}
tl_candidate_class_scorePSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
public ResultSet executeSearchQueryAll (SQLManager sqlMgr) throws SQLException
{
throw new RuntimeException ("NOT implemented: executeSearchQueryAll");
}
public BaseBusinessClass[] loadQuery (PersistentSetCollection allPSets, SQLManager sqlMgr, RDBMSPersistenceContext context, String query, Object[] params, Integer maxRows, boolean truncateExtra) throws SQLException, StorageException
{
LinkedHashMap<ObjectID, CandidateClassScore> results = new LinkedHashMap ();
ResultSet r = executeQuery (sqlMgr, query, params);
while (r.next())
{
ThreadUtils.checkInterrupted ();
ObjectID objectID = new ObjectID (CandidateClassScore.REFERENCE_CandidateClassScore.getObjectIDSpace (), r.getLong ("id"));
CandidateClassScore resultElement;
if (maxRows != null && !results.containsKey (objectID) && results.size () >= maxRows)
{
if (truncateExtra)
{
break;
}
else
{
throw new SearchRowsExceededException ("Maximum rows exceeded:" + maxRows);
}
}
if (context.containsObject(objectID))
{
BaseBusinessClass cachedElement = context.getObjectToReplace(objectID, CandidateClassScore.REFERENCE_CandidateClassScore);
if (cachedElement instanceof CandidateClassScore)
{
LogMgr.log (CandidateClassScorePersistence, LogLevel.TRACE, "Cache hit for id:", objectID);
resultElement = (CandidateClassScore)cachedElement;
}
else
{
throw new StorageException ("Cache collision for id:" + objectID + " with object " + cachedElement + "while fetching a CandidateClassScore");
}
}
else
{
PersistentSet tl_candidate_class_scorePSet = allPSets.getPersistentSet(objectID, "tl_candidate_class_score", PersistentSetStatus.FETCHED);
createPersistentSetFromRS(allPSets, r, objectID);
resultElement = new CandidateClassScore ();
resultElement.setFromPersistentSets(objectID, allPSets);
context.addRetrievedObject(resultElement);
}
results.put (objectID, resultElement);
}
BaseBusinessClass[] resultsArr = new BaseBusinessClass[results.size ()];
return results.values ().toArray (resultsArr);
}
public BaseBusinessClass[] find(String searchType, PersistentSetCollection allPSets, Hashtable criteria, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
LogMgr.log (CandidateClassScorePersistence, LogLevel.DEBUG2, "Search executing:", searchType, " criteria:", criteria);
String customParamFilter = (String)criteria.get (SEARCH_CustomFilter);
String customOrderBy = (String)criteria.get (SEARCH_OrderBy);
String customTables = (String)criteria.get (SEARCH_CustomExtraTables);
Boolean noCommaBeforeCustomExtraTables = (Boolean)criteria.get (SEARCH_CustomExtraTablesNoComma);
if (searchType.equals (SEARCH_CustomSQL))
{
Set<ObjectID> processedIDs = new HashSet();
SearchParamTransform tx = new SearchParamTransform (criteria);
Object[] searchParams;
customParamFilter = StringUtils.replaceParams (customParamFilter, tx);
searchParams = tx.getParamsArray();
if (customOrderBy != null)
{
customOrderBy = " ORDER BY " + customOrderBy;
}
else
{
customOrderBy = "";
}
ResultSet r;
String concatCustomTableWith = CollectionUtils.equals(noCommaBeforeCustomExtraTables, true) ? " " : ", ";
String tables = StringUtils.subBlanks(customTables) == null ? " " : concatCustomTableWith + customTables + " ";
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_candidate_class_score " + tables +
"WHERE " + SELECT_JOINS + " " + customParamFilter + customOrderBy;
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, searchParams, null, false);
return results;
}
else if (searchType.equals (CandidateClassScore.SEARCH_All))
{
// Local scope for transformed variables
{
}
String orderBy = " ORDER BY tl_level_factor.object_id";
String tables = " ";
Set<String> joinTableSet = new HashSet<String>();
String filter;
Object[] searchParams; // paramFilter: tl_level_factor.object_id is not null
String preFilter = "(tl_level_factor.object_id is not null)"
+ " ";
preFilter += context.getLoadingAttributes ().getCustomSQL() ;
SearchParamTransform tx = new SearchParamTransform (criteria);
filter = StringUtils.replaceParams (preFilter, tx);
searchParams = tx.getParamsArray();
Integer maxRows = context.getLoadingAttributes ().getMaxRows ();
boolean truncateExtra = !context.getLoadingAttributes ().isFailIfMaxExceeded();
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_candidate_class_score " + tables + tableSetToSQL(joinTableSet) +
"WHERE " + SELECT_JOINS + " " + filter + orderBy;
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, searchParams, maxRows, truncateExtra);
return results;
}
else
{
throw new IllegalArgumentException ("Illegal search type:" + searchType);
}
}
private void createPersistentSetFromRS(PersistentSetCollection allPSets, ResultSet r, ObjectID objectID) throws SQLException
{
PersistentSet tl_candidate_class_scorePSet = allPSets.getPersistentSet(objectID, "tl_candidate_class_score", PersistentSetStatus.FETCHED);
// Object Modified
tl_candidate_class_scorePSet.setAttrib(BaseBusinessClass.FIELD_ObjectLastModified, r.getTimestamp ("LAST_UPDATED_DATE"));
// Object Created
tl_candidate_class_scorePSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE"));
tl_candidate_class_scorePSet.setAttrib(CandidateClassScore.FIELD_ClassScore, HELPER_ClassScore.getFromRS(dummyClassScore, r, "class_score"));
tl_candidate_class_scorePSet.setAttrib(CandidateClassScore.FIELD_WghtdClassScore, HELPER_WghtdClassScore.getFromRS(dummyWghtdClassScore, r, "wghtd_class_score"));
tl_candidate_class_scorePSet.setAttrib(CandidateClassScore.FIELD_MaxWghtdClassScore, HELPER_MaxWghtdClassScore.getFromRS(dummyMaxWghtdClassScore, r, "max_wghtd_class_score"));
tl_candidate_class_scorePSet.setAttrib(CandidateClassScore.FIELD_ColorCode, HELPER_ColorCode.getFromRS(dummyColorCode, r, "color_code"));
tl_candidate_class_scorePSet.setAttrib(CandidateClassScore.FIELD_WghtdColorCode, HELPER_WghtdColorCode.getFromRS(dummyWghtdColorCode, r, "wghtd_color_code"));
tl_candidate_class_scorePSet.setAttrib(CandidateClassScore.FIELD_FactorClass, HELPER_FactorClass.getFromRS(dummyFactorClass, r, "factor_class"));
tl_candidate_class_scorePSet.setAttrib(CandidateClassScore.SINGLEREFERENCE_TestAnalysis, r.getObject ("test_analysis_id"));
}
public void create(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
ObjectID objectID = obj.getID ();
PersistentSet tl_candidate_class_scorePSet = allPSets.getPersistentSet(objectID, "tl_candidate_class_score");
if (tl_candidate_class_scorePSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_candidate_class_scorePSet.getStatus () != PersistentSetStatus.DEFERRED)
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_candidate_class_score " +
" (class_score, wghtd_class_score, max_wghtd_class_score, color_code, wghtd_color_code, factor_class, test_analysis_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" (?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_ClassScore.getForSQL(dummyClassScore, tl_candidate_class_scorePSet.getAttrib (CandidateClassScore.FIELD_ClassScore))).listEntry (HELPER_WghtdClassScore.getForSQL(dummyWghtdClassScore, tl_candidate_class_scorePSet.getAttrib (CandidateClassScore.FIELD_WghtdClassScore))).listEntry (HELPER_MaxWghtdClassScore.getForSQL(dummyMaxWghtdClassScore, tl_candidate_class_scorePSet.getAttrib (CandidateClassScore.FIELD_MaxWghtdClassScore))).listEntry (HELPER_ColorCode.getForSQL(dummyColorCode, tl_candidate_class_scorePSet.getAttrib (CandidateClassScore.FIELD_ColorCode))).listEntry (HELPER_WghtdColorCode.getForSQL(dummyWghtdColorCode, tl_candidate_class_scorePSet.getAttrib (CandidateClassScore.FIELD_WghtdColorCode))).listEntry (HELPER_FactorClass.getForSQL(dummyFactorClass, tl_candidate_class_scorePSet.getAttrib (CandidateClassScore.FIELD_FactorClass))) .listEntry (SQLManager.CheckNull((Long)(tl_candidate_class_scorePSet.getAttrib (CandidateClassScore.SINGLEREFERENCE_TestAnalysis)))) .listEntry (objectID.longID ()).toList().toArray());
tl_candidate_class_scorePSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
}
package performa.orm;
public class ClassNormalisation extends BaseClassNormalisation
{
private static final long serialVersionUID = 0L;
// This constructor should not be called
public ClassNormalisation ()
{
// Do not add any code to this, always put it in initialiseNewObject
}
@Override
public String getObjectIDSpace()
{
return "ClassNormalisation";
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://www.oneit.com.au/schemas/5.2/BusinessObject.xsd'>
<BUSINESSCLASS name="ClassNormalisation" package="performa.orm">
<IMPORT value="performa.orm.types.*"/>
<TABLE name="tl_class_norm" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="FactorClass" type="FactorClass" dbcol="class_code" attribHelper="EnumeratedAttributeHelper" />
<ATTRIB name="MeanScore" type="Double" dbcol="mean_score"/>
<ATTRIB name="MaxScore" type="Double" dbcol="max_score"/>
<ATTRIB name="MinScore" type="Double" dbcol="min_score"/>
<ATTRIB name="StddevScore" type="Double" dbcol="stddev_score"/>
<ATTRIB name="LeftMeanScore" type="Double" dbcol="left_mean_score"/>
<ATTRIB name="RightMeanScore" type="Double" dbcol="right_mean_score"/>
<ATTRIB name="WghtMeanScore" type="Double" dbcol="wght_mean_score"/>
<ATTRIB name="WghtStddevScore" type="Double" dbcol="wght_stddev_score"/>
<ATTRIB name="WghtLeftMeanScore" type="Double" dbcol="wght_left_mean_score"/>
<ATTRIB name="WghtRightMeanScore" type="Double" dbcol="wght_right_mean_score"/>
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_number" backreferenceName="ClassNormalisations"/>
</TABLE>
<SEARCH type="All" paramFilter="tl_class_norm.object_id is not null" orderBy="tl_class_norm.object_id" />
</BUSINESSCLASS>
</ROOT>
\ No newline at end of file
package performa.orm;
import java.io.*;
import java.util.*;
import java.sql.ResultSet;
import java.sql.SQLException;
import oneit.logging.*;
import oneit.objstore.*;
import oneit.objstore.assocs.*;
import oneit.objstore.rdbms.*;
import oneit.objstore.utils.*;
import oneit.sql.*;
import oneit.utils.resource.*;
import oneit.utils.*;
import oneit.utils.threading.*;
import performa.orm.types.*;
/**
* IMPORTANT!!!! Autogenerated class, DO NOT EDIT!!!!!
* Template: Infrastructure8.2[oneit.objstore.PersistenceMgrTemplate.xsl]
*/
public class ClassNormalisationPersistenceMgr extends ObjectPersistenceMgr
{
private static final LoggingArea ClassNormalisationPersistence = LoggingArea.createLoggingArea(ObjectPersistenceMgr.OBJECT_PERSISTENCE, "ClassNormalisation");
// Private attributes corresponding to business object data
private FactorClass dummyFactorClass;
private Double dummyMeanScore;
private Double dummyMaxScore;
private Double dummyMinScore;
private Double dummyStddevScore;
private Double dummyLeftMeanScore;
private Double dummyRightMeanScore;
private Double dummyWghtMeanScore;
private Double dummyWghtStddevScore;
private Double dummyWghtLeftMeanScore;
private Double dummyWghtRightMeanScore;
// Static constants corresponding to attribute helpers
private static final EnumeratedAttributeHelper HELPER_FactorClass = new EnumeratedAttributeHelper (FactorClass.FACTORY_FactorClass);
private static final DefaultAttributeHelper HELPER_MeanScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_MaxScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_MinScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_StddevScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_LeftMeanScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_RightMeanScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_WghtMeanScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_WghtStddevScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_WghtLeftMeanScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_WghtRightMeanScore = DefaultAttributeHelper.INSTANCE;
public ClassNormalisationPersistenceMgr ()
{
dummyFactorClass = (FactorClass)(HELPER_FactorClass.initialise (dummyFactorClass));
dummyMeanScore = (Double)(HELPER_MeanScore.initialise (dummyMeanScore));
dummyMaxScore = (Double)(HELPER_MaxScore.initialise (dummyMaxScore));
dummyMinScore = (Double)(HELPER_MinScore.initialise (dummyMinScore));
dummyStddevScore = (Double)(HELPER_StddevScore.initialise (dummyStddevScore));
dummyLeftMeanScore = (Double)(HELPER_LeftMeanScore.initialise (dummyLeftMeanScore));
dummyRightMeanScore = (Double)(HELPER_RightMeanScore.initialise (dummyRightMeanScore));
dummyWghtMeanScore = (Double)(HELPER_WghtMeanScore.initialise (dummyWghtMeanScore));
dummyWghtStddevScore = (Double)(HELPER_WghtStddevScore.initialise (dummyWghtStddevScore));
dummyWghtLeftMeanScore = (Double)(HELPER_WghtLeftMeanScore.initialise (dummyWghtLeftMeanScore));
dummyWghtRightMeanScore = (Double)(HELPER_WghtRightMeanScore.initialise (dummyWghtRightMeanScore));
}
private String SELECT_COLUMNS = "{PREFIX}tl_class_norm.object_id as id, {PREFIX}tl_class_norm.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_class_norm.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_class_norm.class_code, {PREFIX}tl_class_norm.mean_score, {PREFIX}tl_class_norm.max_score, {PREFIX}tl_class_norm.min_score, {PREFIX}tl_class_norm.stddev_score, {PREFIX}tl_class_norm.left_mean_score, {PREFIX}tl_class_norm.right_mean_score, {PREFIX}tl_class_norm.wght_mean_score, {PREFIX}tl_class_norm.wght_stddev_score, {PREFIX}tl_class_norm.wght_left_mean_score, {PREFIX}tl_class_norm.wght_right_mean_score, {PREFIX}tl_class_norm.level_number, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
Set<BaseBusinessClass> resultByIDs = fetchByIDs(Collections.singleton (id), allPSets, context, sqlMgr);
if (resultByIDs.isEmpty ())
{
return null;
}
else if (resultByIDs.size () > 1)
{
throw new StorageException ("Multiple results for id:" + id);
}
else
{
return resultByIDs.iterator ().next ();
}
}
public Set<BaseBusinessClass> fetchByIDs(Set<ObjectID> ids, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
Set<BaseBusinessClass> results = new HashSet ();
Set<Long> idsToFetch = new HashSet ();
for (ObjectID id : ids)
{
if (context.containsObject(id)) // Check for cached version
{
BaseBusinessClass objectToReturn = context.getObjectToReplace(id, ClassNormalisation.REFERENCE_ClassNormalisation);
if (objectToReturn instanceof ClassNormalisation)
{
LogMgr.log (ClassNormalisationPersistence, LogLevel.TRACE, "Cache hit for id:", id);
results.add (objectToReturn);
}
else
{
throw new StorageException ("Cache collision for id:" + id + " with object " + objectToReturn + "while fetching a ClassNormalisation");
}
}
PersistentSet tl_class_normPSet = allPSets.getPersistentSet(id, "tl_class_norm", PersistentSetStatus.FETCHED);
// Check for persistent sets already prefetched
if (false || !tl_class_normPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!tl_class_normPSet.containsAttrib(ClassNormalisation.FIELD_FactorClass)||
!tl_class_normPSet.containsAttrib(ClassNormalisation.FIELD_MeanScore)||
!tl_class_normPSet.containsAttrib(ClassNormalisation.FIELD_MaxScore)||
!tl_class_normPSet.containsAttrib(ClassNormalisation.FIELD_MinScore)||
!tl_class_normPSet.containsAttrib(ClassNormalisation.FIELD_StddevScore)||
!tl_class_normPSet.containsAttrib(ClassNormalisation.FIELD_LeftMeanScore)||
!tl_class_normPSet.containsAttrib(ClassNormalisation.FIELD_RightMeanScore)||
!tl_class_normPSet.containsAttrib(ClassNormalisation.FIELD_WghtMeanScore)||
!tl_class_normPSet.containsAttrib(ClassNormalisation.FIELD_WghtStddevScore)||
!tl_class_normPSet.containsAttrib(ClassNormalisation.FIELD_WghtLeftMeanScore)||
!tl_class_normPSet.containsAttrib(ClassNormalisation.FIELD_WghtRightMeanScore)||
!tl_class_normPSet.containsAttrib(ClassNormalisation.SINGLEREFERENCE_Level))
{
// We will need to retrieve it
idsToFetch.add (id.longValue());
}
else
{
LogMgr.log (ClassNormalisationPersistence, LogLevel.DEBUG2, "Persistent set preloaded id:", id);
/* Non Polymorphic */
ClassNormalisation result = new ClassNormalisation ();
result.setFromPersistentSets(id, allPSets);
context.addRetrievedObject(result);
results.add (result);
}
}
if (idsToFetch.size () > 0)
{
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_class_norm " +
"WHERE " + SELECT_JOINS + "{PREFIX}tl_class_norm.object_id IN ?";
BaseBusinessClass[] resultsFetched = loadQuery (allPSets, sqlMgr, context, query, new Object[] { idsToFetch }, null, false);
for (BaseBusinessClass objFetched : resultsFetched)
{
results.add (objFetched);
}
}
return results;
}
public BaseBusinessClass[] getReferencedObjects(ObjectID _objectID, String refName, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
if (false)
{
throw new RuntimeException ();
}
else if (refName.equals (ClassNormalisation.SINGLEREFERENCE_Level))
{
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_class_norm " +
"WHERE " + SELECT_JOINS + "level_number = ?";
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, new Object[] { _objectID.longID () }, null, false);
return results;
}
else
{
throw new IllegalArgumentException ("Illegal reference type:" + refName);
}
}
public void update(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, ConcurrentUpdateConflictException, StorageException
{
EqualityResult test = EqualityResult.compare (obj, obj.getBackup ());
ObjectID objectID = obj.getID ();
if (!test.areAttributesEqual () || !test.areSingleAssocsEqual () || obj.getForcedSave())
{
PersistentSet tl_class_normPSet = allPSets.getPersistentSet(objectID, "tl_class_norm");
if (tl_class_normPSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_class_normPSet.getStatus () != PersistentSetStatus.DEFERRED)
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_class_norm " +
"SET class_code = ?, mean_score = ?, max_score = ?, min_score = ?, stddev_score = ?, left_mean_score = ?, right_mean_score = ?, wght_mean_score = ?, wght_stddev_score = ?, wght_left_mean_score = ?, wght_right_mean_score = ?, level_number = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_class_norm.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_FactorClass.getForSQL(dummyFactorClass, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_FactorClass))).listEntry (HELPER_MeanScore.getForSQL(dummyMeanScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_MeanScore))).listEntry (HELPER_MaxScore.getForSQL(dummyMaxScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_MaxScore))).listEntry (HELPER_MinScore.getForSQL(dummyMinScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_MinScore))).listEntry (HELPER_StddevScore.getForSQL(dummyStddevScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_StddevScore))).listEntry (HELPER_LeftMeanScore.getForSQL(dummyLeftMeanScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_LeftMeanScore))).listEntry (HELPER_RightMeanScore.getForSQL(dummyRightMeanScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_RightMeanScore))).listEntry (HELPER_WghtMeanScore.getForSQL(dummyWghtMeanScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_WghtMeanScore))).listEntry (HELPER_WghtStddevScore.getForSQL(dummyWghtStddevScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_WghtStddevScore))).listEntry (HELPER_WghtLeftMeanScore.getForSQL(dummyWghtLeftMeanScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_WghtLeftMeanScore))).listEntry (HELPER_WghtRightMeanScore.getForSQL(dummyWghtRightMeanScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_WghtRightMeanScore))).listEntry (SQLManager.CheckNull((Long)(tl_class_normPSet.getAttrib (ClassNormalisation.SINGLEREFERENCE_Level)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
// Error, either a concurrency error or a not-exists error
ResultSet r = executeQuery (sqlMgr,
"SELECT object_id, object_LAST_UPDATED_DATE FROM {PREFIX}tl_class_norm WHERE object_id = ?",
new Object[] { objectID.longID () });
if (r.next ())
{
Date d = new java.util.Date (r.getTimestamp (2).getTime());
String errorMsg = QueryBuilder.buildQueryString ("Concurrent update error:[?] for row:[?] objDate:[?] dbDate:[?]",
new Object[] { "tl_class_norm", objectID.longID (), obj.getObjectLastModified (), d },
sqlMgr.getPortabilityServices ());
LogMgr.log (ClassNormalisationPersistence, LogLevel.BUSINESS1, errorMsg);
throw new ConcurrentUpdateConflictException (obj, "tl_class_norm");
}
else
{
String errorMsg = "Attempt to update nonexistent row in table:tl_class_norm for row:" + objectID + " objDate:" + obj.getObjectLastModified ();
LogMgr.log (ClassNormalisationPersistence, LogLevel.BUSINESS1, errorMsg);
throw new RuntimeException (errorMsg);
}
}
tl_class_normPSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
else
{
LogMgr.log (ClassNormalisationPersistence, LogLevel.DEBUG1, "Skipping update since no attribs or simple assocs changed on ", objectID);
}
}
public void delete(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, ConcurrentUpdateConflictException, StorageException
{
ObjectID objectID = obj.getID ();
PersistentSet tl_class_normPSet = allPSets.getPersistentSet(objectID, "tl_class_norm");
LogMgr.log (ClassNormalisationPersistence, LogLevel.DEBUG2, "Deleting:", objectID);
if (tl_class_normPSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_class_normPSet.getStatus () != PersistentSetStatus.DEFERRED)
{
int rowsDeleted = executeStatement (sqlMgr,
"DELETE " +
"FROM {PREFIX}tl_class_norm " +
"WHERE tl_class_norm.object_id = ? AND " + sqlMgr.getPortabilityServices ().getTruncatedTimestampColumn ("object_LAST_UPDATED_DATE") + " = " + sqlMgr.getPortabilityServices ().getTruncatedTimestampParam("?") + " ",
new Object[] { objectID.longID(), obj.getObjectLastModified () });
if (rowsDeleted != 1)
{
// Error, either a concurrency error or a not-exists error
ResultSet r = executeQuery (sqlMgr,
"SELECT object_id FROM {PREFIX}tl_class_norm WHERE object_id = ?",
new Object[] { objectID.longID() });
if (r.next ())
{
throw new ConcurrentUpdateConflictException (obj, "tl_class_norm");
}
else
{
String errorMsg = "Attempt to delete nonexistent row in table:tl_class_norm for row:" + objectID;
LogMgr.log (ClassNormalisationPersistence, LogLevel.SYSTEMERROR1, errorMsg);
throw new RuntimeException (errorMsg);
}
}
tl_class_normPSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
public ResultSet executeSearchQueryAll (SQLManager sqlMgr) throws SQLException
{
throw new RuntimeException ("NOT implemented: executeSearchQueryAll");
}
public BaseBusinessClass[] loadQuery (PersistentSetCollection allPSets, SQLManager sqlMgr, RDBMSPersistenceContext context, String query, Object[] params, Integer maxRows, boolean truncateExtra) throws SQLException, StorageException
{
LinkedHashMap<ObjectID, ClassNormalisation> results = new LinkedHashMap ();
ResultSet r = executeQuery (sqlMgr, query, params);
while (r.next())
{
ThreadUtils.checkInterrupted ();
ObjectID objectID = new ObjectID (ClassNormalisation.REFERENCE_ClassNormalisation.getObjectIDSpace (), r.getLong ("id"));
ClassNormalisation resultElement;
if (maxRows != null && !results.containsKey (objectID) && results.size () >= maxRows)
{
if (truncateExtra)
{
break;
}
else
{
throw new SearchRowsExceededException ("Maximum rows exceeded:" + maxRows);
}
}
if (context.containsObject(objectID))
{
BaseBusinessClass cachedElement = context.getObjectToReplace(objectID, ClassNormalisation.REFERENCE_ClassNormalisation);
if (cachedElement instanceof ClassNormalisation)
{
LogMgr.log (ClassNormalisationPersistence, LogLevel.TRACE, "Cache hit for id:", objectID);
resultElement = (ClassNormalisation)cachedElement;
}
else
{
throw new StorageException ("Cache collision for id:" + objectID + " with object " + cachedElement + "while fetching a ClassNormalisation");
}
}
else
{
PersistentSet tl_class_normPSet = allPSets.getPersistentSet(objectID, "tl_class_norm", PersistentSetStatus.FETCHED);
createPersistentSetFromRS(allPSets, r, objectID);
resultElement = new ClassNormalisation ();
resultElement.setFromPersistentSets(objectID, allPSets);
context.addRetrievedObject(resultElement);
}
results.put (objectID, resultElement);
}
BaseBusinessClass[] resultsArr = new BaseBusinessClass[results.size ()];
return results.values ().toArray (resultsArr);
}
public BaseBusinessClass[] find(String searchType, PersistentSetCollection allPSets, Hashtable criteria, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
LogMgr.log (ClassNormalisationPersistence, LogLevel.DEBUG2, "Search executing:", searchType, " criteria:", criteria);
String customParamFilter = (String)criteria.get (SEARCH_CustomFilter);
String customOrderBy = (String)criteria.get (SEARCH_OrderBy);
String customTables = (String)criteria.get (SEARCH_CustomExtraTables);
Boolean noCommaBeforeCustomExtraTables = (Boolean)criteria.get (SEARCH_CustomExtraTablesNoComma);
if (searchType.equals (SEARCH_CustomSQL))
{
Set<ObjectID> processedIDs = new HashSet();
SearchParamTransform tx = new SearchParamTransform (criteria);
Object[] searchParams;
customParamFilter = StringUtils.replaceParams (customParamFilter, tx);
searchParams = tx.getParamsArray();
if (customOrderBy != null)
{
customOrderBy = " ORDER BY " + customOrderBy;
}
else
{
customOrderBy = "";
}
ResultSet r;
String concatCustomTableWith = CollectionUtils.equals(noCommaBeforeCustomExtraTables, true) ? " " : ", ";
String tables = StringUtils.subBlanks(customTables) == null ? " " : concatCustomTableWith + customTables + " ";
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_class_norm " + tables +
"WHERE " + SELECT_JOINS + " " + customParamFilter + customOrderBy;
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, searchParams, null, false);
return results;
}
else if (searchType.equals (ClassNormalisation.SEARCH_All))
{
// Local scope for transformed variables
{
}
String orderBy = " ORDER BY tl_class_norm.object_id";
String tables = " ";
Set<String> joinTableSet = new HashSet<String>();
String filter;
Object[] searchParams; // paramFilter: tl_class_norm.object_id is not null
String preFilter = "(tl_class_norm.object_id is not null)"
+ " ";
preFilter += context.getLoadingAttributes ().getCustomSQL() ;
SearchParamTransform tx = new SearchParamTransform (criteria);
filter = StringUtils.replaceParams (preFilter, tx);
searchParams = tx.getParamsArray();
Integer maxRows = context.getLoadingAttributes ().getMaxRows ();
boolean truncateExtra = !context.getLoadingAttributes ().isFailIfMaxExceeded();
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_class_norm " + tables + tableSetToSQL(joinTableSet) +
"WHERE " + SELECT_JOINS + " " + filter + orderBy;
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, searchParams, maxRows, truncateExtra);
return results;
}
else
{
throw new IllegalArgumentException ("Illegal search type:" + searchType);
}
}
private void createPersistentSetFromRS(PersistentSetCollection allPSets, ResultSet r, ObjectID objectID) throws SQLException
{
PersistentSet tl_class_normPSet = allPSets.getPersistentSet(objectID, "tl_class_norm", PersistentSetStatus.FETCHED);
// Object Modified
tl_class_normPSet.setAttrib(BaseBusinessClass.FIELD_ObjectLastModified, r.getTimestamp ("LAST_UPDATED_DATE"));
// Object Created
tl_class_normPSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE"));
tl_class_normPSet.setAttrib(ClassNormalisation.FIELD_FactorClass, HELPER_FactorClass.getFromRS(dummyFactorClass, r, "class_code"));
tl_class_normPSet.setAttrib(ClassNormalisation.FIELD_MeanScore, HELPER_MeanScore.getFromRS(dummyMeanScore, r, "mean_score"));
tl_class_normPSet.setAttrib(ClassNormalisation.FIELD_MaxScore, HELPER_MaxScore.getFromRS(dummyMaxScore, r, "max_score"));
tl_class_normPSet.setAttrib(ClassNormalisation.FIELD_MinScore, HELPER_MinScore.getFromRS(dummyMinScore, r, "min_score"));
tl_class_normPSet.setAttrib(ClassNormalisation.FIELD_StddevScore, HELPER_StddevScore.getFromRS(dummyStddevScore, r, "stddev_score"));
tl_class_normPSet.setAttrib(ClassNormalisation.FIELD_LeftMeanScore, HELPER_LeftMeanScore.getFromRS(dummyLeftMeanScore, r, "left_mean_score"));
tl_class_normPSet.setAttrib(ClassNormalisation.FIELD_RightMeanScore, HELPER_RightMeanScore.getFromRS(dummyRightMeanScore, r, "right_mean_score"));
tl_class_normPSet.setAttrib(ClassNormalisation.FIELD_WghtMeanScore, HELPER_WghtMeanScore.getFromRS(dummyWghtMeanScore, r, "wght_mean_score"));
tl_class_normPSet.setAttrib(ClassNormalisation.FIELD_WghtStddevScore, HELPER_WghtStddevScore.getFromRS(dummyWghtStddevScore, r, "wght_stddev_score"));
tl_class_normPSet.setAttrib(ClassNormalisation.FIELD_WghtLeftMeanScore, HELPER_WghtLeftMeanScore.getFromRS(dummyWghtLeftMeanScore, r, "wght_left_mean_score"));
tl_class_normPSet.setAttrib(ClassNormalisation.FIELD_WghtRightMeanScore, HELPER_WghtRightMeanScore.getFromRS(dummyWghtRightMeanScore, r, "wght_right_mean_score"));
tl_class_normPSet.setAttrib(ClassNormalisation.SINGLEREFERENCE_Level, r.getObject ("level_number"));
}
public void create(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
ObjectID objectID = obj.getID ();
PersistentSet tl_class_normPSet = allPSets.getPersistentSet(objectID, "tl_class_norm");
if (tl_class_normPSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_class_normPSet.getStatus () != PersistentSetStatus.DEFERRED)
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_class_norm " +
" (class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, level_number, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_FactorClass.getForSQL(dummyFactorClass, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_FactorClass))).listEntry (HELPER_MeanScore.getForSQL(dummyMeanScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_MeanScore))).listEntry (HELPER_MaxScore.getForSQL(dummyMaxScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_MaxScore))).listEntry (HELPER_MinScore.getForSQL(dummyMinScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_MinScore))).listEntry (HELPER_StddevScore.getForSQL(dummyStddevScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_StddevScore))).listEntry (HELPER_LeftMeanScore.getForSQL(dummyLeftMeanScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_LeftMeanScore))).listEntry (HELPER_RightMeanScore.getForSQL(dummyRightMeanScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_RightMeanScore))).listEntry (HELPER_WghtMeanScore.getForSQL(dummyWghtMeanScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_WghtMeanScore))).listEntry (HELPER_WghtStddevScore.getForSQL(dummyWghtStddevScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_WghtStddevScore))).listEntry (HELPER_WghtLeftMeanScore.getForSQL(dummyWghtLeftMeanScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_WghtLeftMeanScore))).listEntry (HELPER_WghtRightMeanScore.getForSQL(dummyWghtRightMeanScore, tl_class_normPSet.getAttrib (ClassNormalisation.FIELD_WghtRightMeanScore))) .listEntry (SQLManager.CheckNull((Long)(tl_class_normPSet.getAttrib (ClassNormalisation.SINGLEREFERENCE_Level)))) .listEntry (objectID.longID ()).toList().toArray());
tl_class_normPSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
}
package performa.orm; package performa.orm;
import oneit.utils.StringUtils;
public class Factor extends BaseFactor public class Factor extends BaseFactor
{ {
...@@ -16,4 +18,10 @@ public class Factor extends BaseFactor ...@@ -16,4 +18,10 @@ public class Factor extends BaseFactor
{ {
return "Factor"; return "Factor";
} }
@Override
public String getToString()
{
return StringUtils.subNulls(getDescription(), super.getToString());
}
} }
\ No newline at end of file
...@@ -4,9 +4,11 @@ ...@@ -4,9 +4,11 @@
<BUSINESSCLASS name="FactorLevelLink" package="performa.orm"> <BUSINESSCLASS name="FactorLevelLink" package="performa.orm">
<IMPORT value="performa.orm.types.*"/>
<TABLE name="tl_factor_hdr" tablePrefix="object" polymorphic="FALSE"> <TABLE name="tl_factor_hdr" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="ClassCode" type="String" dbcol="class_code" length="15"/> <ATTRIB name="FactorClass" type="FactorClass" dbcol="class_code" attribHelper="EnumeratedAttributeHelper" />
<ATTRIB name="Notes" type="String" dbcol="factor_hdr_notes"/> <ATTRIB name="Notes" type="String" dbcol="factor_hdr_notes"/>
<ATTRIB name="LeftAnnot" type="String" dbcol="left_annot" length="60"/> <ATTRIB name="LeftAnnot" type="String" dbcol="left_annot" length="60"/>
<ATTRIB name="RightAnnot" type="String" dbcol="right_annot" length="60"/> <ATTRIB name="RightAnnot" type="String" dbcol="right_annot" length="60"/>
......
...@@ -14,6 +14,7 @@ import oneit.sql.*; ...@@ -14,6 +14,7 @@ import oneit.sql.*;
import oneit.utils.resource.*; import oneit.utils.resource.*;
import oneit.utils.*; import oneit.utils.*;
import oneit.utils.threading.*; import oneit.utils.threading.*;
import performa.orm.types.*;
...@@ -26,7 +27,7 @@ public class FactorLevelLinkPersistenceMgr extends ObjectPersistenceMgr ...@@ -26,7 +27,7 @@ public class FactorLevelLinkPersistenceMgr extends ObjectPersistenceMgr
private static final LoggingArea FactorLevelLinkPersistence = LoggingArea.createLoggingArea(ObjectPersistenceMgr.OBJECT_PERSISTENCE, "FactorLevelLink"); private static final LoggingArea FactorLevelLinkPersistence = LoggingArea.createLoggingArea(ObjectPersistenceMgr.OBJECT_PERSISTENCE, "FactorLevelLink");
// Private attributes corresponding to business object data // Private attributes corresponding to business object data
private String dummyClassCode; private FactorClass dummyFactorClass;
private String dummyNotes; private String dummyNotes;
private String dummyLeftAnnot; private String dummyLeftAnnot;
private String dummyRightAnnot; private String dummyRightAnnot;
...@@ -35,7 +36,7 @@ public class FactorLevelLinkPersistenceMgr extends ObjectPersistenceMgr ...@@ -35,7 +36,7 @@ public class FactorLevelLinkPersistenceMgr extends ObjectPersistenceMgr
// Static constants corresponding to attribute helpers // Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper HELPER_ClassCode = DefaultAttributeHelper.INSTANCE; private static final EnumeratedAttributeHelper HELPER_FactorClass = new EnumeratedAttributeHelper (FactorClass.FACTORY_FactorClass);
private static final DefaultAttributeHelper HELPER_Notes = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_Notes = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_LeftAnnot = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_LeftAnnot = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_RightAnnot = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_RightAnnot = DefaultAttributeHelper.INSTANCE;
...@@ -47,7 +48,7 @@ public class FactorLevelLinkPersistenceMgr extends ObjectPersistenceMgr ...@@ -47,7 +48,7 @@ public class FactorLevelLinkPersistenceMgr extends ObjectPersistenceMgr
public FactorLevelLinkPersistenceMgr () public FactorLevelLinkPersistenceMgr ()
{ {
dummyClassCode = (String)(HELPER_ClassCode.initialise (dummyClassCode)); dummyFactorClass = (FactorClass)(HELPER_FactorClass.initialise (dummyFactorClass));
dummyNotes = (String)(HELPER_Notes.initialise (dummyNotes)); dummyNotes = (String)(HELPER_Notes.initialise (dummyNotes));
dummyLeftAnnot = (String)(HELPER_LeftAnnot.initialise (dummyLeftAnnot)); dummyLeftAnnot = (String)(HELPER_LeftAnnot.initialise (dummyLeftAnnot));
dummyRightAnnot = (String)(HELPER_RightAnnot.initialise (dummyRightAnnot)); dummyRightAnnot = (String)(HELPER_RightAnnot.initialise (dummyRightAnnot));
...@@ -107,7 +108,7 @@ public class FactorLevelLinkPersistenceMgr extends ObjectPersistenceMgr ...@@ -107,7 +108,7 @@ public class FactorLevelLinkPersistenceMgr extends ObjectPersistenceMgr
// Check for persistent sets already prefetched // Check for persistent sets already prefetched
if (false || !tl_factor_hdrPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) || if (false || !tl_factor_hdrPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!tl_factor_hdrPSet.containsAttrib(FactorLevelLink.FIELD_ClassCode)|| !tl_factor_hdrPSet.containsAttrib(FactorLevelLink.FIELD_FactorClass)||
!tl_factor_hdrPSet.containsAttrib(FactorLevelLink.FIELD_Notes)|| !tl_factor_hdrPSet.containsAttrib(FactorLevelLink.FIELD_Notes)||
!tl_factor_hdrPSet.containsAttrib(FactorLevelLink.FIELD_LeftAnnot)|| !tl_factor_hdrPSet.containsAttrib(FactorLevelLink.FIELD_LeftAnnot)||
!tl_factor_hdrPSet.containsAttrib(FactorLevelLink.FIELD_RightAnnot)|| !tl_factor_hdrPSet.containsAttrib(FactorLevelLink.FIELD_RightAnnot)||
...@@ -207,7 +208,7 @@ public class FactorLevelLinkPersistenceMgr extends ObjectPersistenceMgr ...@@ -207,7 +208,7 @@ public class FactorLevelLinkPersistenceMgr extends ObjectPersistenceMgr
"SET class_code = ?, factor_hdr_notes = ?, left_annot = ?, right_annot = ?, z_score_wght = ?, z_score_wght_2 = ?, level_number = ? , factor_number = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " + "SET class_code = ?, factor_hdr_notes = ?, left_annot = ?, right_annot = ?, z_score_wght = ?, z_score_wght_2 = ?, level_number = ? , factor_number = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_factor_hdr.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ", "WHERE tl_factor_hdr.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_ClassCode.getForSQL(dummyClassCode, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_ClassCode))).listEntry (HELPER_Notes.getForSQL(dummyNotes, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_Notes))).listEntry (HELPER_LeftAnnot.getForSQL(dummyLeftAnnot, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_LeftAnnot))).listEntry (HELPER_RightAnnot.getForSQL(dummyRightAnnot, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_RightAnnot))).listEntry (HELPER_ZScoreWeight.getForSQL(dummyZScoreWeight, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_ZScoreWeight))).listEntry (HELPER_ZScoreWeight2.getForSQL(dummyZScoreWeight2, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_ZScoreWeight2))).listEntry (SQLManager.CheckNull((Long)(tl_factor_hdrPSet.getAttrib (FactorLevelLink.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_factor_hdrPSet.getAttrib (FactorLevelLink.SINGLEREFERENCE_Factor)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray()); CollectionUtils.listEntry (HELPER_FactorClass.getForSQL(dummyFactorClass, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_FactorClass))).listEntry (HELPER_Notes.getForSQL(dummyNotes, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_Notes))).listEntry (HELPER_LeftAnnot.getForSQL(dummyLeftAnnot, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_LeftAnnot))).listEntry (HELPER_RightAnnot.getForSQL(dummyRightAnnot, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_RightAnnot))).listEntry (HELPER_ZScoreWeight.getForSQL(dummyZScoreWeight, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_ZScoreWeight))).listEntry (HELPER_ZScoreWeight2.getForSQL(dummyZScoreWeight2, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_ZScoreWeight2))).listEntry (SQLManager.CheckNull((Long)(tl_factor_hdrPSet.getAttrib (FactorLevelLink.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_factor_hdrPSet.getAttrib (FactorLevelLink.SINGLEREFERENCE_Factor)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1) if (rowsUpdated != 1)
{ {
...@@ -463,7 +464,7 @@ public class FactorLevelLinkPersistenceMgr extends ObjectPersistenceMgr ...@@ -463,7 +464,7 @@ public class FactorLevelLinkPersistenceMgr extends ObjectPersistenceMgr
// Object Created // Object Created
tl_factor_hdrPSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE")); tl_factor_hdrPSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE"));
tl_factor_hdrPSet.setAttrib(FactorLevelLink.FIELD_ClassCode, HELPER_ClassCode.getFromRS(dummyClassCode, r, "class_code")); tl_factor_hdrPSet.setAttrib(FactorLevelLink.FIELD_FactorClass, HELPER_FactorClass.getFromRS(dummyFactorClass, r, "class_code"));
tl_factor_hdrPSet.setAttrib(FactorLevelLink.FIELD_Notes, HELPER_Notes.getFromRS(dummyNotes, r, "factor_hdr_notes")); tl_factor_hdrPSet.setAttrib(FactorLevelLink.FIELD_Notes, HELPER_Notes.getFromRS(dummyNotes, r, "factor_hdr_notes"));
tl_factor_hdrPSet.setAttrib(FactorLevelLink.FIELD_LeftAnnot, HELPER_LeftAnnot.getFromRS(dummyLeftAnnot, r, "left_annot")); tl_factor_hdrPSet.setAttrib(FactorLevelLink.FIELD_LeftAnnot, HELPER_LeftAnnot.getFromRS(dummyLeftAnnot, r, "left_annot"));
tl_factor_hdrPSet.setAttrib(FactorLevelLink.FIELD_RightAnnot, HELPER_RightAnnot.getFromRS(dummyRightAnnot, r, "right_annot")); tl_factor_hdrPSet.setAttrib(FactorLevelLink.FIELD_RightAnnot, HELPER_RightAnnot.getFromRS(dummyRightAnnot, r, "right_annot"));
...@@ -491,7 +492,7 @@ public class FactorLevelLinkPersistenceMgr extends ObjectPersistenceMgr ...@@ -491,7 +492,7 @@ public class FactorLevelLinkPersistenceMgr extends ObjectPersistenceMgr
" (class_code, factor_hdr_notes, left_annot, right_annot, z_score_wght, z_score_wght_2, level_number, factor_number, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " + " (class_code, factor_hdr_notes, left_annot, right_annot, z_score_wght, z_score_wght_2, level_number, factor_number, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " + "VALUES " +
" (?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")", " (?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_ClassCode.getForSQL(dummyClassCode, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_ClassCode))).listEntry (HELPER_Notes.getForSQL(dummyNotes, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_Notes))).listEntry (HELPER_LeftAnnot.getForSQL(dummyLeftAnnot, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_LeftAnnot))).listEntry (HELPER_RightAnnot.getForSQL(dummyRightAnnot, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_RightAnnot))).listEntry (HELPER_ZScoreWeight.getForSQL(dummyZScoreWeight, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_ZScoreWeight))).listEntry (HELPER_ZScoreWeight2.getForSQL(dummyZScoreWeight2, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_ZScoreWeight2))) .listEntry (SQLManager.CheckNull((Long)(tl_factor_hdrPSet.getAttrib (FactorLevelLink.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_factor_hdrPSet.getAttrib (FactorLevelLink.SINGLEREFERENCE_Factor)))) .listEntry (objectID.longID ()).toList().toArray()); CollectionUtils.listEntry (HELPER_FactorClass.getForSQL(dummyFactorClass, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_FactorClass))).listEntry (HELPER_Notes.getForSQL(dummyNotes, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_Notes))).listEntry (HELPER_LeftAnnot.getForSQL(dummyLeftAnnot, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_LeftAnnot))).listEntry (HELPER_RightAnnot.getForSQL(dummyRightAnnot, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_RightAnnot))).listEntry (HELPER_ZScoreWeight.getForSQL(dummyZScoreWeight, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_ZScoreWeight))).listEntry (HELPER_ZScoreWeight2.getForSQL(dummyZScoreWeight2, tl_factor_hdrPSet.getAttrib (FactorLevelLink.FIELD_ZScoreWeight2))) .listEntry (SQLManager.CheckNull((Long)(tl_factor_hdrPSet.getAttrib (FactorLevelLink.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_factor_hdrPSet.getAttrib (FactorLevelLink.SINGLEREFERENCE_Factor)))) .listEntry (objectID.longID ()).toList().toArray());
tl_factor_hdrPSet.setStatus (PersistentSetStatus.PROCESSED); tl_factor_hdrPSet.setStatus (PersistentSetStatus.PROCESSED);
} }
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
<SINGLEREFERENCE name="Factor" type="Factor" dbcol="factor_number"/> <SINGLEREFERENCE name="Factor" type="Factor" dbcol="factor_number"/>
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_number"/> <SINGLEREFERENCE name="Level" type="Level" dbcol="level_number"/>
<SINGLEREFERENCE name="Narrative" type="Narrative" dbcol="narrative_id" backreferenceName="FactorScores"/> <SINGLEREFERENCE name="Narrative" type="Narrative" dbcol="narrative_id" backreferenceName="FactorScores"/>
<SINGLEREFERENCE name="Candidate" type="Candidate" dbcol="candidate_id" backreferenceName="FactorScores"/>
</TABLE> </TABLE>
......
...@@ -48,7 +48,7 @@ public class FactorScorePersistenceMgr extends ObjectPersistenceMgr ...@@ -48,7 +48,7 @@ public class FactorScorePersistenceMgr extends ObjectPersistenceMgr
} }
private String SELECT_COLUMNS = "{PREFIX}tl_score.object_id as id, {PREFIX}tl_score.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_score.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_score.score_number, {PREFIX}tl_score.color_rank, {PREFIX}tl_score.wghtd_score, {PREFIX}tl_score.test_analysis_id, {PREFIX}tl_score.factor_number, {PREFIX}tl_score.level_number, {PREFIX}tl_score.narrative_id, {PREFIX}tl_score.candidate_id, 1 AS commasafe "; private String SELECT_COLUMNS = "{PREFIX}tl_score.object_id as id, {PREFIX}tl_score.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_score.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_score.score_number, {PREFIX}tl_score.color_rank, {PREFIX}tl_score.wghtd_score, {PREFIX}tl_score.test_analysis_id, {PREFIX}tl_score.factor_number, {PREFIX}tl_score.level_number, {PREFIX}tl_score.narrative_id, 1 AS commasafe ";
private String SELECT_JOINS = ""; private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
...@@ -105,8 +105,7 @@ public class FactorScorePersistenceMgr extends ObjectPersistenceMgr ...@@ -105,8 +105,7 @@ public class FactorScorePersistenceMgr extends ObjectPersistenceMgr
!tl_scorePSet.containsAttrib(FactorScore.SINGLEREFERENCE_TestAnalysis)|| !tl_scorePSet.containsAttrib(FactorScore.SINGLEREFERENCE_TestAnalysis)||
!tl_scorePSet.containsAttrib(FactorScore.SINGLEREFERENCE_Factor)|| !tl_scorePSet.containsAttrib(FactorScore.SINGLEREFERENCE_Factor)||
!tl_scorePSet.containsAttrib(FactorScore.SINGLEREFERENCE_Level)|| !tl_scorePSet.containsAttrib(FactorScore.SINGLEREFERENCE_Level)||
!tl_scorePSet.containsAttrib(FactorScore.SINGLEREFERENCE_Narrative)|| !tl_scorePSet.containsAttrib(FactorScore.SINGLEREFERENCE_Narrative))
!tl_scorePSet.containsAttrib(FactorScore.SINGLEREFERENCE_Candidate))
{ {
// We will need to retrieve it // We will need to retrieve it
idsToFetch.add (id.longValue()); idsToFetch.add (id.longValue());
...@@ -172,16 +171,6 @@ public class FactorScorePersistenceMgr extends ObjectPersistenceMgr ...@@ -172,16 +171,6 @@ public class FactorScorePersistenceMgr extends ObjectPersistenceMgr
return results; return results;
} }
else if (refName.equals (FactorScore.SINGLEREFERENCE_Candidate))
{
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_score " +
"WHERE " + SELECT_JOINS + "candidate_id = ?";
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, new Object[] { _objectID.longID () }, null, false);
return results;
}
else else
{ {
throw new IllegalArgumentException ("Illegal reference type:" + refName); throw new IllegalArgumentException ("Illegal reference type:" + refName);
...@@ -206,10 +195,10 @@ public class FactorScorePersistenceMgr extends ObjectPersistenceMgr ...@@ -206,10 +195,10 @@ public class FactorScorePersistenceMgr extends ObjectPersistenceMgr
{ {
int rowsUpdated = executeStatement (sqlMgr, int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_score " + "UPDATE {PREFIX}tl_score " +
"SET score_number = ?, color_rank = ?, wghtd_score = ?, test_analysis_id = ? , factor_number = ? , level_number = ? , narrative_id = ? , candidate_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " + "SET score_number = ?, color_rank = ?, wghtd_score = ?, test_analysis_id = ? , factor_number = ? , level_number = ? , narrative_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_score.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ", "WHERE tl_score.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_Score.getForSQL(dummyScore, tl_scorePSet.getAttrib (FactorScore.FIELD_Score))).listEntry (HELPER_ColorRank.getForSQL(dummyColorRank, tl_scorePSet.getAttrib (FactorScore.FIELD_ColorRank))).listEntry (HELPER_WghtdScore.getForSQL(dummyWghtdScore, tl_scorePSet.getAttrib (FactorScore.FIELD_WghtdScore))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_TestAnalysis)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Factor)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Narrative)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Candidate)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray()); CollectionUtils.listEntry (HELPER_Score.getForSQL(dummyScore, tl_scorePSet.getAttrib (FactorScore.FIELD_Score))).listEntry (HELPER_ColorRank.getForSQL(dummyColorRank, tl_scorePSet.getAttrib (FactorScore.FIELD_ColorRank))).listEntry (HELPER_WghtdScore.getForSQL(dummyWghtdScore, tl_scorePSet.getAttrib (FactorScore.FIELD_WghtdScore))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_TestAnalysis)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Factor)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Narrative)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1) if (rowsUpdated != 1)
{ {
...@@ -473,7 +462,6 @@ public class FactorScorePersistenceMgr extends ObjectPersistenceMgr ...@@ -473,7 +462,6 @@ public class FactorScorePersistenceMgr extends ObjectPersistenceMgr
tl_scorePSet.setAttrib(FactorScore.SINGLEREFERENCE_Factor, r.getObject ("factor_number")); tl_scorePSet.setAttrib(FactorScore.SINGLEREFERENCE_Factor, r.getObject ("factor_number"));
tl_scorePSet.setAttrib(FactorScore.SINGLEREFERENCE_Level, r.getObject ("level_number")); tl_scorePSet.setAttrib(FactorScore.SINGLEREFERENCE_Level, r.getObject ("level_number"));
tl_scorePSet.setAttrib(FactorScore.SINGLEREFERENCE_Narrative, r.getObject ("narrative_id")); tl_scorePSet.setAttrib(FactorScore.SINGLEREFERENCE_Narrative, r.getObject ("narrative_id"));
tl_scorePSet.setAttrib(FactorScore.SINGLEREFERENCE_Candidate, r.getObject ("candidate_id"));
} }
...@@ -490,10 +478,10 @@ public class FactorScorePersistenceMgr extends ObjectPersistenceMgr ...@@ -490,10 +478,10 @@ public class FactorScorePersistenceMgr extends ObjectPersistenceMgr
{ {
executeStatement (sqlMgr, executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_score " + "INSERT INTO {PREFIX}tl_score " +
" (score_number, color_rank, wghtd_score, test_analysis_id, factor_number, level_number, narrative_id, candidate_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " + " (score_number, color_rank, wghtd_score, test_analysis_id, factor_number, level_number, narrative_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " + "VALUES " +
" (?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")", " (?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_Score.getForSQL(dummyScore, tl_scorePSet.getAttrib (FactorScore.FIELD_Score))).listEntry (HELPER_ColorRank.getForSQL(dummyColorRank, tl_scorePSet.getAttrib (FactorScore.FIELD_ColorRank))).listEntry (HELPER_WghtdScore.getForSQL(dummyWghtdScore, tl_scorePSet.getAttrib (FactorScore.FIELD_WghtdScore))) .listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_TestAnalysis)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Factor)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Narrative)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Candidate)))) .listEntry (objectID.longID ()).toList().toArray()); CollectionUtils.listEntry (HELPER_Score.getForSQL(dummyScore, tl_scorePSet.getAttrib (FactorScore.FIELD_Score))).listEntry (HELPER_ColorRank.getForSQL(dummyColorRank, tl_scorePSet.getAttrib (FactorScore.FIELD_ColorRank))).listEntry (HELPER_WghtdScore.getForSQL(dummyWghtdScore, tl_scorePSet.getAttrib (FactorScore.FIELD_WghtdScore))) .listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_TestAnalysis)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Factor)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_scorePSet.getAttrib (FactorScore.SINGLEREFERENCE_Narrative)))) .listEntry (objectID.longID ()).toList().toArray());
tl_scorePSet.setStatus (PersistentSetStatus.PROCESSED); tl_scorePSet.setStatus (PersistentSetStatus.PROCESSED);
} }
......
...@@ -12,9 +12,7 @@ import oneit.utils.ObjectTransform; ...@@ -12,9 +12,7 @@ import oneit.utils.ObjectTransform;
import oneit.utils.filter.CollectionFilter; import oneit.utils.filter.CollectionFilter;
import oneit.utils.filter.Filter; import oneit.utils.filter.Filter;
import oneit.utils.parsers.FieldException; import oneit.utils.parsers.FieldException;
import performa.orm.types.AppProcessOption; import performa.orm.types.*;
import performa.orm.types.ApplicationStatus;
import performa.orm.types.CriteriaType;
import performa.utils.AnalysisEngine; import performa.utils.AnalysisEngine;
...@@ -262,9 +260,9 @@ public class JobApplication extends BaseJobApplication ...@@ -262,9 +260,9 @@ public class JobApplication extends BaseJobApplication
} }
public int getJobMatchPercentage() //ROLE public Double getJobMatchPercentage() //ROLE
{ {
return 85; return AnalysisEngine.getRoleFitSuitability(getCandidate(), getJob().getLevel()).get(null);
} }
...@@ -359,4 +357,24 @@ public class JobApplication extends BaseJobApplication ...@@ -359,4 +357,24 @@ public class JobApplication extends BaseJobApplication
return null; return null;
} }
public Set<Answer> getCompletedAnswers()
{
return getAlreadyCompletedApplicationForRole() != null ? getAlreadyCompletedApplicationForRole().getProfileAssessmentAnswersSet() : getProfileAssessmentAnswersSet();
}
public Set<FactorClass> getSortedFactorClasses()
{
Set<FactorClass> factorClasses = new LinkedHashSet<>();
Set<FactorClass> levelFactorClasses = pipelineJobApplication().toJob().toLevel().toLevelClassCriterias().toFactorClass().uniqueVals();
for(FactorClass factorClass : FactorClass.getFactorClassArray()) //getFactorClassArray returns Factor Classes sorted by SortOrder
{
if(levelFactorClasses.contains(factorClass))
{
factorClasses.add(factorClass);
}
}
return factorClasses;
}
} }
\ No newline at end of file
package performa.orm; package performa.orm;
import java.util.*;
import oneit.objstore.rdbms.filters.EqualsFilter;
import oneit.objstore.utils.ObjstoreUtils;
import oneit.utils.*;
import oneit.utils.filter.*;
import performa.orm.types.FactorClass;
public class Level extends BaseLevel public class Level extends BaseLevel
{ {
...@@ -22,4 +29,43 @@ public class Level extends BaseLevel ...@@ -22,4 +29,43 @@ public class Level extends BaseLevel
{ {
return getLevelDescription(); return getLevelDescription();
} }
public LevelFactorType getLevelFactorType(Factor factor)
{
Filter<LevelFactorType> levelFactorFilter = LevelFactorType.SearchByAll().andFactor(new EqualsFilter(factor));
return pipelineLevel().toLevelFactorTypes(levelFactorFilter).val();
}
public ClassNormalisation getClassNormalisationFor(FactorClass factorClass)
{
Filter<ClassNormalisation> classNormalisationFilter = ClassNormalisation.SearchByAll().andFactorClass(new EqualsFilter(factorClass));
return pipelineLevel().toClassNormalisations(classNormalisationFilter).val();
}
public LevelNormalisation getLevelNormalisation()
{
return pipelineLevel().toLevelNormalisations().val();
}
public List<FactorLevelLink> getSortedFactorLinks(FactorClass factorClass)
{
Filter<FactorLevelLink> factorLevelLinkFilter = FactorLevelLink.SearchByAll().andFactorClass(new EqualsFilter(factorClass));
List<FactorLevelLink> factorLevelLinksForClass= (List<FactorLevelLink>) CollectionFilter.filter(getFactorsSet(), factorLevelLinkFilter);
return ObjstoreUtils.sort(factorLevelLinksForClass,
new ObjectTransform[]{FactorLevelLink.pipesFactorLevelLink().toFactor().toObjectID()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR});
}
public List<FactorScoreResult> getSortedFactorScoreResults(Factor factor)
{
Filter<FactorScoreResult> factorScoreResultFilter = FactorScoreResult.SearchByAll().andFactor(new EqualsFilter(factor));
List<FactorScoreResult> factorScoreResultsForClass= (List<FactorScoreResult>) CollectionFilter.filter(getResultsSet(), factorScoreResultFilter);
return ObjstoreUtils.sort(factorScoreResultsForClass,
new ObjectTransform[]{FactorScoreResult.pipesFactorScoreResult().toFromScore()},
new Comparator[]{CollectionUtils.DEFAULT_COMPARATOR});
}
} }
\ No newline at end of file
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
<MULTIPLEREFERENCE name="Narratives" type="Narrative" backreferenceName="Level" /> <MULTIPLEREFERENCE name="Narratives" type="Narrative" backreferenceName="Level" />
<MULTIPLEREFERENCE name="TestAnalysises" type="TestAnalysis" backreferenceName="Level" /> <MULTIPLEREFERENCE name="TestAnalysises" type="TestAnalysis" backreferenceName="Level" />
<MULTIPLEREFERENCE name="LevelFactorTypes" type="LevelFactorType" backreferenceName="Level" /> <MULTIPLEREFERENCE name="LevelFactorTypes" type="LevelFactorType" backreferenceName="Level" />
<MULTIPLEREFERENCE name="LevelClassCriterias" type="LevelClassCriteria" backreferenceName="Level" />
<MULTIPLEREFERENCE name="LevelNormalisations" type="LevelNormalisation" backreferenceName="Level" />
<MULTIPLEREFERENCE name="ClassNormalisations" type="ClassNormalisation" backreferenceName="Level" />
<TABLE name="tl_level" tablePrefix="object" polymorphic="FALSE"> <TABLE name="tl_level" tablePrefix="object" polymorphic="FALSE">
......
package performa.orm;
public class LevelClassCriteria extends BaseLevelClassCriteria
{
private static final long serialVersionUID = 0L;
// This constructor should not be called
public LevelClassCriteria ()
{
// Do not add any code to this, always put it in initialiseNewObject
}
@Override
public String getObjectIDSpace()
{
return "LevelClassCriteria";
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://www.oneit.com.au/schemas/5.2/BusinessObject.xsd'>
<BUSINESSCLASS name="LevelClassCriteria" package="performa.orm">
<IMPORT value="performa.orm.types.*"/>
<TABLE name="tl_level_class_criteria" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="Importance" type="Importance" dbcol="weighting" attribHelper="EnumeratedAttributeHelper" mandatory="true"/>
<ATTRIB name="FactorClass" type="FactorClass" dbcol="class_code" attribHelper="EnumeratedAttributeHelper" mandatory="true"/>
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_number" backreferenceName="LevelClassCriterias"/>
</TABLE>
<SEARCH type="All" paramFilter="tl_level_class_criteria.object_id is not null" orderBy="tl_level_class_criteria.object_id" />
</BUSINESSCLASS>
</ROOT>
\ No newline at end of file
package performa.orm;
import java.io.*;
import java.util.*;
import java.sql.ResultSet;
import java.sql.SQLException;
import oneit.logging.*;
import oneit.objstore.*;
import oneit.objstore.assocs.*;
import oneit.objstore.rdbms.*;
import oneit.objstore.utils.*;
import oneit.sql.*;
import oneit.utils.resource.*;
import oneit.utils.*;
import oneit.utils.threading.*;
import performa.orm.types.*;
/**
* IMPORTANT!!!! Autogenerated class, DO NOT EDIT!!!!!
* Template: Infrastructure8.2[oneit.objstore.PersistenceMgrTemplate.xsl]
*/
public class LevelClassCriteriaPersistenceMgr extends ObjectPersistenceMgr
{
private static final LoggingArea LevelClassCriteriaPersistence = LoggingArea.createLoggingArea(ObjectPersistenceMgr.OBJECT_PERSISTENCE, "LevelClassCriteria");
// Private attributes corresponding to business object data
private Importance dummyImportance;
private FactorClass dummyFactorClass;
// Static constants corresponding to attribute helpers
private static final EnumeratedAttributeHelper HELPER_Importance = new EnumeratedAttributeHelper (Importance.FACTORY_Importance);
private static final EnumeratedAttributeHelper HELPER_FactorClass = new EnumeratedAttributeHelper (FactorClass.FACTORY_FactorClass);
public LevelClassCriteriaPersistenceMgr ()
{
dummyImportance = (Importance)(HELPER_Importance.initialise (dummyImportance));
dummyFactorClass = (FactorClass)(HELPER_FactorClass.initialise (dummyFactorClass));
}
private String SELECT_COLUMNS = "{PREFIX}tl_level_class_criteria.object_id as id, {PREFIX}tl_level_class_criteria.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_level_class_criteria.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_level_class_criteria.weighting, {PREFIX}tl_level_class_criteria.class_code, {PREFIX}tl_level_class_criteria.level_number, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
Set<BaseBusinessClass> resultByIDs = fetchByIDs(Collections.singleton (id), allPSets, context, sqlMgr);
if (resultByIDs.isEmpty ())
{
return null;
}
else if (resultByIDs.size () > 1)
{
throw new StorageException ("Multiple results for id:" + id);
}
else
{
return resultByIDs.iterator ().next ();
}
}
public Set<BaseBusinessClass> fetchByIDs(Set<ObjectID> ids, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
Set<BaseBusinessClass> results = new HashSet ();
Set<Long> idsToFetch = new HashSet ();
for (ObjectID id : ids)
{
if (context.containsObject(id)) // Check for cached version
{
BaseBusinessClass objectToReturn = context.getObjectToReplace(id, LevelClassCriteria.REFERENCE_LevelClassCriteria);
if (objectToReturn instanceof LevelClassCriteria)
{
LogMgr.log (LevelClassCriteriaPersistence, LogLevel.TRACE, "Cache hit for id:", id);
results.add (objectToReturn);
}
else
{
throw new StorageException ("Cache collision for id:" + id + " with object " + objectToReturn + "while fetching a LevelClassCriteria");
}
}
PersistentSet tl_level_class_criteriaPSet = allPSets.getPersistentSet(id, "tl_level_class_criteria", PersistentSetStatus.FETCHED);
// Check for persistent sets already prefetched
if (false || !tl_level_class_criteriaPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!tl_level_class_criteriaPSet.containsAttrib(LevelClassCriteria.FIELD_Importance)||
!tl_level_class_criteriaPSet.containsAttrib(LevelClassCriteria.FIELD_FactorClass)||
!tl_level_class_criteriaPSet.containsAttrib(LevelClassCriteria.SINGLEREFERENCE_Level))
{
// We will need to retrieve it
idsToFetch.add (id.longValue());
}
else
{
LogMgr.log (LevelClassCriteriaPersistence, LogLevel.DEBUG2, "Persistent set preloaded id:", id);
/* Non Polymorphic */
LevelClassCriteria result = new LevelClassCriteria ();
result.setFromPersistentSets(id, allPSets);
context.addRetrievedObject(result);
results.add (result);
}
}
if (idsToFetch.size () > 0)
{
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_level_class_criteria " +
"WHERE " + SELECT_JOINS + "{PREFIX}tl_level_class_criteria.object_id IN ?";
BaseBusinessClass[] resultsFetched = loadQuery (allPSets, sqlMgr, context, query, new Object[] { idsToFetch }, null, false);
for (BaseBusinessClass objFetched : resultsFetched)
{
results.add (objFetched);
}
}
return results;
}
public BaseBusinessClass[] getReferencedObjects(ObjectID _objectID, String refName, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
if (false)
{
throw new RuntimeException ();
}
else if (refName.equals (LevelClassCriteria.SINGLEREFERENCE_Level))
{
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_level_class_criteria " +
"WHERE " + SELECT_JOINS + "level_number = ?";
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, new Object[] { _objectID.longID () }, null, false);
return results;
}
else
{
throw new IllegalArgumentException ("Illegal reference type:" + refName);
}
}
public void update(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, ConcurrentUpdateConflictException, StorageException
{
EqualityResult test = EqualityResult.compare (obj, obj.getBackup ());
ObjectID objectID = obj.getID ();
if (!test.areAttributesEqual () || !test.areSingleAssocsEqual () || obj.getForcedSave())
{
PersistentSet tl_level_class_criteriaPSet = allPSets.getPersistentSet(objectID, "tl_level_class_criteria");
if (tl_level_class_criteriaPSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_level_class_criteriaPSet.getStatus () != PersistentSetStatus.DEFERRED)
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_level_class_criteria " +
"SET weighting = ?, class_code = ?, level_number = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_level_class_criteria.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_Importance.getForSQL(dummyImportance, tl_level_class_criteriaPSet.getAttrib (LevelClassCriteria.FIELD_Importance))).listEntry (HELPER_FactorClass.getForSQL(dummyFactorClass, tl_level_class_criteriaPSet.getAttrib (LevelClassCriteria.FIELD_FactorClass))).listEntry (SQLManager.CheckNull((Long)(tl_level_class_criteriaPSet.getAttrib (LevelClassCriteria.SINGLEREFERENCE_Level)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
// Error, either a concurrency error or a not-exists error
ResultSet r = executeQuery (sqlMgr,
"SELECT object_id, object_LAST_UPDATED_DATE FROM {PREFIX}tl_level_class_criteria WHERE object_id = ?",
new Object[] { objectID.longID () });
if (r.next ())
{
Date d = new java.util.Date (r.getTimestamp (2).getTime());
String errorMsg = QueryBuilder.buildQueryString ("Concurrent update error:[?] for row:[?] objDate:[?] dbDate:[?]",
new Object[] { "tl_level_class_criteria", objectID.longID (), obj.getObjectLastModified (), d },
sqlMgr.getPortabilityServices ());
LogMgr.log (LevelClassCriteriaPersistence, LogLevel.BUSINESS1, errorMsg);
throw new ConcurrentUpdateConflictException (obj, "tl_level_class_criteria");
}
else
{
String errorMsg = "Attempt to update nonexistent row in table:tl_level_class_criteria for row:" + objectID + " objDate:" + obj.getObjectLastModified ();
LogMgr.log (LevelClassCriteriaPersistence, LogLevel.BUSINESS1, errorMsg);
throw new RuntimeException (errorMsg);
}
}
tl_level_class_criteriaPSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
else
{
LogMgr.log (LevelClassCriteriaPersistence, LogLevel.DEBUG1, "Skipping update since no attribs or simple assocs changed on ", objectID);
}
}
public void delete(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, ConcurrentUpdateConflictException, StorageException
{
ObjectID objectID = obj.getID ();
PersistentSet tl_level_class_criteriaPSet = allPSets.getPersistentSet(objectID, "tl_level_class_criteria");
LogMgr.log (LevelClassCriteriaPersistence, LogLevel.DEBUG2, "Deleting:", objectID);
if (tl_level_class_criteriaPSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_level_class_criteriaPSet.getStatus () != PersistentSetStatus.DEFERRED)
{
int rowsDeleted = executeStatement (sqlMgr,
"DELETE " +
"FROM {PREFIX}tl_level_class_criteria " +
"WHERE tl_level_class_criteria.object_id = ? AND " + sqlMgr.getPortabilityServices ().getTruncatedTimestampColumn ("object_LAST_UPDATED_DATE") + " = " + sqlMgr.getPortabilityServices ().getTruncatedTimestampParam("?") + " ",
new Object[] { objectID.longID(), obj.getObjectLastModified () });
if (rowsDeleted != 1)
{
// Error, either a concurrency error or a not-exists error
ResultSet r = executeQuery (sqlMgr,
"SELECT object_id FROM {PREFIX}tl_level_class_criteria WHERE object_id = ?",
new Object[] { objectID.longID() });
if (r.next ())
{
throw new ConcurrentUpdateConflictException (obj, "tl_level_class_criteria");
}
else
{
String errorMsg = "Attempt to delete nonexistent row in table:tl_level_class_criteria for row:" + objectID;
LogMgr.log (LevelClassCriteriaPersistence, LogLevel.SYSTEMERROR1, errorMsg);
throw new RuntimeException (errorMsg);
}
}
tl_level_class_criteriaPSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
public ResultSet executeSearchQueryAll (SQLManager sqlMgr) throws SQLException
{
throw new RuntimeException ("NOT implemented: executeSearchQueryAll");
}
public BaseBusinessClass[] loadQuery (PersistentSetCollection allPSets, SQLManager sqlMgr, RDBMSPersistenceContext context, String query, Object[] params, Integer maxRows, boolean truncateExtra) throws SQLException, StorageException
{
LinkedHashMap<ObjectID, LevelClassCriteria> results = new LinkedHashMap ();
ResultSet r = executeQuery (sqlMgr, query, params);
while (r.next())
{
ThreadUtils.checkInterrupted ();
ObjectID objectID = new ObjectID (LevelClassCriteria.REFERENCE_LevelClassCriteria.getObjectIDSpace (), r.getLong ("id"));
LevelClassCriteria resultElement;
if (maxRows != null && !results.containsKey (objectID) && results.size () >= maxRows)
{
if (truncateExtra)
{
break;
}
else
{
throw new SearchRowsExceededException ("Maximum rows exceeded:" + maxRows);
}
}
if (context.containsObject(objectID))
{
BaseBusinessClass cachedElement = context.getObjectToReplace(objectID, LevelClassCriteria.REFERENCE_LevelClassCriteria);
if (cachedElement instanceof LevelClassCriteria)
{
LogMgr.log (LevelClassCriteriaPersistence, LogLevel.TRACE, "Cache hit for id:", objectID);
resultElement = (LevelClassCriteria)cachedElement;
}
else
{
throw new StorageException ("Cache collision for id:" + objectID + " with object " + cachedElement + "while fetching a LevelClassCriteria");
}
}
else
{
PersistentSet tl_level_class_criteriaPSet = allPSets.getPersistentSet(objectID, "tl_level_class_criteria", PersistentSetStatus.FETCHED);
createPersistentSetFromRS(allPSets, r, objectID);
resultElement = new LevelClassCriteria ();
resultElement.setFromPersistentSets(objectID, allPSets);
context.addRetrievedObject(resultElement);
}
results.put (objectID, resultElement);
}
BaseBusinessClass[] resultsArr = new BaseBusinessClass[results.size ()];
return results.values ().toArray (resultsArr);
}
public BaseBusinessClass[] find(String searchType, PersistentSetCollection allPSets, Hashtable criteria, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
LogMgr.log (LevelClassCriteriaPersistence, LogLevel.DEBUG2, "Search executing:", searchType, " criteria:", criteria);
String customParamFilter = (String)criteria.get (SEARCH_CustomFilter);
String customOrderBy = (String)criteria.get (SEARCH_OrderBy);
String customTables = (String)criteria.get (SEARCH_CustomExtraTables);
Boolean noCommaBeforeCustomExtraTables = (Boolean)criteria.get (SEARCH_CustomExtraTablesNoComma);
if (searchType.equals (SEARCH_CustomSQL))
{
Set<ObjectID> processedIDs = new HashSet();
SearchParamTransform tx = new SearchParamTransform (criteria);
Object[] searchParams;
customParamFilter = StringUtils.replaceParams (customParamFilter, tx);
searchParams = tx.getParamsArray();
if (customOrderBy != null)
{
customOrderBy = " ORDER BY " + customOrderBy;
}
else
{
customOrderBy = "";
}
ResultSet r;
String concatCustomTableWith = CollectionUtils.equals(noCommaBeforeCustomExtraTables, true) ? " " : ", ";
String tables = StringUtils.subBlanks(customTables) == null ? " " : concatCustomTableWith + customTables + " ";
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_level_class_criteria " + tables +
"WHERE " + SELECT_JOINS + " " + customParamFilter + customOrderBy;
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, searchParams, null, false);
return results;
}
else if (searchType.equals (LevelClassCriteria.SEARCH_All))
{
// Local scope for transformed variables
{
}
String orderBy = " ORDER BY tl_level_class_criteria.object_id";
String tables = " ";
Set<String> joinTableSet = new HashSet<String>();
String filter;
Object[] searchParams; // paramFilter: tl_level_class_criteria.object_id is not null
String preFilter = "(tl_level_class_criteria.object_id is not null)"
+ " ";
preFilter += context.getLoadingAttributes ().getCustomSQL() ;
SearchParamTransform tx = new SearchParamTransform (criteria);
filter = StringUtils.replaceParams (preFilter, tx);
searchParams = tx.getParamsArray();
Integer maxRows = context.getLoadingAttributes ().getMaxRows ();
boolean truncateExtra = !context.getLoadingAttributes ().isFailIfMaxExceeded();
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_level_class_criteria " + tables + tableSetToSQL(joinTableSet) +
"WHERE " + SELECT_JOINS + " " + filter + orderBy;
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, searchParams, maxRows, truncateExtra);
return results;
}
else
{
throw new IllegalArgumentException ("Illegal search type:" + searchType);
}
}
private void createPersistentSetFromRS(PersistentSetCollection allPSets, ResultSet r, ObjectID objectID) throws SQLException
{
PersistentSet tl_level_class_criteriaPSet = allPSets.getPersistentSet(objectID, "tl_level_class_criteria", PersistentSetStatus.FETCHED);
// Object Modified
tl_level_class_criteriaPSet.setAttrib(BaseBusinessClass.FIELD_ObjectLastModified, r.getTimestamp ("LAST_UPDATED_DATE"));
// Object Created
tl_level_class_criteriaPSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE"));
tl_level_class_criteriaPSet.setAttrib(LevelClassCriteria.FIELD_Importance, HELPER_Importance.getFromRS(dummyImportance, r, "weighting"));
tl_level_class_criteriaPSet.setAttrib(LevelClassCriteria.FIELD_FactorClass, HELPER_FactorClass.getFromRS(dummyFactorClass, r, "class_code"));
tl_level_class_criteriaPSet.setAttrib(LevelClassCriteria.SINGLEREFERENCE_Level, r.getObject ("level_number"));
}
public void create(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
ObjectID objectID = obj.getID ();
PersistentSet tl_level_class_criteriaPSet = allPSets.getPersistentSet(objectID, "tl_level_class_criteria");
if (tl_level_class_criteriaPSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_level_class_criteriaPSet.getStatus () != PersistentSetStatus.DEFERRED)
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_level_class_criteria " +
" (weighting, class_code, level_number, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" (?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_Importance.getForSQL(dummyImportance, tl_level_class_criteriaPSet.getAttrib (LevelClassCriteria.FIELD_Importance))).listEntry (HELPER_FactorClass.getForSQL(dummyFactorClass, tl_level_class_criteriaPSet.getAttrib (LevelClassCriteria.FIELD_FactorClass))) .listEntry (SQLManager.CheckNull((Long)(tl_level_class_criteriaPSet.getAttrib (LevelClassCriteria.SINGLEREFERENCE_Level)))) .listEntry (objectID.longID ()).toList().toArray());
tl_level_class_criteriaPSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
}
package performa.orm;
public class LevelNormalisation extends BaseLevelNormalisation
{
private static final long serialVersionUID = 0L;
// This constructor should not be called
public LevelNormalisation ()
{
// Do not add any code to this, always put it in initialiseNewObject
}
@Override
public String getObjectIDSpace()
{
return "LevelNormalisation";
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://www.oneit.com.au/schemas/5.2/BusinessObject.xsd'>
<BUSINESSCLASS name="LevelNormalisation" package="performa.orm">
<IMPORT value="performa.orm.types.*"/>
<TABLE name="tl_level_norm" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="MeanScore" type="Double" dbcol="mean_score"/>
<ATTRIB name="MaxScore" type="Double" dbcol="max_score"/>
<ATTRIB name="MinScore" type="Double" dbcol="min_score"/>
<ATTRIB name="StddevScore" type="Double" dbcol="stddev_score"/>
<ATTRIB name="LeftMeanScore" type="Double" dbcol="left_mean_score"/>
<ATTRIB name="RightMeanScore" type="Double" dbcol="right_mean_score"/>
<ATTRIB name="WghtMeanScore" type="Double" dbcol="wght_mean_score"/>
<ATTRIB name="WghtStddevScore" type="Double" dbcol="wght_stddev_score"/>
<ATTRIB name="WghtLeftMeanScore" type="Double" dbcol="wght_left_mean_score"/>
<ATTRIB name="WghtRightMeanScore" type="Double" dbcol="wght_right_mean_score"/>
<ATTRIB name="MeanWghtZScore" type="Double" dbcol="mean_wght_z_score"/>
<ATTRIB name="MeanWghtZScores" type="Double" dbcol="mean_wght_z_score_2"/>
<ATTRIB name="StdDevWghtZScore" type="Double" dbcol="stddev_wght_z_score"/>
<ATTRIB name="StdDevWghtZScore2" type="Double" dbcol="stddev_wght_z_score_2"/>
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_number" backreferenceName="LevelNormalisations"/>
</TABLE>
<SEARCH type="All" paramFilter="tl_level_norm.object_id is not null" orderBy="tl_level_norm.object_id" />
</BUSINESSCLASS>
</ROOT>
\ No newline at end of file
package performa.orm;
import java.io.*;
import java.util.*;
import java.sql.ResultSet;
import java.sql.SQLException;
import oneit.logging.*;
import oneit.objstore.*;
import oneit.objstore.assocs.*;
import oneit.objstore.rdbms.*;
import oneit.objstore.utils.*;
import oneit.sql.*;
import oneit.utils.resource.*;
import oneit.utils.*;
import oneit.utils.threading.*;
import performa.orm.types.*;
/**
* IMPORTANT!!!! Autogenerated class, DO NOT EDIT!!!!!
* Template: Infrastructure8.2[oneit.objstore.PersistenceMgrTemplate.xsl]
*/
public class LevelNormalisationPersistenceMgr extends ObjectPersistenceMgr
{
private static final LoggingArea LevelNormalisationPersistence = LoggingArea.createLoggingArea(ObjectPersistenceMgr.OBJECT_PERSISTENCE, "LevelNormalisation");
// Private attributes corresponding to business object data
private Double dummyMeanScore;
private Double dummyMaxScore;
private Double dummyMinScore;
private Double dummyStddevScore;
private Double dummyLeftMeanScore;
private Double dummyRightMeanScore;
private Double dummyWghtMeanScore;
private Double dummyWghtStddevScore;
private Double dummyWghtLeftMeanScore;
private Double dummyWghtRightMeanScore;
private Double dummyMeanWghtZScore;
private Double dummyMeanWghtZScores;
private Double dummyStdDevWghtZScore;
private Double dummyStdDevWghtZScore2;
// Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper HELPER_MeanScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_MaxScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_MinScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_StddevScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_LeftMeanScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_RightMeanScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_WghtMeanScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_WghtStddevScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_WghtLeftMeanScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_WghtRightMeanScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_MeanWghtZScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_MeanWghtZScores = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_StdDevWghtZScore = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_StdDevWghtZScore2 = DefaultAttributeHelper.INSTANCE;
public LevelNormalisationPersistenceMgr ()
{
dummyMeanScore = (Double)(HELPER_MeanScore.initialise (dummyMeanScore));
dummyMaxScore = (Double)(HELPER_MaxScore.initialise (dummyMaxScore));
dummyMinScore = (Double)(HELPER_MinScore.initialise (dummyMinScore));
dummyStddevScore = (Double)(HELPER_StddevScore.initialise (dummyStddevScore));
dummyLeftMeanScore = (Double)(HELPER_LeftMeanScore.initialise (dummyLeftMeanScore));
dummyRightMeanScore = (Double)(HELPER_RightMeanScore.initialise (dummyRightMeanScore));
dummyWghtMeanScore = (Double)(HELPER_WghtMeanScore.initialise (dummyWghtMeanScore));
dummyWghtStddevScore = (Double)(HELPER_WghtStddevScore.initialise (dummyWghtStddevScore));
dummyWghtLeftMeanScore = (Double)(HELPER_WghtLeftMeanScore.initialise (dummyWghtLeftMeanScore));
dummyWghtRightMeanScore = (Double)(HELPER_WghtRightMeanScore.initialise (dummyWghtRightMeanScore));
dummyMeanWghtZScore = (Double)(HELPER_MeanWghtZScore.initialise (dummyMeanWghtZScore));
dummyMeanWghtZScores = (Double)(HELPER_MeanWghtZScores.initialise (dummyMeanWghtZScores));
dummyStdDevWghtZScore = (Double)(HELPER_StdDevWghtZScore.initialise (dummyStdDevWghtZScore));
dummyStdDevWghtZScore2 = (Double)(HELPER_StdDevWghtZScore2.initialise (dummyStdDevWghtZScore2));
}
private String SELECT_COLUMNS = "{PREFIX}tl_level_norm.object_id as id, {PREFIX}tl_level_norm.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_level_norm.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_level_norm.mean_score, {PREFIX}tl_level_norm.max_score, {PREFIX}tl_level_norm.min_score, {PREFIX}tl_level_norm.stddev_score, {PREFIX}tl_level_norm.left_mean_score, {PREFIX}tl_level_norm.right_mean_score, {PREFIX}tl_level_norm.wght_mean_score, {PREFIX}tl_level_norm.wght_stddev_score, {PREFIX}tl_level_norm.wght_left_mean_score, {PREFIX}tl_level_norm.wght_right_mean_score, {PREFIX}tl_level_norm.mean_wght_z_score, {PREFIX}tl_level_norm.mean_wght_z_score_2, {PREFIX}tl_level_norm.stddev_wght_z_score, {PREFIX}tl_level_norm.stddev_wght_z_score_2, {PREFIX}tl_level_norm.level_number, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
Set<BaseBusinessClass> resultByIDs = fetchByIDs(Collections.singleton (id), allPSets, context, sqlMgr);
if (resultByIDs.isEmpty ())
{
return null;
}
else if (resultByIDs.size () > 1)
{
throw new StorageException ("Multiple results for id:" + id);
}
else
{
return resultByIDs.iterator ().next ();
}
}
public Set<BaseBusinessClass> fetchByIDs(Set<ObjectID> ids, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
Set<BaseBusinessClass> results = new HashSet ();
Set<Long> idsToFetch = new HashSet ();
for (ObjectID id : ids)
{
if (context.containsObject(id)) // Check for cached version
{
BaseBusinessClass objectToReturn = context.getObjectToReplace(id, LevelNormalisation.REFERENCE_LevelNormalisation);
if (objectToReturn instanceof LevelNormalisation)
{
LogMgr.log (LevelNormalisationPersistence, LogLevel.TRACE, "Cache hit for id:", id);
results.add (objectToReturn);
}
else
{
throw new StorageException ("Cache collision for id:" + id + " with object " + objectToReturn + "while fetching a LevelNormalisation");
}
}
PersistentSet tl_level_normPSet = allPSets.getPersistentSet(id, "tl_level_norm", PersistentSetStatus.FETCHED);
// Check for persistent sets already prefetched
if (false || !tl_level_normPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!tl_level_normPSet.containsAttrib(LevelNormalisation.FIELD_MeanScore)||
!tl_level_normPSet.containsAttrib(LevelNormalisation.FIELD_MaxScore)||
!tl_level_normPSet.containsAttrib(LevelNormalisation.FIELD_MinScore)||
!tl_level_normPSet.containsAttrib(LevelNormalisation.FIELD_StddevScore)||
!tl_level_normPSet.containsAttrib(LevelNormalisation.FIELD_LeftMeanScore)||
!tl_level_normPSet.containsAttrib(LevelNormalisation.FIELD_RightMeanScore)||
!tl_level_normPSet.containsAttrib(LevelNormalisation.FIELD_WghtMeanScore)||
!tl_level_normPSet.containsAttrib(LevelNormalisation.FIELD_WghtStddevScore)||
!tl_level_normPSet.containsAttrib(LevelNormalisation.FIELD_WghtLeftMeanScore)||
!tl_level_normPSet.containsAttrib(LevelNormalisation.FIELD_WghtRightMeanScore)||
!tl_level_normPSet.containsAttrib(LevelNormalisation.FIELD_MeanWghtZScore)||
!tl_level_normPSet.containsAttrib(LevelNormalisation.FIELD_MeanWghtZScores)||
!tl_level_normPSet.containsAttrib(LevelNormalisation.FIELD_StdDevWghtZScore)||
!tl_level_normPSet.containsAttrib(LevelNormalisation.FIELD_StdDevWghtZScore2)||
!tl_level_normPSet.containsAttrib(LevelNormalisation.SINGLEREFERENCE_Level))
{
// We will need to retrieve it
idsToFetch.add (id.longValue());
}
else
{
LogMgr.log (LevelNormalisationPersistence, LogLevel.DEBUG2, "Persistent set preloaded id:", id);
/* Non Polymorphic */
LevelNormalisation result = new LevelNormalisation ();
result.setFromPersistentSets(id, allPSets);
context.addRetrievedObject(result);
results.add (result);
}
}
if (idsToFetch.size () > 0)
{
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_level_norm " +
"WHERE " + SELECT_JOINS + "{PREFIX}tl_level_norm.object_id IN ?";
BaseBusinessClass[] resultsFetched = loadQuery (allPSets, sqlMgr, context, query, new Object[] { idsToFetch }, null, false);
for (BaseBusinessClass objFetched : resultsFetched)
{
results.add (objFetched);
}
}
return results;
}
public BaseBusinessClass[] getReferencedObjects(ObjectID _objectID, String refName, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
if (false)
{
throw new RuntimeException ();
}
else if (refName.equals (LevelNormalisation.SINGLEREFERENCE_Level))
{
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_level_norm " +
"WHERE " + SELECT_JOINS + "level_number = ?";
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, new Object[] { _objectID.longID () }, null, false);
return results;
}
else
{
throw new IllegalArgumentException ("Illegal reference type:" + refName);
}
}
public void update(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, ConcurrentUpdateConflictException, StorageException
{
EqualityResult test = EqualityResult.compare (obj, obj.getBackup ());
ObjectID objectID = obj.getID ();
if (!test.areAttributesEqual () || !test.areSingleAssocsEqual () || obj.getForcedSave())
{
PersistentSet tl_level_normPSet = allPSets.getPersistentSet(objectID, "tl_level_norm");
if (tl_level_normPSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_level_normPSet.getStatus () != PersistentSetStatus.DEFERRED)
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_level_norm " +
"SET mean_score = ?, max_score = ?, min_score = ?, stddev_score = ?, left_mean_score = ?, right_mean_score = ?, wght_mean_score = ?, wght_stddev_score = ?, wght_left_mean_score = ?, wght_right_mean_score = ?, mean_wght_z_score = ?, mean_wght_z_score_2 = ?, stddev_wght_z_score = ?, stddev_wght_z_score_2 = ?, level_number = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_level_norm.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_MeanScore.getForSQL(dummyMeanScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_MeanScore))).listEntry (HELPER_MaxScore.getForSQL(dummyMaxScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_MaxScore))).listEntry (HELPER_MinScore.getForSQL(dummyMinScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_MinScore))).listEntry (HELPER_StddevScore.getForSQL(dummyStddevScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_StddevScore))).listEntry (HELPER_LeftMeanScore.getForSQL(dummyLeftMeanScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_LeftMeanScore))).listEntry (HELPER_RightMeanScore.getForSQL(dummyRightMeanScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_RightMeanScore))).listEntry (HELPER_WghtMeanScore.getForSQL(dummyWghtMeanScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_WghtMeanScore))).listEntry (HELPER_WghtStddevScore.getForSQL(dummyWghtStddevScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_WghtStddevScore))).listEntry (HELPER_WghtLeftMeanScore.getForSQL(dummyWghtLeftMeanScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_WghtLeftMeanScore))).listEntry (HELPER_WghtRightMeanScore.getForSQL(dummyWghtRightMeanScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_WghtRightMeanScore))).listEntry (HELPER_MeanWghtZScore.getForSQL(dummyMeanWghtZScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_MeanWghtZScore))).listEntry (HELPER_MeanWghtZScores.getForSQL(dummyMeanWghtZScores, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_MeanWghtZScores))).listEntry (HELPER_StdDevWghtZScore.getForSQL(dummyStdDevWghtZScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_StdDevWghtZScore))).listEntry (HELPER_StdDevWghtZScore2.getForSQL(dummyStdDevWghtZScore2, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_StdDevWghtZScore2))).listEntry (SQLManager.CheckNull((Long)(tl_level_normPSet.getAttrib (LevelNormalisation.SINGLEREFERENCE_Level)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
// Error, either a concurrency error or a not-exists error
ResultSet r = executeQuery (sqlMgr,
"SELECT object_id, object_LAST_UPDATED_DATE FROM {PREFIX}tl_level_norm WHERE object_id = ?",
new Object[] { objectID.longID () });
if (r.next ())
{
Date d = new java.util.Date (r.getTimestamp (2).getTime());
String errorMsg = QueryBuilder.buildQueryString ("Concurrent update error:[?] for row:[?] objDate:[?] dbDate:[?]",
new Object[] { "tl_level_norm", objectID.longID (), obj.getObjectLastModified (), d },
sqlMgr.getPortabilityServices ());
LogMgr.log (LevelNormalisationPersistence, LogLevel.BUSINESS1, errorMsg);
throw new ConcurrentUpdateConflictException (obj, "tl_level_norm");
}
else
{
String errorMsg = "Attempt to update nonexistent row in table:tl_level_norm for row:" + objectID + " objDate:" + obj.getObjectLastModified ();
LogMgr.log (LevelNormalisationPersistence, LogLevel.BUSINESS1, errorMsg);
throw new RuntimeException (errorMsg);
}
}
tl_level_normPSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
else
{
LogMgr.log (LevelNormalisationPersistence, LogLevel.DEBUG1, "Skipping update since no attribs or simple assocs changed on ", objectID);
}
}
public void delete(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, ConcurrentUpdateConflictException, StorageException
{
ObjectID objectID = obj.getID ();
PersistentSet tl_level_normPSet = allPSets.getPersistentSet(objectID, "tl_level_norm");
LogMgr.log (LevelNormalisationPersistence, LogLevel.DEBUG2, "Deleting:", objectID);
if (tl_level_normPSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_level_normPSet.getStatus () != PersistentSetStatus.DEFERRED)
{
int rowsDeleted = executeStatement (sqlMgr,
"DELETE " +
"FROM {PREFIX}tl_level_norm " +
"WHERE tl_level_norm.object_id = ? AND " + sqlMgr.getPortabilityServices ().getTruncatedTimestampColumn ("object_LAST_UPDATED_DATE") + " = " + sqlMgr.getPortabilityServices ().getTruncatedTimestampParam("?") + " ",
new Object[] { objectID.longID(), obj.getObjectLastModified () });
if (rowsDeleted != 1)
{
// Error, either a concurrency error or a not-exists error
ResultSet r = executeQuery (sqlMgr,
"SELECT object_id FROM {PREFIX}tl_level_norm WHERE object_id = ?",
new Object[] { objectID.longID() });
if (r.next ())
{
throw new ConcurrentUpdateConflictException (obj, "tl_level_norm");
}
else
{
String errorMsg = "Attempt to delete nonexistent row in table:tl_level_norm for row:" + objectID;
LogMgr.log (LevelNormalisationPersistence, LogLevel.SYSTEMERROR1, errorMsg);
throw new RuntimeException (errorMsg);
}
}
tl_level_normPSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
public ResultSet executeSearchQueryAll (SQLManager sqlMgr) throws SQLException
{
throw new RuntimeException ("NOT implemented: executeSearchQueryAll");
}
public BaseBusinessClass[] loadQuery (PersistentSetCollection allPSets, SQLManager sqlMgr, RDBMSPersistenceContext context, String query, Object[] params, Integer maxRows, boolean truncateExtra) throws SQLException, StorageException
{
LinkedHashMap<ObjectID, LevelNormalisation> results = new LinkedHashMap ();
ResultSet r = executeQuery (sqlMgr, query, params);
while (r.next())
{
ThreadUtils.checkInterrupted ();
ObjectID objectID = new ObjectID (LevelNormalisation.REFERENCE_LevelNormalisation.getObjectIDSpace (), r.getLong ("id"));
LevelNormalisation resultElement;
if (maxRows != null && !results.containsKey (objectID) && results.size () >= maxRows)
{
if (truncateExtra)
{
break;
}
else
{
throw new SearchRowsExceededException ("Maximum rows exceeded:" + maxRows);
}
}
if (context.containsObject(objectID))
{
BaseBusinessClass cachedElement = context.getObjectToReplace(objectID, LevelNormalisation.REFERENCE_LevelNormalisation);
if (cachedElement instanceof LevelNormalisation)
{
LogMgr.log (LevelNormalisationPersistence, LogLevel.TRACE, "Cache hit for id:", objectID);
resultElement = (LevelNormalisation)cachedElement;
}
else
{
throw new StorageException ("Cache collision for id:" + objectID + " with object " + cachedElement + "while fetching a LevelNormalisation");
}
}
else
{
PersistentSet tl_level_normPSet = allPSets.getPersistentSet(objectID, "tl_level_norm", PersistentSetStatus.FETCHED);
createPersistentSetFromRS(allPSets, r, objectID);
resultElement = new LevelNormalisation ();
resultElement.setFromPersistentSets(objectID, allPSets);
context.addRetrievedObject(resultElement);
}
results.put (objectID, resultElement);
}
BaseBusinessClass[] resultsArr = new BaseBusinessClass[results.size ()];
return results.values ().toArray (resultsArr);
}
public BaseBusinessClass[] find(String searchType, PersistentSetCollection allPSets, Hashtable criteria, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
LogMgr.log (LevelNormalisationPersistence, LogLevel.DEBUG2, "Search executing:", searchType, " criteria:", criteria);
String customParamFilter = (String)criteria.get (SEARCH_CustomFilter);
String customOrderBy = (String)criteria.get (SEARCH_OrderBy);
String customTables = (String)criteria.get (SEARCH_CustomExtraTables);
Boolean noCommaBeforeCustomExtraTables = (Boolean)criteria.get (SEARCH_CustomExtraTablesNoComma);
if (searchType.equals (SEARCH_CustomSQL))
{
Set<ObjectID> processedIDs = new HashSet();
SearchParamTransform tx = new SearchParamTransform (criteria);
Object[] searchParams;
customParamFilter = StringUtils.replaceParams (customParamFilter, tx);
searchParams = tx.getParamsArray();
if (customOrderBy != null)
{
customOrderBy = " ORDER BY " + customOrderBy;
}
else
{
customOrderBy = "";
}
ResultSet r;
String concatCustomTableWith = CollectionUtils.equals(noCommaBeforeCustomExtraTables, true) ? " " : ", ";
String tables = StringUtils.subBlanks(customTables) == null ? " " : concatCustomTableWith + customTables + " ";
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_level_norm " + tables +
"WHERE " + SELECT_JOINS + " " + customParamFilter + customOrderBy;
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, searchParams, null, false);
return results;
}
else if (searchType.equals (LevelNormalisation.SEARCH_All))
{
// Local scope for transformed variables
{
}
String orderBy = " ORDER BY tl_level_norm.object_id";
String tables = " ";
Set<String> joinTableSet = new HashSet<String>();
String filter;
Object[] searchParams; // paramFilter: tl_level_norm.object_id is not null
String preFilter = "(tl_level_norm.object_id is not null)"
+ " ";
preFilter += context.getLoadingAttributes ().getCustomSQL() ;
SearchParamTransform tx = new SearchParamTransform (criteria);
filter = StringUtils.replaceParams (preFilter, tx);
searchParams = tx.getParamsArray();
Integer maxRows = context.getLoadingAttributes ().getMaxRows ();
boolean truncateExtra = !context.getLoadingAttributes ().isFailIfMaxExceeded();
String query = "SELECT " + SELECT_COLUMNS +
"FROM {PREFIX}tl_level_norm " + tables + tableSetToSQL(joinTableSet) +
"WHERE " + SELECT_JOINS + " " + filter + orderBy;
BaseBusinessClass[] results = loadQuery (allPSets, sqlMgr, context, query, searchParams, maxRows, truncateExtra);
return results;
}
else
{
throw new IllegalArgumentException ("Illegal search type:" + searchType);
}
}
private void createPersistentSetFromRS(PersistentSetCollection allPSets, ResultSet r, ObjectID objectID) throws SQLException
{
PersistentSet tl_level_normPSet = allPSets.getPersistentSet(objectID, "tl_level_norm", PersistentSetStatus.FETCHED);
// Object Modified
tl_level_normPSet.setAttrib(BaseBusinessClass.FIELD_ObjectLastModified, r.getTimestamp ("LAST_UPDATED_DATE"));
// Object Created
tl_level_normPSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE"));
tl_level_normPSet.setAttrib(LevelNormalisation.FIELD_MeanScore, HELPER_MeanScore.getFromRS(dummyMeanScore, r, "mean_score"));
tl_level_normPSet.setAttrib(LevelNormalisation.FIELD_MaxScore, HELPER_MaxScore.getFromRS(dummyMaxScore, r, "max_score"));
tl_level_normPSet.setAttrib(LevelNormalisation.FIELD_MinScore, HELPER_MinScore.getFromRS(dummyMinScore, r, "min_score"));
tl_level_normPSet.setAttrib(LevelNormalisation.FIELD_StddevScore, HELPER_StddevScore.getFromRS(dummyStddevScore, r, "stddev_score"));
tl_level_normPSet.setAttrib(LevelNormalisation.FIELD_LeftMeanScore, HELPER_LeftMeanScore.getFromRS(dummyLeftMeanScore, r, "left_mean_score"));
tl_level_normPSet.setAttrib(LevelNormalisation.FIELD_RightMeanScore, HELPER_RightMeanScore.getFromRS(dummyRightMeanScore, r, "right_mean_score"));
tl_level_normPSet.setAttrib(LevelNormalisation.FIELD_WghtMeanScore, HELPER_WghtMeanScore.getFromRS(dummyWghtMeanScore, r, "wght_mean_score"));
tl_level_normPSet.setAttrib(LevelNormalisation.FIELD_WghtStddevScore, HELPER_WghtStddevScore.getFromRS(dummyWghtStddevScore, r, "wght_stddev_score"));
tl_level_normPSet.setAttrib(LevelNormalisation.FIELD_WghtLeftMeanScore, HELPER_WghtLeftMeanScore.getFromRS(dummyWghtLeftMeanScore, r, "wght_left_mean_score"));
tl_level_normPSet.setAttrib(LevelNormalisation.FIELD_WghtRightMeanScore, HELPER_WghtRightMeanScore.getFromRS(dummyWghtRightMeanScore, r, "wght_right_mean_score"));
tl_level_normPSet.setAttrib(LevelNormalisation.FIELD_MeanWghtZScore, HELPER_MeanWghtZScore.getFromRS(dummyMeanWghtZScore, r, "mean_wght_z_score"));
tl_level_normPSet.setAttrib(LevelNormalisation.FIELD_MeanWghtZScores, HELPER_MeanWghtZScores.getFromRS(dummyMeanWghtZScores, r, "mean_wght_z_score_2"));
tl_level_normPSet.setAttrib(LevelNormalisation.FIELD_StdDevWghtZScore, HELPER_StdDevWghtZScore.getFromRS(dummyStdDevWghtZScore, r, "stddev_wght_z_score"));
tl_level_normPSet.setAttrib(LevelNormalisation.FIELD_StdDevWghtZScore2, HELPER_StdDevWghtZScore2.getFromRS(dummyStdDevWghtZScore2, r, "stddev_wght_z_score_2"));
tl_level_normPSet.setAttrib(LevelNormalisation.SINGLEREFERENCE_Level, r.getObject ("level_number"));
}
public void create(BaseBusinessClass obj, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
{
ObjectID objectID = obj.getID ();
PersistentSet tl_level_normPSet = allPSets.getPersistentSet(objectID, "tl_level_norm");
if (tl_level_normPSet.getStatus () != PersistentSetStatus.PROCESSED &&
tl_level_normPSet.getStatus () != PersistentSetStatus.DEFERRED)
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_level_norm " +
" (mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, level_number, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_MeanScore.getForSQL(dummyMeanScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_MeanScore))).listEntry (HELPER_MaxScore.getForSQL(dummyMaxScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_MaxScore))).listEntry (HELPER_MinScore.getForSQL(dummyMinScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_MinScore))).listEntry (HELPER_StddevScore.getForSQL(dummyStddevScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_StddevScore))).listEntry (HELPER_LeftMeanScore.getForSQL(dummyLeftMeanScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_LeftMeanScore))).listEntry (HELPER_RightMeanScore.getForSQL(dummyRightMeanScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_RightMeanScore))).listEntry (HELPER_WghtMeanScore.getForSQL(dummyWghtMeanScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_WghtMeanScore))).listEntry (HELPER_WghtStddevScore.getForSQL(dummyWghtStddevScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_WghtStddevScore))).listEntry (HELPER_WghtLeftMeanScore.getForSQL(dummyWghtLeftMeanScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_WghtLeftMeanScore))).listEntry (HELPER_WghtRightMeanScore.getForSQL(dummyWghtRightMeanScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_WghtRightMeanScore))).listEntry (HELPER_MeanWghtZScore.getForSQL(dummyMeanWghtZScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_MeanWghtZScore))).listEntry (HELPER_MeanWghtZScores.getForSQL(dummyMeanWghtZScores, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_MeanWghtZScores))).listEntry (HELPER_StdDevWghtZScore.getForSQL(dummyStdDevWghtZScore, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_StdDevWghtZScore))).listEntry (HELPER_StdDevWghtZScore2.getForSQL(dummyStdDevWghtZScore2, tl_level_normPSet.getAttrib (LevelNormalisation.FIELD_StdDevWghtZScore2))) .listEntry (SQLManager.CheckNull((Long)(tl_level_normPSet.getAttrib (LevelNormalisation.SINGLEREFERENCE_Level)))) .listEntry (objectID.longID ()).toList().toArray());
tl_level_normPSet.setStatus (PersistentSetStatus.PROCESSED);
}
}
}
package performa.orm; package performa.orm;
import oneit.objstore.rdbms.filters.EqualsFilter;
import oneit.utils.filter.Filter;
import oneit.utils.math.Statistics;
public class TestAnalysis extends BaseTestAnalysis public class TestAnalysis extends BaseTestAnalysis
{ {
...@@ -16,4 +20,30 @@ public class TestAnalysis extends BaseTestAnalysis ...@@ -16,4 +20,30 @@ public class TestAnalysis extends BaseTestAnalysis
{ {
return "TestAnalysis"; return "TestAnalysis";
} }
//Related to CANDIDATE_LEVEL_SCORE - LEVEL_SCORE
public double getLevelScore()
{
return Statistics.sum(pipelineTestAnalysis().toCandidateClassScores().toClassScore().vals());
}
//Related to CANDIDATE_LEVEL_SCORE - WEIGHTED_LEVEL_SCORE
public double getWghtdLevelScore()
{
return Statistics.sum(pipelineTestAnalysis().toCandidateClassScores().toWghtdClassScore().vals());
}
//Related to CANDIDATE_LEVEL_SCORE - MAX_WGHT_LEVEL_SCORE
public double getMaxWghtdLevelScore()
{
return Statistics.sum(pipelineTestAnalysis().toCandidateClassScores().toMaxWghtdClassScore().vals());
}
public FactorScore getFactorScoreFor(Factor factor)
{
Filter<FactorScore> factorScoreFilter = FactorScore.SearchByAll().andFactor(new EqualsFilter(factor));
return pipelineTestAnalysis().toFactorScores(factorScoreFilter).val();
}
} }
\ No newline at end of file
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
<BUSINESSCLASS name="TestAnalysis" package="performa.orm"> <BUSINESSCLASS name="TestAnalysis" package="performa.orm">
<MULTIPLEREFERENCE name="FactorScores" type="FactorScore" backreferenceName="TestAnalysis" /> <MULTIPLEREFERENCE name="FactorScores" type="FactorScore" backreferenceName="TestAnalysis" />
<MULTIPLEREFERENCE name="CandidateClassScores" type="CandidateClassScore" backreferenceName="TestAnalysis" />
<TABLE name="tl_test_analysis" tablePrefix="object" polymorphic="FALSE"> <TABLE name="tl_test_analysis" tablePrefix="object" polymorphic="FALSE">
<SINGLEREFERENCE name="Job" type="Job" dbcol="job_id"/>
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_id" backreferenceName="TestAnalysises"/> <SINGLEREFERENCE name="Level" type="Level" dbcol="level_id" backreferenceName="TestAnalysises"/>
<SINGLEREFERENCE name="Candidate" type="Candidate" dbcol="candidate_id" backreferenceName="TestAnalysises"/> <SINGLEREFERENCE name="Candidate" type="Candidate" dbcol="candidate_id" backreferenceName="TestAnalysises"/>
......
...@@ -38,7 +38,7 @@ public class TestAnalysisPersistenceMgr extends ObjectPersistenceMgr ...@@ -38,7 +38,7 @@ public class TestAnalysisPersistenceMgr extends ObjectPersistenceMgr
} }
private String SELECT_COLUMNS = "{PREFIX}tl_test_analysis.object_id as id, {PREFIX}tl_test_analysis.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_test_analysis.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_test_analysis.job_id, {PREFIX}tl_test_analysis.level_id, {PREFIX}tl_test_analysis.candidate_id, 1 AS commasafe "; private String SELECT_COLUMNS = "{PREFIX}tl_test_analysis.object_id as id, {PREFIX}tl_test_analysis.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_test_analysis.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_test_analysis.level_id, {PREFIX}tl_test_analysis.candidate_id, 1 AS commasafe ";
private String SELECT_JOINS = ""; private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
...@@ -89,7 +89,6 @@ public class TestAnalysisPersistenceMgr extends ObjectPersistenceMgr ...@@ -89,7 +89,6 @@ public class TestAnalysisPersistenceMgr extends ObjectPersistenceMgr
// Check for persistent sets already prefetched // Check for persistent sets already prefetched
if (false || !tl_test_analysisPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) || if (false || !tl_test_analysisPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!tl_test_analysisPSet.containsAttrib(TestAnalysis.SINGLEREFERENCE_Job)||
!tl_test_analysisPSet.containsAttrib(TestAnalysis.SINGLEREFERENCE_Level)|| !tl_test_analysisPSet.containsAttrib(TestAnalysis.SINGLEREFERENCE_Level)||
!tl_test_analysisPSet.containsAttrib(TestAnalysis.SINGLEREFERENCE_Candidate)) !tl_test_analysisPSet.containsAttrib(TestAnalysis.SINGLEREFERENCE_Candidate))
{ {
...@@ -181,10 +180,10 @@ public class TestAnalysisPersistenceMgr extends ObjectPersistenceMgr ...@@ -181,10 +180,10 @@ public class TestAnalysisPersistenceMgr extends ObjectPersistenceMgr
{ {
int rowsUpdated = executeStatement (sqlMgr, int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_test_analysis " + "UPDATE {PREFIX}tl_test_analysis " +
"SET job_id = ? , level_id = ? , candidate_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " + "SET level_id = ? , candidate_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_test_analysis.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ", "WHERE tl_test_analysis.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (SQLManager.CheckNull((Long)(tl_test_analysisPSet.getAttrib (TestAnalysis.SINGLEREFERENCE_Job)))).listEntry (SQLManager.CheckNull((Long)(tl_test_analysisPSet.getAttrib (TestAnalysis.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_test_analysisPSet.getAttrib (TestAnalysis.SINGLEREFERENCE_Candidate)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray()); CollectionUtils.listEntry (SQLManager.CheckNull((Long)(tl_test_analysisPSet.getAttrib (TestAnalysis.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_test_analysisPSet.getAttrib (TestAnalysis.SINGLEREFERENCE_Candidate)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1) if (rowsUpdated != 1)
{ {
...@@ -441,7 +440,6 @@ public class TestAnalysisPersistenceMgr extends ObjectPersistenceMgr ...@@ -441,7 +440,6 @@ public class TestAnalysisPersistenceMgr extends ObjectPersistenceMgr
tl_test_analysisPSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE")); tl_test_analysisPSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE"));
tl_test_analysisPSet.setAttrib(TestAnalysis.SINGLEREFERENCE_Job, r.getObject ("job_id"));
tl_test_analysisPSet.setAttrib(TestAnalysis.SINGLEREFERENCE_Level, r.getObject ("level_id")); tl_test_analysisPSet.setAttrib(TestAnalysis.SINGLEREFERENCE_Level, r.getObject ("level_id"));
tl_test_analysisPSet.setAttrib(TestAnalysis.SINGLEREFERENCE_Candidate, r.getObject ("candidate_id")); tl_test_analysisPSet.setAttrib(TestAnalysis.SINGLEREFERENCE_Candidate, r.getObject ("candidate_id"));
...@@ -460,10 +458,10 @@ public class TestAnalysisPersistenceMgr extends ObjectPersistenceMgr ...@@ -460,10 +458,10 @@ public class TestAnalysisPersistenceMgr extends ObjectPersistenceMgr
{ {
executeStatement (sqlMgr, executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_test_analysis " + "INSERT INTO {PREFIX}tl_test_analysis " +
" ( job_id, level_id, candidate_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " + " ( level_id, candidate_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " + "VALUES " +
" ( ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")", " ( ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils .listEntry (SQLManager.CheckNull((Long)(tl_test_analysisPSet.getAttrib (TestAnalysis.SINGLEREFERENCE_Job)))).listEntry (SQLManager.CheckNull((Long)(tl_test_analysisPSet.getAttrib (TestAnalysis.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_test_analysisPSet.getAttrib (TestAnalysis.SINGLEREFERENCE_Candidate)))) .listEntry (objectID.longID ()).toList().toArray()); CollectionUtils .listEntry (SQLManager.CheckNull((Long)(tl_test_analysisPSet.getAttrib (TestAnalysis.SINGLEREFERENCE_Level)))).listEntry (SQLManager.CheckNull((Long)(tl_test_analysisPSet.getAttrib (TestAnalysis.SINGLEREFERENCE_Candidate)))) .listEntry (objectID.longID ()).toList().toArray());
tl_test_analysisPSet.setStatus (PersistentSetStatus.PROCESSED); tl_test_analysisPSet.setStatus (PersistentSetStatus.PROCESSED);
} }
......
...@@ -39,6 +39,8 @@ public class ColorCode extends AbstractEnumerated ...@@ -39,6 +39,8 @@ public class ColorCode extends AbstractEnumerated
private transient Integer RatingScore; private transient Integer RatingScore;
private transient String CSSClass;
private ColorCode (String name, String value, String description, boolean disabled) private ColorCode (String name, String value, String description, boolean disabled)
{ {
super (name, value, description, disabled); super (name, value, description, disabled);
...@@ -54,6 +56,11 @@ public class ColorCode extends AbstractEnumerated ...@@ -54,6 +56,11 @@ public class ColorCode extends AbstractEnumerated
return RatingScore; return RatingScore;
} }
public String getCSSClass()
{
return CSSClass;
}
public static final Comparator COMPARE_BY_POSITION = new CompareEnumByPosition (allColorCodes); public static final Comparator COMPARE_BY_POSITION = new CompareEnumByPosition (allColorCodes);
...@@ -123,10 +130,13 @@ public class ColorCode extends AbstractEnumerated ...@@ -123,10 +130,13 @@ public class ColorCode extends AbstractEnumerated
{ {
RED.ColorRank = 3; RED.ColorRank = 3;
RED.RatingScore = 0; RED.RatingScore = 0;
RED.CSSClass = "red-b";
AMBER.ColorRank = 2; AMBER.ColorRank = 2;
AMBER.RatingScore = 5; AMBER.RatingScore = 5;
AMBER.CSSClass = "yellow-b";
GREEN.ColorRank = 1; GREEN.ColorRank = 1;
GREEN.RatingScore = 10; GREEN.RatingScore = 10;
GREEN.CSSClass = "green-b";
} }
...@@ -156,6 +166,7 @@ public class ColorCode extends AbstractEnumerated ...@@ -156,6 +166,7 @@ public class ColorCode extends AbstractEnumerated
attribs.put ("ColorRank", ArrayFormatter.toObject(getColorRank())); attribs.put ("ColorRank", ArrayFormatter.toObject(getColorRank()));
attribs.put ("RatingScore", ArrayFormatter.toObject(getRatingScore())); attribs.put ("RatingScore", ArrayFormatter.toObject(getRatingScore()));
attribs.put ("CSSClass", ArrayFormatter.toObject(getCSSClass()));
return attribs; return attribs;
} }
......
...@@ -5,10 +5,11 @@ ...@@ -5,10 +5,11 @@
<DATA name="ColorRank" type="Integer"/> <DATA name="ColorRank" type="Integer"/>
<DATA name="RatingScore" type="Integer"/> <DATA name="RatingScore" type="Integer"/>
<DATA name="CSSClass" type="String"/>
<VALUE name="RED" value="RED" description="Red" ColorRank="3" RatingScore="0"/> <VALUE name="RED" value="RED" description="Red" ColorRank="3" RatingScore="0" CSSClass='"red-b"'/>
<VALUE name="AMBER" value="AMBER" description="Amber" ColorRank="2" RatingScore="5"/> <VALUE name="AMBER" value="AMBER" description="Amber" ColorRank="2" RatingScore="5" CSSClass='"yellow-b"'/>
<VALUE name="GREEN" value="GREEN" description="Green" ColorRank="1" RatingScore="10"/> <VALUE name="GREEN" value="GREEN" description="Green" ColorRank="1" RatingScore="10" CSSClass='"green-b"'/>
</CONSTANT> </CONSTANT>
</ROOT> </ROOT>
\ No newline at end of file
package performa.orm.types;
import java.util.*;
import oneit.utils.*;
/**
* This class was generated using constGen.bat.
* DO NOT MODIFY THIS CODE.
* Edit the associated .xml file, and regenerate this file
* constGen (directory) (file minus extension)
* e.g. constGen C:\...\sql FieldType
*/
public class FactorClass extends AbstractEnumerated
{
public static final EnumeratedFactory FACTORY_FactorClass = new FactorClassFactory();
public static final FactorClass CARDRV = new FactorClass ("CARDRV", "CARDRV", "Career Drives", false);
public static final FactorClass CONFL = new FactorClass ("CONFL", "CONFL", "Conflict Management Style", false);
public static final FactorClass COPING = new FactorClass ("COPING", "COPING", "Coping", false);
public static final FactorClass INTPER = new FactorClass ("INTPER", "INTPER", "Interpersonal", false);
public static final FactorClass LEADINFL = new FactorClass ("LEADINFL", "LEADINFL", "Leadership and Influence", false);
public static final FactorClass NEGOT = new FactorClass ("NEGOT", "NEGOT", "Negotiation Style", false);
public static final FactorClass OPER = new FactorClass ("OPER", "OPER", "Operating", false);
public static final FactorClass PEOPLE = new FactorClass ("PEOPLE", "PEOPLE", "People Orientation", false);
public static final FactorClass POWERINFL = new FactorClass ("POWERINFL", "POWERINFL", "Power and Influence", false);
public static final FactorClass PROBLEM = new FactorClass ("PROBLEM", "PROBLEM", "Problem Solving", false);
public static final FactorClass STRATEGIC = new FactorClass ("STRATEGIC", "STRATEGIC", "Strategic Orientation", false);
public static final FactorClass VALUES = new FactorClass ("VALUES", "VALUES", "Values", false);
public static final FactorClass WORKSTYLE = new FactorClass ("WORKSTYLE", "WORKSTYLE", "Workplace Management", false);
public static final FactorClass CONSISTENCY = new FactorClass ("CONSISTENCY", "CONSISTENCY", "Consistency", false);
public static final FactorClass HIGHQUAL = new FactorClass ("HIGHQUAL", "HIGHQUAL", "Highest Quality", false);
public static final FactorClass ACTINTER = new FactorClass ("ACTINTER", "ACTINTER", "Act Interdependently", false);
public static final FactorClass INNOVSPIR = new FactorClass ("INNOVSPIR", "INNOVSPIR", "iNnovative Spirit", false);
public static final FactorClass EMPATHRESP = new FactorClass ("EMPATHRESP", "EMPATHRESP", "Empathy & Respect", false);
public static final FactorClass LEADER = new FactorClass ("LEADER", "LEADER", "Leadership", false);
public static final FactorClass OTHERS = new FactorClass ("OTHERS", "OTHERS", "Other Factors", false);
public static final FactorClass ANSSCALE = new FactorClass ("ANSSCALE", "ANSSCALE", "Unusual Answers Score", false);
public static final FactorClass LEVINNOV = new FactorClass ("LEVINNOV", "LEVINNOV", "Leverage Innovation", false);
public static final FactorClass LEADCOUR = new FactorClass ("LEADCOUR", "LEADCOUR", "Lead Courageously", false);
public static final FactorClass SOUNDDEC = new FactorClass ("SOUNDDEC", "SOUNDDEC", "Make Sound Decisions", false);
public static final FactorClass DRVINNIT = new FactorClass ("DRVINNIT", "DRVINNIT", "Show Drive And Initiative", false);
public static final FactorClass FOSTCOMM = new FactorClass ("FOSTCOMM", "FOSTCOMM", "Foster Open Communication", false);
public static final FactorClass PROMCOLL = new FactorClass ("PROMCOLL", "PROMCOLL", "Promote Collaboration and Team", false);
public static final FactorClass SHOWADAP = new FactorClass ("SHOWADAP", "SHOWADAP", "Show Adaptability", false);
public static final FactorClass ENGINSP = new FactorClass ("ENGINSP", "ENGINSP", "Engage And Inspire", false);
private static final FactorClass[] allFactorClasss =
new FactorClass[] { CARDRV,CONFL,COPING,INTPER,LEADINFL,NEGOT,OPER,PEOPLE,POWERINFL,PROBLEM,STRATEGIC,VALUES,WORKSTYLE,CONSISTENCY,HIGHQUAL,ACTINTER,INNOVSPIR,EMPATHRESP,LEADER,OTHERS,ANSSCALE,LEVINNOV,LEADCOUR,SOUNDDEC,DRVINNIT,FOSTCOMM,PROMCOLL,SHOWADAP,ENGINSP};
private static FactorClass[] getAllFactorClasss ()
{
return allFactorClasss;
}
private transient Integer SortOrder;
private FactorClass (String name, String value, String description, boolean disabled)
{
super (name, value, description, disabled);
}
public Integer getSortOrder()
{
return SortOrder;
}
public static final Comparator COMPARE_BY_POSITION = new CompareEnumByPosition (allFactorClasss);
static
{
defineAdditionalData ();
}
public boolean isEqual (FactorClass other)
{
return this.name.equals (other.name);
}
public Enumeration getAllInstances ()
{
return FactorClass.getAll ();
}
private Object readResolve() throws java.io.ObjectStreamException
{
return FactorClass.forName (this.name);
}
public EnumeratedFactory getFactory ()
{
return FACTORY_FactorClass;
}
public static FactorClass forName (String name)
{
if (name == null) { return null; }
FactorClass[] all = getAllFactorClasss();
int enumIndex = AbstractEnumerated.getIndexForName (all, name);
return all[enumIndex];
}
public static FactorClass forValue (String value)
{
if (value == null) { return null; }
FactorClass[] all = getAllFactorClasss();
int enumIndex = AbstractEnumerated.getIndexForValue (getAllFactorClasss (), value);
return all[enumIndex];
}
public static java.util.Enumeration getAll ()
{
return AbstractEnumerated.getAll (getAllFactorClasss());
}
public static FactorClass[] getFactorClassArray ()
{
return (FactorClass[])getAllFactorClasss().clone ();
}
public static void defineAdditionalData ()
{
CARDRV.SortOrder = 2;
CONFL.SortOrder = 3;
COPING.SortOrder = 5;
INTPER.SortOrder = 9;
LEADINFL.SortOrder = 11;
NEGOT.SortOrder = 12;
OPER.SortOrder = 13;
PEOPLE.SortOrder = 15;
POWERINFL.SortOrder = 16;
PROBLEM.SortOrder = 17;
STRATEGIC.SortOrder = 18;
VALUES.SortOrder = 19;
WORKSTYLE.SortOrder = 20;
CONSISTENCY.SortOrder = 100;
HIGHQUAL.SortOrder = 110;
ACTINTER.SortOrder = 120;
INNOVSPIR.SortOrder = 130;
EMPATHRESP.SortOrder = 140;
LEADER.SortOrder = 150;
OTHERS.SortOrder = 160;
ANSSCALE.SortOrder = 170;
LEVINNOV.SortOrder = 200;
LEADCOUR.SortOrder = 210;
SOUNDDEC.SortOrder = 220;
DRVINNIT.SortOrder = 230;
FOSTCOMM.SortOrder = 240;
PROMCOLL.SortOrder = 250;
SHOWADAP.SortOrder = 260;
ENGINSP.SortOrder = 270;
}
static class FactorClassFactory implements EnumeratedFactory
{
public AbstractEnumerated getForName (String name)
{
return FactorClass.forName (name);
}
public AbstractEnumerated getForValue (String name)
{
return FactorClass.forValue (name);
}
public Enumeration getAll ()
{
return FactorClass.getAll ();
}
}
public Map getAdditionalAttributes ()
{
Map attribs = new HashMap ();
attribs.put ("SortOrder", ArrayFormatter.toObject(getSortOrder()));
return attribs;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
<CONSTANT package="performa.orm.types" name="FactorClass">
<DATA name="SortOrder" type="Integer"/>
<VALUE name="CARDRV" description="Career Drives" SortOrder="2"/>
<VALUE name="CONFL" description="Conflict Management Style" SortOrder="3"/>
<VALUE name="COPING" description="Coping" SortOrder="5"/>
<VALUE name="INTPER" description="Interpersonal" SortOrder="9"/>
<VALUE name="LEADINFL" description="Leadership and Influence" SortOrder="11"/>
<VALUE name="NEGOT" description="Negotiation Style" SortOrder="12"/>
<VALUE name="OPER" description="Operating" SortOrder="13"/>
<VALUE name="PEOPLE" description="People Orientation" SortOrder="15"/>
<VALUE name="POWERINFL" description="Power and Influence" SortOrder="16"/>
<VALUE name="PROBLEM" description="Problem Solving" SortOrder="17"/>
<VALUE name="STRATEGIC" description="Strategic Orientation" SortOrder="18"/>
<VALUE name="VALUES" description="Values" SortOrder="19"/>
<VALUE name="WORKSTYLE" description="Workplace Management" SortOrder="20"/>
<VALUE name="CONSISTENCY" description="Consistency" SortOrder="100"/>
<VALUE name="HIGHQUAL" description="Highest Quality" SortOrder="110"/>
<VALUE name="ACTINTER" description="Act Interdependently" SortOrder="120"/>
<VALUE name="INNOVSPIR" description="iNnovative Spirit" SortOrder="130"/>
<VALUE name="EMPATHRESP" description="Empathy &amp; Respect" SortOrder="140"/>
<VALUE name="LEADER" description="Leadership" SortOrder="150"/>
<VALUE name="OTHERS" description="Other Factors" SortOrder="160"/>
<VALUE name="ANSSCALE" description="Unusual Answers Score" SortOrder="170"/>
<VALUE name="LEVINNOV" description="Leverage Innovation" SortOrder="200"/>
<VALUE name="LEADCOUR" description="Lead Courageously" SortOrder="210"/>
<VALUE name="SOUNDDEC" description="Make Sound Decisions" SortOrder="220"/>
<VALUE name="DRVINNIT" description="Show Drive And Initiative" SortOrder="230"/>
<VALUE name="FOSTCOMM" description="Foster Open Communication" SortOrder="240"/>
<VALUE name="PROMCOLL" description="Promote Collaboration and Team" SortOrder="250"/>
<VALUE name="SHOWADAP" description="Show Adaptability" SortOrder="260"/>
<VALUE name="ENGINSP" description="Engage And Inspire" SortOrder="270"/>
</CONSTANT>
</ROOT>
\ No newline at end of file
...@@ -5,7 +5,7 @@ import oneit.logging.*; ...@@ -5,7 +5,7 @@ import oneit.logging.*;
import oneit.objstore.*; import oneit.objstore.*;
import oneit.objstore.rdbms.filters.*; import oneit.objstore.rdbms.filters.*;
import oneit.utils.*; import oneit.utils.*;
import oneit.utils.filter.Filter; import oneit.utils.filter.*;
import oneit.utils.math.*; import oneit.utils.math.*;
import oneit.utils.parsers.FieldException; import oneit.utils.parsers.FieldException;
import performa.orm.*; import performa.orm.*;
...@@ -19,25 +19,30 @@ public class AnalysisEngine ...@@ -19,25 +19,30 @@ public class AnalysisEngine
{ {
private static final Long MAX_VALID_FACTOR_NUMBER = 49L; //Don't consider unusally high/low answer factors i.e 50/51 private static final Long MAX_VALID_FACTOR_NUMBER = 49L; //Don't consider unusally high/low answer factors i.e 50/51
public static void analyseAnswers(JobApplication jobApplication) throws StorageException, FieldException public static void analyseAnswers(Candidate candidate, Level level, Set<Answer> answers) throws StorageException, FieldException
{ {
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1, "Inside AnalysisEngine --> analyseAnswers"); LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1, "Inside AnalysisEngine --> analyseAnswers for candidate ", candidate, " Level ", level);
ObjectTransaction objTran = jobApplication.getTransaction(); if(!answers.isEmpty())
Set<Factor> levelFactors = jobApplication.pipelineJobApplication().toJob().toLevel().toFactors().toFactor().uniqueVals(); {
ObjectTransaction objTran = candidate.getTransaction();
if(candidate.getTestAnalysisFor(level) == null)
{
Level.LevelPipeLineFactory levelPipeline = level.pipelineLevel();
Set<Factor> levelFactors = levelPipeline.toFactors().toFactor().uniqueVals();
Filter<FactorQuestionLink> factorFilter = FactorQuestionLink.SearchByAll().andFactor(new InFilter(levelFactors)); Filter<FactorQuestionLink> factorFilter = FactorQuestionLink.SearchByAll().andFactor(new InFilter(levelFactors));
//Preloading Data //Preloading Data
jobApplication.pipelineJobApplication().toProfileAssessmentAnswers().toQuestion().toSection().uniqueVals(); Answer.pipesAnswer(answers).toQuestion().toSection().uniqueVals();
jobApplication.pipelineJobApplication().toProfileAssessmentAnswers().toQuestion().toFactors().toFactor().uniqueVals(); Answer.pipesAnswer(answers).toQuestion().toFactors().toFactor().uniqueVals();
Factor.pipesFactor(levelFactors).toResults().uniqueVals(); Factor.pipesFactor(levelFactors).toResults().uniqueVals();
Factor.pipesFactor(levelFactors).toLevelFactorTypes().uniqueVals(); Factor.pipesFactor(levelFactors).toLevelFactorTypes().uniqueVals();
levelPipeline.toClassNormalisations().uniqueVals();
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1, "Processing Job Application ", jobApplication);
Map<Factor, Integer> factorScoreMap = new HashMap(); Map<Factor, Integer> factorScoreMap = new HashMap();
for (Answer answer : jobApplication.getProfileAssessmentAnswersSet()) for (Answer answer : answers)
{ {
Set<FactorQuestionLink> links = answer.pipelineAnswer().toQuestion().toFactors(factorFilter).uniqueVals(); Set<FactorQuestionLink> links = answer.pipelineAnswer().toQuestion().toFactors(factorFilter).uniqueVals();
...@@ -77,7 +82,7 @@ public class AnalysisEngine ...@@ -77,7 +82,7 @@ public class AnalysisEngine
Filter<Question> questFilter = Question.SearchByAll().andHighLowFactor(new IsNotNullFilter()); Filter<Question> questFilter = Question.SearchByAll().andHighLowFactor(new IsNotNullFilter());
MultiHashtable<Factor, Answer> highLowAnswersByFactor = new MultiHashtable(); MultiHashtable<Factor, Answer> highLowAnswersByFactor = new MultiHashtable();
highLowAnswersByFactor.groupValues(jobApplication.getProfileAssessmentAnswersSet(), Answer.pipesAnswer().toQuestion(questFilter).toHighLowFactor()); highLowAnswersByFactor.groupValues(answers, Answer.pipesAnswer().toQuestion(questFilter).toHighLowFactor());
for(Factor factor : highLowAnswersByFactor.keySet()) for(Factor factor : highLowAnswersByFactor.keySet())
{ {
...@@ -91,17 +96,16 @@ public class AnalysisEngine ...@@ -91,17 +96,16 @@ public class AnalysisEngine
TestAnalysis testAnalysis = TestAnalysis.createTestAnalysis(objTran); TestAnalysis testAnalysis = TestAnalysis.createTestAnalysis(objTran);
jobApplication.getJob().getLevel().addToTestAnalysises(testAnalysis); level.addToTestAnalysises(testAnalysis);
jobApplication.getCandidate().addToTestAnalysises(testAnalysis); candidate.addToTestAnalysises(testAnalysis);
testAnalysis.setJob(jobApplication.getJob());
for(Factor factor : factorScoreMap.keySet()) for(Factor factor : factorScoreMap.keySet())
{ {
int score = factorScoreMap.get(factor); int score = factorScoreMap.get(factor);
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1, "Candidate:", jobApplication.getCandidate(), " Factor:", factor, " Score:", score); LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1, "Candidate:", candidate, " Factor:", factor, " Score:", score);
Filter<FactorScoreResult> factorScoreFilter = FactorScoreResult.SearchByAll().andLevel(new EqualsFilter<>(jobApplication.getJob().getLevel())) Filter<FactorScoreResult> factorScoreFilter = FactorScoreResult.SearchByAll().andLevel(new EqualsFilter<>(level))
.andFromScore(new LessThanEqualFilter<>(score)) .andFromScore(new LessThanEqualFilter<>(score))
.andToScore(new GreaterThanEqualFilter<>(score)); .andToScore(new GreaterThanEqualFilter<>(score));
...@@ -114,7 +118,7 @@ public class AnalysisEngine ...@@ -114,7 +118,7 @@ public class AnalysisEngine
FactorScore factorScore = FactorScore.createFactorScore(objTran); FactorScore factorScore = FactorScore.createFactorScore(objTran);
factorScore.setFactor(factor); factorScore.setFactor(factor);
factorScore.setLevel(jobApplication.getJob().getLevel()); factorScore.setLevel(level);
factorScore.setScore(score); factorScore.setScore(score);
factorScore.setColorCode(factorScoreResult.getColorCode()); factorScore.setColorCode(factorScoreResult.getColorCode());
factorScore.setColorRank(factorScoreResult.getColorCode() != null ? factorScoreResult.getColorCode().getColorRank() : 0); factorScore.setColorRank(factorScoreResult.getColorCode() != null ? factorScoreResult.getColorCode().getColorRank() : 0);
...@@ -132,9 +136,7 @@ public class AnalysisEngine ...@@ -132,9 +136,7 @@ public class AnalysisEngine
if(factorScoreResult.getColorCode() == ColorCode.GREEN || factorScoreResult.getColorCode() == ColorCode.AMBER) if(factorScoreResult.getColorCode() == ColorCode.GREEN || factorScoreResult.getColorCode() == ColorCode.AMBER)
{ {
Filter<LevelFactorType> levelFactorFilter = LevelFactorType.SearchByAll().andLevel(new EqualsFilter(jobApplication.getJob().getLevel())); LevelFactorType levelFactorType = level.getLevelFactorType(factor);
LevelFactorType levelFactorType = factor.pipelineFactor().toLevelFactorTypes(levelFactorFilter).val();
if(levelFactorType != null && levelFactorType.getTypeFlag() != null) if(levelFactorType != null && levelFactorType.getTypeFlag() != null)
{ {
...@@ -151,11 +153,81 @@ public class AnalysisEngine ...@@ -151,11 +153,81 @@ public class AnalysisEngine
factorScore.setWghtdScore(weightedScore); factorScore.setWghtdScore(weightedScore);
testAnalysis.addToFactorScores(factorScore); testAnalysis.addToFactorScores(factorScore);
jobApplication.getCandidate().addToFactorScores(factorScore);
} }
} }
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1, "AnalysisEngine --> analyseAnswers completed"); Set<FactorLevelLink> factorLevelLinks = levelPipeline.toFactors().uniqueVals();
for(FactorClass factorClass : level.pipelineLevel().toLevelClassCriterias().toFactorClass().uniqueVals())
{
Integer classScore = 0;
Integer wghtdclassScore = 0;
Integer maxWghtdClassScore = 0;
Filter<FactorLevelLink> factorLevelLinkFilter = FactorLevelLink.SearchByAll().andFactorClass(new EqualsFilter(factorClass));
List<FactorLevelLink> factorLevelLinksForClass= (List<FactorLevelLink>) CollectionFilter.filter(factorLevelLinks, factorLevelLinkFilter);
for(FactorLevelLink factorLevelLink : factorLevelLinksForClass)
{
Filter<FactorScore> factorScoreFilter = FactorScore.SearchByAll().andFactor(new EqualsFilter(factorLevelLink.getFactor())).andLevel(new EqualsFilter(factorLevelLink.getLevel()));
List<FactorScore> filteredFactorScores = (List<FactorScore>) CollectionFilter.filter(testAnalysis.getFactorScoresSet(), factorScoreFilter);
LevelFactorType levelFactorType = factorLevelLink.getLevel().getLevelFactorType(factorLevelLink.getFactor());
TypeFlag typeFlag = levelFactorType.getTypeFlag();
Integer multiplier = 0;
if(typeFlag == TypeFlag.PRIMARY)
{
multiplier = 2;
}
else if(typeFlag == TypeFlag.SECONDARY)
{
multiplier = 1;
}
for(FactorScore factorScore : filteredFactorScores)
{
if(factorScore.getColorCode() == ColorCode.GREEN)
{
classScore += 10;
wghtdclassScore += (multiplier * 50);
}
else if(factorScore.getColorCode() == ColorCode.AMBER)
{
classScore += 5;
wghtdclassScore += (multiplier * 25);
}
else if(factorScore.getColorCode() == ColorCode.RED)
{
classScore += 1;
wghtdclassScore += (multiplier * 5);
}
}
maxWghtdClassScore += (multiplier * 50);
}
ClassNormalisation classNormalisation = level.getClassNormalisationFor(factorClass);
CandidateClassScore candidateClassScore = CandidateClassScore.createCandidateClassScore(objTran);
candidateClassScore.setFactorClass(factorClass);
candidateClassScore.setClassScore(classScore);
candidateClassScore.setWghtdClassScore(wghtdclassScore);
candidateClassScore.setMaxWghtdClassScore(maxWghtdClassScore);
candidateClassScore.setColorCode(NullArith.lessThan(classScore, classNormalisation.getLeftMeanScore()) ? ColorCode.RED : (NullArith.lessThan(classScore, classNormalisation.getMeanScore()) ? ColorCode.AMBER : ColorCode.GREEN));
candidateClassScore.setWghtdColorCode(NullArith.lessThan(wghtdclassScore, classNormalisation.getWghtLeftMeanScore()) ? ColorCode.RED : (NullArith.lessThan(wghtdclassScore, classNormalisation.getWghtMeanScore()) ? ColorCode.AMBER : ColorCode.GREEN));
testAnalysis.addToCandidateClassScores(candidateClassScore);
}
}
else
{
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1, "AnalysisEngine --> analyseAnswers skipped as already present for Candidate ", candidate, " Level:", level);
}
}
else
{
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1, "AnalysisEngine --> analyseAnswers skipped as no answers found for Candidate ", candidate, " Level:", level);
}
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1, "AnalysisEngine --> analyseAnswers completed for Candidate ", candidate, " Level:", level);
} }
public static Map<CultureClass, Long> getCultureFit(Set<CultureCriteriaAnswer> cultureCriteriaAnswers) public static Map<CultureClass, Long> getCultureFit(Set<CultureCriteriaAnswer> cultureCriteriaAnswers)
...@@ -290,4 +362,152 @@ public class AnalysisEngine ...@@ -290,4 +362,152 @@ public class AnalysisEngine
return requirementFitMap; return requirementFitMap;
} }
public static Map<FactorClass, Long> getRoleFitPercentage(Candidate candidate, Level level)
{
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1, "AnalysisEngine --> getRoleFit called for candidate ", candidate, " Level ", level);
TestAnalysis testAnalysis = candidate.getTestAnalysisFor(level);
Map<FactorClass, Integer> scoreMap = new HashMap();
Map<FactorClass, Integer> maxScoreMap = new HashMap();
if(testAnalysis != null && testAnalysis.getCandidateClassScoresCount() > 0)
{
for(LevelClassCriteria levelClassCriteria : level.getLevelClassCriteriasSet())
{
FactorClass factorClass = levelClassCriteria.getFactorClass();
Filter<CandidateClassScore> candidateClassScoreFilter = CandidateClassScore.SearchByAll().andFactorClass(new EqualsFilter(factorClass));
CandidateClassScore candidateClassScore = testAnalysis.pipelineTestAnalysis().toCandidateClassScores(candidateClassScoreFilter).val();
Integer score = 0;
Importance importance = levelClassCriteria.getImportance();
maxScoreMap.put(factorClass, importance != null ? importance.getWeightingScore() * 10 : 0);
if(candidateClassScore != null)
{
ColorCode colorCode = candidateClassScore.getWghtdColorCode();
score = (importance != null ? importance.getWeightingScore() : 0) * (colorCode != null ? colorCode.getRatingScore() : 0);
}
scoreMap.put(factorClass, score);
}
}
Map<FactorClass, Long> roleFitMap = getFinalFitMap(scoreMap, maxScoreMap);
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1, "AnalysisEngine --> getRoleFit completed for candidate ", candidate, " Level ", level);
return roleFitMap;
}
public static Map<FactorClass, Double> getRoleFitSuitability(Candidate candidate, Level level)
{
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1, "AnalysisEngine --> getRoleFitSuitability called for candidate ", candidate, " Level ", level);
TestAnalysis testAnalysis = candidate.getTestAnalysisFor(level);
Map<FactorClass, Double> scoreMap = new HashMap();
if(testAnalysis != null && testAnalysis.getCandidateClassScoresCount() > 0)
{
for(LevelClassCriteria levelClassCriteria : level.getLevelClassCriteriasSet())
{
FactorClass factorClass = levelClassCriteria.getFactorClass();
Filter<CandidateClassScore> candidateClassScoreFilter = CandidateClassScore.SearchByAll().andFactorClass(new EqualsFilter(factorClass));
CandidateClassScore candidateClassScore = testAnalysis.pipelineTestAnalysis().toCandidateClassScores(candidateClassScoreFilter).val();
ClassNormalisation classNormalisation = level.getClassNormalisationFor(factorClass);
Double score = 0d;
if(candidateClassScore != null && classNormalisation != null && NullArith.greaterThan(classNormalisation.getWghtStddevScore(), 0d))
{
score = NullArith.round(((10 * ((candidateClassScore.getWghtdClassScore() - classNormalisation.getWghtMeanScore()) / classNormalisation.getWghtStddevScore())) + 50), 1);
}
scoreMap.put(factorClass, score);
}
scoreMap.put(null, getSuitabilityScore(testAnalysis).get0());
}
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1, "AnalysisEngine --> getRoleFitSuitability completed for candidate ", candidate, " Level ", level);
return scoreMap;
}
public static Tuple.T2<Double, ColorCode> getSuitabilityScore(TestAnalysis testAnalysis)
{
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1, "AnalysisEngine --> getSuitabilityScore called for testAnalysis ", testAnalysis);
Double totalScore = testAnalysis.getWghtdLevelScore();
Double wghtdMeanScore = 0d;
Double wghtdStdDevScore = 0d;
Double suitabilityScore = 0d;
ColorCode colorCode = null;
LevelNormalisation levelNormalisation = testAnalysis.getLevel().getLevelNormalisation();
if(levelNormalisation != null)
{
wghtdMeanScore = levelNormalisation.getWghtMeanScore();
wghtdStdDevScore = levelNormalisation.getWghtStddevScore();
}
if(wghtdStdDevScore > 0d)
{
suitabilityScore = NullArith.round(((10 * ((totalScore - wghtdMeanScore) / wghtdStdDevScore)) + 50), 2);
}
if(totalScore >= wghtdMeanScore)
{
colorCode = ColorCode.GREEN;
}
else if(totalScore < (wghtdMeanScore - wghtdStdDevScore))
{
colorCode = ColorCode.RED;
}
else
{
colorCode = ColorCode.AMBER;
}
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1, "AnalysisEngine --> getSuitabilityScore completed for testAnalysis ", testAnalysis, " Score:", suitabilityScore, " Color:", colorCode);
return new Tuple.T2(suitabilityScore, colorCode);
}
public static Map<FactorLevelLink, Map> getFactorScoreDetails(Candidate candidate, Level level, FactorClass factorClass)
{
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1, "AnalysisEngine --> getFactorScoreDetails called for candidate: ", candidate, " Level: ", level, " factorClass: ", factorClass);
Map<FactorLevelLink, Map> factorDetails = new LinkedHashMap<>();
TestAnalysis testAnalysis = candidate.getTestAnalysisFor(level);
if(testAnalysis != null)
{
List<FactorLevelLink> factorLevelLinks = level.getSortedFactorLinks(factorClass);
for(FactorLevelLink factorLevelLink : factorLevelLinks)
{
Map factorLinkDetails = new HashMap();
Map<FactorScoreResult, Double> factorScoreDetails = new LinkedHashMap();
List<FactorScoreResult> factorScoreResults = level.getSortedFactorScoreResults(factorLevelLink.getFactor());
Integer minScore = factorScoreResults.get(0).getFromScore();
Integer maxScore = factorScoreResults.get(factorScoreResults.size() - 1).getToScore();
Double totalLength = NullArith.subtract(maxScore, minScore, 0d) + 1;
for(FactorScoreResult scoreResult : factorScoreResults)
{
factorScoreDetails.put(scoreResult, (NullArith.divide(NullArith.subtract(scoreResult.getToScore(), scoreResult.getFromScore(), 0d) + 1, totalLength) * 100));
}
FactorScore factorScore = testAnalysis.getFactorScoreFor(factorLevelLink.getFactor());
if(factorScore != null && factorScore.getScore() != null)
{
factorLinkDetails.put("factorScoreDetails", factorScoreDetails);
factorLinkDetails.put("factorScore", factorScore);
factorLinkDetails.put("scoreLeftMargin", (NullArith.divide(NullArith.subtract(factorScore.getScore(), minScore, 0d), totalLength) * 100));
}
factorDetails.put(factorLevelLink, factorLinkDetails);
}
}
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1, "AnalysisEngine --> getFactorScoreDetails completed for candidate: ", candidate, " Level: ", level, " factorClass: ", factorClass);
return factorDetails;
}
} }
\ No newline at end of file
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
for(JobApplication jobApplication : applications) for(JobApplication jobApplication : applications)
{ {
String jobMatch = FormatUtils.stringify(jobApplication.getJobMatchPercentage(), "PercentageWholeNumber", "0"); String jobMatch = FormatUtils.stringify(jobApplication.getJobMatchPercentage(), "TwoDPDouble", "0");
String culture = FormatUtils.stringify(jobApplication.getCulturePercentage(), "PercentageWholeNumber", "0"); String culture = FormatUtils.stringify(jobApplication.getCulturePercentage(), "PercentageWholeNumber", "0");
String criteria = FormatUtils.stringify(jobApplication.getCriteriaPercentage(), "PercentageWholeNumber", "0"); String criteria = FormatUtils.stringify(jobApplication.getCriteriaPercentage(), "PercentageWholeNumber", "0");
String appID = "app-id-" + jobApplication.getID().toString(); String appID = "app-id-" + jobApplication.getID().toString();
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
%> %>
<oneit:dynIncluded> <oneit:dynIncluded>
<%
Map<FactorClass, Double> roleScoreMap = AnalysisEngine.getRoleFitSuitability(candidate, job.getLevel());
%>
<script> <script>
function tabToggle(tab) { function tabToggle(tab) {
$(".nav-justified li").each(function() { $(".nav-justified li").each(function() {
...@@ -56,7 +59,7 @@ ...@@ -56,7 +59,7 @@
<div class="col-sm-4 col-xs-12 text-center" href="#1a" data-toggle="tab" id="progress1" onClick="tabToggle('#tab1')"> <div class="col-sm-4 col-xs-12 text-center" href="#1a" data-toggle="tab" id="progress1" onClick="tabToggle('#tab1')">
<label class="progress-label">role fit</label> <label class="progress-label">role fit</label>
<div class="percent-green fixed-width"> <div class="percent-green fixed-width">
<p style="display:none;">83%</p> <p style="display:none;"><oneit:toString value="<%= roleScoreMap.get(null) %>" mode="TwoDPDouble" nullValue="0"/></p>
</div> </div>
</div> </div>
<div class="col-sm-4 col-xs-12 text-center" href="#2a" data-toggle="tab" id="progress2" onClick="tabToggle('#tab2')"> <div class="col-sm-4 col-xs-12 text-center" href="#2a" data-toggle="tab" id="progress2" onClick="tabToggle('#tab2')">
...@@ -81,230 +84,67 @@ ...@@ -81,230 +84,67 @@
</ul> </ul>
<div class="tab-content clearfix"> <div class="tab-content clearfix">
<div class="tab-pane active" id="1a"> <div class="tab-pane active" id="1a">
<%
for(FactorClass factorClass : jobApplication.getSortedFactorClasses())
{
if(roleScoreMap.get(factorClass) != null && roleScoreMap.get(factorClass) > 0d)
{
Map<FactorLevelLink, Map> factorDetails = AnalysisEngine.getFactorScoreDetails(candidate, job.getLevel(), factorClass);
%>
<div class="main-pro-bar"> <div class="main-pro-bar">
<div class="pro-bar"> <div class="pro-bar">
<span class="appli-label">Career Drive</span> <span class="appli-label"><oneit:toString value="<%= factorClass %>" mode="EscapeHTML"/></span>
<span class="appli-percen">82%</span> <span class="appli-percen"><oneit:toString value="<%= roleScoreMap.get(factorClass) %>" mode="TwoDPDouble"/></span>
<span class="appli-progress-bar">
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="82" aria-valuemin="0" aria-valuemax="100" style="width:82%"></div>
</div>
</span>
<span class="expand-box"> <span class="expand-box">
<span><img src="images/select-top-arrow.png"></span> <span><img src="images/select-top-arrow.png"></span>
</span> </span>
</div> </div>
<div class="expand-hide-tag" style="display: block;">
<div class="tab-row">
<div class="tab-view-label">
Achievement
</div>
<div class="tab-view-side">
<div class="result-want">
<div class="result">Not results focused</div>
<div class="wants">Wants results</div>
</div>
<div class="result-bar">
<ul>
<li class="red-b" style="width: 26.5%;"></li>
<li class="yellow-b" style="width: 26.5%;"></li>
<li class="green-b" style="width: 47%;"></li>
</ul>
<span class="triangle-arrow" style="left: 48%;"></span>
</div>
<div class="like-strive">Likely to strive to achive results</div>
</div>
</div>
<div class="tab-row">
<div class="tab-view-label">
Remuneration
</div>
<div class="tab-view-side">
<div class="result-want">
<div class="result">Low concern</div>
<div class="wants">High concern</div>
</div>
<div class="result-bar">
<ul>
<li class="red-b" style="width: 23.2%;"></li>
<li class="yellow-b" style="width: 57.6%;"></li>
<li class="green-b" style="width: 19.2%;"></li>
</ul>
<span class="triangle-arrow" style="left: 72%;"></span>
</div>
<div class="like-strive">Financial reward is less of a motivation than many other factors</div>
</div>
</div>
</div>
</div>
<div class="main-pro-bar">
<div class="pro-bar">
<span class="appli-label">Conflict Management Style</span>
<span class="appli-percen">82%</span>
<span class="appli-progress-bar">
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="82" aria-valuemin="0" aria-valuemax="100" style="width:82%"></div>
</div>
</span>
<span class="expand-box">
<span class="hasarrow"><img src="images/select-down-arrow.png" /></span>
</span>
</div>
<div class="expand-hide-tag">
<div class="tab-row">
<div class="tab-view-label">
Achievement
</div>
<div class="tab-view-side">
<div class="result-want">
<div class="result">Not results focused</div>
<div class="wants">Wants results</div>
</div>
<div class="result-bar">
<ul>
<li class="red-b" style="width: 26.5%;"></li>
<li class="yellow-b" style="width: 26.5%;"></li>
<li class="green-b" style="width: 47%;"></li>
</ul>
<span class="triangle-arrow" style="left: 48%;"></span>
</div>
<div class="like-strive">Likely to strive to achive results</div>
</div>
</div>
<div class="tab-row">
<div class="tab-view-label">
Remuneration
</div>
<div class="tab-view-side">
<div class="result-want">
<div class="result">Low concern</div>
<div class="wants">High concern</div>
</div>
<div class="result-bar">
<ul>
<li class="red-b" style="width: 23.2%;"></li>
<li class="yellow-b" style="width: 57.6%;"></li>
<li class="green-b" style="width: 19%;"></li>
</ul>
<span class="triangle-arrow" style="left: 72%;"></span>
</div>
<div class="like-strive">Financial reward is less of a motivation than many other factors</div>
</div>
</div>
</div>
</div>
<div class="main-pro-bar">
<div class="pro-bar">
<span class="appli-label">Coping</span>
<span class="appli-percen blue">78%</span>
<span class="appli-progress-bar">
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="78" aria-valuemin="0" aria-valuemax="100" style="width:78%"></div>
</div>
</span>
<span class="expand-box">
<span class="hasarrow"><img src="images/select-down-arrow.png" /></span>
</span>
</div>
<div class="expand-hide-tag">
<div class="tab-row">
<div class="tab-view-label">
Achievement
</div>
<div class="tab-view-side">
<div class="result-want">
<div class="result">Not results focused</div>
<div class="wants">Wants results</div>
</div>
<div class="result-bar">
<ul>
<li class="red-b" style="width: 26.5%;"></li>
<li class="yellow-b" style="width: 26.5%;"></li>
<li class="green-b" style="width: 47%;"></li>
</ul>
<span class="triangle-arrow" style="left: 48%;"></span>
</div>
<div class="like-strive">Likely to strive to achive results</div>
</div>
</div>
<div class="tab-row">
<div class="tab-view-label">
Remuneration
</div>
<div class="tab-view-side">
<div class="result-want">
<div class="result">Low concern</div>
<div class="wants">High concern</div>
</div>
<div class="result-bar">
<ul>
<li class="red-b" style="width: 23.2%;"></li>
<li class="yellow-b" style="width: 57.6%;"></li>
<li class="green-b" style="width: 19%;"></li>
</ul>
<span class="triangle-arrow" style="left: 72%;"></span>
</div>
<div class="like-strive">Financial reward is less of a motivation than many other factors</div>
</div>
</div>
</div>
</div>
<div class="main-pro-bar">
<div class="pro-bar">
<span class="appli-label">People Orientation</span>
<span class="appli-percen gray">68%</span>
<span class="appli-progress-bar">
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="68" aria-valuemin="0" aria-valuemax="100" style="width:68%"></div>
</div>
</span>
<span class="expand-box">
<span class="hasarrow"><img src="images/select-down-arrow.png" /></span>
</span>
</div>
<div class="expand-hide-tag"> <div class="expand-hide-tag">
<%
for(FactorLevelLink factorLevelLink : factorDetails.keySet())
{
Map factorLinkDetails = factorDetails.get(factorLevelLink);
if(!factorLinkDetails.isEmpty())
{
FactorScore factorScore = (FactorScore) factorLinkDetails.get("factorScore");
%>
<div class="tab-row"> <div class="tab-row">
<div class="tab-view-label"> <div class="tab-view-label"><oneit:toString value="<%= factorLevelLink.getFactor() %>" mode="EscapeHTML"/></div>
Achievement
</div>
<div class="tab-view-side">
<div class="result-want">
<div class="result">Not results focused</div>
<div class="wants">Wants results</div>
</div>
<div class="result-bar">
<ul>
<li class="red-b" style="width: 26.5%;"></li>
<li class="yellow-b" style="width: 26.5%;"></li>
<li class="green-b" style="width: 47%;"></li>
</ul>
<span class="triangle-arrow" style="left: 48%;"></span>
</div>
<div class="like-strive">Likely to strive to achive results</div>
</div>
</div>
<div class="tab-row">
<div class="tab-view-label">
Remuneration
</div>
<div class="tab-view-side"> <div class="tab-view-side">
<div class="result-want"> <div class="result-want">
<div class="result">Low concern</div> <div class="result"><oneit:toString value="<%= factorLevelLink.getLeftAnnot() %>" mode="EscapeHTML"/></div>
<div class="wants">High concern</div> <div class="wants"><oneit:toString value="<%= factorLevelLink.getRightAnnot() %>" mode="EscapeHTML"/></div>
</div> </div>
<div class="result-bar"> <div class="result-bar">
<ul> <ul>
<li class="red-b" style="width: 23.2%;"></li> <%
<li class="yellow-b" style="width: 57.6%;"></li> Map<FactorScoreResult, Double> factorScoreDetails = (Map<FactorScoreResult, Double>)factorLinkDetails.get("factorScoreDetails");
<li class="green-b" style="width: 19%;"></li>
for(FactorScoreResult factorScoreResult : factorScoreDetails.keySet())
{
%>
<li class="<%= factorScoreResult.getColorCode() != null ? factorScoreResult.getColorCode().getCSSClass() : "" %>" style="width: <%= factorScoreDetails.get(factorScoreResult) %>%;"></li>
<%
}
%>
</ul> </ul>
<span class="triangle-arrow" style="left: 72%;"></span> <span class="triangle-arrow" style="left: <%= factorLinkDetails.get("scoreLeftMargin")%>%;"></span>
</div> </div>
<div class="like-strive">Financial reward is less of a motivation than many other factors</div> <div class="like-strive"><oneit:toString value="<%= factorScore != null ? factorScore.getNarrative() : null %>" mode="EscapeHTML"/></div>
</div> </div>
</div> </div>
<%
}
}
%>
</div> </div>
</div> </div>
<%
}
}
%>
</div> </div>
<div class="tab-pane" id="2a"> <div class="tab-pane" id="2a">
<% <%
......
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicationPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicationPage)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).toMap()) .mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).toMap())
.toMap() %>"> .toMap() %>">
<oneit:toString value="<%= jobApplication.getJobMatchPercentage() %>" mode="PercentageWholeNumber" /> <oneit:toString value="<%= jobApplication.getJobMatchPercentage() %>" mode="TwoDPDouble" />
</oneit:button> </oneit:button>
</span> </span>
</div> </div>
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
<div class="jcc-box"> <div class="jcc-box">
<div class="job-match jcc"> <div class="job-match jcc">
<img src="images/app-job-match-icon.svg"> Role fit <img src="images/app-job-match-icon.svg"> Role fit
<span><oneit:toString value="<%= jobApplication.getJobMatchPercentage() %>" mode="PercentageWholeNumber" /></span> <span><oneit:toString value="<%= jobApplication.getJobMatchPercentage() %>" mode="TwoDPDouble" /></span>
</div> </div>
<div class="detail-box"> <div class="detail-box">
<div class="detail-row"> <div class="detail-row">
......
<?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">tl_class_norm</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="class_code" type="String" nullable="true" length="200"/>
<column name="mean_score" type="Double" nullable="true"/>
<column name="max_score" type="Double" nullable="true"/>
<column name="min_score" type="Double" nullable="true"/>
<column name="stddev_score" type="Double" nullable="true"/>
<column name="left_mean_score" type="Double" nullable="true"/>
<column name="right_mean_score" type="Double" nullable="true"/>
<column name="wght_mean_score" type="Double" nullable="true"/>
<column name="wght_stddev_score" type="Double" nullable="true"/>
<column name="wght_left_mean_score" type="Double" nullable="true"/>
<column name="wght_right_mean_score" type="Double" nullable="true"/>
<column name="level_number" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_class_norm" indexName="idx_tl_class_norm_level_number" isUnique="false"><column name="level_number"/></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">tl_level_class_criteria</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="weighting" type="String" nullable="false" length="200"/>
<column name="class_code" type="String" nullable="false" length="200"/>
<column name="level_number" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_level_class_criteria" indexName="idx_tl_level_class_criteria_level_number" isUnique="false"><column name="level_number"/></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">tl_level_norm</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="mean_score" type="Double" nullable="true"/>
<column name="max_score" type="Double" nullable="true"/>
<column name="min_score" type="Double" nullable="true"/>
<column name="stddev_score" type="Double" nullable="true"/>
<column name="left_mean_score" type="Double" nullable="true"/>
<column name="right_mean_score" type="Double" nullable="true"/>
<column name="wght_mean_score" type="Double" nullable="true"/>
<column name="wght_stddev_score" type="Double" nullable="true"/>
<column name="wght_left_mean_score" type="Double" nullable="true"/>
<column name="wght_right_mean_score" type="Double" nullable="true"/>
<column name="mean_wght_z_score" type="Double" nullable="true"/>
<column name="mean_wght_z_score_2" type="Double" nullable="true"/>
<column name="stddev_wght_z_score" type="Double" nullable="true"/>
<column name="stddev_wght_z_score_2" type="Double" nullable="true"/>
<column name="level_number" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_level_norm" indexName="idx_tl_level_norm_level_number" isUnique="false"><column name="level_number"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
Alter table tl_score drop column candidate_id;
Alter table tl_test_analysis drop column job_id;
<?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">tl_candidate_class_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="class_score" type="Long" nullable="true"/>
<column name="wghtd_class_score" type="Long" nullable="true"/>
<column name="max_wghtd_class_score" type="Long" nullable="true"/>
<column name="color_code" type="String" nullable="true" length="200"/>
<column name="wghtd_color_code" type="String" nullable="true" length="200"/>
<column name="factor_class" type="String" nullable="false" length="200"/>
<column name="test_analysis_id" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_candidate_class_score" indexName="idx_tl_candidate_class_score_test_analysis_id" isUnique="false"><column name="test_analysis_id"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (20, 'LEADINFL', 7.91, 10.00, 1.00, 3.39, 4.52, 11.30, 0.00, 0.00, 0.00, 0.00, 95, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (1, 'CARDRV', 41.72, 50.00, 17.00, 6.80, 34.92, 48.52, 292.15, 51.60, 240.55, 343.75, 1, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (1, 'CONFL', 30.59, 40.00, 12.00, 6.89, 23.70, 37.48, 152.99, 34.46, 118.53, 187.45, 2, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (1, 'COPING', 33.98, 40.00, 12.00, 6.41, 27.57, 40.39, 258.02, 50.34, 207.68, 308.36, 3, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (1, 'LEADINFL', 44.84, 60.00, 15.00, 9.90, 34.94, 54.74, 407.11, 94.81, 312.30, 501.92, 4, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (1, 'PEOPLE', 33.66, 40.00, 16.00, 5.86, 27.80, 39.52, 206.90, 43.16, 163.74, 250.06, 5, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (1, 'STRATEGIC', 30.82, 40.00, 8.00, 7.33, 23.49, 38.15, 273.36, 63.25, 210.11, 336.61, 6, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (1, 'VALUES', 36.74, 40.00, 21.00, 3.89, 32.85, 40.63, 183.72, 19.48, 164.24, 203.20, 7, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (1, 'WORKSTYLE', 24.86, 30.00, 7.00, 6.37, 18.49, 31.23, 166.04, 43.83, 122.21, 209.87, 8, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (2, 'CARDRV', 42.81, 50.00, 18.00, 6.48, 36.33, 49.29, 298.25, 51.33, 246.92, 349.58, 9, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (2, 'CONFL', 32.48, 40.00, 12.00, 6.45, 26.03, 38.93, 162.40, 32.26, 130.14, 194.66, 10, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (2, 'COPING', 35.29, 40.00, 12.00, 5.47, 29.82, 40.76, 263.10, 46.76, 216.34, 309.86, 11, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (2, 'LEADINFL', 46.53, 60.00, 6.00, 10.13, 36.40, 56.66, 425.96, 93.93, 332.03, 519.89, 12, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (2, 'PEOPLE', 33.83, 40.00, 12.00, 6.10, 27.73, 39.93, 208.58, 44.14, 164.44, 252.72, 13, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (2, 'STRATEGIC', 33.92, 40.00, 12.00, 5.77, 28.15, 39.69, 293.95, 53.91, 240.04, 347.86, 14, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (2, 'VALUES', 36.19, 40.00, 16.00, 4.36, 31.83, 40.55, 180.95, 21.81, 159.14, 202.76, 15, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (2, 'WORKSTYLE', 27.47, 30.00, 11.00, 4.29, 23.18, 31.76, 137.35, 21.48, 115.87, 158.83, 16, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (3, 'CARDRV', 42.11, 50.00, 22.00, 6.71, 35.40, 48.82, 337.59, 59.08, 278.51, 396.67, 17, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (3, 'COPING', 33.45, 40.00, 12.00, 6.01, 27.44, 39.46, 291.18, 56.71, 234.47, 347.89, 18, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (3, 'NEGOT', 50.94, 60.00, 27.00, 6.87, 44.07, 57.81, 254.73, 34.38, 220.35, 289.11, 19, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (3, 'PEOPLE', 35.02, 40.00, 20.00, 4.55, 30.47, 39.57, 262.40, 35.62, 226.78, 298.02, 20, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (3, 'POWERINFL', 24.83, 30.00, 7.00, 5.29, 19.54, 30.12, 166.57, 37.30, 129.27, 203.87, 21, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (3, 'VALUES', 36.17, 40.00, 25.00, 3.81, 32.36, 39.98, 180.85, 19.06, 161.79, 199.91, 22, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (3, 'WORKSTYLE', 36.22, 40.00, 16.00, 5.06, 31.16, 41.28, 181.14, 25.30, 155.84, 206.44, 23, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (4, 'CARDRV', 44.14, 50.00, 22.00, 5.73, 38.41, 49.87, 307.73, 46.77, 260.96, 354.50, 24, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (4, 'CONFL', 33.95, 40.00, 16.00, 5.71, 28.24, 39.66, 169.76, 28.57, 141.19, 198.33, 25, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (4, 'COPING', 36.67, 40.00, 17.00, 4.65, 32.02, 41.32, 272.22, 41.41, 230.81, 313.63, 26, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (4, 'PEOPLE', 36.78, 40.00, 21.00, 4.41, 32.37, 41.19, 230.25, 28.96, 201.29, 259.21, 27, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (4, 'POWERINFL', 17.45, 20.00, 10.00, 3.95, 13.50, 21.40, 87.26, 19.75, 67.51, 107.01, 28, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (4, 'PROBLEM', 36.43, 40.00, 20.00, 4.07, 32.36, 40.50, 182.18, 20.37, 161.81, 202.55, 29, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (4, 'VALUES', 36.44, 40.00, 16.00, 4.38, 32.06, 40.82, 182.22, 21.92, 160.30, 204.14, 30, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (4, 'WORKSTYLE', 28.04, 30.00, 20.00, 2.99, 25.05, 31.03, 280.47, 29.97, 250.50, 310.44, 31, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (5, 'CARDRV', 14.04, 20.00, 2.00, 5.76, 8.28, 19.80, 140.47, 57.67, 82.80, 198.14, 32, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (5, 'CONFL', 15.61, 20.00, 6.00, 4.99, 10.62, 20.60, 115.57, 43.75, 71.82, 159.32, 33, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (5, 'COPING', 30.55, 40.00, 4.00, 7.41, 23.14, 37.96, 228.51, 55.77, 172.74, 284.28, 34, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (5, 'PEOPLE', 24.47, 30.00, 6.00, 5.85, 18.62, 30.32, 201.79, 53.73, 148.06, 255.52, 35, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (5, 'POWERINFL', 25.12, 30.00, 3.00, 6.77, 18.35, 31.89, 211.11, 54.91, 156.20, 266.02, 36, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (5, 'PROBLEM', 25.20, 30.00, 7.00, 5.05, 20.15, 30.25, 206.06, 46.34, 159.72, 252.40, 37, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (5, 'VALUES', 34.50, 40.00, 12.00, 5.90, 28.60, 40.40, 172.50, 29.53, 142.97, 202.03, 38, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (5, 'WORKSTYLE', 35.51, 40.00, 16.00, 5.64, 29.87, 41.15, 221.30, 35.21, 186.09, 256.51, 39, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (6, 'CARDRV', 16.77, 20.00, 2.00, 4.49, 12.28, 21.26, 167.73, 44.91, 122.82, 212.64, 40, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (6, 'CONFL', 16.00, 20.00, 2.00, 5.18, 10.82, 21.18, 80.00, 25.91, 54.09, 105.91, 41, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (6, 'COPING', 35.11, 40.00, 17.00, 5.75, 29.36, 40.86, 263.86, 46.32, 217.54, 310.18, 42, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (6, 'PEOPLE', 25.77, 30.00, 11.00, 5.33, 20.44, 31.10, 215.75, 46.29, 169.46, 262.04, 43, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (6, 'POWERINFL', 26.28, 30.00, 11.00, 5.35, 20.93, 31.63, 175.56, 37.62, 137.94, 213.18, 44, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (6, 'PROBLEM', 26.28, 30.00, 16.00, 4.47, 21.81, 30.75, 218.01, 38.47, 179.54, 256.48, 45, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (6, 'VALUES', 36.52, 40.00, 25.00, 3.77, 32.75, 40.29, 182.64, 18.89, 163.75, 201.53, 46, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (6, 'WORKSTYLE', 36.41, 40.00, 25.00, 3.93, 32.48, 40.34, 274.05, 31.83, 242.22, 305.88, 47, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (7, 'CARDRV', 42.50, 50.00, 26.00, 6.62, 35.88, 49.12, 332.42, 61.25, 271.17, 393.67, 48, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (7, 'COPING', 35.70, 40.00, 12.00, 5.75, 29.95, 41.45, 313.14, 52.40, 260.74, 365.54, 49, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (7, 'NEGOT', 51.30, 60.00, 31.00, 6.97, 44.33, 58.27, 256.50, 34.85, 221.65, 291.35, 50, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (7, 'PEOPLE', 36.03, 40.00, 20.00, 4.09, 31.94, 40.12, 267.82, 33.06, 234.76, 300.88, 51, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (7, 'POWERINFL', 26.44, 30.00, 7.00, 4.68, 21.76, 31.12, 176.08, 33.13, 142.95, 209.21, 52, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (7, 'VALUES', 36.90, 40.00, 20.00, 3.61, 33.29, 40.51, 184.52, 18.07, 166.45, 202.59, 53, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (7, 'WORKSTYLE', 34.24, 40.00, 12.00, 6.98, 27.26, 41.22, 171.23, 34.94, 136.29, 206.17, 54, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (9, 'CARDRV', 43.75, 50.00, 22.00, 6.82, 36.93, 50.57, 301.21, 57.08, 244.13, 358.29, 55, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (9, 'CONFL', 34.97, 40.00, 17.00, 5.31, 29.66, 40.28, 174.86, 26.58, 148.28, 201.44, 56, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (9, 'COPING', 34.47, 40.00, 12.00, 6.02, 28.45, 40.49, 255.20, 52.05, 203.15, 307.25, 57, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (9, 'PEOPLE', 35.18, 40.00, 20.00, 5.06, 30.12, 40.24, 222.25, 31.11, 191.14, 253.36, 58, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (9, 'POWERINFL', 16.20, 20.00, 10.00, 3.90, 12.30, 20.10, 81.04, 19.51, 61.53, 100.55, 59, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (9, 'PROBLEM', 35.59, 40.00, 20.00, 4.30, 31.29, 39.89, 177.95, 21.54, 156.41, 199.49, 60, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (9, 'VALUES', 37.35, 40.00, 21.00, 3.86, 33.49, 41.21, 186.77, 19.32, 167.45, 206.09, 61, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (9, 'WORKSTYLE', 27.32, 30.00, 20.00, 3.38, 23.94, 30.70, 273.26, 33.80, 239.46, 307.06, 62, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (10, 'CARDRV', 44.16, 50.00, 22.00, 5.71, 38.45, 49.87, 307.89, 46.58, 261.31, 354.47, 63, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (10, 'CONFL', 33.94, 40.00, 16.00, 5.69, 28.25, 39.63, 169.72, 28.48, 141.24, 198.20, 64, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (10, 'COPING', 36.67, 40.00, 17.00, 4.62, 32.05, 41.29, 272.33, 41.15, 231.18, 313.48, 65, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (10, 'PEOPLE', 36.78, 40.00, 21.00, 4.40, 32.38, 41.18, 230.16, 28.97, 201.19, 259.13, 66, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (10, 'POWERINFL', 17.42, 20.00, 10.00, 3.97, 13.45, 21.39, 87.10, 19.86, 67.24, 106.96, 67, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (10, 'PROBLEM', 36.41, 40.00, 20.00, 4.06, 32.35, 40.47, 182.07, 20.31, 161.76, 202.38, 68, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (10, 'VALUES', 36.43, 40.00, 16.00, 4.38, 32.05, 40.81, 182.18, 21.93, 160.25, 204.11, 69, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (10, 'WORKSTYLE', 28.05, 30.00, 20.00, 2.98, 25.07, 31.03, 280.51, 29.88, 250.63, 310.39, 70, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (14, 'CARDRV', 42.81, 50.00, 18.00, 6.48, 36.33, 49.29, 298.25, 51.33, 246.92, 349.58, 71, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (14, 'CONFL', 32.48, 40.00, 12.00, 6.45, 26.03, 38.93, 162.40, 32.26, 130.14, 194.66, 72, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (14, 'COPING', 35.29, 40.00, 12.00, 5.47, 29.82, 40.76, 263.10, 46.76, 216.34, 309.86, 73, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (14, 'LEADINFL', 46.53, 60.00, 6.00, 10.13, 36.40, 56.66, 425.96, 93.93, 332.03, 519.89, 74, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (14, 'PEOPLE', 33.83, 40.00, 12.00, 6.10, 27.73, 39.93, 208.58, 44.14, 164.44, 252.72, 75, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (14, 'STRATEGIC', 33.92, 40.00, 12.00, 5.77, 28.15, 39.69, 293.95, 53.91, 240.04, 347.86, 76, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (14, 'VALUES', 36.19, 40.00, 16.00, 4.36, 31.83, 40.55, 180.95, 21.81, 159.14, 202.76, 77, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (14, 'WORKSTYLE', 27.47, 30.00, 11.00, 4.29, 23.18, 31.76, 137.35, 21.48, 115.87, 158.83, 78, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (15, 'CARDRV', 42.11, 50.00, 22.00, 6.71, 35.40, 48.82, 337.59, 59.08, 278.51, 396.67, 79, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (15, 'COPING', 33.45, 40.00, 12.00, 6.01, 27.44, 39.46, 291.18, 56.71, 234.47, 347.89, 80, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (15, 'NEGOT', 50.94, 60.00, 27.00, 6.87, 44.07, 57.81, 254.73, 34.38, 220.35, 289.11, 81, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (15, 'PEOPLE', 35.02, 40.00, 20.00, 4.55, 30.47, 39.57, 262.40, 35.62, 226.78, 298.02, 82, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (15, 'POWERINFL', 24.83, 30.00, 7.00, 5.29, 19.54, 30.12, 166.57, 37.30, 129.27, 203.87, 83, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (15, 'VALUES', 36.17, 40.00, 25.00, 3.81, 32.36, 39.98, 180.85, 19.06, 161.79, 199.91, 84, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (15, 'WORKSTYLE', 36.22, 40.00, 16.00, 5.06, 31.16, 41.28, 181.14, 25.30, 155.84, 206.44, 85, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (16, 'CARDRV', 42.11, 50.00, 22.00, 6.71, 35.40, 48.82, 337.59, 59.08, 278.51, 396.67, 86, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (16, 'COPING', 33.45, 40.00, 12.00, 6.01, 27.44, 39.46, 291.18, 56.71, 234.47, 347.89, 87, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (16, 'NEGOT', 50.94, 60.00, 27.00, 6.87, 44.07, 57.81, 254.73, 34.38, 220.35, 289.11, 88, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (16, 'PEOPLE', 35.02, 40.00, 20.00, 4.55, 30.47, 39.57, 262.40, 35.62, 226.78, 298.02, 89, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (16, 'POWERINFL', 24.83, 30.00, 7.00, 5.29, 19.54, 30.12, 166.57, 37.30, 129.27, 203.87, 90, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (16, 'VALUES', 36.17, 40.00, 25.00, 3.81, 32.36, 39.98, 180.85, 19.06, 161.79, 199.91, 91, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (16, 'WORKSTYLE', 36.22, 40.00, 16.00, 5.06, 31.16, 41.28, 181.14, 25.30, 155.84, 206.44, 92, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (20, 'CARDRV', 39.74, 50.00, 13.00, 7.44, 32.30, 47.18, 308.45, 67.20, 241.25, 375.65, 93, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (20, 'COPING', 33.46, 40.00, 12.00, 5.99, 27.47, 39.45, 211.15, 44.90, 166.25, 256.05, 94, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (20, 'NEGOT', 47.10, 60.00, 18.00, 8.13, 38.97, 55.23, 314.64, 61.84, 252.80, 376.48, 96, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (20, 'PEOPLE', 30.86, 40.00, 8.00, 7.39, 23.47, 38.25, 190.38, 50.93, 139.45, 241.31, 97, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (20, 'POWERINFL', 23.35, 30.00, 3.00, 6.58, 16.77, 29.93, 233.58, 65.83, 167.75, 299.41, 98, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (20, 'VALUES', 34.08, 40.00, 17.00, 5.87, 28.21, 39.95, 171.70, 38.26, 133.44, 209.96, 99, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (20, 'WORKSTYLE', 41.89, 50.00, 17.00, 7.40, 34.49, 49.29, 293.31, 53.18, 240.13, 346.49, 100, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (21, 'CARDRV', 44.16, 50.00, 22.00, 5.71, 38.45, 49.87, 307.89, 46.58, 261.31, 354.47, 101, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (21, 'CONFL', 33.94, 40.00, 16.00, 5.69, 28.25, 39.63, 169.72, 28.48, 141.24, 198.20, 102, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (21, 'COPING', 36.67, 40.00, 17.00, 4.62, 32.05, 41.29, 272.33, 41.15, 231.18, 313.48, 103, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (21, 'PEOPLE', 36.78, 40.00, 21.00, 4.40, 32.38, 41.18, 230.16, 28.97, 201.19, 259.13, 104, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (21, 'POWERINFL', 17.42, 20.00, 10.00, 3.97, 13.45, 21.39, 87.10, 19.86, 67.24, 106.96, 105, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (21, 'PROBLEM', 36.41, 40.00, 20.00, 4.06, 32.35, 40.47, 182.07, 20.31, 161.76, 202.38, 106, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (21, 'VALUES', 36.43, 40.00, 16.00, 4.38, 32.05, 40.81, 182.18, 21.93, 160.25, 204.11, 107, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (21, 'WORKSTYLE', 28.05, 30.00, 20.00, 2.98, 25.07, 31.03, 280.51, 29.88, 250.63, 310.39, 108, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (26, 'ACTINTER', 35.50, 40.00, 25.00, 4.03, 31.47, 39.53, 177.50, 20.15, 157.35, 197.65, 109, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (26, 'CONSISTENCY', 34.54, 40.00, 26.00, 4.48, 30.06, 39.02, 203.70, 36.73, 166.97, 240.43, 110, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (26, 'EMPATHRESP', 59.08, 70.00, 36.00, 6.93, 52.15, 66.01, 381.90, 46.00, 335.90, 427.90, 111, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (26, 'HIGHQUAL', 35.98, 40.00, 21.00, 4.24, 31.74, 40.22, 179.90, 21.22, 158.68, 201.12, 112, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (26, 'INNOVSPIR', 33.88, 40.00, 25.00, 5.08, 28.80, 38.96, 214.10, 31.12, 182.98, 245.22, 113, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (26, 'LEADER', 37.84, 50.00, 13.00, 11.05, 26.79, 48.89, 295.90, 98.85, 197.05, 394.75, 114, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (26, 'OTHERS', 23.32, 30.00, 11.00, 4.46, 18.86, 27.78, 196.20, 43.27, 152.93, 239.47, 115, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (28, 'CARDRV', 40.78, 50.00, 27.00, 5.76, 35.02, 46.54, 332.01, 44.55, 287.46, 376.56, 116, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (28, 'COPING', 37.48, 40.00, 26.00, 3.79, 33.69, 41.27, 327.69, 33.76, 293.93, 361.45, 117, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (28, 'NEGOT', 54.30, 60.00, 36.00, 6.05, 48.25, 60.35, 271.53, 30.29, 241.24, 301.82, 118, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (28, 'PEOPLE', 38.57, 40.00, 30.00, 2.59, 35.98, 41.16, 288.17, 22.01, 266.16, 310.18, 119, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (28, 'POWERINFL', 26.48, 30.00, 11.00, 5.27, 21.21, 31.75, 178.75, 34.95, 143.80, 213.70, 120, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (28, 'VALUES', 37.69, 40.00, 30.00, 3.46, 34.23, 41.15, 188.46, 17.30, 171.16, 205.76, 121, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (28, 'WORKSTYLE', 38.38, 40.00, 30.00, 2.84, 35.54, 41.22, 191.92, 14.21, 177.71, 206.13, 122, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (29, 'CARDRV', 45.63, 50.00, 36.00, 4.37, 41.26, 50.00, 323.15, 28.61, 294.54, 351.76, 123, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (29, 'CONFL', 33.89, 40.00, 26.00, 4.01, 29.88, 37.90, 169.47, 20.05, 149.42, 189.52, 124, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (29, 'COPING', 36.36, 40.00, 30.00, 3.48, 32.88, 39.84, 268.94, 32.26, 236.68, 301.20, 125, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (29, 'LEADINFL', 50.52, 60.00, 23.00, 7.81, 42.71, 58.33, 456.57, 73.59, 382.98, 530.16, 126, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (29, 'PEOPLE', 36.36, 40.00, 21.00, 4.92, 31.44, 41.28, 226.84, 34.91, 191.93, 261.75, 127, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (29, 'STRATEGIC', 36.36, 40.00, 21.00, 4.92, 31.44, 41.28, 316.05, 42.38, 273.67, 358.43, 128, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (29, 'VALUES', 38.15, 40.00, 30.00, 2.90, 35.25, 41.05, 190.78, 14.53, 176.25, 205.31, 129, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (29, 'WORKSTYLE', 28.47, 30.00, 15.00, 3.88, 24.59, 32.35, 142.36, 19.42, 122.94, 161.78, 130, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (30, 'CARDRV', 42.33, 50.00, 31.00, 5.64, 36.69, 47.97, 295.83, 44.38, 251.45, 340.21, 131, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (30, 'CONFL', 35.33, 40.00, 31.00, 3.68, 31.65, 39.01, 176.66, 18.40, 158.26, 195.06, 132, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (30, 'COPING', 36.41, 40.00, 30.00, 3.90, 32.51, 40.31, 277.91, 25.12, 252.79, 303.03, 133, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (30, 'LEADINFL', 47.00, 60.00, 32.00, 8.26, 38.74, 55.26, 422.08, 79.09, 342.99, 501.17, 134, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (30, 'PEOPLE', 34.33, 40.00, 25.00, 4.71, 29.62, 39.04, 210.00, 38.45, 171.55, 248.45, 135, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (30, 'STRATEGIC', 35.83, 40.00, 30.00, 3.99, 31.84, 39.82, 314.58, 34.54, 280.04, 349.12, 136, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (30, 'VALUES', 35.41, 40.00, 30.00, 3.79, 31.62, 39.20, 177.08, 18.98, 158.10, 196.06, 137, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (30, 'WORKSTYLE', 28.08, 30.00, 21.00, 3.45, 24.63, 31.53, 140.41, 17.25, 123.16, 157.66, 138, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (31, 'CARDRV', 45.71, 50.00, 35.00, 4.94, 40.77, 50.65, 325.00, 32.73, 292.27, 357.73, 139, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (31, 'CONFL', 36.00, 40.00, 26.00, 5.20, 30.80, 41.20, 180.00, 26.04, 153.96, 206.04, 140, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (31, 'COPING', 37.28, 40.00, 31.00, 3.36, 33.92, 40.64, 286.42, 16.84, 269.58, 303.26, 141, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (31, 'LEADINFL', 50.57, 60.00, 33.00, 9.08, 41.49, 59.65, 462.14, 88.95, 373.19, 551.09, 142, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (31, 'PEOPLE', 37.28, 40.00, 31.00, 3.36, 33.92, 40.64, 226.42, 32.37, 194.05, 258.79, 143, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (31, 'STRATEGIC', 37.14, 40.00, 30.00, 3.64, 33.50, 40.78, 321.42, 36.42, 285.00, 357.84, 144, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (31, 'VALUES', 35.71, 40.00, 30.00, 3.19, 32.52, 38.90, 178.57, 15.97, 162.60, 194.54, 145, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_class_norm (level_number, class_code, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, object_id, object_last_updated_date, object_created_date) VALUES (31, 'WORKSTYLE', 29.28, 30.00, 25.00, 1.74, 27.54, 31.02, 146.42, 8.74, 137.68, 155.16, 146, '2017-08-19 17:15:43.493713', '2017-08-19 17:15:43.493713');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (1, 'CARDRV', 'ESSENTIAL', 1, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (1, 'COPING', 'ESSENTIAL', 2, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (1, 'LEADINFL', 'ESSENTIAL', 3, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (1, 'STRATEGIC', 'ESSENTIAL', 4, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (1, 'VALUES', 'ESSENTIAL', 5, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (2, 'CARDRV', 'ESSENTIAL', 6, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (2, 'COPING', 'ESSENTIAL', 7, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (2, 'PEOPLE', 'ESSENTIAL', 8, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (2, 'STRATEGIC', 'DESIRABLE', 9, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (3, 'CARDRV', 'ESSENTIAL', 10, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (3, 'COPING', 'ESSENTIAL', 11, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (3, 'NEGOT', 'ESSENTIAL', 12, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (3, 'POWERINFL', 'ESSENTIAL', 13, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (3, 'VALUES', 'DESIRABLE', 14, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (4, 'CARDRV', 'ESSENTIAL', 15, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (4, 'CONFL', 'DESIRABLE', 16, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (4, 'COPING', 'ESSENTIAL', 17, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (4, 'POWERINFL', 'DESIRABLE', 18, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (4, 'PROBLEM', 'DESIRABLE', 19, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (4, 'WORKSTYLE', 'DESIRABLE', 20, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (5, 'CARDRV', 'ESSENTIAL', 21, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (5, 'COPING', 'ESSENTIAL', 22, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (5, 'PEOPLE', 'DESIRABLE', 23, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (5, 'VALUES', 'DESIRABLE', 24, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (6, 'CARDRV', 'ESSENTIAL', 25, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (6, 'COPING', 'ESSENTIAL', 26, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (6, 'PEOPLE', 'DESIRABLE', 27, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (6, 'VALUES', 'DESIRABLE', 28, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (1, 'CONFL', 'HIGHLY_DESIRABLE', 29, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (1, 'PEOPLE', 'HIGHLY_DESIRABLE', 30, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (1, 'WORKSTYLE', 'HIGHLY_DESIRABLE', 31, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (2, 'CONFL', 'HIGHLY_DESIRABLE', 32, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (2, 'LEADINFL', 'HIGHLY_DESIRABLE', 33, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (2, 'VALUES', 'HIGHLY_DESIRABLE', 34, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (2, 'WORKSTYLE', 'HIGHLY_DESIRABLE', 35, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (3, 'PEOPLE', 'HIGHLY_DESIRABLE', 36, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (3, 'WORKSTYLE', 'HIGHLY_DESIRABLE', 37, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (4, 'PEOPLE', 'HIGHLY_DESIRABLE', 38, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (4, 'VALUES', 'HIGHLY_DESIRABLE', 39, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (5, 'CONFL', 'HIGHLY_DESIRABLE', 40, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (5, 'POWERINFL', 'HIGHLY_DESIRABLE', 41, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (5, 'PROBLEM', 'HIGHLY_DESIRABLE', 42, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (5, 'WORKSTYLE', 'HIGHLY_DESIRABLE', 43, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (6, 'CONFL', 'HIGHLY_DESIRABLE', 44, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (6, 'POWERINFL', 'HIGHLY_DESIRABLE', 45, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (6, 'PROBLEM', 'HIGHLY_DESIRABLE', 46, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_class_criteria (level_number, class_code, weighting, object_id, object_last_updated_date, object_created_date) VALUES (6, 'WORKSTYLE', 'HIGHLY_DESIRABLE', 47, '2017-08-19 17:10:13.058029', '2017-08-19 17:10:13.058029');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (1, 278.00, 330.00, 182.00, 28.45, 249.55, 306.45, 1945.30, 218.50, 1726.80, 2163.80, 0.00, 0.00, 0.00, 0.00, 1, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (2, 288.37, 340.00, 184.00, 28.21, 260.16, 316.58, 1971.99, 211.42, 1760.57, 2183.41, -0.04, 0.00, 8.23, 0.00, 2, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (3, 258.81, 300.00, 187.00, 20.24, 238.57, 279.05, 1675.37, 146.66, 1528.71, 1822.03, -0.09, 0.00, 8.52, 0.00, 3, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (4, 269.08, 300.00, 190.00, 19.80, 249.28, 288.88, 1705.39, 135.10, 1570.29, 1840.49, 0.02, 0.02, 7.70, 12.25, 4, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (5, 205.04, 250.00, 101.00, 24.39, 180.65, 229.43, 1497.34, 192.50, 1304.84, 1689.84, 0.00, 0.00, 0.00, 0.00, 5, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (6, 219.16, 250.00, 170.00, 18.06, 201.10, 237.22, 1577.64, 139.07, 1438.57, 1716.71, 0.00, 0.00, 0.00, 0.00, 6, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (10, 269.08, 300.00, 190.00, 19.80, 249.28, 288.88, 1705.39, 135.10, 1570.29, 1840.49, NULL, NULL, NULL, NULL, 7, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (14, 288.37, 340.00, 184.00, 28.21, 260.16, 316.58, 1971.99, 211.42, 1760.57, 2183.41, NULL, NULL, NULL, NULL, 8, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (15, 258.81, 300.00, 187.00, 20.24, 238.57, 279.05, 1675.37, 146.66, 1528.71, 1822.03, NULL, NULL, NULL, NULL, 9, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (16, 258.81, 300.00, 187.00, 20.24, 238.57, 279.05, 1675.37, 146.66, 1528.71, 1822.03, NULL, NULL, NULL, NULL, 10, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (21, 269.08, 300.00, 190.00, 19.80, 249.28, 288.88, 1705.39, 135.10, 1570.29, 1840.49, 0.02, 0.02, 7.70, 12.25, 11, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (26, 260.14, 300.00, 197.00, 22.34, 237.80, 282.48, 1649.20, 181.79, 1467.41, 1830.99, NULL, NULL, NULL, NULL, 12, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (27, 260.14, 300.00, 197.00, 22.34, NULL, NULL, 1649.20, 181.79, NULL, NULL, NULL, NULL, NULL, NULL, 13, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (28, 273.67, 295.00, 242.00, 13.52, 260.15, 287.19, 1777.45, 92.00, 1685.45, 1869.45, NULL, NULL, NULL, NULL, 14, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (29, 305.78, 335.00, 277.00, 17.91, 287.87, 323.69, 2094.21, 137.65, 1956.56, 2231.86, NULL, NULL, NULL, NULL, 15, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (30, 294.75, 320.00, 273.00, 13.51, 281.24, 308.26, 2014.58, 114.49, 1900.09, 2129.07, NULL, NULL, NULL, NULL, 16, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (31, 309.00, 335.00, 278.00, 18.41, 290.59, 327.41, 2126.42, 139.58, 1986.84, 2266.00, NULL, NULL, NULL, NULL, 17, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
INSERT INTO tl_level_norm (level_number, mean_score, max_score, min_score, stddev_score, left_mean_score, right_mean_score, wght_mean_score, wght_stddev_score, wght_left_mean_score, wght_right_mean_score, mean_wght_z_score, mean_wght_z_score_2, stddev_wght_z_score, stddev_wght_z_score_2, object_id, object_last_updated_date, object_created_date) VALUES (40, 223.61, 270.00, 167.00, 22.22, 201.39, 245.83, 1503.45, 188.52, 1314.93, 1691.97, NULL, NULL, NULL, NULL, 18, '2017-08-19 17:14:09.528383', '2017-08-19 17:14:09.528383');
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