<?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"/>
            <ATTRIB name="IsExpressQuestion"    type="Boolean"  dbcol="is_express_question" defaultValue="Boolean.FALSE"/>
            <ATTRIB name="InnerSortOrder"       type="Integer"  dbcol="inner_sort_order"    defaultValue="1"/>  <!-- Added mainly for express question PERSONAL VALUES section, question #1073 -->

            <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>