/*
 * 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;



public abstract class BaseQuestion extends BaseBusinessClass
{
    // Reference instance for the object
    public static final Question REFERENCE_Question = new Question ();

    // Reference instance for the object
    public static final Question DUMMY_Question = new DummyQuestion ();

    // Static constants corresponding to field names
    
    public static final String FIELD_LeftQuestionNo = "LeftQuestionNo";
    public static final String FIELD_LeftQuestion = "LeftQuestion";
    public static final String FIELD_RightQuestionNo = "RightQuestionNo";
    public static final String FIELD_RightQuestion = "RightQuestion";
    public static final String FIELD_LeftQuestionSchinese = "LeftQuestionSchinese";
    public static final String FIELD_RightQuestionSchinese = "RightQuestionSchinese";
    public static final String FIELD_LeftQuestionChinese = "LeftQuestionChinese";
    public static final String FIELD_RightQuestionChinese = "RightQuestionChinese";
    public static final String FIELD_LeftQuestionKorean = "LeftQuestionKorean";
    public static final String FIELD_RightQuestionKorean = "RightQuestionKorean";
    public static final String FIELD_LeftQuestionThai = "LeftQuestionThai";
    public static final String FIELD_RightQuestionThai = "RightQuestionThai";
    public static final String FIELD_LeftQuestionViet = "LeftQuestionViet";
    public static final String FIELD_RightQuestionViet = "RightQuestionViet";

    // Static constants corresponding to searches
    

    // Static constants corresponding to attribute helpers
    private static final DefaultAttributeHelper<Question> HELPER_LeftQuestionNo = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Question> HELPER_LeftQuestion = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Question> HELPER_RightQuestionNo = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Question> HELPER_RightQuestion = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Question> HELPER_LeftQuestionSchinese = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Question> HELPER_RightQuestionSchinese = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Question> HELPER_LeftQuestionChinese = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Question> HELPER_RightQuestionChinese = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Question> HELPER_LeftQuestionKorean = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Question> HELPER_RightQuestionKorean = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Question> HELPER_LeftQuestionThai = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Question> HELPER_RightQuestionThai = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Question> HELPER_LeftQuestionViet = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Question> HELPER_RightQuestionViet = DefaultAttributeHelper.INSTANCE;
    

    // Private attributes corresponding to business object data
    private Integer _LeftQuestionNo;
    private String _LeftQuestion;
    private Integer _RightQuestionNo;
    private String _RightQuestion;
    private String _LeftQuestionSchinese;
    private String _RightQuestionSchinese;
    private String _LeftQuestionChinese;
    private String _RightQuestionChinese;
    private String _LeftQuestionKorean;
    private String _RightQuestionKorean;
    private String _LeftQuestionThai;
    private String _RightQuestionThai;
    private String _LeftQuestionViet;
    private String _RightQuestionViet;
    

    // Private attributes corresponding to single references
    

    // Private attributes corresponding to multiple references
    

    // Map of maps of metadata
    private static final Map ATTRIBUTES_METADATA_Question = new HashMap ();

    // Arrays of validators for each attribute
    private static final AttributeValidator[] FIELD_LeftQuestionNo_Validators;
    private static final AttributeValidator[] FIELD_LeftQuestion_Validators;
    private static final AttributeValidator[] FIELD_RightQuestionNo_Validators;
    private static final AttributeValidator[] FIELD_RightQuestion_Validators;
    private static final AttributeValidator[] FIELD_LeftQuestionSchinese_Validators;
    private static final AttributeValidator[] FIELD_RightQuestionSchinese_Validators;
    private static final AttributeValidator[] FIELD_LeftQuestionChinese_Validators;
    private static final AttributeValidator[] FIELD_RightQuestionChinese_Validators;
    private static final AttributeValidator[] FIELD_LeftQuestionKorean_Validators;
    private static final AttributeValidator[] FIELD_RightQuestionKorean_Validators;
    private static final AttributeValidator[] FIELD_LeftQuestionThai_Validators;
    private static final AttributeValidator[] FIELD_RightQuestionThai_Validators;
    private static final AttributeValidator[] FIELD_LeftQuestionViet_Validators;
    private static final AttributeValidator[] FIELD_RightQuestionViet_Validators;
    

    // Arrays of behaviour decorators
    private static final QuestionBehaviourDecorator[] Question_BehaviourDecorators;
    
    static
    {
        try
        {
            
            
            Map  validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping"));

            FIELD_LeftQuestionNo_Validators = (AttributeValidator[])setupAttribMetaData_LeftQuestionNo(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_LeftQuestion_Validators = (AttributeValidator[])setupAttribMetaData_LeftQuestion(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_RightQuestionNo_Validators = (AttributeValidator[])setupAttribMetaData_RightQuestionNo(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_RightQuestion_Validators = (AttributeValidator[])setupAttribMetaData_RightQuestion(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_LeftQuestionSchinese_Validators = (AttributeValidator[])setupAttribMetaData_LeftQuestionSchinese(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_RightQuestionSchinese_Validators = (AttributeValidator[])setupAttribMetaData_RightQuestionSchinese(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_LeftQuestionChinese_Validators = (AttributeValidator[])setupAttribMetaData_LeftQuestionChinese(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_RightQuestionChinese_Validators = (AttributeValidator[])setupAttribMetaData_RightQuestionChinese(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_LeftQuestionKorean_Validators = (AttributeValidator[])setupAttribMetaData_LeftQuestionKorean(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_RightQuestionKorean_Validators = (AttributeValidator[])setupAttribMetaData_RightQuestionKorean(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_LeftQuestionThai_Validators = (AttributeValidator[])setupAttribMetaData_LeftQuestionThai(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_RightQuestionThai_Validators = (AttributeValidator[])setupAttribMetaData_RightQuestionThai(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_LeftQuestionViet_Validators = (AttributeValidator[])setupAttribMetaData_LeftQuestionViet(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_RightQuestionViet_Validators = (AttributeValidator[])setupAttribMetaData_RightQuestionViet(validatorMapping).toArray (new AttributeValidator[0]);
            

            REFERENCE_Question.initialiseReference ();
            DUMMY_Question.initialiseReference ();
            Question_BehaviourDecorators = BaseBusinessClass.getBBCBehaviours(Question.class).toArray(new QuestionBehaviourDecorator[0]);
        }
        catch (RuntimeException e)
        {
            LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR1, e, "Error initialising");
            throw e;
        }
    }

    
    // Meta Info setup
    private static List setupAttribMetaData_LeftQuestionNo(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "left_quest_number");
        metaInfo.put ("name", "LeftQuestionNo");
        metaInfo.put ("type", "Integer");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Question.LeftQuestionNo:", metaInfo);
        ATTRIBUTES_METADATA_Question.put (FIELD_LeftQuestionNo, Collections.unmodifiableMap (metaInfo));

        List validators = BaseBusinessClass.getAttribValidators(Question.class, "LeftQuestionNo", metaInfo, validatorMapping);
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Question.LeftQuestionNo:", validators);        

        return validators;
    }
    
    // Meta Info setup
    private static List setupAttribMetaData_LeftQuestion(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "left_quest");
        metaInfo.put ("length", "80");
        metaInfo.put ("name", "LeftQuestion");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Question.LeftQuestion:", metaInfo);
        ATTRIBUTES_METADATA_Question.put (FIELD_LeftQuestion, Collections.unmodifiableMap (metaInfo));

        List validators = BaseBusinessClass.getAttribValidators(Question.class, "LeftQuestion", metaInfo, validatorMapping);
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Question.LeftQuestion:", validators);        

        return validators;
    }
    
    // Meta Info setup
    private static List setupAttribMetaData_RightQuestionNo(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "right_quest_number");
        metaInfo.put ("name", "RightQuestionNo");
        metaInfo.put ("type", "Integer");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Question.RightQuestionNo:", metaInfo);
        ATTRIBUTES_METADATA_Question.put (FIELD_RightQuestionNo, Collections.unmodifiableMap (metaInfo));

        List validators = BaseBusinessClass.getAttribValidators(Question.class, "RightQuestionNo", metaInfo, validatorMapping);
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Question.RightQuestionNo:", validators);        

        return validators;
    }
    
    // Meta Info setup
    private static List setupAttribMetaData_RightQuestion(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "right_quest");
        metaInfo.put ("length", "80");
        metaInfo.put ("name", "RightQuestion");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Question.RightQuestion:", metaInfo);
        ATTRIBUTES_METADATA_Question.put (FIELD_RightQuestion, Collections.unmodifiableMap (metaInfo));

        List validators = BaseBusinessClass.getAttribValidators(Question.class, "RightQuestion", metaInfo, validatorMapping);
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Question.RightQuestion:", validators);        

        return validators;
    }
    
    // Meta Info setup
    private static List setupAttribMetaData_LeftQuestionSchinese(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "left_quest_schinese");
        metaInfo.put ("name", "LeftQuestionSchinese");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Question.LeftQuestionSchinese:", metaInfo);
        ATTRIBUTES_METADATA_Question.put (FIELD_LeftQuestionSchinese, Collections.unmodifiableMap (metaInfo));

        List validators = BaseBusinessClass.getAttribValidators(Question.class, "LeftQuestionSchinese", metaInfo, validatorMapping);
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Question.LeftQuestionSchinese:", validators);        

        return validators;
    }
    
    // Meta Info setup
    private static List setupAttribMetaData_RightQuestionSchinese(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "right_quest_schinese");
        metaInfo.put ("name", "RightQuestionSchinese");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Question.RightQuestionSchinese:", metaInfo);
        ATTRIBUTES_METADATA_Question.put (FIELD_RightQuestionSchinese, Collections.unmodifiableMap (metaInfo));

        List validators = BaseBusinessClass.getAttribValidators(Question.class, "RightQuestionSchinese", metaInfo, validatorMapping);
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Question.RightQuestionSchinese:", validators);        

        return validators;
    }
    
    // Meta Info setup
    private static List setupAttribMetaData_LeftQuestionChinese(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "left_quest_chinese");
        metaInfo.put ("name", "LeftQuestionChinese");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Question.LeftQuestionChinese:", metaInfo);
        ATTRIBUTES_METADATA_Question.put (FIELD_LeftQuestionChinese, Collections.unmodifiableMap (metaInfo));

        List validators = BaseBusinessClass.getAttribValidators(Question.class, "LeftQuestionChinese", metaInfo, validatorMapping);
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Question.LeftQuestionChinese:", validators);        

        return validators;
    }
    
    // Meta Info setup
    private static List setupAttribMetaData_RightQuestionChinese(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "right_quest_chinese");
        metaInfo.put ("name", "RightQuestionChinese");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Question.RightQuestionChinese:", metaInfo);
        ATTRIBUTES_METADATA_Question.put (FIELD_RightQuestionChinese, Collections.unmodifiableMap (metaInfo));

        List validators = BaseBusinessClass.getAttribValidators(Question.class, "RightQuestionChinese", metaInfo, validatorMapping);
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Question.RightQuestionChinese:", validators);        

        return validators;
    }
    
    // Meta Info setup
    private static List setupAttribMetaData_LeftQuestionKorean(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "left_quest_korean");
        metaInfo.put ("name", "LeftQuestionKorean");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Question.LeftQuestionKorean:", metaInfo);
        ATTRIBUTES_METADATA_Question.put (FIELD_LeftQuestionKorean, Collections.unmodifiableMap (metaInfo));

        List validators = BaseBusinessClass.getAttribValidators(Question.class, "LeftQuestionKorean", metaInfo, validatorMapping);
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Question.LeftQuestionKorean:", validators);        

        return validators;
    }
    
    // Meta Info setup
    private static List setupAttribMetaData_RightQuestionKorean(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "right_quest_korean");
        metaInfo.put ("name", "RightQuestionKorean");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Question.RightQuestionKorean:", metaInfo);
        ATTRIBUTES_METADATA_Question.put (FIELD_RightQuestionKorean, Collections.unmodifiableMap (metaInfo));

        List validators = BaseBusinessClass.getAttribValidators(Question.class, "RightQuestionKorean", metaInfo, validatorMapping);
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Question.RightQuestionKorean:", validators);        

        return validators;
    }
    
    // Meta Info setup
    private static List setupAttribMetaData_LeftQuestionThai(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "left_quest_thai");
        metaInfo.put ("name", "LeftQuestionThai");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Question.LeftQuestionThai:", metaInfo);
        ATTRIBUTES_METADATA_Question.put (FIELD_LeftQuestionThai, Collections.unmodifiableMap (metaInfo));

        List validators = BaseBusinessClass.getAttribValidators(Question.class, "LeftQuestionThai", metaInfo, validatorMapping);
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Question.LeftQuestionThai:", validators);        

        return validators;
    }
    
    // Meta Info setup
    private static List setupAttribMetaData_RightQuestionThai(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "right_quest_thai");
        metaInfo.put ("name", "RightQuestionThai");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Question.RightQuestionThai:", metaInfo);
        ATTRIBUTES_METADATA_Question.put (FIELD_RightQuestionThai, Collections.unmodifiableMap (metaInfo));

        List validators = BaseBusinessClass.getAttribValidators(Question.class, "RightQuestionThai", metaInfo, validatorMapping);
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Question.RightQuestionThai:", validators);        

        return validators;
    }
    
    // Meta Info setup
    private static List setupAttribMetaData_LeftQuestionViet(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "left_quest_viet");
        metaInfo.put ("name", "LeftQuestionViet");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Question.LeftQuestionViet:", metaInfo);
        ATTRIBUTES_METADATA_Question.put (FIELD_LeftQuestionViet, Collections.unmodifiableMap (metaInfo));

        List validators = BaseBusinessClass.getAttribValidators(Question.class, "LeftQuestionViet", metaInfo, validatorMapping);
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Question.LeftQuestionViet:", validators);        

        return validators;
    }
    
    // Meta Info setup
    private static List setupAttribMetaData_RightQuestionViet(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "right_quest_viet");
        metaInfo.put ("name", "RightQuestionViet");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Question.RightQuestionViet:", metaInfo);
        ATTRIBUTES_METADATA_Question.put (FIELD_RightQuestionViet, Collections.unmodifiableMap (metaInfo));

        List validators = BaseBusinessClass.getAttribValidators(Question.class, "RightQuestionViet", metaInfo, validatorMapping);
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Question.RightQuestionViet:", validators);        

        return validators;
    }
    
    // END OF STATIC METADATA DEFINITION    
    
    
    
    // This constructor should not be called
    protected BaseQuestion ()
    {
    }


    protected BBCBehaviourDecorator[] getBehaviours()
    {
        return Question_BehaviourDecorators;
    }
    
    


    


    // Initialise the attributes
    protected void _initialiseNewObjAttributes (ObjectTransaction transaction) throws StorageException
    {
        super._initialiseNewObjAttributes (transaction);

        
        _LeftQuestionNo = (Integer)(HELPER_LeftQuestionNo.initialise (_LeftQuestionNo));
        _LeftQuestion = (String)(HELPER_LeftQuestion.initialise (_LeftQuestion));
        _RightQuestionNo = (Integer)(HELPER_RightQuestionNo.initialise (_RightQuestionNo));
        _RightQuestion = (String)(HELPER_RightQuestion.initialise (_RightQuestion));
        _LeftQuestionSchinese = (String)(HELPER_LeftQuestionSchinese.initialise (_LeftQuestionSchinese));
        _RightQuestionSchinese = (String)(HELPER_RightQuestionSchinese.initialise (_RightQuestionSchinese));
        _LeftQuestionChinese = (String)(HELPER_LeftQuestionChinese.initialise (_LeftQuestionChinese));
        _RightQuestionChinese = (String)(HELPER_RightQuestionChinese.initialise (_RightQuestionChinese));
        _LeftQuestionKorean = (String)(HELPER_LeftQuestionKorean.initialise (_LeftQuestionKorean));
        _RightQuestionKorean = (String)(HELPER_RightQuestionKorean.initialise (_RightQuestionKorean));
        _LeftQuestionThai = (String)(HELPER_LeftQuestionThai.initialise (_LeftQuestionThai));
        _RightQuestionThai = (String)(HELPER_RightQuestionThai.initialise (_RightQuestionThai));
        _LeftQuestionViet = (String)(HELPER_LeftQuestionViet.initialise (_LeftQuestionViet));
        _RightQuestionViet = (String)(HELPER_RightQuestionViet.initialise (_RightQuestionViet));
    }


    // Initialise the associations
    protected void _initialiseAssociations ()
    {
        super._initialiseAssociations ();

        
    }


    // Initialise the associations
    protected BaseBusinessClass initialiseReference ()
    {
        super.initialiseReference ();
        
        
        
        return this;
    }

    

    /**
     * Get the attribute LeftQuestionNo
     */
    public Integer getLeftQuestionNo ()
    {
        assertValid();
        Integer valToReturn = _LeftQuestionNo;

            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                valToReturn = bhd.getLeftQuestionNo ((Question)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 preLeftQuestionNoChange (Integer newLeftQuestionNo) 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 postLeftQuestionNoChange () throws FieldException
    {
    }

    
    public FieldWriteability getWriteability_LeftQuestionNo ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }

    /**
     * Set the attribute LeftQuestionNo.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setLeftQuestionNo (Integer newLeftQuestionNo) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_LeftQuestionNo.compare (_LeftQuestionNo, newLeftQuestionNo);
        
        try
        {
            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                newLeftQuestionNo = bhd.setLeftQuestionNo ((Question)this, newLeftQuestionNo);
                oldAndNewIdentical = HELPER_LeftQuestionNo.compare (_LeftQuestionNo, newLeftQuestionNo);
            }

            

            if (FIELD_LeftQuestionNo_Validators.length > 0)
            {
                Object newLeftQuestionNoObj = HELPER_LeftQuestionNo.toObject (newLeftQuestionNo);

                if (newLeftQuestionNoObj != null)
                {
                    int     loopMax = FIELD_LeftQuestionNo_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Question.get (FIELD_LeftQuestionNo);

                    for (int v = 0 ; v < loopMax ; ++v)
                    {
                        FIELD_LeftQuestionNo_Validators[v].checkAttribute (this, FIELD_LeftQuestionNo, metadata, newLeftQuestionNoObj);
                    }
                }
            }
        }
        catch (FieldException e)
        {
            if (!oldAndNewIdentical)
            {
                e.setWouldModify ();
            }
            
            throw e;
        }

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_LeftQuestionNo () != FieldWriteability.FALSE, "Field  LeftQuestionNo is not writeable");
            preLeftQuestionNoChange (newLeftQuestionNo);
            markFieldChange (FIELD_LeftQuestionNo);
            _LeftQuestionNo = newLeftQuestionNo;            
            postFieldChange (FIELD_LeftQuestionNo);
            postLeftQuestionNoChange ();
        }
    }

    /**
     * Get the attribute LeftQuestion
     */
    public String getLeftQuestion ()
    {
        assertValid();
        String valToReturn = _LeftQuestion;

            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                valToReturn = bhd.getLeftQuestion ((Question)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 preLeftQuestionChange (String newLeftQuestion) 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 postLeftQuestionChange () throws FieldException
    {
    }

    
    public FieldWriteability getWriteability_LeftQuestion ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }

    /**
     * Set the attribute LeftQuestion.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setLeftQuestion (String newLeftQuestion) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_LeftQuestion.compare (_LeftQuestion, newLeftQuestion);
        
        try
        {
            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                newLeftQuestion = bhd.setLeftQuestion ((Question)this, newLeftQuestion);
                oldAndNewIdentical = HELPER_LeftQuestion.compare (_LeftQuestion, newLeftQuestion);
            }

            

            if (FIELD_LeftQuestion_Validators.length > 0)
            {
                Object newLeftQuestionObj = HELPER_LeftQuestion.toObject (newLeftQuestion);

                if (newLeftQuestionObj != null)
                {
                    int     loopMax = FIELD_LeftQuestion_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Question.get (FIELD_LeftQuestion);

                    for (int v = 0 ; v < loopMax ; ++v)
                    {
                        FIELD_LeftQuestion_Validators[v].checkAttribute (this, FIELD_LeftQuestion, metadata, newLeftQuestionObj);
                    }
                }
            }
        }
        catch (FieldException e)
        {
            if (!oldAndNewIdentical)
            {
                e.setWouldModify ();
            }
            
            throw e;
        }

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_LeftQuestion () != FieldWriteability.FALSE, "Field  LeftQuestion is not writeable");
            preLeftQuestionChange (newLeftQuestion);
            markFieldChange (FIELD_LeftQuestion);
            _LeftQuestion = newLeftQuestion;            
            postFieldChange (FIELD_LeftQuestion);
            postLeftQuestionChange ();
        }
    }

    /**
     * Get the attribute RightQuestionNo
     */
    public Integer getRightQuestionNo ()
    {
        assertValid();
        Integer valToReturn = _RightQuestionNo;

            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                valToReturn = bhd.getRightQuestionNo ((Question)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 preRightQuestionNoChange (Integer newRightQuestionNo) 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 postRightQuestionNoChange () throws FieldException
    {
    }

    
    public FieldWriteability getWriteability_RightQuestionNo ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }

    /**
     * Set the attribute RightQuestionNo.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setRightQuestionNo (Integer newRightQuestionNo) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_RightQuestionNo.compare (_RightQuestionNo, newRightQuestionNo);
        
        try
        {
            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                newRightQuestionNo = bhd.setRightQuestionNo ((Question)this, newRightQuestionNo);
                oldAndNewIdentical = HELPER_RightQuestionNo.compare (_RightQuestionNo, newRightQuestionNo);
            }

            

            if (FIELD_RightQuestionNo_Validators.length > 0)
            {
                Object newRightQuestionNoObj = HELPER_RightQuestionNo.toObject (newRightQuestionNo);

                if (newRightQuestionNoObj != null)
                {
                    int     loopMax = FIELD_RightQuestionNo_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Question.get (FIELD_RightQuestionNo);

                    for (int v = 0 ; v < loopMax ; ++v)
                    {
                        FIELD_RightQuestionNo_Validators[v].checkAttribute (this, FIELD_RightQuestionNo, metadata, newRightQuestionNoObj);
                    }
                }
            }
        }
        catch (FieldException e)
        {
            if (!oldAndNewIdentical)
            {
                e.setWouldModify ();
            }
            
            throw e;
        }

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_RightQuestionNo () != FieldWriteability.FALSE, "Field  RightQuestionNo is not writeable");
            preRightQuestionNoChange (newRightQuestionNo);
            markFieldChange (FIELD_RightQuestionNo);
            _RightQuestionNo = newRightQuestionNo;            
            postFieldChange (FIELD_RightQuestionNo);
            postRightQuestionNoChange ();
        }
    }

    /**
     * Get the attribute RightQuestion
     */
    public String getRightQuestion ()
    {
        assertValid();
        String valToReturn = _RightQuestion;

            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                valToReturn = bhd.getRightQuestion ((Question)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 preRightQuestionChange (String newRightQuestion) 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 postRightQuestionChange () throws FieldException
    {
    }

    
    public FieldWriteability getWriteability_RightQuestion ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }

    /**
     * Set the attribute RightQuestion.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setRightQuestion (String newRightQuestion) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_RightQuestion.compare (_RightQuestion, newRightQuestion);
        
        try
        {
            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                newRightQuestion = bhd.setRightQuestion ((Question)this, newRightQuestion);
                oldAndNewIdentical = HELPER_RightQuestion.compare (_RightQuestion, newRightQuestion);
            }

            

            if (FIELD_RightQuestion_Validators.length > 0)
            {
                Object newRightQuestionObj = HELPER_RightQuestion.toObject (newRightQuestion);

                if (newRightQuestionObj != null)
                {
                    int     loopMax = FIELD_RightQuestion_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Question.get (FIELD_RightQuestion);

                    for (int v = 0 ; v < loopMax ; ++v)
                    {
                        FIELD_RightQuestion_Validators[v].checkAttribute (this, FIELD_RightQuestion, metadata, newRightQuestionObj);
                    }
                }
            }
        }
        catch (FieldException e)
        {
            if (!oldAndNewIdentical)
            {
                e.setWouldModify ();
            }
            
            throw e;
        }

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_RightQuestion () != FieldWriteability.FALSE, "Field  RightQuestion is not writeable");
            preRightQuestionChange (newRightQuestion);
            markFieldChange (FIELD_RightQuestion);
            _RightQuestion = newRightQuestion;            
            postFieldChange (FIELD_RightQuestion);
            postRightQuestionChange ();
        }
    }

    /**
     * Get the attribute LeftQuestionSchinese
     */
    public String getLeftQuestionSchinese ()
    {
        assertValid();
        String valToReturn = _LeftQuestionSchinese;

            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                valToReturn = bhd.getLeftQuestionSchinese ((Question)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 preLeftQuestionSchineseChange (String newLeftQuestionSchinese) 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 postLeftQuestionSchineseChange () throws FieldException
    {
    }

    
    public FieldWriteability getWriteability_LeftQuestionSchinese ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }

    /**
     * Set the attribute LeftQuestionSchinese.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setLeftQuestionSchinese (String newLeftQuestionSchinese) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_LeftQuestionSchinese.compare (_LeftQuestionSchinese, newLeftQuestionSchinese);
        
        try
        {
            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                newLeftQuestionSchinese = bhd.setLeftQuestionSchinese ((Question)this, newLeftQuestionSchinese);
                oldAndNewIdentical = HELPER_LeftQuestionSchinese.compare (_LeftQuestionSchinese, newLeftQuestionSchinese);
            }

            

            if (FIELD_LeftQuestionSchinese_Validators.length > 0)
            {
                Object newLeftQuestionSchineseObj = HELPER_LeftQuestionSchinese.toObject (newLeftQuestionSchinese);

                if (newLeftQuestionSchineseObj != null)
                {
                    int     loopMax = FIELD_LeftQuestionSchinese_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Question.get (FIELD_LeftQuestionSchinese);

                    for (int v = 0 ; v < loopMax ; ++v)
                    {
                        FIELD_LeftQuestionSchinese_Validators[v].checkAttribute (this, FIELD_LeftQuestionSchinese, metadata, newLeftQuestionSchineseObj);
                    }
                }
            }
        }
        catch (FieldException e)
        {
            if (!oldAndNewIdentical)
            {
                e.setWouldModify ();
            }
            
            throw e;
        }

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_LeftQuestionSchinese () != FieldWriteability.FALSE, "Field  LeftQuestionSchinese is not writeable");
            preLeftQuestionSchineseChange (newLeftQuestionSchinese);
            markFieldChange (FIELD_LeftQuestionSchinese);
            _LeftQuestionSchinese = newLeftQuestionSchinese;            
            postFieldChange (FIELD_LeftQuestionSchinese);
            postLeftQuestionSchineseChange ();
        }
    }

    /**
     * Get the attribute RightQuestionSchinese
     */
    public String getRightQuestionSchinese ()
    {
        assertValid();
        String valToReturn = _RightQuestionSchinese;

            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                valToReturn = bhd.getRightQuestionSchinese ((Question)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 preRightQuestionSchineseChange (String newRightQuestionSchinese) 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 postRightQuestionSchineseChange () throws FieldException
    {
    }

    
    public FieldWriteability getWriteability_RightQuestionSchinese ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }

    /**
     * Set the attribute RightQuestionSchinese.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setRightQuestionSchinese (String newRightQuestionSchinese) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_RightQuestionSchinese.compare (_RightQuestionSchinese, newRightQuestionSchinese);
        
        try
        {
            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                newRightQuestionSchinese = bhd.setRightQuestionSchinese ((Question)this, newRightQuestionSchinese);
                oldAndNewIdentical = HELPER_RightQuestionSchinese.compare (_RightQuestionSchinese, newRightQuestionSchinese);
            }

            

            if (FIELD_RightQuestionSchinese_Validators.length > 0)
            {
                Object newRightQuestionSchineseObj = HELPER_RightQuestionSchinese.toObject (newRightQuestionSchinese);

                if (newRightQuestionSchineseObj != null)
                {
                    int     loopMax = FIELD_RightQuestionSchinese_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Question.get (FIELD_RightQuestionSchinese);

                    for (int v = 0 ; v < loopMax ; ++v)
                    {
                        FIELD_RightQuestionSchinese_Validators[v].checkAttribute (this, FIELD_RightQuestionSchinese, metadata, newRightQuestionSchineseObj);
                    }
                }
            }
        }
        catch (FieldException e)
        {
            if (!oldAndNewIdentical)
            {
                e.setWouldModify ();
            }
            
            throw e;
        }

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_RightQuestionSchinese () != FieldWriteability.FALSE, "Field  RightQuestionSchinese is not writeable");
            preRightQuestionSchineseChange (newRightQuestionSchinese);
            markFieldChange (FIELD_RightQuestionSchinese);
            _RightQuestionSchinese = newRightQuestionSchinese;            
            postFieldChange (FIELD_RightQuestionSchinese);
            postRightQuestionSchineseChange ();
        }
    }

    /**
     * Get the attribute LeftQuestionChinese
     */
    public String getLeftQuestionChinese ()
    {
        assertValid();
        String valToReturn = _LeftQuestionChinese;

            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                valToReturn = bhd.getLeftQuestionChinese ((Question)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 preLeftQuestionChineseChange (String newLeftQuestionChinese) 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 postLeftQuestionChineseChange () throws FieldException
    {
    }

    
    public FieldWriteability getWriteability_LeftQuestionChinese ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }

    /**
     * Set the attribute LeftQuestionChinese.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setLeftQuestionChinese (String newLeftQuestionChinese) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_LeftQuestionChinese.compare (_LeftQuestionChinese, newLeftQuestionChinese);
        
        try
        {
            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                newLeftQuestionChinese = bhd.setLeftQuestionChinese ((Question)this, newLeftQuestionChinese);
                oldAndNewIdentical = HELPER_LeftQuestionChinese.compare (_LeftQuestionChinese, newLeftQuestionChinese);
            }

            

            if (FIELD_LeftQuestionChinese_Validators.length > 0)
            {
                Object newLeftQuestionChineseObj = HELPER_LeftQuestionChinese.toObject (newLeftQuestionChinese);

                if (newLeftQuestionChineseObj != null)
                {
                    int     loopMax = FIELD_LeftQuestionChinese_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Question.get (FIELD_LeftQuestionChinese);

                    for (int v = 0 ; v < loopMax ; ++v)
                    {
                        FIELD_LeftQuestionChinese_Validators[v].checkAttribute (this, FIELD_LeftQuestionChinese, metadata, newLeftQuestionChineseObj);
                    }
                }
            }
        }
        catch (FieldException e)
        {
            if (!oldAndNewIdentical)
            {
                e.setWouldModify ();
            }
            
            throw e;
        }

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_LeftQuestionChinese () != FieldWriteability.FALSE, "Field  LeftQuestionChinese is not writeable");
            preLeftQuestionChineseChange (newLeftQuestionChinese);
            markFieldChange (FIELD_LeftQuestionChinese);
            _LeftQuestionChinese = newLeftQuestionChinese;            
            postFieldChange (FIELD_LeftQuestionChinese);
            postLeftQuestionChineseChange ();
        }
    }

    /**
     * Get the attribute RightQuestionChinese
     */
    public String getRightQuestionChinese ()
    {
        assertValid();
        String valToReturn = _RightQuestionChinese;

            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                valToReturn = bhd.getRightQuestionChinese ((Question)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 preRightQuestionChineseChange (String newRightQuestionChinese) 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 postRightQuestionChineseChange () throws FieldException
    {
    }

    
    public FieldWriteability getWriteability_RightQuestionChinese ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }

    /**
     * Set the attribute RightQuestionChinese.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setRightQuestionChinese (String newRightQuestionChinese) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_RightQuestionChinese.compare (_RightQuestionChinese, newRightQuestionChinese);
        
        try
        {
            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                newRightQuestionChinese = bhd.setRightQuestionChinese ((Question)this, newRightQuestionChinese);
                oldAndNewIdentical = HELPER_RightQuestionChinese.compare (_RightQuestionChinese, newRightQuestionChinese);
            }

            

            if (FIELD_RightQuestionChinese_Validators.length > 0)
            {
                Object newRightQuestionChineseObj = HELPER_RightQuestionChinese.toObject (newRightQuestionChinese);

                if (newRightQuestionChineseObj != null)
                {
                    int     loopMax = FIELD_RightQuestionChinese_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Question.get (FIELD_RightQuestionChinese);

                    for (int v = 0 ; v < loopMax ; ++v)
                    {
                        FIELD_RightQuestionChinese_Validators[v].checkAttribute (this, FIELD_RightQuestionChinese, metadata, newRightQuestionChineseObj);
                    }
                }
            }
        }
        catch (FieldException e)
        {
            if (!oldAndNewIdentical)
            {
                e.setWouldModify ();
            }
            
            throw e;
        }

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_RightQuestionChinese () != FieldWriteability.FALSE, "Field  RightQuestionChinese is not writeable");
            preRightQuestionChineseChange (newRightQuestionChinese);
            markFieldChange (FIELD_RightQuestionChinese);
            _RightQuestionChinese = newRightQuestionChinese;            
            postFieldChange (FIELD_RightQuestionChinese);
            postRightQuestionChineseChange ();
        }
    }

    /**
     * Get the attribute LeftQuestionKorean
     */
    public String getLeftQuestionKorean ()
    {
        assertValid();
        String valToReturn = _LeftQuestionKorean;

            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                valToReturn = bhd.getLeftQuestionKorean ((Question)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 preLeftQuestionKoreanChange (String newLeftQuestionKorean) 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 postLeftQuestionKoreanChange () throws FieldException
    {
    }

    
    public FieldWriteability getWriteability_LeftQuestionKorean ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }

    /**
     * Set the attribute LeftQuestionKorean.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setLeftQuestionKorean (String newLeftQuestionKorean) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_LeftQuestionKorean.compare (_LeftQuestionKorean, newLeftQuestionKorean);
        
        try
        {
            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                newLeftQuestionKorean = bhd.setLeftQuestionKorean ((Question)this, newLeftQuestionKorean);
                oldAndNewIdentical = HELPER_LeftQuestionKorean.compare (_LeftQuestionKorean, newLeftQuestionKorean);
            }

            

            if (FIELD_LeftQuestionKorean_Validators.length > 0)
            {
                Object newLeftQuestionKoreanObj = HELPER_LeftQuestionKorean.toObject (newLeftQuestionKorean);

                if (newLeftQuestionKoreanObj != null)
                {
                    int     loopMax = FIELD_LeftQuestionKorean_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Question.get (FIELD_LeftQuestionKorean);

                    for (int v = 0 ; v < loopMax ; ++v)
                    {
                        FIELD_LeftQuestionKorean_Validators[v].checkAttribute (this, FIELD_LeftQuestionKorean, metadata, newLeftQuestionKoreanObj);
                    }
                }
            }
        }
        catch (FieldException e)
        {
            if (!oldAndNewIdentical)
            {
                e.setWouldModify ();
            }
            
            throw e;
        }

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_LeftQuestionKorean () != FieldWriteability.FALSE, "Field  LeftQuestionKorean is not writeable");
            preLeftQuestionKoreanChange (newLeftQuestionKorean);
            markFieldChange (FIELD_LeftQuestionKorean);
            _LeftQuestionKorean = newLeftQuestionKorean;            
            postFieldChange (FIELD_LeftQuestionKorean);
            postLeftQuestionKoreanChange ();
        }
    }

    /**
     * Get the attribute RightQuestionKorean
     */
    public String getRightQuestionKorean ()
    {
        assertValid();
        String valToReturn = _RightQuestionKorean;

            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                valToReturn = bhd.getRightQuestionKorean ((Question)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 preRightQuestionKoreanChange (String newRightQuestionKorean) 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 postRightQuestionKoreanChange () throws FieldException
    {
    }

    
    public FieldWriteability getWriteability_RightQuestionKorean ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }

    /**
     * Set the attribute RightQuestionKorean.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setRightQuestionKorean (String newRightQuestionKorean) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_RightQuestionKorean.compare (_RightQuestionKorean, newRightQuestionKorean);
        
        try
        {
            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                newRightQuestionKorean = bhd.setRightQuestionKorean ((Question)this, newRightQuestionKorean);
                oldAndNewIdentical = HELPER_RightQuestionKorean.compare (_RightQuestionKorean, newRightQuestionKorean);
            }

            

            if (FIELD_RightQuestionKorean_Validators.length > 0)
            {
                Object newRightQuestionKoreanObj = HELPER_RightQuestionKorean.toObject (newRightQuestionKorean);

                if (newRightQuestionKoreanObj != null)
                {
                    int     loopMax = FIELD_RightQuestionKorean_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Question.get (FIELD_RightQuestionKorean);

                    for (int v = 0 ; v < loopMax ; ++v)
                    {
                        FIELD_RightQuestionKorean_Validators[v].checkAttribute (this, FIELD_RightQuestionKorean, metadata, newRightQuestionKoreanObj);
                    }
                }
            }
        }
        catch (FieldException e)
        {
            if (!oldAndNewIdentical)
            {
                e.setWouldModify ();
            }
            
            throw e;
        }

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_RightQuestionKorean () != FieldWriteability.FALSE, "Field  RightQuestionKorean is not writeable");
            preRightQuestionKoreanChange (newRightQuestionKorean);
            markFieldChange (FIELD_RightQuestionKorean);
            _RightQuestionKorean = newRightQuestionKorean;            
            postFieldChange (FIELD_RightQuestionKorean);
            postRightQuestionKoreanChange ();
        }
    }

    /**
     * Get the attribute LeftQuestionThai
     */
    public String getLeftQuestionThai ()
    {
        assertValid();
        String valToReturn = _LeftQuestionThai;

            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                valToReturn = bhd.getLeftQuestionThai ((Question)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 preLeftQuestionThaiChange (String newLeftQuestionThai) 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 postLeftQuestionThaiChange () throws FieldException
    {
    }

    
    public FieldWriteability getWriteability_LeftQuestionThai ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }

    /**
     * Set the attribute LeftQuestionThai.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setLeftQuestionThai (String newLeftQuestionThai) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_LeftQuestionThai.compare (_LeftQuestionThai, newLeftQuestionThai);
        
        try
        {
            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                newLeftQuestionThai = bhd.setLeftQuestionThai ((Question)this, newLeftQuestionThai);
                oldAndNewIdentical = HELPER_LeftQuestionThai.compare (_LeftQuestionThai, newLeftQuestionThai);
            }

            

            if (FIELD_LeftQuestionThai_Validators.length > 0)
            {
                Object newLeftQuestionThaiObj = HELPER_LeftQuestionThai.toObject (newLeftQuestionThai);

                if (newLeftQuestionThaiObj != null)
                {
                    int     loopMax = FIELD_LeftQuestionThai_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Question.get (FIELD_LeftQuestionThai);

                    for (int v = 0 ; v < loopMax ; ++v)
                    {
                        FIELD_LeftQuestionThai_Validators[v].checkAttribute (this, FIELD_LeftQuestionThai, metadata, newLeftQuestionThaiObj);
                    }
                }
            }
        }
        catch (FieldException e)
        {
            if (!oldAndNewIdentical)
            {
                e.setWouldModify ();
            }
            
            throw e;
        }

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_LeftQuestionThai () != FieldWriteability.FALSE, "Field  LeftQuestionThai is not writeable");
            preLeftQuestionThaiChange (newLeftQuestionThai);
            markFieldChange (FIELD_LeftQuestionThai);
            _LeftQuestionThai = newLeftQuestionThai;            
            postFieldChange (FIELD_LeftQuestionThai);
            postLeftQuestionThaiChange ();
        }
    }

    /**
     * Get the attribute RightQuestionThai
     */
    public String getRightQuestionThai ()
    {
        assertValid();
        String valToReturn = _RightQuestionThai;

            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                valToReturn = bhd.getRightQuestionThai ((Question)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 preRightQuestionThaiChange (String newRightQuestionThai) 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 postRightQuestionThaiChange () throws FieldException
    {
    }

    
    public FieldWriteability getWriteability_RightQuestionThai ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }

    /**
     * Set the attribute RightQuestionThai.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setRightQuestionThai (String newRightQuestionThai) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_RightQuestionThai.compare (_RightQuestionThai, newRightQuestionThai);
        
        try
        {
            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                newRightQuestionThai = bhd.setRightQuestionThai ((Question)this, newRightQuestionThai);
                oldAndNewIdentical = HELPER_RightQuestionThai.compare (_RightQuestionThai, newRightQuestionThai);
            }

            

            if (FIELD_RightQuestionThai_Validators.length > 0)
            {
                Object newRightQuestionThaiObj = HELPER_RightQuestionThai.toObject (newRightQuestionThai);

                if (newRightQuestionThaiObj != null)
                {
                    int     loopMax = FIELD_RightQuestionThai_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Question.get (FIELD_RightQuestionThai);

                    for (int v = 0 ; v < loopMax ; ++v)
                    {
                        FIELD_RightQuestionThai_Validators[v].checkAttribute (this, FIELD_RightQuestionThai, metadata, newRightQuestionThaiObj);
                    }
                }
            }
        }
        catch (FieldException e)
        {
            if (!oldAndNewIdentical)
            {
                e.setWouldModify ();
            }
            
            throw e;
        }

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_RightQuestionThai () != FieldWriteability.FALSE, "Field  RightQuestionThai is not writeable");
            preRightQuestionThaiChange (newRightQuestionThai);
            markFieldChange (FIELD_RightQuestionThai);
            _RightQuestionThai = newRightQuestionThai;            
            postFieldChange (FIELD_RightQuestionThai);
            postRightQuestionThaiChange ();
        }
    }

    /**
     * Get the attribute LeftQuestionViet
     */
    public String getLeftQuestionViet ()
    {
        assertValid();
        String valToReturn = _LeftQuestionViet;

            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                valToReturn = bhd.getLeftQuestionViet ((Question)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 preLeftQuestionVietChange (String newLeftQuestionViet) 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 postLeftQuestionVietChange () throws FieldException
    {
    }

    
    public FieldWriteability getWriteability_LeftQuestionViet ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }

    /**
     * Set the attribute LeftQuestionViet.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setLeftQuestionViet (String newLeftQuestionViet) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_LeftQuestionViet.compare (_LeftQuestionViet, newLeftQuestionViet);
        
        try
        {
            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                newLeftQuestionViet = bhd.setLeftQuestionViet ((Question)this, newLeftQuestionViet);
                oldAndNewIdentical = HELPER_LeftQuestionViet.compare (_LeftQuestionViet, newLeftQuestionViet);
            }

            

            if (FIELD_LeftQuestionViet_Validators.length > 0)
            {
                Object newLeftQuestionVietObj = HELPER_LeftQuestionViet.toObject (newLeftQuestionViet);

                if (newLeftQuestionVietObj != null)
                {
                    int     loopMax = FIELD_LeftQuestionViet_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Question.get (FIELD_LeftQuestionViet);

                    for (int v = 0 ; v < loopMax ; ++v)
                    {
                        FIELD_LeftQuestionViet_Validators[v].checkAttribute (this, FIELD_LeftQuestionViet, metadata, newLeftQuestionVietObj);
                    }
                }
            }
        }
        catch (FieldException e)
        {
            if (!oldAndNewIdentical)
            {
                e.setWouldModify ();
            }
            
            throw e;
        }

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_LeftQuestionViet () != FieldWriteability.FALSE, "Field  LeftQuestionViet is not writeable");
            preLeftQuestionVietChange (newLeftQuestionViet);
            markFieldChange (FIELD_LeftQuestionViet);
            _LeftQuestionViet = newLeftQuestionViet;            
            postFieldChange (FIELD_LeftQuestionViet);
            postLeftQuestionVietChange ();
        }
    }

    /**
     * Get the attribute RightQuestionViet
     */
    public String getRightQuestionViet ()
    {
        assertValid();
        String valToReturn = _RightQuestionViet;

            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                valToReturn = bhd.getRightQuestionViet ((Question)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 preRightQuestionVietChange (String newRightQuestionViet) 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 postRightQuestionVietChange () throws FieldException
    {
    }

    
    public FieldWriteability getWriteability_RightQuestionViet ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }

    /**
     * Set the attribute RightQuestionViet.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setRightQuestionViet (String newRightQuestionViet) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_RightQuestionViet.compare (_RightQuestionViet, newRightQuestionViet);
        
        try
        {
            for (QuestionBehaviourDecorator bhd : Question_BehaviourDecorators)
            {
                newRightQuestionViet = bhd.setRightQuestionViet ((Question)this, newRightQuestionViet);
                oldAndNewIdentical = HELPER_RightQuestionViet.compare (_RightQuestionViet, newRightQuestionViet);
            }

            

            if (FIELD_RightQuestionViet_Validators.length > 0)
            {
                Object newRightQuestionVietObj = HELPER_RightQuestionViet.toObject (newRightQuestionViet);

                if (newRightQuestionVietObj != null)
                {
                    int     loopMax = FIELD_RightQuestionViet_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Question.get (FIELD_RightQuestionViet);

                    for (int v = 0 ; v < loopMax ; ++v)
                    {
                        FIELD_RightQuestionViet_Validators[v].checkAttribute (this, FIELD_RightQuestionViet, metadata, newRightQuestionVietObj);
                    }
                }
            }
        }
        catch (FieldException e)
        {
            if (!oldAndNewIdentical)
            {
                e.setWouldModify ();
            }
            
            throw e;
        }

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_RightQuestionViet () != FieldWriteability.FALSE, "Field  RightQuestionViet is not writeable");
            preRightQuestionVietChange (newRightQuestionViet);
            markFieldChange (FIELD_RightQuestionViet);
            _RightQuestionViet = newRightQuestionViet;            
            postFieldChange (FIELD_RightQuestionViet);
            postRightQuestionVietChange ();
        }
    }



    /**
     * A list of multi assoc names e.g. list of strings.
     */
    public List<String> getSingleAssocs()
    {
        List result = super.getSingleAssocs ();

        

        return result;
    }
    
    
    public BaseBusinessClass getSingleAssocReferenceInstance (String assocName)
    {
        if (assocName == null)
        {
            throw new RuntimeException ("Game over == null!");
        }
        
        else
        {
            return super.getSingleAssocReferenceInstance (assocName);
        }
    }


    public String getSingleAssocBackReference(String assocName)
    {
        if (assocName == null)
        {
            throw new RuntimeException ("Game over == null!");
        }
        
        else
        {
            return super.getSingleAssocBackReference (assocName);
        }
    }
    
    
    public BaseBusinessClass getSingleAssoc (String assocName) throws StorageException
    {
        if (assocName == null)
        {
            throw new RuntimeException ("Game over == null!");
        }
        
        else
        {
            return super.getSingleAssoc (assocName);
        }
    }


    public BaseBusinessClass getSingleAssoc (String assocName, Get getType) throws StorageException
    {
        if (assocName == null)
        {
            throw new RuntimeException ("Game over == null!");
        }
        
        else
        {
            return super.getSingleAssoc (assocName, getType);
        }
    }


    public Long getSingleAssocID (String assocName) throws StorageException
    {
        if (assocName == null)
        {
            throw new RuntimeException ("Game over == null!");
        }
        
        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
        {
            super.setSingleAssoc (assocName, newValue);
        }
    }



    /**
     * 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 
        {
        }
        catch (Exception e)
        {
            throw NestedException.wrap(e);
        }

        super.onDelete ();
    }


    public Question newInstance ()
    {
        return new Question ();
    }


    public Question referenceInstance ()
    {
        return REFERENCE_Question;
    }


    public Question getInTransaction (ObjectTransaction t) throws StorageException
    {
        return getQuestionByID (t, getObjectID());
    }
    
    
    public BaseBusinessClass dummyInstance ()
    {
        return DUMMY_Question;
    }


    public String getBaseSetName ()
    {
        return "quest_lin";
    }





    /**
     * 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   quest_linPSet = allSets.getPersistentSet (myID, "quest_lin", myPSetStatus);

        quest_linPSet.setAttrib (FIELD_ObjectID, myID);
        quest_linPSet.setAttrib (FIELD_LeftQuestionNo, HELPER_LeftQuestionNo.toObject (_LeftQuestionNo)); //
        quest_linPSet.setAttrib (FIELD_LeftQuestion, HELPER_LeftQuestion.toObject (_LeftQuestion)); //
        quest_linPSet.setAttrib (FIELD_RightQuestionNo, HELPER_RightQuestionNo.toObject (_RightQuestionNo)); //
        quest_linPSet.setAttrib (FIELD_RightQuestion, HELPER_RightQuestion.toObject (_RightQuestion)); //
        quest_linPSet.setAttrib (FIELD_LeftQuestionSchinese, HELPER_LeftQuestionSchinese.toObject (_LeftQuestionSchinese)); //
        quest_linPSet.setAttrib (FIELD_RightQuestionSchinese, HELPER_RightQuestionSchinese.toObject (_RightQuestionSchinese)); //
        quest_linPSet.setAttrib (FIELD_LeftQuestionChinese, HELPER_LeftQuestionChinese.toObject (_LeftQuestionChinese)); //
        quest_linPSet.setAttrib (FIELD_RightQuestionChinese, HELPER_RightQuestionChinese.toObject (_RightQuestionChinese)); //
        quest_linPSet.setAttrib (FIELD_LeftQuestionKorean, HELPER_LeftQuestionKorean.toObject (_LeftQuestionKorean)); //
        quest_linPSet.setAttrib (FIELD_RightQuestionKorean, HELPER_RightQuestionKorean.toObject (_RightQuestionKorean)); //
        quest_linPSet.setAttrib (FIELD_LeftQuestionThai, HELPER_LeftQuestionThai.toObject (_LeftQuestionThai)); //
        quest_linPSet.setAttrib (FIELD_RightQuestionThai, HELPER_RightQuestionThai.toObject (_RightQuestionThai)); //
        quest_linPSet.setAttrib (FIELD_LeftQuestionViet, HELPER_LeftQuestionViet.toObject (_LeftQuestionViet)); //
        quest_linPSet.setAttrib (FIELD_RightQuestionViet, HELPER_RightQuestionViet.toObject (_RightQuestionViet)); //
        
    }


    /**
     * Sets the objects state based on Persistent sets.
     */
    public void setFromPersistentSets (ObjectID objectID, PersistentSetCollection allSets)
    {
        super.setFromPersistentSets (objectID, allSets);

        
        PersistentSet   quest_linPSet = allSets.getPersistentSet (objectID, "quest_lin");

        _LeftQuestionNo = (Integer)(HELPER_LeftQuestionNo.fromObject (_LeftQuestionNo, quest_linPSet.getAttrib (FIELD_LeftQuestionNo))); //
        _LeftQuestion = (String)(HELPER_LeftQuestion.fromObject (_LeftQuestion, quest_linPSet.getAttrib (FIELD_LeftQuestion))); //
        _RightQuestionNo = (Integer)(HELPER_RightQuestionNo.fromObject (_RightQuestionNo, quest_linPSet.getAttrib (FIELD_RightQuestionNo))); //
        _RightQuestion = (String)(HELPER_RightQuestion.fromObject (_RightQuestion, quest_linPSet.getAttrib (FIELD_RightQuestion))); //
        _LeftQuestionSchinese = (String)(HELPER_LeftQuestionSchinese.fromObject (_LeftQuestionSchinese, quest_linPSet.getAttrib (FIELD_LeftQuestionSchinese))); //
        _RightQuestionSchinese = (String)(HELPER_RightQuestionSchinese.fromObject (_RightQuestionSchinese, quest_linPSet.getAttrib (FIELD_RightQuestionSchinese))); //
        _LeftQuestionChinese = (String)(HELPER_LeftQuestionChinese.fromObject (_LeftQuestionChinese, quest_linPSet.getAttrib (FIELD_LeftQuestionChinese))); //
        _RightQuestionChinese = (String)(HELPER_RightQuestionChinese.fromObject (_RightQuestionChinese, quest_linPSet.getAttrib (FIELD_RightQuestionChinese))); //
        _LeftQuestionKorean = (String)(HELPER_LeftQuestionKorean.fromObject (_LeftQuestionKorean, quest_linPSet.getAttrib (FIELD_LeftQuestionKorean))); //
        _RightQuestionKorean = (String)(HELPER_RightQuestionKorean.fromObject (_RightQuestionKorean, quest_linPSet.getAttrib (FIELD_RightQuestionKorean))); //
        _LeftQuestionThai = (String)(HELPER_LeftQuestionThai.fromObject (_LeftQuestionThai, quest_linPSet.getAttrib (FIELD_LeftQuestionThai))); //
        _RightQuestionThai = (String)(HELPER_RightQuestionThai.fromObject (_RightQuestionThai, quest_linPSet.getAttrib (FIELD_RightQuestionThai))); //
        _LeftQuestionViet = (String)(HELPER_LeftQuestionViet.fromObject (_LeftQuestionViet, quest_linPSet.getAttrib (FIELD_LeftQuestionViet))); //
        _RightQuestionViet = (String)(HELPER_RightQuestionViet.fromObject (_RightQuestionViet, quest_linPSet.getAttrib (FIELD_RightQuestionViet))); //
        
    }





    public void setAttributesFrom (BaseBusinessClass other, MultiException e)
    {
        super.setAttributesFrom (other, e);

        if (other instanceof Question)
        {
            Question otherQuestion = (Question)other;
            
            try
            {
                setLeftQuestionNo (otherQuestion.getLeftQuestionNo ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setLeftQuestion (otherQuestion.getLeftQuestion ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setRightQuestionNo (otherQuestion.getRightQuestionNo ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setRightQuestion (otherQuestion.getRightQuestion ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setLeftQuestionSchinese (otherQuestion.getLeftQuestionSchinese ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setRightQuestionSchinese (otherQuestion.getRightQuestionSchinese ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setLeftQuestionChinese (otherQuestion.getLeftQuestionChinese ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setRightQuestionChinese (otherQuestion.getRightQuestionChinese ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setLeftQuestionKorean (otherQuestion.getLeftQuestionKorean ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setRightQuestionKorean (otherQuestion.getRightQuestionKorean ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setLeftQuestionThai (otherQuestion.getLeftQuestionThai ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setRightQuestionThai (otherQuestion.getRightQuestionThai ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setLeftQuestionViet (otherQuestion.getLeftQuestionViet ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setRightQuestionViet (otherQuestion.getRightQuestionViet ());
            }
            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 BaseQuestion)
        {
            BaseQuestion sourceQuestion = (BaseQuestion)(source);

            _LeftQuestionNo = sourceQuestion._LeftQuestionNo;
            _LeftQuestion = sourceQuestion._LeftQuestion;
            _RightQuestionNo = sourceQuestion._RightQuestionNo;
            _RightQuestion = sourceQuestion._RightQuestion;
            _LeftQuestionSchinese = sourceQuestion._LeftQuestionSchinese;
            _RightQuestionSchinese = sourceQuestion._RightQuestionSchinese;
            _LeftQuestionChinese = sourceQuestion._LeftQuestionChinese;
            _RightQuestionChinese = sourceQuestion._RightQuestionChinese;
            _LeftQuestionKorean = sourceQuestion._LeftQuestionKorean;
            _RightQuestionKorean = sourceQuestion._RightQuestionKorean;
            _LeftQuestionThai = sourceQuestion._LeftQuestionThai;
            _RightQuestionThai = sourceQuestion._RightQuestionThai;
            _LeftQuestionViet = sourceQuestion._LeftQuestionViet;
            _RightQuestionViet = sourceQuestion._RightQuestionViet;
            
        }
    }


    /**
     * 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 BaseQuestion)
        {
            BaseQuestion sourceQuestion = (BaseQuestion)(source);

            
        }
    }


    /**
     * 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 BaseQuestion)
        {
            BaseQuestion sourceQuestion = (BaseQuestion)(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);

        _LeftQuestionNo = (Integer)(HELPER_LeftQuestionNo.readExternal (_LeftQuestionNo, vals.get(FIELD_LeftQuestionNo))); //
        _LeftQuestion = (String)(HELPER_LeftQuestion.readExternal (_LeftQuestion, vals.get(FIELD_LeftQuestion))); //
        _RightQuestionNo = (Integer)(HELPER_RightQuestionNo.readExternal (_RightQuestionNo, vals.get(FIELD_RightQuestionNo))); //
        _RightQuestion = (String)(HELPER_RightQuestion.readExternal (_RightQuestion, vals.get(FIELD_RightQuestion))); //
        _LeftQuestionSchinese = (String)(HELPER_LeftQuestionSchinese.readExternal (_LeftQuestionSchinese, vals.get(FIELD_LeftQuestionSchinese))); //
        _RightQuestionSchinese = (String)(HELPER_RightQuestionSchinese.readExternal (_RightQuestionSchinese, vals.get(FIELD_RightQuestionSchinese))); //
        _LeftQuestionChinese = (String)(HELPER_LeftQuestionChinese.readExternal (_LeftQuestionChinese, vals.get(FIELD_LeftQuestionChinese))); //
        _RightQuestionChinese = (String)(HELPER_RightQuestionChinese.readExternal (_RightQuestionChinese, vals.get(FIELD_RightQuestionChinese))); //
        _LeftQuestionKorean = (String)(HELPER_LeftQuestionKorean.readExternal (_LeftQuestionKorean, vals.get(FIELD_LeftQuestionKorean))); //
        _RightQuestionKorean = (String)(HELPER_RightQuestionKorean.readExternal (_RightQuestionKorean, vals.get(FIELD_RightQuestionKorean))); //
        _LeftQuestionThai = (String)(HELPER_LeftQuestionThai.readExternal (_LeftQuestionThai, vals.get(FIELD_LeftQuestionThai))); //
        _RightQuestionThai = (String)(HELPER_RightQuestionThai.readExternal (_RightQuestionThai, vals.get(FIELD_RightQuestionThai))); //
        _LeftQuestionViet = (String)(HELPER_LeftQuestionViet.readExternal (_LeftQuestionViet, vals.get(FIELD_LeftQuestionViet))); //
        _RightQuestionViet = (String)(HELPER_RightQuestionViet.readExternal (_RightQuestionViet, vals.get(FIELD_RightQuestionViet))); //
        
    }


    /**
     * Subclasses must override this to write out their attributes
     */
    protected void writeExternalData(Map<String, Object> vals) throws IOException
    {
        super.writeExternalData(vals);

        vals.put (FIELD_LeftQuestionNo, HELPER_LeftQuestionNo.writeExternal (_LeftQuestionNo));
        vals.put (FIELD_LeftQuestion, HELPER_LeftQuestion.writeExternal (_LeftQuestion));
        vals.put (FIELD_RightQuestionNo, HELPER_RightQuestionNo.writeExternal (_RightQuestionNo));
        vals.put (FIELD_RightQuestion, HELPER_RightQuestion.writeExternal (_RightQuestion));
        vals.put (FIELD_LeftQuestionSchinese, HELPER_LeftQuestionSchinese.writeExternal (_LeftQuestionSchinese));
        vals.put (FIELD_RightQuestionSchinese, HELPER_RightQuestionSchinese.writeExternal (_RightQuestionSchinese));
        vals.put (FIELD_LeftQuestionChinese, HELPER_LeftQuestionChinese.writeExternal (_LeftQuestionChinese));
        vals.put (FIELD_RightQuestionChinese, HELPER_RightQuestionChinese.writeExternal (_RightQuestionChinese));
        vals.put (FIELD_LeftQuestionKorean, HELPER_LeftQuestionKorean.writeExternal (_LeftQuestionKorean));
        vals.put (FIELD_RightQuestionKorean, HELPER_RightQuestionKorean.writeExternal (_RightQuestionKorean));
        vals.put (FIELD_LeftQuestionThai, HELPER_LeftQuestionThai.writeExternal (_LeftQuestionThai));
        vals.put (FIELD_RightQuestionThai, HELPER_RightQuestionThai.writeExternal (_RightQuestionThai));
        vals.put (FIELD_LeftQuestionViet, HELPER_LeftQuestionViet.writeExternal (_LeftQuestionViet));
        vals.put (FIELD_RightQuestionViet, HELPER_RightQuestionViet.writeExternal (_RightQuestionViet));
        
    }


    public void compare (BaseBusinessClass other, AttributeChangeListener listener) throws StorageException
    {
        super.compare (other, listener);

        if (other instanceof BaseQuestion)
        {
            BaseQuestion otherQuestion = (BaseQuestion)(other);

            
            if (!HELPER_LeftQuestionNo.compare(this._LeftQuestionNo, otherQuestion._LeftQuestionNo))
            {
                listener.notifyFieldChange(this, other, FIELD_LeftQuestionNo, HELPER_LeftQuestionNo.toObject(this._LeftQuestionNo), HELPER_LeftQuestionNo.toObject(otherQuestion._LeftQuestionNo));
            }
            if (!HELPER_LeftQuestion.compare(this._LeftQuestion, otherQuestion._LeftQuestion))
            {
                listener.notifyFieldChange(this, other, FIELD_LeftQuestion, HELPER_LeftQuestion.toObject(this._LeftQuestion), HELPER_LeftQuestion.toObject(otherQuestion._LeftQuestion));
            }
            if (!HELPER_RightQuestionNo.compare(this._RightQuestionNo, otherQuestion._RightQuestionNo))
            {
                listener.notifyFieldChange(this, other, FIELD_RightQuestionNo, HELPER_RightQuestionNo.toObject(this._RightQuestionNo), HELPER_RightQuestionNo.toObject(otherQuestion._RightQuestionNo));
            }
            if (!HELPER_RightQuestion.compare(this._RightQuestion, otherQuestion._RightQuestion))
            {
                listener.notifyFieldChange(this, other, FIELD_RightQuestion, HELPER_RightQuestion.toObject(this._RightQuestion), HELPER_RightQuestion.toObject(otherQuestion._RightQuestion));
            }
            if (!HELPER_LeftQuestionSchinese.compare(this._LeftQuestionSchinese, otherQuestion._LeftQuestionSchinese))
            {
                listener.notifyFieldChange(this, other, FIELD_LeftQuestionSchinese, HELPER_LeftQuestionSchinese.toObject(this._LeftQuestionSchinese), HELPER_LeftQuestionSchinese.toObject(otherQuestion._LeftQuestionSchinese));
            }
            if (!HELPER_RightQuestionSchinese.compare(this._RightQuestionSchinese, otherQuestion._RightQuestionSchinese))
            {
                listener.notifyFieldChange(this, other, FIELD_RightQuestionSchinese, HELPER_RightQuestionSchinese.toObject(this._RightQuestionSchinese), HELPER_RightQuestionSchinese.toObject(otherQuestion._RightQuestionSchinese));
            }
            if (!HELPER_LeftQuestionChinese.compare(this._LeftQuestionChinese, otherQuestion._LeftQuestionChinese))
            {
                listener.notifyFieldChange(this, other, FIELD_LeftQuestionChinese, HELPER_LeftQuestionChinese.toObject(this._LeftQuestionChinese), HELPER_LeftQuestionChinese.toObject(otherQuestion._LeftQuestionChinese));
            }
            if (!HELPER_RightQuestionChinese.compare(this._RightQuestionChinese, otherQuestion._RightQuestionChinese))
            {
                listener.notifyFieldChange(this, other, FIELD_RightQuestionChinese, HELPER_RightQuestionChinese.toObject(this._RightQuestionChinese), HELPER_RightQuestionChinese.toObject(otherQuestion._RightQuestionChinese));
            }
            if (!HELPER_LeftQuestionKorean.compare(this._LeftQuestionKorean, otherQuestion._LeftQuestionKorean))
            {
                listener.notifyFieldChange(this, other, FIELD_LeftQuestionKorean, HELPER_LeftQuestionKorean.toObject(this._LeftQuestionKorean), HELPER_LeftQuestionKorean.toObject(otherQuestion._LeftQuestionKorean));
            }
            if (!HELPER_RightQuestionKorean.compare(this._RightQuestionKorean, otherQuestion._RightQuestionKorean))
            {
                listener.notifyFieldChange(this, other, FIELD_RightQuestionKorean, HELPER_RightQuestionKorean.toObject(this._RightQuestionKorean), HELPER_RightQuestionKorean.toObject(otherQuestion._RightQuestionKorean));
            }
            if (!HELPER_LeftQuestionThai.compare(this._LeftQuestionThai, otherQuestion._LeftQuestionThai))
            {
                listener.notifyFieldChange(this, other, FIELD_LeftQuestionThai, HELPER_LeftQuestionThai.toObject(this._LeftQuestionThai), HELPER_LeftQuestionThai.toObject(otherQuestion._LeftQuestionThai));
            }
            if (!HELPER_RightQuestionThai.compare(this._RightQuestionThai, otherQuestion._RightQuestionThai))
            {
                listener.notifyFieldChange(this, other, FIELD_RightQuestionThai, HELPER_RightQuestionThai.toObject(this._RightQuestionThai), HELPER_RightQuestionThai.toObject(otherQuestion._RightQuestionThai));
            }
            if (!HELPER_LeftQuestionViet.compare(this._LeftQuestionViet, otherQuestion._LeftQuestionViet))
            {
                listener.notifyFieldChange(this, other, FIELD_LeftQuestionViet, HELPER_LeftQuestionViet.toObject(this._LeftQuestionViet), HELPER_LeftQuestionViet.toObject(otherQuestion._LeftQuestionViet));
            }
            if (!HELPER_RightQuestionViet.compare(this._RightQuestionViet, otherQuestion._RightQuestionViet))
            {
                listener.notifyFieldChange(this, other, FIELD_RightQuestionViet, HELPER_RightQuestionViet.toObject(this._RightQuestionViet), HELPER_RightQuestionViet.toObject(otherQuestion._RightQuestionViet));
            }

            // Compare single assocs
            

            // 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_LeftQuestionNo, HELPER_LeftQuestionNo.toObject(getLeftQuestionNo()));
        visitor.visitField(this, FIELD_LeftQuestion, HELPER_LeftQuestion.toObject(getLeftQuestion()));
        visitor.visitField(this, FIELD_RightQuestionNo, HELPER_RightQuestionNo.toObject(getRightQuestionNo()));
        visitor.visitField(this, FIELD_RightQuestion, HELPER_RightQuestion.toObject(getRightQuestion()));
        visitor.visitField(this, FIELD_LeftQuestionSchinese, HELPER_LeftQuestionSchinese.toObject(getLeftQuestionSchinese()));
        visitor.visitField(this, FIELD_RightQuestionSchinese, HELPER_RightQuestionSchinese.toObject(getRightQuestionSchinese()));
        visitor.visitField(this, FIELD_LeftQuestionChinese, HELPER_LeftQuestionChinese.toObject(getLeftQuestionChinese()));
        visitor.visitField(this, FIELD_RightQuestionChinese, HELPER_RightQuestionChinese.toObject(getRightQuestionChinese()));
        visitor.visitField(this, FIELD_LeftQuestionKorean, HELPER_LeftQuestionKorean.toObject(getLeftQuestionKorean()));
        visitor.visitField(this, FIELD_RightQuestionKorean, HELPER_RightQuestionKorean.toObject(getRightQuestionKorean()));
        visitor.visitField(this, FIELD_LeftQuestionThai, HELPER_LeftQuestionThai.toObject(getLeftQuestionThai()));
        visitor.visitField(this, FIELD_RightQuestionThai, HELPER_RightQuestionThai.toObject(getRightQuestionThai()));
        visitor.visitField(this, FIELD_LeftQuestionViet, HELPER_LeftQuestionViet.toObject(getLeftQuestionViet()));
        visitor.visitField(this, FIELD_RightQuestionViet, HELPER_RightQuestionViet.toObject(getRightQuestionViet()));
        
    }


    public void visitAssociations (AssociationVisitor visitor, AssociatedScope scope) throws StorageException
    {
        super.visitAssociations (visitor, scope);

        
    }


    public static Question createQuestion (ObjectTransaction transaction) throws StorageException
    {
        Question     result = new Question ();

        result.initialiseNewObject (transaction);

        return result;
    }


    public static Question getQuestionByID (ObjectTransaction transaction, Long objectID) throws StorageException
    {
        return (Question)(transaction.getObjectByID (REFERENCE_Question, objectID));
    }

    public boolean testFilter (String attribName, QueryFilter filter) throws StorageException
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (attribName.equals (FIELD_LeftQuestionNo))
        {
            return filter.matches (getLeftQuestionNo ());
        }
        else if (attribName.equals (FIELD_LeftQuestion))
        {
            return filter.matches (getLeftQuestion ());
        }
        else if (attribName.equals (FIELD_RightQuestionNo))
        {
            return filter.matches (getRightQuestionNo ());
        }
        else if (attribName.equals (FIELD_RightQuestion))
        {
            return filter.matches (getRightQuestion ());
        }
        else if (attribName.equals (FIELD_LeftQuestionSchinese))
        {
            return filter.matches (getLeftQuestionSchinese ());
        }
        else if (attribName.equals (FIELD_RightQuestionSchinese))
        {
            return filter.matches (getRightQuestionSchinese ());
        }
        else if (attribName.equals (FIELD_LeftQuestionChinese))
        {
            return filter.matches (getLeftQuestionChinese ());
        }
        else if (attribName.equals (FIELD_RightQuestionChinese))
        {
            return filter.matches (getRightQuestionChinese ());
        }
        else if (attribName.equals (FIELD_LeftQuestionKorean))
        {
            return filter.matches (getLeftQuestionKorean ());
        }
        else if (attribName.equals (FIELD_RightQuestionKorean))
        {
            return filter.matches (getRightQuestionKorean ());
        }
        else if (attribName.equals (FIELD_LeftQuestionThai))
        {
            return filter.matches (getLeftQuestionThai ());
        }
        else if (attribName.equals (FIELD_RightQuestionThai))
        {
            return filter.matches (getRightQuestionThai ());
        }
        else if (attribName.equals (FIELD_LeftQuestionViet))
        {
            return filter.matches (getLeftQuestionViet ());
        }
        else if (attribName.equals (FIELD_RightQuestionViet))
        {
            return filter.matches (getRightQuestionViet ());
        }
        else
        {
            return super.testFilter (attribName, filter);
        }
    }




    public Object getAttribute (String attribName)
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (attribName.equals (FIELD_LeftQuestionNo))
        {
            return HELPER_LeftQuestionNo.toObject (getLeftQuestionNo ());
        }
        else if (attribName.equals (FIELD_LeftQuestion))
        {
            return HELPER_LeftQuestion.toObject (getLeftQuestion ());
        }
        else if (attribName.equals (FIELD_RightQuestionNo))
        {
            return HELPER_RightQuestionNo.toObject (getRightQuestionNo ());
        }
        else if (attribName.equals (FIELD_RightQuestion))
        {
            return HELPER_RightQuestion.toObject (getRightQuestion ());
        }
        else if (attribName.equals (FIELD_LeftQuestionSchinese))
        {
            return HELPER_LeftQuestionSchinese.toObject (getLeftQuestionSchinese ());
        }
        else if (attribName.equals (FIELD_RightQuestionSchinese))
        {
            return HELPER_RightQuestionSchinese.toObject (getRightQuestionSchinese ());
        }
        else if (attribName.equals (FIELD_LeftQuestionChinese))
        {
            return HELPER_LeftQuestionChinese.toObject (getLeftQuestionChinese ());
        }
        else if (attribName.equals (FIELD_RightQuestionChinese))
        {
            return HELPER_RightQuestionChinese.toObject (getRightQuestionChinese ());
        }
        else if (attribName.equals (FIELD_LeftQuestionKorean))
        {
            return HELPER_LeftQuestionKorean.toObject (getLeftQuestionKorean ());
        }
        else if (attribName.equals (FIELD_RightQuestionKorean))
        {
            return HELPER_RightQuestionKorean.toObject (getRightQuestionKorean ());
        }
        else if (attribName.equals (FIELD_LeftQuestionThai))
        {
            return HELPER_LeftQuestionThai.toObject (getLeftQuestionThai ());
        }
        else if (attribName.equals (FIELD_RightQuestionThai))
        {
            return HELPER_RightQuestionThai.toObject (getRightQuestionThai ());
        }
        else if (attribName.equals (FIELD_LeftQuestionViet))
        {
            return HELPER_LeftQuestionViet.toObject (getLeftQuestionViet ());
        }
        else if (attribName.equals (FIELD_RightQuestionViet))
        {
            return HELPER_RightQuestionViet.toObject (getRightQuestionViet ());
        }
        else
        {
            return super.getAttribute (attribName);
        }
    }


    public AttributeHelper getAttributeHelper (String attribName)
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (attribName.equals (FIELD_LeftQuestionNo))
        {
            return HELPER_LeftQuestionNo;
        }
        else if (attribName.equals (FIELD_LeftQuestion))
        {
            return HELPER_LeftQuestion;
        }
        else if (attribName.equals (FIELD_RightQuestionNo))
        {
            return HELPER_RightQuestionNo;
        }
        else if (attribName.equals (FIELD_RightQuestion))
        {
            return HELPER_RightQuestion;
        }
        else if (attribName.equals (FIELD_LeftQuestionSchinese))
        {
            return HELPER_LeftQuestionSchinese;
        }
        else if (attribName.equals (FIELD_RightQuestionSchinese))
        {
            return HELPER_RightQuestionSchinese;
        }
        else if (attribName.equals (FIELD_LeftQuestionChinese))
        {
            return HELPER_LeftQuestionChinese;
        }
        else if (attribName.equals (FIELD_RightQuestionChinese))
        {
            return HELPER_RightQuestionChinese;
        }
        else if (attribName.equals (FIELD_LeftQuestionKorean))
        {
            return HELPER_LeftQuestionKorean;
        }
        else if (attribName.equals (FIELD_RightQuestionKorean))
        {
            return HELPER_RightQuestionKorean;
        }
        else if (attribName.equals (FIELD_LeftQuestionThai))
        {
            return HELPER_LeftQuestionThai;
        }
        else if (attribName.equals (FIELD_RightQuestionThai))
        {
            return HELPER_RightQuestionThai;
        }
        else if (attribName.equals (FIELD_LeftQuestionViet))
        {
            return HELPER_LeftQuestionViet;
        }
        else if (attribName.equals (FIELD_RightQuestionViet))
        {
            return HELPER_RightQuestionViet;
        }
        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_LeftQuestionNo))
        {
            setLeftQuestionNo ((Integer)(HELPER_LeftQuestionNo.fromObject (_LeftQuestionNo, attribValue)));            
        }
        else if (attribName.equals (FIELD_LeftQuestion))
        {
            setLeftQuestion ((String)(HELPER_LeftQuestion.fromObject (_LeftQuestion, attribValue)));            
        }
        else if (attribName.equals (FIELD_RightQuestionNo))
        {
            setRightQuestionNo ((Integer)(HELPER_RightQuestionNo.fromObject (_RightQuestionNo, attribValue)));            
        }
        else if (attribName.equals (FIELD_RightQuestion))
        {
            setRightQuestion ((String)(HELPER_RightQuestion.fromObject (_RightQuestion, attribValue)));            
        }
        else if (attribName.equals (FIELD_LeftQuestionSchinese))
        {
            setLeftQuestionSchinese ((String)(HELPER_LeftQuestionSchinese.fromObject (_LeftQuestionSchinese, attribValue)));            
        }
        else if (attribName.equals (FIELD_RightQuestionSchinese))
        {
            setRightQuestionSchinese ((String)(HELPER_RightQuestionSchinese.fromObject (_RightQuestionSchinese, attribValue)));            
        }
        else if (attribName.equals (FIELD_LeftQuestionChinese))
        {
            setLeftQuestionChinese ((String)(HELPER_LeftQuestionChinese.fromObject (_LeftQuestionChinese, attribValue)));            
        }
        else if (attribName.equals (FIELD_RightQuestionChinese))
        {
            setRightQuestionChinese ((String)(HELPER_RightQuestionChinese.fromObject (_RightQuestionChinese, attribValue)));            
        }
        else if (attribName.equals (FIELD_LeftQuestionKorean))
        {
            setLeftQuestionKorean ((String)(HELPER_LeftQuestionKorean.fromObject (_LeftQuestionKorean, attribValue)));            
        }
        else if (attribName.equals (FIELD_RightQuestionKorean))
        {
            setRightQuestionKorean ((String)(HELPER_RightQuestionKorean.fromObject (_RightQuestionKorean, attribValue)));            
        }
        else if (attribName.equals (FIELD_LeftQuestionThai))
        {
            setLeftQuestionThai ((String)(HELPER_LeftQuestionThai.fromObject (_LeftQuestionThai, attribValue)));            
        }
        else if (attribName.equals (FIELD_RightQuestionThai))
        {
            setRightQuestionThai ((String)(HELPER_RightQuestionThai.fromObject (_RightQuestionThai, attribValue)));            
        }
        else if (attribName.equals (FIELD_LeftQuestionViet))
        {
            setLeftQuestionViet ((String)(HELPER_LeftQuestionViet.fromObject (_LeftQuestionViet, attribValue)));            
        }
        else if (attribName.equals (FIELD_RightQuestionViet))
        {
            setRightQuestionViet ((String)(HELPER_RightQuestionViet.fromObject (_RightQuestionViet, 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_LeftQuestionNo))
        {
            return getWriteability_LeftQuestionNo ();
        }
        else if (fieldName.equals (FIELD_LeftQuestion))
        {
            return getWriteability_LeftQuestion ();
        }
        else if (fieldName.equals (FIELD_RightQuestionNo))
        {
            return getWriteability_RightQuestionNo ();
        }
        else if (fieldName.equals (FIELD_RightQuestion))
        {
            return getWriteability_RightQuestion ();
        }
        else if (fieldName.equals (FIELD_LeftQuestionSchinese))
        {
            return getWriteability_LeftQuestionSchinese ();
        }
        else if (fieldName.equals (FIELD_RightQuestionSchinese))
        {
            return getWriteability_RightQuestionSchinese ();
        }
        else if (fieldName.equals (FIELD_LeftQuestionChinese))
        {
            return getWriteability_LeftQuestionChinese ();
        }
        else if (fieldName.equals (FIELD_RightQuestionChinese))
        {
            return getWriteability_RightQuestionChinese ();
        }
        else if (fieldName.equals (FIELD_LeftQuestionKorean))
        {
            return getWriteability_LeftQuestionKorean ();
        }
        else if (fieldName.equals (FIELD_RightQuestionKorean))
        {
            return getWriteability_RightQuestionKorean ();
        }
        else if (fieldName.equals (FIELD_LeftQuestionThai))
        {
            return getWriteability_LeftQuestionThai ();
        }
        else if (fieldName.equals (FIELD_RightQuestionThai))
        {
            return getWriteability_RightQuestionThai ();
        }
        else if (fieldName.equals (FIELD_LeftQuestionViet))
        {
            return getWriteability_LeftQuestionViet ();
        }
        else if (fieldName.equals (FIELD_RightQuestionViet))
        {
            return getWriteability_RightQuestionViet ();
        }
        else
        {
            return super.getWriteable (fieldName);
        }
    }


    public void putUnwriteable (Set<String> fields)
    {
        
            if (getWriteability_LeftQuestionNo () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_LeftQuestionNo);
            }
        
            if (getWriteability_LeftQuestion () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_LeftQuestion);
            }
        
            if (getWriteability_RightQuestionNo () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_RightQuestionNo);
            }
        
            if (getWriteability_RightQuestion () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_RightQuestion);
            }
        
            if (getWriteability_LeftQuestionSchinese () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_LeftQuestionSchinese);
            }
        
            if (getWriteability_RightQuestionSchinese () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_RightQuestionSchinese);
            }
        
            if (getWriteability_LeftQuestionChinese () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_LeftQuestionChinese);
            }
        
            if (getWriteability_RightQuestionChinese () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_RightQuestionChinese);
            }
        
            if (getWriteability_LeftQuestionKorean () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_LeftQuestionKorean);
            }
        
            if (getWriteability_RightQuestionKorean () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_RightQuestionKorean);
            }
        
            if (getWriteability_LeftQuestionThai () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_LeftQuestionThai);
            }
        
            if (getWriteability_RightQuestionThai () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_RightQuestionThai);
            }
        
            if (getWriteability_LeftQuestionViet () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_LeftQuestionViet);
            }
        
            if (getWriteability_RightQuestionViet () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_RightQuestionViet);
            }
        

        super.putUnwriteable (fields);
    }

    public List<AbstractAttribute> getAttributes ()
    {
        List result = super.getAttributes ();

        
        result.add(HELPER_LeftQuestionNo.getAttribObject (getClass (), _LeftQuestionNo, false, FIELD_LeftQuestionNo));
        result.add(HELPER_LeftQuestion.getAttribObject (getClass (), _LeftQuestion, false, FIELD_LeftQuestion));
        result.add(HELPER_RightQuestionNo.getAttribObject (getClass (), _RightQuestionNo, false, FIELD_RightQuestionNo));
        result.add(HELPER_RightQuestion.getAttribObject (getClass (), _RightQuestion, false, FIELD_RightQuestion));
        result.add(HELPER_LeftQuestionSchinese.getAttribObject (getClass (), _LeftQuestionSchinese, false, FIELD_LeftQuestionSchinese));
        result.add(HELPER_RightQuestionSchinese.getAttribObject (getClass (), _RightQuestionSchinese, false, FIELD_RightQuestionSchinese));
        result.add(HELPER_LeftQuestionChinese.getAttribObject (getClass (), _LeftQuestionChinese, false, FIELD_LeftQuestionChinese));
        result.add(HELPER_RightQuestionChinese.getAttribObject (getClass (), _RightQuestionChinese, false, FIELD_RightQuestionChinese));
        result.add(HELPER_LeftQuestionKorean.getAttribObject (getClass (), _LeftQuestionKorean, false, FIELD_LeftQuestionKorean));
        result.add(HELPER_RightQuestionKorean.getAttribObject (getClass (), _RightQuestionKorean, false, FIELD_RightQuestionKorean));
        result.add(HELPER_LeftQuestionThai.getAttribObject (getClass (), _LeftQuestionThai, false, FIELD_LeftQuestionThai));
        result.add(HELPER_RightQuestionThai.getAttribObject (getClass (), _RightQuestionThai, false, FIELD_RightQuestionThai));
        result.add(HELPER_LeftQuestionViet.getAttribObject (getClass (), _LeftQuestionViet, false, FIELD_LeftQuestionViet));
        result.add(HELPER_RightQuestionViet.getAttribObject (getClass (), _RightQuestionViet, false, FIELD_RightQuestionViet));

        return result;
    }


    public Map getAttributeMetadata (String attribute)
    {
        if (ATTRIBUTES_METADATA_Question.containsKey (attribute))
        {
            return (Map)ATTRIBUTES_METADATA_Question.get (attribute);
        }
        else
        {
            return super.getAttributeMetadata (attribute);
        }
    }


    public Object getAttributeMetadata (String attribute, String metadata)
    {
        if (ATTRIBUTES_METADATA_Question.containsKey (attribute))
        {
            return ((Map)ATTRIBUTES_METADATA_Question.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 QuestionBehaviourDecorator extends BaseBusinessClass.BBCBehaviourDecorator<Question>
    {

    /**
     * Get the attribute LeftQuestionNo
     */
    public Integer getLeftQuestionNo (Question obj, Integer original)
    {
        return original;
    }

    /**
     * Change the value set for attribute LeftQuestionNo.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Integer setLeftQuestionNo (Question obj, Integer newLeftQuestionNo) throws FieldException
    {
        return newLeftQuestionNo;
    }

    /**
     * Get the attribute LeftQuestion
     */
    public String getLeftQuestion (Question obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute LeftQuestion.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setLeftQuestion (Question obj, String newLeftQuestion) throws FieldException
    {
        return newLeftQuestion;
    }

    /**
     * Get the attribute RightQuestionNo
     */
    public Integer getRightQuestionNo (Question obj, Integer original)
    {
        return original;
    }

    /**
     * Change the value set for attribute RightQuestionNo.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Integer setRightQuestionNo (Question obj, Integer newRightQuestionNo) throws FieldException
    {
        return newRightQuestionNo;
    }

    /**
     * Get the attribute RightQuestion
     */
    public String getRightQuestion (Question obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute RightQuestion.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setRightQuestion (Question obj, String newRightQuestion) throws FieldException
    {
        return newRightQuestion;
    }

    /**
     * Get the attribute LeftQuestionSchinese
     */
    public String getLeftQuestionSchinese (Question obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute LeftQuestionSchinese.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setLeftQuestionSchinese (Question obj, String newLeftQuestionSchinese) throws FieldException
    {
        return newLeftQuestionSchinese;
    }

    /**
     * Get the attribute RightQuestionSchinese
     */
    public String getRightQuestionSchinese (Question obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute RightQuestionSchinese.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setRightQuestionSchinese (Question obj, String newRightQuestionSchinese) throws FieldException
    {
        return newRightQuestionSchinese;
    }

    /**
     * Get the attribute LeftQuestionChinese
     */
    public String getLeftQuestionChinese (Question obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute LeftQuestionChinese.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setLeftQuestionChinese (Question obj, String newLeftQuestionChinese) throws FieldException
    {
        return newLeftQuestionChinese;
    }

    /**
     * Get the attribute RightQuestionChinese
     */
    public String getRightQuestionChinese (Question obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute RightQuestionChinese.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setRightQuestionChinese (Question obj, String newRightQuestionChinese) throws FieldException
    {
        return newRightQuestionChinese;
    }

    /**
     * Get the attribute LeftQuestionKorean
     */
    public String getLeftQuestionKorean (Question obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute LeftQuestionKorean.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setLeftQuestionKorean (Question obj, String newLeftQuestionKorean) throws FieldException
    {
        return newLeftQuestionKorean;
    }

    /**
     * Get the attribute RightQuestionKorean
     */
    public String getRightQuestionKorean (Question obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute RightQuestionKorean.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setRightQuestionKorean (Question obj, String newRightQuestionKorean) throws FieldException
    {
        return newRightQuestionKorean;
    }

    /**
     * Get the attribute LeftQuestionThai
     */
    public String getLeftQuestionThai (Question obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute LeftQuestionThai.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setLeftQuestionThai (Question obj, String newLeftQuestionThai) throws FieldException
    {
        return newLeftQuestionThai;
    }

    /**
     * Get the attribute RightQuestionThai
     */
    public String getRightQuestionThai (Question obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute RightQuestionThai.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setRightQuestionThai (Question obj, String newRightQuestionThai) throws FieldException
    {
        return newRightQuestionThai;
    }

    /**
     * Get the attribute LeftQuestionViet
     */
    public String getLeftQuestionViet (Question obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute LeftQuestionViet.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setLeftQuestionViet (Question obj, String newLeftQuestionViet) throws FieldException
    {
        return newLeftQuestionViet;
    }

    /**
     * Get the attribute RightQuestionViet
     */
    public String getRightQuestionViet (Question obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute RightQuestionViet.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setRightQuestionViet (Question obj, String newRightQuestionViet) throws FieldException
    {
        return newRightQuestionViet;
    }

    }

    
    public ORMPipeLine pipes()
    {
        return new QuestionPipeLineFactory<Question, Question> ((Question)this);
    }
      
    /**
     * Use this instead of pipes() to get rid of type casting.
     */  
    public QuestionPipeLineFactory<Question, Question> pipelineQuestion()
    {
        return (QuestionPipeLineFactory<Question, Question>) pipes();
    }
    
    public static QuestionPipeLineFactory<Question, Question> pipesQuestion(Collection<Question> items)
    {
        return REFERENCE_Question.new QuestionPipeLineFactory<Question, Question> (items);
    }
    
    public static QuestionPipeLineFactory<Question, Question> pipesQuestion(Question[] _items)
    {
        return pipesQuestion(Arrays.asList (_items));
    }
    
    public static QuestionPipeLineFactory<Question, Question> pipesQuestion()
    {
        return pipesQuestion((Collection)null);
    }
    
    
    public class QuestionPipeLineFactory<From extends BaseBusinessClass, Me extends Question> extends BaseBusinessClass.ORMPipeLine<From, Me>    
    {
        public <Prev> QuestionPipeLineFactory (PipeLine<From, Prev> pipeLine, Pipe<Prev, Me> nextPipe)
        {
            super (pipeLine, nextPipe);
        }
        
        public QuestionPipeLineFactory (From seed)
        {
            super(seed);
        }

        public QuestionPipeLineFactory (Collection<From> seed)
        {
            super(seed);
        }
        
        
        public PipeLine<From, ? extends Object> to(String name)
        {
            if (name.equals ("LeftQuestionNo"))
            {
                return toLeftQuestionNo ();
            }                
            if (name.equals ("LeftQuestion"))
            {
                return toLeftQuestion ();
            }                
            if (name.equals ("RightQuestionNo"))
            {
                return toRightQuestionNo ();
            }                
            if (name.equals ("RightQuestion"))
            {
                return toRightQuestion ();
            }                
            if (name.equals ("LeftQuestionSchinese"))
            {
                return toLeftQuestionSchinese ();
            }                
            if (name.equals ("RightQuestionSchinese"))
            {
                return toRightQuestionSchinese ();
            }                
            if (name.equals ("LeftQuestionChinese"))
            {
                return toLeftQuestionChinese ();
            }                
            if (name.equals ("RightQuestionChinese"))
            {
                return toRightQuestionChinese ();
            }                
            if (name.equals ("LeftQuestionKorean"))
            {
                return toLeftQuestionKorean ();
            }                
            if (name.equals ("RightQuestionKorean"))
            {
                return toRightQuestionKorean ();
            }                
            if (name.equals ("LeftQuestionThai"))
            {
                return toLeftQuestionThai ();
            }                
            if (name.equals ("RightQuestionThai"))
            {
                return toRightQuestionThai ();
            }                
            if (name.equals ("LeftQuestionViet"))
            {
                return toLeftQuestionViet ();
            }                
            if (name.equals ("RightQuestionViet"))
            {
                return toRightQuestionViet ();
            }                
            
            
            return super.to(name);
        }
        
        
        public PipeLine<From, Integer> toLeftQuestionNo () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_LeftQuestionNo));  }
        
        public PipeLine<From, String> toLeftQuestion () { return pipe(new ORMAttributePipe<Me, String>(FIELD_LeftQuestion));  }
        
        public PipeLine<From, Integer> toRightQuestionNo () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_RightQuestionNo));  }
        
        public PipeLine<From, String> toRightQuestion () { return pipe(new ORMAttributePipe<Me, String>(FIELD_RightQuestion));  }
        
        public PipeLine<From, String> toLeftQuestionSchinese () { return pipe(new ORMAttributePipe<Me, String>(FIELD_LeftQuestionSchinese));  }
        
        public PipeLine<From, String> toRightQuestionSchinese () { return pipe(new ORMAttributePipe<Me, String>(FIELD_RightQuestionSchinese));  }
        
        public PipeLine<From, String> toLeftQuestionChinese () { return pipe(new ORMAttributePipe<Me, String>(FIELD_LeftQuestionChinese));  }
        
        public PipeLine<From, String> toRightQuestionChinese () { return pipe(new ORMAttributePipe<Me, String>(FIELD_RightQuestionChinese));  }
        
        public PipeLine<From, String> toLeftQuestionKorean () { return pipe(new ORMAttributePipe<Me, String>(FIELD_LeftQuestionKorean));  }
        
        public PipeLine<From, String> toRightQuestionKorean () { return pipe(new ORMAttributePipe<Me, String>(FIELD_RightQuestionKorean));  }
        
        public PipeLine<From, String> toLeftQuestionThai () { return pipe(new ORMAttributePipe<Me, String>(FIELD_LeftQuestionThai));  }
        
        public PipeLine<From, String> toRightQuestionThai () { return pipe(new ORMAttributePipe<Me, String>(FIELD_RightQuestionThai));  }
        
        public PipeLine<From, String> toLeftQuestionViet () { return pipe(new ORMAttributePipe<Me, String>(FIELD_LeftQuestionViet));  }
        
        public PipeLine<From, String> toRightQuestionViet () { return pipe(new ORMAttributePipe<Me, String>(FIELD_RightQuestionViet));  }
        
    }
    
    public boolean isTransientAttrib(String attribName)
    {
        

        return super.isTransientAttrib(attribName);
    }

    public boolean isTransientSingleReference(String assocName)
    {
        

        return super.isTransientSingleReference(assocName);
    }
}

class DummyQuestion extends Question
{
    // Default constructor primarily to support Externalisable
    public DummyQuestion()
    {
        super();
    }

    public void assertValid ()
    {
    }


}

    
