Commit 0d6d079a by Nilu

new BO TestAnalysis and FactorScore

parent 82465240
<?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">score</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="score_number" type="Long" nullable="true"/>
<column name="test_analysis_id" type="Long" length="11" nullable="true"/>
<column name="factor_number" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="score" indexName="idx_score_test_analysis_id" isUnique="false"><column name="test_analysis_id"/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
......@@ -4,11 +4,12 @@
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">it_does_not_matter</tableName>
<tableName factory="String">test_analysis</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="xxxx" type="BLOB" nullable="false"/>
<column name="level_id" type="Long" length="11" nullable="true"/>
<column name="candidate_id" type="Long" length="11" nullable="true"/>
</NODE>
</NODE></OBJECTS>
\ No newline at end of file
-- DROP TABLE score;
CREATE TABLE score (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
score_number numeric(12) NULL,
test_analysis_id numeric(12) NULL,
factor_number numeric(12) NULL
);
ALTER TABLE score ADD
CONSTRAINT PK_score PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_score_test_analysis_id
ON score (test_analysis_id);
-- DROP TABLE it_does_not_matter;
-- DROP TABLE test_analysis;
CREATE TABLE it_does_not_matter (
CREATE TABLE test_analysis (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
xxxx image NOT NULL
level_id numeric(12) NULL,
candidate_id numeric(12) NULL
);
ALTER TABLE it_does_not_matter ADD
CONSTRAINT PK_it_does_not_matter PRIMARY KEY
ALTER TABLE test_analysis ADD
CONSTRAINT PK_test_analysis PRIMARY KEY
(
object_id
) ;
......
-- DROP TABLE score;
CREATE TABLE score (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
score_number number(12) NULL,
test_analysis_id number(12) NULL,
factor_number number(12) NULL
);
ALTER TABLE score ADD
CONSTRAINT PK_score PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_score_test_analysis_id
ON score (test_analysis_id);
-- DROP TABLE it_does_not_matter;
-- DROP TABLE test_analysis;
CREATE TABLE it_does_not_matter (
CREATE TABLE test_analysis (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
xxxx blob NOT NULL
level_id number(12) NULL,
candidate_id number(12) NULL
);
ALTER TABLE it_does_not_matter ADD
CONSTRAINT PK_it_does_not_matter PRIMARY KEY
ALTER TABLE test_analysis ADD
CONSTRAINT PK_test_analysis PRIMARY KEY
(
object_id
) ;
......
-- @AutoRun
-- drop table score;
CREATE TABLE score (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
score_number numeric(12) NULL,
test_analysis_id numeric(12) NULL,
factor_number numeric(12) NULL
);
ALTER TABLE score ADD
CONSTRAINT pk_score PRIMARY KEY
(
object_id
) ;
CREATE INDEX idx_score_test_analysis_id
ON score (test_analysis_id);
-- @AutoRun
-- drop table it_does_not_matter;
-- drop table test_analysis;
CREATE TABLE it_does_not_matter (
CREATE TABLE test_analysis (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
xxxx bytea NOT NULL
level_id numeric(12) NULL,
candidate_id numeric(12) NULL
);
ALTER TABLE it_does_not_matter ADD
CONSTRAINT pk_it_does_not_matter PRIMARY KEY
ALTER TABLE test_analysis ADD
CONSTRAINT pk_test_analysis PRIMARY KEY
(
object_id
) ;
......
package performa.orm;
public class FactorScore extends BaseFactorScore
{
private static final long serialVersionUID = 0L;
// This constructor should not be called
public FactorScore ()
{
// 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="FactorScore" package="performa.orm">
<TABLE name="score" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="Score" type="Integer" dbcol="score_number"/>
<SINGLEREFERENCE name="TestAnalysis" type="TestAnalysis" dbcol="test_analysis_id" backreferenceName="FactorScores"/>
<SINGLEREFERENCE name="Factor" type="Factor" dbcol="factor_number"/>
</TABLE>
<SEARCH type="All" paramFilter="score.object_id is not null" orderBy="score.object_id" />
</BUSINESSCLASS>
</ROOT>
\ No newline at end of file
package performa.orm;
public class TestAnalysis extends BaseTestAnalysis
{
private static final long serialVersionUID = 0L;
// This constructor should not be called
public TestAnalysis ()
{
// 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="TestAnalysis" package="performa.orm">
<MULTIPLEREFERENCE name="FactorScores" type="FactorScore" backreferenceName="TestAnalysis" />
<TABLE name="test_analysis" tablePrefix="object" polymorphic="FALSE">
<SINGLEREFERENCE name="Level" type="Level" dbcol="level_id"/>
<SINGLEREFERENCE name="Candidate" type="Candidate" dbcol="candidate_id"/>
</TABLE>
<SEARCH type="All" paramFilter="test_analysis.object_id is not null" orderBy="test_analysis.object_id" />
</BUSINESSCLASS>
</ROOT>
\ No newline at end of file
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