<?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="Question" package="performa.orm">
        
        <MULTIPLEREFERENCE  name="Factors"          type="FactorQuestionLink"   backreferenceName="Question" />
        <MULTIPLEREFERENCE  name="LeftQuestions"    type="Question"             backreferenceName="RightQuestion" />    <!-- Can't be greater than 1 -->
                
        <TABLE  name="tl_quest_lin" tablePrefix="object"    polymorphic="FALSE">
            
            <ATTRIB name="Description"      type="String"   dbcol="description"     length="80"/>
            <ATTRIB name="IsRightQuestion"  type="Boolean"  dbcol="is_right_quest"  defaultValue="Boolean.FALSE"/>

            <SINGLEREFERENCE    name="Section"          type="Section"  dbcol="section_number"      backreferenceName="Questions"/>
            <SINGLEREFERENCE    name="RightQuestion"    type="Question" dbcol="right_quest_number"  backreferenceName="LeftQuestions"/>
            <SINGLEREFERENCE    name="HighLowFactor"    type="Factor"   dbcol="high_low_factor_id"  backreferenceName="HighLowQuestions"/>  <!-- Using this to manage special case of Unusually High/Low Factor Calculation -->

        </TABLE>
                
        <SEARCH type="All"  paramFilter="tl_quest_lin.object_id is not null"    orderBy="tl_quest_lin.object_id"    />

    </BUSINESSCLASS>
    
</ROOT>