/*
 * IMPORTANT!!!! XSL Autogenerated class, DO NOT EDIT!!!!!
 * Template: Infrastructure9.0 [oneit.objstore.BusinessObjectTemplate.xsl]
 *   Vendor: Apache Software Foundation (Xalan XSLTC) (Version: 1.0)
 */

    
package performa.orm;

import java.io.*;
import java.util.*;
import oneit.appservices.config.*;
import oneit.logging.*;
import oneit.objstore.*;
import oneit.objstore.assocs.*;
import oneit.objstore.attributes.*;
import oneit.objstore.rdbms.filters.*;
import oneit.objstore.parser.*;
import oneit.objstore.validator.*;
import oneit.objstore.utils.*;
import oneit.utils.*;
import oneit.utils.filter.Filter;
import oneit.utils.transform.*;
import oneit.utils.parsers.FieldException;

import performa.orm.types.*;


public abstract class BaseWorkFlowTemplate extends BaseBusinessClass
{
    // Reference instance for the object
    public static final WorkFlowTemplate REFERENCE_WorkFlowTemplate = new WorkFlowTemplate ();

    // Reference instance for the object
    public static final WorkFlowTemplate DUMMY_WorkFlowTemplate = new DummyWorkFlowTemplate ();

    // Static constants corresponding to field names
    
    public static final String FIELD_TemplateName = "TemplateName";
    public static final String FIELD_LandingButtonText = "LandingButtonText";
    public static final String FIELD_VerificationHeaderText = "VerificationHeaderText";
    public static final String FIELD_CaptureCV = "CaptureCV";
    public static final String FIELD_IsCVMandatory = "IsCVMandatory";
    public static final String FIELD_CaptureCL = "CaptureCL";
    public static final String FIELD_IsCLMandatory = "IsCLMandatory";
    public static final String FIELD_ApplicationButtonText = "ApplicationButtonText";
    public static final String FIELD_ApplicationResponseAction = "ApplicationResponseAction";
    public static final String FIELD_ThankYouHeaderText = "ThankYouHeaderText";
    public static final String FIELD_ThankYouSecondaryText = "ThankYouSecondaryText";
    public static final String FIELD_JobOutlineButtonText = "JobOutlineButtonText";
    public static final String FIELD_RelatedToJob = "RelatedToJob";
    public static final String FIELD_IsSystemGenerated = "IsSystemGenerated";
    public static final String SINGLEREFERENCE_WithdrawalMessage = "WithdrawalMessage";
    public static final String SINGLEREFERENCE_HiringTeam = "HiringTeam";
    public static final String BACKREF_HiringTeam = "";
    public static final String MULTIPLEREFERENCE_WorkFlowStages = "WorkFlowStages";
    public static final String BACKREF_WorkFlowStages = "";
    public static final String MULTIPLEREFERENCE_Jobs = "Jobs";
    public static final String BACKREF_Jobs = "";

    // Static constants corresponding to searches
    public static final String SEARCH_All = "All";
    

    // Static constants corresponding to attribute helpers
    private static final DefaultAttributeHelper<WorkFlowTemplate> HELPER_TemplateName = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<WorkFlowTemplate> HELPER_LandingButtonText = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<WorkFlowTemplate> HELPER_VerificationHeaderText = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<WorkFlowTemplate> HELPER_CaptureCV = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<WorkFlowTemplate> HELPER_IsCVMandatory = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<WorkFlowTemplate> HELPER_CaptureCL = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<WorkFlowTemplate> HELPER_IsCLMandatory = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<WorkFlowTemplate> HELPER_ApplicationButtonText = DefaultAttributeHelper.INSTANCE;
    private static final EnumeratedAttributeHelper<WorkFlowTemplate, ResponseAction> HELPER_ApplicationResponseAction =  new EnumeratedAttributeHelper<WorkFlowTemplate, ResponseAction> (ResponseAction.FACTORY_ResponseAction);
    private static final DefaultAttributeHelper<WorkFlowTemplate> HELPER_ThankYouHeaderText = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<WorkFlowTemplate> HELPER_ThankYouSecondaryText = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<WorkFlowTemplate> HELPER_JobOutlineButtonText = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<WorkFlowTemplate> HELPER_RelatedToJob = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<WorkFlowTemplate> HELPER_IsSystemGenerated = DefaultAttributeHelper.INSTANCE;
    

    // Private attributes corresponding to business object data
    private String _TemplateName;
    private String _LandingButtonText;
    private String _VerificationHeaderText;
    private Boolean _CaptureCV;
    private Boolean _IsCVMandatory;
    private Boolean _CaptureCL;
    private Boolean _IsCLMandatory;
    private String _ApplicationButtonText;
    private ResponseAction _ApplicationResponseAction;
    private String _ThankYouHeaderText;
    private String _ThankYouSecondaryText;
    private String _JobOutlineButtonText;
    private Boolean _RelatedToJob;
    private Boolean _IsSystemGenerated;
    

    // Private attributes corresponding to single references
    private SingleAssociation<WorkFlowTemplate, WorkFlowMessage> _WithdrawalMessage;
    private SingleAssociation<WorkFlowTemplate, HiringTeam> _HiringTeam;
    

    // Private attributes corresponding to multiple references
    private MultipleAssociation<WorkFlowTemplate, WorkFlowStage> _WorkFlowStages;
    private MultipleAssociation<WorkFlowTemplate, Job> _Jobs;
    

    // Map of maps of metadata
    private static final Map ATTRIBUTES_METADATA_WorkFlowTemplate = new LinkedHashMap ();

    // Arrays of validators for each attribute
    private static final AttributeValidator[] FIELD_TemplateName_Validators;
    private static final AttributeValidator[] FIELD_LandingButtonText_Validators;
    private static final AttributeValidator[] FIELD_VerificationHeaderText_Validators;
    private static final AttributeValidator[] FIELD_CaptureCV_Validators;
    private static final AttributeValidator[] FIELD_IsCVMandatory_Validators;
    private static final AttributeValidator[] FIELD_CaptureCL_Validators;
    private static final AttributeValidator[] FIELD_IsCLMandatory_Validators;
    private static final AttributeValidator[] FIELD_ApplicationButtonText_Validators;
    private static final AttributeValidator[] FIELD_ApplicationResponseAction_Validators;
    private static final AttributeValidator[] FIELD_ThankYouHeaderText_Validators;
    private static final AttributeValidator[] FIELD_ThankYouSecondaryText_Validators;
    private static final AttributeValidator[] FIELD_JobOutlineButtonText_Validators;
    private static final AttributeValidator[] FIELD_RelatedToJob_Validators;
    private static final AttributeValidator[] FIELD_IsSystemGenerated_Validators;
    

    // Arrays of AttributeDecorators for each attribute
    private static final AttributeDecorator<WorkFlowTemplate, String>[] FIELD_TemplateName_Decorators;
    private static final AttributeDecorator<WorkFlowTemplate, String>[] FIELD_LandingButtonText_Decorators;
    private static final AttributeDecorator<WorkFlowTemplate, String>[] FIELD_VerificationHeaderText_Decorators;
    private static final AttributeDecorator<WorkFlowTemplate, Boolean>[] FIELD_CaptureCV_Decorators;
    private static final AttributeDecorator<WorkFlowTemplate, Boolean>[] FIELD_IsCVMandatory_Decorators;
    private static final AttributeDecorator<WorkFlowTemplate, Boolean>[] FIELD_CaptureCL_Decorators;
    private static final AttributeDecorator<WorkFlowTemplate, Boolean>[] FIELD_IsCLMandatory_Decorators;
    private static final AttributeDecorator<WorkFlowTemplate, String>[] FIELD_ApplicationButtonText_Decorators;
    private static final AttributeDecorator<WorkFlowTemplate, ResponseAction>[] FIELD_ApplicationResponseAction_Decorators;
    private static final AttributeDecorator<WorkFlowTemplate, String>[] FIELD_ThankYouHeaderText_Decorators;
    private static final AttributeDecorator<WorkFlowTemplate, String>[] FIELD_ThankYouSecondaryText_Decorators;
    private static final AttributeDecorator<WorkFlowTemplate, String>[] FIELD_JobOutlineButtonText_Decorators;
    private static final AttributeDecorator<WorkFlowTemplate, Boolean>[] FIELD_RelatedToJob_Decorators;
    private static final AttributeDecorator<WorkFlowTemplate, Boolean>[] FIELD_IsSystemGenerated_Decorators;
    
    
    // Arrays of SingleAssocDecorators for each attribute
    private static final SingleAssocDecorator<WorkFlowTemplate, WorkFlowMessage>[] SINGLEREFERENCE_WithdrawalMessage_Decorators;
    private static final SingleAssocDecorator<WorkFlowTemplate, HiringTeam>[] SINGLEREFERENCE_HiringTeam_Decorators;
    
    
    // Arrays of MultiAssocDecorators for each attribute
    private static final MultiAssocDecorator<WorkFlowTemplate, WorkFlowStage>[] MULTIPLEREFERENCE_WorkFlowStages_Decorators;
    private static final MultiAssocDecorator<WorkFlowTemplate, Job>[] MULTIPLEREFERENCE_Jobs_Decorators;
    

    // Arrays of behaviour decorators
    private static final WorkFlowTemplateBehaviourDecorator[] WorkFlowTemplate_BehaviourDecorators;
    
    static
    {
        try
        {
            
            String tmp_WorkFlowStages = WorkFlowStage.BACKREF_WorkFlowTemplate;
            String tmp_Jobs = Job.BACKREF_WorkFlowTemplate;
            String tmp_HiringTeam = HiringTeam.BACKREF_WorkFlowTemplates;
            
            Map  validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping"));

            setupAssocMetaData_WorkFlowStages();
            setupAssocMetaData_Jobs();
            setupAssocMetaData_WithdrawalMessage();
            setupAssocMetaData_HiringTeam();
            FIELD_TemplateName_Validators = (AttributeValidator[])setupAttribMetaData_TemplateName(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_LandingButtonText_Validators = (AttributeValidator[])setupAttribMetaData_LandingButtonText(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_VerificationHeaderText_Validators = (AttributeValidator[])setupAttribMetaData_VerificationHeaderText(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_CaptureCV_Validators = (AttributeValidator[])setupAttribMetaData_CaptureCV(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_IsCVMandatory_Validators = (AttributeValidator[])setupAttribMetaData_IsCVMandatory(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_CaptureCL_Validators = (AttributeValidator[])setupAttribMetaData_CaptureCL(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_IsCLMandatory_Validators = (AttributeValidator[])setupAttribMetaData_IsCLMandatory(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_ApplicationButtonText_Validators = (AttributeValidator[])setupAttribMetaData_ApplicationButtonText(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_ApplicationResponseAction_Validators = (AttributeValidator[])setupAttribMetaData_ApplicationResponseAction(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_ThankYouHeaderText_Validators = (AttributeValidator[])setupAttribMetaData_ThankYouHeaderText(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_ThankYouSecondaryText_Validators = (AttributeValidator[])setupAttribMetaData_ThankYouSecondaryText(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_JobOutlineButtonText_Validators = (AttributeValidator[])setupAttribMetaData_JobOutlineButtonText(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_RelatedToJob_Validators = (AttributeValidator[])setupAttribMetaData_RelatedToJob(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_IsSystemGenerated_Validators = (AttributeValidator[])setupAttribMetaData_IsSystemGenerated(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_TemplateName_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_WorkFlowTemplate, FIELD_TemplateName).toArray (new AttributeDecorator[0]);
            FIELD_LandingButtonText_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_WorkFlowTemplate, FIELD_LandingButtonText).toArray (new AttributeDecorator[0]);
            FIELD_VerificationHeaderText_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_WorkFlowTemplate, FIELD_VerificationHeaderText).toArray (new AttributeDecorator[0]);
            FIELD_CaptureCV_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_WorkFlowTemplate, FIELD_CaptureCV).toArray (new AttributeDecorator[0]);
            FIELD_IsCVMandatory_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_WorkFlowTemplate, FIELD_IsCVMandatory).toArray (new AttributeDecorator[0]);
            FIELD_CaptureCL_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_WorkFlowTemplate, FIELD_CaptureCL).toArray (new AttributeDecorator[0]);
            FIELD_IsCLMandatory_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_WorkFlowTemplate, FIELD_IsCLMandatory).toArray (new AttributeDecorator[0]);
            FIELD_ApplicationButtonText_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_WorkFlowTemplate, FIELD_ApplicationButtonText).toArray (new AttributeDecorator[0]);
            FIELD_ApplicationResponseAction_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_WorkFlowTemplate, FIELD_ApplicationResponseAction).toArray (new AttributeDecorator[0]);
            FIELD_ThankYouHeaderText_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_WorkFlowTemplate, FIELD_ThankYouHeaderText).toArray (new AttributeDecorator[0]);
            FIELD_ThankYouSecondaryText_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_WorkFlowTemplate, FIELD_ThankYouSecondaryText).toArray (new AttributeDecorator[0]);
            FIELD_JobOutlineButtonText_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_WorkFlowTemplate, FIELD_JobOutlineButtonText).toArray (new AttributeDecorator[0]);
            FIELD_RelatedToJob_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_WorkFlowTemplate, FIELD_RelatedToJob).toArray (new AttributeDecorator[0]);
            FIELD_IsSystemGenerated_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_WorkFlowTemplate, FIELD_IsSystemGenerated).toArray (new AttributeDecorator[0]);
            SINGLEREFERENCE_WithdrawalMessage_Decorators = (SingleAssocDecorator[])AttributeDecoratorUtils.getSingleAssocDecorators(REFERENCE_WorkFlowTemplate, SINGLEREFERENCE_WithdrawalMessage).toArray (new SingleAssocDecorator[0]);
            SINGLEREFERENCE_HiringTeam_Decorators = (SingleAssocDecorator[])AttributeDecoratorUtils.getSingleAssocDecorators(REFERENCE_WorkFlowTemplate, SINGLEREFERENCE_HiringTeam).toArray (new SingleAssocDecorator[0]);
            MULTIPLEREFERENCE_WorkFlowStages_Decorators = (MultiAssocDecorator[])AttributeDecoratorUtils.getMultiAssocDecorators(REFERENCE_WorkFlowTemplate, MULTIPLEREFERENCE_WorkFlowStages).toArray (new MultiAssocDecorator[0]);
            MULTIPLEREFERENCE_Jobs_Decorators = (MultiAssocDecorator[])AttributeDecoratorUtils.getMultiAssocDecorators(REFERENCE_WorkFlowTemplate, MULTIPLEREFERENCE_Jobs).toArray (new MultiAssocDecorator[0]);
            

            REFERENCE_WorkFlowTemplate.initialiseReference ();
            DUMMY_WorkFlowTemplate.initialiseReference ();
            WorkFlowTemplate_BehaviourDecorators = BaseBusinessClass.getBBCBehaviours(WorkFlowTemplate.class).toArray(new WorkFlowTemplateBehaviourDecorator[0]);
        }
        catch (RuntimeException e)
        {
            LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR1, e, "Error initialising");
            throw e;
        }
    }

    
    private static void setupAssocMetaData_WorkFlowStages()
    {
        Map metaInfo = new HashMap ();

        metaInfo.put ("backreferenceName", "WorkFlowTemplate");
        metaInfo.put ("name", "WorkFlowStages");
        metaInfo.put ("type", "WorkFlowStage");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for WorkFlowTemplate.WorkFlowStages:", metaInfo);
        ATTRIBUTES_METADATA_WorkFlowTemplate.put (MULTIPLEREFERENCE_WorkFlowStages, Collections.unmodifiableMap (metaInfo));
    }
    
    
    private static void setupAssocMetaData_Jobs()
    {
        Map metaInfo = new HashMap ();

        metaInfo.put ("backreferenceName", "WorkFlowTemplate");
        metaInfo.put ("name", "Jobs");
        metaInfo.put ("type", "Job");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for WorkFlowTemplate.Jobs:", metaInfo);
        ATTRIBUTES_METADATA_WorkFlowTemplate.put (MULTIPLEREFERENCE_Jobs, Collections.unmodifiableMap (metaInfo));
    }
    
    
    private static void setupAssocMetaData_WithdrawalMessage()
    {
        Map metaInfo = new HashMap ();

        metaInfo.put ("dbcol", "withdrawal_message_id");
        metaInfo.put ("name", "WithdrawalMessage");
        metaInfo.put ("type", "WorkFlowMessage");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_work_flow_template");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for WorkFlowTemplate.WithdrawalMessage:", metaInfo);
        ATTRIBUTES_METADATA_WorkFlowTemplate.put (SINGLEREFERENCE_WithdrawalMessage, Collections.unmodifiableMap (metaInfo));
    }
    
    
    private static void setupAssocMetaData_HiringTeam()
    {
        Map metaInfo = new HashMap ();

        metaInfo.put ("backreferenceName", "WorkFlowTemplates");
        metaInfo.put ("dbcol", "hiring_team_id");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "HiringTeam");
        metaInfo.put ("type", "HiringTeam");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_work_flow_template");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for WorkFlowTemplate.HiringTeam:", metaInfo);
        ATTRIBUTES_METADATA_WorkFlowTemplate.put (SINGLEREFERENCE_HiringTeam, Collections.unmodifiableMap (metaInfo));
    }
    
    
    private static List setupAttribMetaData_TemplateName(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "template_name");
        metaInfo.put ("mandatory", "true");
        metaInfo.put ("name", "TemplateName");
        metaInfo.put ("type", "String");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_work_flow_template");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for WorkFlowTemplate.TemplateName:", metaInfo);
        ATTRIBUTES_METADATA_WorkFlowTemplate.put (FIELD_TemplateName, Collections.unmodifiableMap (metaInfo));

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

        return validators;
    }
    
    private static List setupAttribMetaData_LandingButtonText(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "landing_button_text");
        metaInfo.put ("defaultValue", "Apply Now");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "LandingButtonText");
        metaInfo.put ("type", "String");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_work_flow_template");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for WorkFlowTemplate.LandingButtonText:", metaInfo);
        ATTRIBUTES_METADATA_WorkFlowTemplate.put (FIELD_LandingButtonText, Collections.unmodifiableMap (metaInfo));

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

        return validators;
    }
    
    private static List setupAttribMetaData_VerificationHeaderText(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "verification_header_text");
        metaInfo.put ("defaultValue", "Please verify your identity before applying to:");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "VerificationHeaderText");
        metaInfo.put ("type", "String");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_work_flow_template");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for WorkFlowTemplate.VerificationHeaderText:", metaInfo);
        ATTRIBUTES_METADATA_WorkFlowTemplate.put (FIELD_VerificationHeaderText, Collections.unmodifiableMap (metaInfo));

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

        return validators;
    }
    
    private static List setupAttribMetaData_CaptureCV(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "capture_cv");
        metaInfo.put ("defaultValue", "Boolean.TRUE");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "CaptureCV");
        metaInfo.put ("type", "Boolean");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_work_flow_template");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for WorkFlowTemplate.CaptureCV:", metaInfo);
        ATTRIBUTES_METADATA_WorkFlowTemplate.put (FIELD_CaptureCV, Collections.unmodifiableMap (metaInfo));

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

        return validators;
    }
    
    private static List setupAttribMetaData_IsCVMandatory(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "is_cv_mandatory");
        metaInfo.put ("defaultValue", "Boolean.TRUE");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "IsCVMandatory");
        metaInfo.put ("type", "Boolean");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_work_flow_template");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for WorkFlowTemplate.IsCVMandatory:", metaInfo);
        ATTRIBUTES_METADATA_WorkFlowTemplate.put (FIELD_IsCVMandatory, Collections.unmodifiableMap (metaInfo));

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

        return validators;
    }
    
    private static List setupAttribMetaData_CaptureCL(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "capture_cl");
        metaInfo.put ("defaultValue", "Boolean.TRUE");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "CaptureCL");
        metaInfo.put ("type", "Boolean");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_work_flow_template");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for WorkFlowTemplate.CaptureCL:", metaInfo);
        ATTRIBUTES_METADATA_WorkFlowTemplate.put (FIELD_CaptureCL, Collections.unmodifiableMap (metaInfo));

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

        return validators;
    }
    
    private static List setupAttribMetaData_IsCLMandatory(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "is_cl_mandatory");
        metaInfo.put ("defaultValue", "Boolean.TRUE");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "IsCLMandatory");
        metaInfo.put ("type", "Boolean");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_work_flow_template");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for WorkFlowTemplate.IsCLMandatory:", metaInfo);
        ATTRIBUTES_METADATA_WorkFlowTemplate.put (FIELD_IsCLMandatory, Collections.unmodifiableMap (metaInfo));

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

        return validators;
    }
    
    private static List setupAttribMetaData_ApplicationButtonText(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "application_button_text");
        metaInfo.put ("defaultValue", "Submit");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "ApplicationButtonText");
        metaInfo.put ("type", "String");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_work_flow_template");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for WorkFlowTemplate.ApplicationButtonText:", metaInfo);
        ATTRIBUTES_METADATA_WorkFlowTemplate.put (FIELD_ApplicationButtonText, Collections.unmodifiableMap (metaInfo));

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

        return validators;
    }
    
    private static List setupAttribMetaData_ApplicationResponseAction(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
        metaInfo.put ("dbcol", "application_response_action");
        metaInfo.put ("defaultValue", "ResponseAction.EMAIL_RESPONSE");
        metaInfo.put ("mandatory", "true");
        metaInfo.put ("name", "ApplicationResponseAction");
        metaInfo.put ("type", "ResponseAction");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_work_flow_template");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for WorkFlowTemplate.ApplicationResponseAction:", metaInfo);
        ATTRIBUTES_METADATA_WorkFlowTemplate.put (FIELD_ApplicationResponseAction, Collections.unmodifiableMap (metaInfo));

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

        return validators;
    }
    
    private static List setupAttribMetaData_ThankYouHeaderText(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "thank_you_header_text");
        metaInfo.put ("defaultValue", "Thank You for your application to:");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "ThankYouHeaderText");
        metaInfo.put ("type", "String");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_work_flow_template");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for WorkFlowTemplate.ThankYouHeaderText:", metaInfo);
        ATTRIBUTES_METADATA_WorkFlowTemplate.put (FIELD_ThankYouHeaderText, Collections.unmodifiableMap (metaInfo));

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

        return validators;
    }
    
    private static List setupAttribMetaData_ThankYouSecondaryText(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "thank_you_secondary_text");
        metaInfo.put ("defaultValue", "We will get in touch with you soon");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "ThankYouSecondaryText");
        metaInfo.put ("type", "String");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_work_flow_template");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for WorkFlowTemplate.ThankYouSecondaryText:", metaInfo);
        ATTRIBUTES_METADATA_WorkFlowTemplate.put (FIELD_ThankYouSecondaryText, Collections.unmodifiableMap (metaInfo));

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

        return validators;
    }
    
    private static List setupAttribMetaData_JobOutlineButtonText(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "job_outline_button_text");
        metaInfo.put ("defaultValue", "Continue");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "JobOutlineButtonText");
        metaInfo.put ("type", "String");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_work_flow_template");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for WorkFlowTemplate.JobOutlineButtonText:", metaInfo);
        ATTRIBUTES_METADATA_WorkFlowTemplate.put (FIELD_JobOutlineButtonText, Collections.unmodifiableMap (metaInfo));

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

        return validators;
    }
    
    private static List setupAttribMetaData_RelatedToJob(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "related_to_job");
        metaInfo.put ("defaultValue", "Boolean.FALSE");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "RelatedToJob");
        metaInfo.put ("type", "Boolean");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_work_flow_template");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for WorkFlowTemplate.RelatedToJob:", metaInfo);
        ATTRIBUTES_METADATA_WorkFlowTemplate.put (FIELD_RelatedToJob, Collections.unmodifiableMap (metaInfo));

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

        return validators;
    }
    
    private static List setupAttribMetaData_IsSystemGenerated(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "is_system_generated");
        metaInfo.put ("defaultValue", "Boolean.FALSE");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "IsSystemGenerated");
        metaInfo.put ("type", "Boolean");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_work_flow_template");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for WorkFlowTemplate.IsSystemGenerated:", metaInfo);
        ATTRIBUTES_METADATA_WorkFlowTemplate.put (FIELD_IsSystemGenerated, Collections.unmodifiableMap (metaInfo));

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

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


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

    


    protected void _initialiseNewObjAttributes (ObjectTransaction transaction) throws StorageException
    {
        super._initialiseNewObjAttributes (transaction);

        
        _TemplateName = (String)(HELPER_TemplateName.initialise (_TemplateName));
        _LandingButtonText = (String)("Apply Now");
        _VerificationHeaderText = (String)("Please verify your identity before applying to:");
        _CaptureCV = (Boolean)(Boolean.TRUE);
        _IsCVMandatory = (Boolean)(Boolean.TRUE);
        _CaptureCL = (Boolean)(Boolean.TRUE);
        _IsCLMandatory = (Boolean)(Boolean.TRUE);
        _ApplicationButtonText = (String)("Submit");
        _ApplicationResponseAction = (ResponseAction)(ResponseAction.EMAIL_RESPONSE);
        _ThankYouHeaderText = (String)("Thank You for your application to:");
        _ThankYouSecondaryText = (String)("We will get in touch with you soon");
        _JobOutlineButtonText = (String)("Continue");
        _RelatedToJob = (Boolean)(Boolean.FALSE);
        _IsSystemGenerated = (Boolean)(Boolean.FALSE);
    }


    protected void _initialiseAssociations ()
    {
        super._initialiseAssociations ();

        _WithdrawalMessage = new SingleAssociation<WorkFlowTemplate, WorkFlowMessage> (this, SINGLEREFERENCE_WithdrawalMessage, null, WorkFlowMessage.REFERENCE_WorkFlowMessage, "tl_work_flow_template");
        _HiringTeam = new SingleAssociation<WorkFlowTemplate, HiringTeam> (this, SINGLEREFERENCE_HiringTeam, HiringTeam.MULTIPLEREFERENCE_WorkFlowTemplates, HiringTeam.REFERENCE_HiringTeam, "tl_work_flow_template");
        _WorkFlowStages = new MultipleAssociation<WorkFlowTemplate, WorkFlowStage> (this, MULTIPLEREFERENCE_WorkFlowStages, WorkFlowStage.SINGLEREFERENCE_WorkFlowTemplate, WorkFlowStage.REFERENCE_WorkFlowStage);_Jobs = new MultipleAssociation<WorkFlowTemplate, Job> (this, MULTIPLEREFERENCE_Jobs, Job.SINGLEREFERENCE_WorkFlowTemplate, Job.REFERENCE_Job);
    }


    protected BaseBusinessClass initialiseReference ()
    {
        super.initialiseReference ();
        
        _WithdrawalMessage = new SingleAssociation<WorkFlowTemplate, WorkFlowMessage> (this, SINGLEREFERENCE_WithdrawalMessage, null, WorkFlowMessage.REFERENCE_WorkFlowMessage, "tl_work_flow_template");
        _HiringTeam = new SingleAssociation<WorkFlowTemplate, HiringTeam> (this, SINGLEREFERENCE_HiringTeam, HiringTeam.MULTIPLEREFERENCE_WorkFlowTemplates, HiringTeam.REFERENCE_HiringTeam, "tl_work_flow_template");
        _WorkFlowStages = new MultipleAssociation<WorkFlowTemplate, WorkFlowStage> (this, MULTIPLEREFERENCE_WorkFlowStages, WorkFlowStage.SINGLEREFERENCE_WorkFlowTemplate, WorkFlowStage.REFERENCE_WorkFlowStage);_Jobs = new MultipleAssociation<WorkFlowTemplate, Job> (this, MULTIPLEREFERENCE_Jobs, Job.SINGLEREFERENCE_WorkFlowTemplate, Job.REFERENCE_Job);
        
        return this;
    }


    /**
     * Attribute TemplateName
     */
    public String getTemplateName ()
    {
        assertValid();
        String valToReturn = AttributeDecoratorUtils.getValue (FIELD_TemplateName_Decorators, (WorkFlowTemplate)this, FIELD_TemplateName, _TemplateName);

        
        for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
        {
            valToReturn = bhd.getTemplateName ((WorkFlowTemplate)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 preTemplateNameChange (String newTemplateName) 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 postTemplateNameChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute TemplateName.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setTemplateName (String newTemplateName) throws FieldException
    {
        newTemplateName = AttributeDecoratorUtils.setValue (FIELD_TemplateName_Decorators, (WorkFlowTemplate)this, FIELD_TemplateName, newTemplateName);

        boolean oldAndNewIdentical = HELPER_TemplateName.compare (_TemplateName, newTemplateName);
        
        try
        {
            for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
            {
                newTemplateName = bhd.setTemplateName ((WorkFlowTemplate)this, newTemplateName);
                oldAndNewIdentical = HELPER_TemplateName.compare (_TemplateName, newTemplateName);
            }

            BusinessObjectParser.assertFieldCondition (newTemplateName != null, this, FIELD_TemplateName, "mandatory");
            

            if (FIELD_TemplateName_Validators.length > 0)
            {
                Object newTemplateNameObj = HELPER_TemplateName.toObject (newTemplateName);

                if (newTemplateNameObj != null)
                {
                    int     loopMax = FIELD_TemplateName_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_WorkFlowTemplate.get (FIELD_TemplateName);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_TemplateName_Decorators, (WorkFlowTemplate)this, FIELD_TemplateName ,getWriteability_TemplateName ()) != FieldWriteability.FALSE, "Field  TemplateName is not writeable");
            preTemplateNameChange (newTemplateName);
            markFieldChange (FIELD_TemplateName);
            _TemplateName = newTemplateName;            
            postFieldChange (FIELD_TemplateName);
            postTemplateNameChange ();
        }
    }

    /**
     * Attribute LandingButtonText
     */
    public String getLandingButtonText ()
    {
        assertValid();
        String valToReturn = AttributeDecoratorUtils.getValue (FIELD_LandingButtonText_Decorators, (WorkFlowTemplate)this, FIELD_LandingButtonText, _LandingButtonText);

        
        for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
        {
            valToReturn = bhd.getLandingButtonText ((WorkFlowTemplate)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 preLandingButtonTextChange (String newLandingButtonText) 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 postLandingButtonTextChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute LandingButtonText.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setLandingButtonText (String newLandingButtonText) throws FieldException
    {
        newLandingButtonText = AttributeDecoratorUtils.setValue (FIELD_LandingButtonText_Decorators, (WorkFlowTemplate)this, FIELD_LandingButtonText, newLandingButtonText);

        boolean oldAndNewIdentical = HELPER_LandingButtonText.compare (_LandingButtonText, newLandingButtonText);
        
        try
        {
            for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
            {
                newLandingButtonText = bhd.setLandingButtonText ((WorkFlowTemplate)this, newLandingButtonText);
                oldAndNewIdentical = HELPER_LandingButtonText.compare (_LandingButtonText, newLandingButtonText);
            }

            

            if (FIELD_LandingButtonText_Validators.length > 0)
            {
                Object newLandingButtonTextObj = HELPER_LandingButtonText.toObject (newLandingButtonText);

                if (newLandingButtonTextObj != null)
                {
                    int     loopMax = FIELD_LandingButtonText_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_WorkFlowTemplate.get (FIELD_LandingButtonText);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_LandingButtonText_Decorators, (WorkFlowTemplate)this, FIELD_LandingButtonText ,getWriteability_LandingButtonText ()) != FieldWriteability.FALSE, "Field  LandingButtonText is not writeable");
            preLandingButtonTextChange (newLandingButtonText);
            markFieldChange (FIELD_LandingButtonText);
            _LandingButtonText = newLandingButtonText;            
            postFieldChange (FIELD_LandingButtonText);
            postLandingButtonTextChange ();
        }
    }

    /**
     * Attribute VerificationHeaderText
     */
    public String getVerificationHeaderText ()
    {
        assertValid();
        String valToReturn = AttributeDecoratorUtils.getValue (FIELD_VerificationHeaderText_Decorators, (WorkFlowTemplate)this, FIELD_VerificationHeaderText, _VerificationHeaderText);

        
        for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
        {
            valToReturn = bhd.getVerificationHeaderText ((WorkFlowTemplate)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 preVerificationHeaderTextChange (String newVerificationHeaderText) 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 postVerificationHeaderTextChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute VerificationHeaderText.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setVerificationHeaderText (String newVerificationHeaderText) throws FieldException
    {
        newVerificationHeaderText = AttributeDecoratorUtils.setValue (FIELD_VerificationHeaderText_Decorators, (WorkFlowTemplate)this, FIELD_VerificationHeaderText, newVerificationHeaderText);

        boolean oldAndNewIdentical = HELPER_VerificationHeaderText.compare (_VerificationHeaderText, newVerificationHeaderText);
        
        try
        {
            for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
            {
                newVerificationHeaderText = bhd.setVerificationHeaderText ((WorkFlowTemplate)this, newVerificationHeaderText);
                oldAndNewIdentical = HELPER_VerificationHeaderText.compare (_VerificationHeaderText, newVerificationHeaderText);
            }

            

            if (FIELD_VerificationHeaderText_Validators.length > 0)
            {
                Object newVerificationHeaderTextObj = HELPER_VerificationHeaderText.toObject (newVerificationHeaderText);

                if (newVerificationHeaderTextObj != null)
                {
                    int     loopMax = FIELD_VerificationHeaderText_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_WorkFlowTemplate.get (FIELD_VerificationHeaderText);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_VerificationHeaderText_Decorators, (WorkFlowTemplate)this, FIELD_VerificationHeaderText ,getWriteability_VerificationHeaderText ()) != FieldWriteability.FALSE, "Field  VerificationHeaderText is not writeable");
            preVerificationHeaderTextChange (newVerificationHeaderText);
            markFieldChange (FIELD_VerificationHeaderText);
            _VerificationHeaderText = newVerificationHeaderText;            
            postFieldChange (FIELD_VerificationHeaderText);
            postVerificationHeaderTextChange ();
        }
    }

    /**
     * Attribute CaptureCV
     */
    public Boolean getCaptureCV ()
    {
        assertValid();
        Boolean valToReturn = AttributeDecoratorUtils.getValue (FIELD_CaptureCV_Decorators, (WorkFlowTemplate)this, FIELD_CaptureCV, _CaptureCV);

        
        for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
        {
            valToReturn = bhd.getCaptureCV ((WorkFlowTemplate)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 preCaptureCVChange (Boolean newCaptureCV) 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 postCaptureCVChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute CaptureCV.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setCaptureCV (Boolean newCaptureCV) throws FieldException
    {
        newCaptureCV = AttributeDecoratorUtils.setValue (FIELD_CaptureCV_Decorators, (WorkFlowTemplate)this, FIELD_CaptureCV, newCaptureCV);

        boolean oldAndNewIdentical = HELPER_CaptureCV.compare (_CaptureCV, newCaptureCV);
        
        try
        {
            for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
            {
                newCaptureCV = bhd.setCaptureCV ((WorkFlowTemplate)this, newCaptureCV);
                oldAndNewIdentical = HELPER_CaptureCV.compare (_CaptureCV, newCaptureCV);
            }

            

            if (FIELD_CaptureCV_Validators.length > 0)
            {
                Object newCaptureCVObj = HELPER_CaptureCV.toObject (newCaptureCV);

                if (newCaptureCVObj != null)
                {
                    int     loopMax = FIELD_CaptureCV_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_WorkFlowTemplate.get (FIELD_CaptureCV);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_CaptureCV_Decorators, (WorkFlowTemplate)this, FIELD_CaptureCV ,getWriteability_CaptureCV ()) != FieldWriteability.FALSE, "Field  CaptureCV is not writeable");
            preCaptureCVChange (newCaptureCV);
            markFieldChange (FIELD_CaptureCV);
            _CaptureCV = newCaptureCV;            
            postFieldChange (FIELD_CaptureCV);
            postCaptureCVChange ();
        }
    }

    /**
     * Attribute IsCVMandatory
     */
    public Boolean getIsCVMandatory ()
    {
        assertValid();
        Boolean valToReturn = AttributeDecoratorUtils.getValue (FIELD_IsCVMandatory_Decorators, (WorkFlowTemplate)this, FIELD_IsCVMandatory, _IsCVMandatory);

        
        for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
        {
            valToReturn = bhd.getIsCVMandatory ((WorkFlowTemplate)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 preIsCVMandatoryChange (Boolean newIsCVMandatory) 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 postIsCVMandatoryChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute IsCVMandatory.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setIsCVMandatory (Boolean newIsCVMandatory) throws FieldException
    {
        newIsCVMandatory = AttributeDecoratorUtils.setValue (FIELD_IsCVMandatory_Decorators, (WorkFlowTemplate)this, FIELD_IsCVMandatory, newIsCVMandatory);

        boolean oldAndNewIdentical = HELPER_IsCVMandatory.compare (_IsCVMandatory, newIsCVMandatory);
        
        try
        {
            for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
            {
                newIsCVMandatory = bhd.setIsCVMandatory ((WorkFlowTemplate)this, newIsCVMandatory);
                oldAndNewIdentical = HELPER_IsCVMandatory.compare (_IsCVMandatory, newIsCVMandatory);
            }

            

            if (FIELD_IsCVMandatory_Validators.length > 0)
            {
                Object newIsCVMandatoryObj = HELPER_IsCVMandatory.toObject (newIsCVMandatory);

                if (newIsCVMandatoryObj != null)
                {
                    int     loopMax = FIELD_IsCVMandatory_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_WorkFlowTemplate.get (FIELD_IsCVMandatory);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_IsCVMandatory_Decorators, (WorkFlowTemplate)this, FIELD_IsCVMandatory ,getWriteability_IsCVMandatory ()) != FieldWriteability.FALSE, "Field  IsCVMandatory is not writeable");
            preIsCVMandatoryChange (newIsCVMandatory);
            markFieldChange (FIELD_IsCVMandatory);
            _IsCVMandatory = newIsCVMandatory;            
            postFieldChange (FIELD_IsCVMandatory);
            postIsCVMandatoryChange ();
        }
    }

    /**
     * Attribute CaptureCL
     */
    public Boolean getCaptureCL ()
    {
        assertValid();
        Boolean valToReturn = AttributeDecoratorUtils.getValue (FIELD_CaptureCL_Decorators, (WorkFlowTemplate)this, FIELD_CaptureCL, _CaptureCL);

        
        for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
        {
            valToReturn = bhd.getCaptureCL ((WorkFlowTemplate)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 preCaptureCLChange (Boolean newCaptureCL) 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 postCaptureCLChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute CaptureCL.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setCaptureCL (Boolean newCaptureCL) throws FieldException
    {
        newCaptureCL = AttributeDecoratorUtils.setValue (FIELD_CaptureCL_Decorators, (WorkFlowTemplate)this, FIELD_CaptureCL, newCaptureCL);

        boolean oldAndNewIdentical = HELPER_CaptureCL.compare (_CaptureCL, newCaptureCL);
        
        try
        {
            for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
            {
                newCaptureCL = bhd.setCaptureCL ((WorkFlowTemplate)this, newCaptureCL);
                oldAndNewIdentical = HELPER_CaptureCL.compare (_CaptureCL, newCaptureCL);
            }

            

            if (FIELD_CaptureCL_Validators.length > 0)
            {
                Object newCaptureCLObj = HELPER_CaptureCL.toObject (newCaptureCL);

                if (newCaptureCLObj != null)
                {
                    int     loopMax = FIELD_CaptureCL_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_WorkFlowTemplate.get (FIELD_CaptureCL);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_CaptureCL_Decorators, (WorkFlowTemplate)this, FIELD_CaptureCL ,getWriteability_CaptureCL ()) != FieldWriteability.FALSE, "Field  CaptureCL is not writeable");
            preCaptureCLChange (newCaptureCL);
            markFieldChange (FIELD_CaptureCL);
            _CaptureCL = newCaptureCL;            
            postFieldChange (FIELD_CaptureCL);
            postCaptureCLChange ();
        }
    }

    /**
     * Attribute IsCLMandatory
     */
    public Boolean getIsCLMandatory ()
    {
        assertValid();
        Boolean valToReturn = AttributeDecoratorUtils.getValue (FIELD_IsCLMandatory_Decorators, (WorkFlowTemplate)this, FIELD_IsCLMandatory, _IsCLMandatory);

        
        for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
        {
            valToReturn = bhd.getIsCLMandatory ((WorkFlowTemplate)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 preIsCLMandatoryChange (Boolean newIsCLMandatory) 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 postIsCLMandatoryChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute IsCLMandatory.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setIsCLMandatory (Boolean newIsCLMandatory) throws FieldException
    {
        newIsCLMandatory = AttributeDecoratorUtils.setValue (FIELD_IsCLMandatory_Decorators, (WorkFlowTemplate)this, FIELD_IsCLMandatory, newIsCLMandatory);

        boolean oldAndNewIdentical = HELPER_IsCLMandatory.compare (_IsCLMandatory, newIsCLMandatory);
        
        try
        {
            for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
            {
                newIsCLMandatory = bhd.setIsCLMandatory ((WorkFlowTemplate)this, newIsCLMandatory);
                oldAndNewIdentical = HELPER_IsCLMandatory.compare (_IsCLMandatory, newIsCLMandatory);
            }

            

            if (FIELD_IsCLMandatory_Validators.length > 0)
            {
                Object newIsCLMandatoryObj = HELPER_IsCLMandatory.toObject (newIsCLMandatory);

                if (newIsCLMandatoryObj != null)
                {
                    int     loopMax = FIELD_IsCLMandatory_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_WorkFlowTemplate.get (FIELD_IsCLMandatory);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_IsCLMandatory_Decorators, (WorkFlowTemplate)this, FIELD_IsCLMandatory ,getWriteability_IsCLMandatory ()) != FieldWriteability.FALSE, "Field  IsCLMandatory is not writeable");
            preIsCLMandatoryChange (newIsCLMandatory);
            markFieldChange (FIELD_IsCLMandatory);
            _IsCLMandatory = newIsCLMandatory;            
            postFieldChange (FIELD_IsCLMandatory);
            postIsCLMandatoryChange ();
        }
    }

    /**
     * Attribute ApplicationButtonText
     */
    public String getApplicationButtonText ()
    {
        assertValid();
        String valToReturn = AttributeDecoratorUtils.getValue (FIELD_ApplicationButtonText_Decorators, (WorkFlowTemplate)this, FIELD_ApplicationButtonText, _ApplicationButtonText);

        
        for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
        {
            valToReturn = bhd.getApplicationButtonText ((WorkFlowTemplate)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 preApplicationButtonTextChange (String newApplicationButtonText) 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 postApplicationButtonTextChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute ApplicationButtonText.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setApplicationButtonText (String newApplicationButtonText) throws FieldException
    {
        newApplicationButtonText = AttributeDecoratorUtils.setValue (FIELD_ApplicationButtonText_Decorators, (WorkFlowTemplate)this, FIELD_ApplicationButtonText, newApplicationButtonText);

        boolean oldAndNewIdentical = HELPER_ApplicationButtonText.compare (_ApplicationButtonText, newApplicationButtonText);
        
        try
        {
            for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
            {
                newApplicationButtonText = bhd.setApplicationButtonText ((WorkFlowTemplate)this, newApplicationButtonText);
                oldAndNewIdentical = HELPER_ApplicationButtonText.compare (_ApplicationButtonText, newApplicationButtonText);
            }

            

            if (FIELD_ApplicationButtonText_Validators.length > 0)
            {
                Object newApplicationButtonTextObj = HELPER_ApplicationButtonText.toObject (newApplicationButtonText);

                if (newApplicationButtonTextObj != null)
                {
                    int     loopMax = FIELD_ApplicationButtonText_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_WorkFlowTemplate.get (FIELD_ApplicationButtonText);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_ApplicationButtonText_Decorators, (WorkFlowTemplate)this, FIELD_ApplicationButtonText ,getWriteability_ApplicationButtonText ()) != FieldWriteability.FALSE, "Field  ApplicationButtonText is not writeable");
            preApplicationButtonTextChange (newApplicationButtonText);
            markFieldChange (FIELD_ApplicationButtonText);
            _ApplicationButtonText = newApplicationButtonText;            
            postFieldChange (FIELD_ApplicationButtonText);
            postApplicationButtonTextChange ();
        }
    }

    /**
     * Attribute ApplicationResponseAction
     */
    public ResponseAction getApplicationResponseAction ()
    {
        assertValid();
        ResponseAction valToReturn = AttributeDecoratorUtils.getValue (FIELD_ApplicationResponseAction_Decorators, (WorkFlowTemplate)this, FIELD_ApplicationResponseAction, _ApplicationResponseAction);

        
        for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
        {
            valToReturn = bhd.getApplicationResponseAction ((WorkFlowTemplate)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 preApplicationResponseActionChange (ResponseAction newApplicationResponseAction) 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 postApplicationResponseActionChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute ApplicationResponseAction.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setApplicationResponseAction (ResponseAction newApplicationResponseAction) throws FieldException
    {
        newApplicationResponseAction = AttributeDecoratorUtils.setValue (FIELD_ApplicationResponseAction_Decorators, (WorkFlowTemplate)this, FIELD_ApplicationResponseAction, newApplicationResponseAction);

        boolean oldAndNewIdentical = HELPER_ApplicationResponseAction.compare (_ApplicationResponseAction, newApplicationResponseAction);
        
        try
        {
            for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
            {
                newApplicationResponseAction = bhd.setApplicationResponseAction ((WorkFlowTemplate)this, newApplicationResponseAction);
                oldAndNewIdentical = HELPER_ApplicationResponseAction.compare (_ApplicationResponseAction, newApplicationResponseAction);
            }

            BusinessObjectParser.assertFieldCondition (newApplicationResponseAction != null, this, FIELD_ApplicationResponseAction, "mandatory");
            

            if (FIELD_ApplicationResponseAction_Validators.length > 0)
            {
                Object newApplicationResponseActionObj = HELPER_ApplicationResponseAction.toObject (newApplicationResponseAction);

                if (newApplicationResponseActionObj != null)
                {
                    int     loopMax = FIELD_ApplicationResponseAction_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_WorkFlowTemplate.get (FIELD_ApplicationResponseAction);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_ApplicationResponseAction_Decorators, (WorkFlowTemplate)this, FIELD_ApplicationResponseAction ,getWriteability_ApplicationResponseAction ()) != FieldWriteability.FALSE, "Field  ApplicationResponseAction is not writeable");
            preApplicationResponseActionChange (newApplicationResponseAction);
            markFieldChange (FIELD_ApplicationResponseAction);
            _ApplicationResponseAction = newApplicationResponseAction;            
            postFieldChange (FIELD_ApplicationResponseAction);
            postApplicationResponseActionChange ();
        }
    }

    /**
     * Attribute ThankYouHeaderText
     */
    public String getThankYouHeaderText ()
    {
        assertValid();
        String valToReturn = AttributeDecoratorUtils.getValue (FIELD_ThankYouHeaderText_Decorators, (WorkFlowTemplate)this, FIELD_ThankYouHeaderText, _ThankYouHeaderText);

        
        for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
        {
            valToReturn = bhd.getThankYouHeaderText ((WorkFlowTemplate)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 preThankYouHeaderTextChange (String newThankYouHeaderText) 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 postThankYouHeaderTextChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute ThankYouHeaderText.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setThankYouHeaderText (String newThankYouHeaderText) throws FieldException
    {
        newThankYouHeaderText = AttributeDecoratorUtils.setValue (FIELD_ThankYouHeaderText_Decorators, (WorkFlowTemplate)this, FIELD_ThankYouHeaderText, newThankYouHeaderText);

        boolean oldAndNewIdentical = HELPER_ThankYouHeaderText.compare (_ThankYouHeaderText, newThankYouHeaderText);
        
        try
        {
            for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
            {
                newThankYouHeaderText = bhd.setThankYouHeaderText ((WorkFlowTemplate)this, newThankYouHeaderText);
                oldAndNewIdentical = HELPER_ThankYouHeaderText.compare (_ThankYouHeaderText, newThankYouHeaderText);
            }

            

            if (FIELD_ThankYouHeaderText_Validators.length > 0)
            {
                Object newThankYouHeaderTextObj = HELPER_ThankYouHeaderText.toObject (newThankYouHeaderText);

                if (newThankYouHeaderTextObj != null)
                {
                    int     loopMax = FIELD_ThankYouHeaderText_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_WorkFlowTemplate.get (FIELD_ThankYouHeaderText);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_ThankYouHeaderText_Decorators, (WorkFlowTemplate)this, FIELD_ThankYouHeaderText ,getWriteability_ThankYouHeaderText ()) != FieldWriteability.FALSE, "Field  ThankYouHeaderText is not writeable");
            preThankYouHeaderTextChange (newThankYouHeaderText);
            markFieldChange (FIELD_ThankYouHeaderText);
            _ThankYouHeaderText = newThankYouHeaderText;            
            postFieldChange (FIELD_ThankYouHeaderText);
            postThankYouHeaderTextChange ();
        }
    }

    /**
     * Attribute ThankYouSecondaryText
     */
    public String getThankYouSecondaryText ()
    {
        assertValid();
        String valToReturn = AttributeDecoratorUtils.getValue (FIELD_ThankYouSecondaryText_Decorators, (WorkFlowTemplate)this, FIELD_ThankYouSecondaryText, _ThankYouSecondaryText);

        
        for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
        {
            valToReturn = bhd.getThankYouSecondaryText ((WorkFlowTemplate)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 preThankYouSecondaryTextChange (String newThankYouSecondaryText) 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 postThankYouSecondaryTextChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute ThankYouSecondaryText.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setThankYouSecondaryText (String newThankYouSecondaryText) throws FieldException
    {
        newThankYouSecondaryText = AttributeDecoratorUtils.setValue (FIELD_ThankYouSecondaryText_Decorators, (WorkFlowTemplate)this, FIELD_ThankYouSecondaryText, newThankYouSecondaryText);

        boolean oldAndNewIdentical = HELPER_ThankYouSecondaryText.compare (_ThankYouSecondaryText, newThankYouSecondaryText);
        
        try
        {
            for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
            {
                newThankYouSecondaryText = bhd.setThankYouSecondaryText ((WorkFlowTemplate)this, newThankYouSecondaryText);
                oldAndNewIdentical = HELPER_ThankYouSecondaryText.compare (_ThankYouSecondaryText, newThankYouSecondaryText);
            }

            

            if (FIELD_ThankYouSecondaryText_Validators.length > 0)
            {
                Object newThankYouSecondaryTextObj = HELPER_ThankYouSecondaryText.toObject (newThankYouSecondaryText);

                if (newThankYouSecondaryTextObj != null)
                {
                    int     loopMax = FIELD_ThankYouSecondaryText_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_WorkFlowTemplate.get (FIELD_ThankYouSecondaryText);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_ThankYouSecondaryText_Decorators, (WorkFlowTemplate)this, FIELD_ThankYouSecondaryText ,getWriteability_ThankYouSecondaryText ()) != FieldWriteability.FALSE, "Field  ThankYouSecondaryText is not writeable");
            preThankYouSecondaryTextChange (newThankYouSecondaryText);
            markFieldChange (FIELD_ThankYouSecondaryText);
            _ThankYouSecondaryText = newThankYouSecondaryText;            
            postFieldChange (FIELD_ThankYouSecondaryText);
            postThankYouSecondaryTextChange ();
        }
    }

    /**
     * Attribute JobOutlineButtonText
     */
    public String getJobOutlineButtonText ()
    {
        assertValid();
        String valToReturn = AttributeDecoratorUtils.getValue (FIELD_JobOutlineButtonText_Decorators, (WorkFlowTemplate)this, FIELD_JobOutlineButtonText, _JobOutlineButtonText);

        
        for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
        {
            valToReturn = bhd.getJobOutlineButtonText ((WorkFlowTemplate)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 preJobOutlineButtonTextChange (String newJobOutlineButtonText) 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 postJobOutlineButtonTextChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute JobOutlineButtonText.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setJobOutlineButtonText (String newJobOutlineButtonText) throws FieldException
    {
        newJobOutlineButtonText = AttributeDecoratorUtils.setValue (FIELD_JobOutlineButtonText_Decorators, (WorkFlowTemplate)this, FIELD_JobOutlineButtonText, newJobOutlineButtonText);

        boolean oldAndNewIdentical = HELPER_JobOutlineButtonText.compare (_JobOutlineButtonText, newJobOutlineButtonText);
        
        try
        {
            for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
            {
                newJobOutlineButtonText = bhd.setJobOutlineButtonText ((WorkFlowTemplate)this, newJobOutlineButtonText);
                oldAndNewIdentical = HELPER_JobOutlineButtonText.compare (_JobOutlineButtonText, newJobOutlineButtonText);
            }

            

            if (FIELD_JobOutlineButtonText_Validators.length > 0)
            {
                Object newJobOutlineButtonTextObj = HELPER_JobOutlineButtonText.toObject (newJobOutlineButtonText);

                if (newJobOutlineButtonTextObj != null)
                {
                    int     loopMax = FIELD_JobOutlineButtonText_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_WorkFlowTemplate.get (FIELD_JobOutlineButtonText);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_JobOutlineButtonText_Decorators, (WorkFlowTemplate)this, FIELD_JobOutlineButtonText ,getWriteability_JobOutlineButtonText ()) != FieldWriteability.FALSE, "Field  JobOutlineButtonText is not writeable");
            preJobOutlineButtonTextChange (newJobOutlineButtonText);
            markFieldChange (FIELD_JobOutlineButtonText);
            _JobOutlineButtonText = newJobOutlineButtonText;            
            postFieldChange (FIELD_JobOutlineButtonText);
            postJobOutlineButtonTextChange ();
        }
    }

    /**
     * Attribute RelatedToJob
     */
    public Boolean getRelatedToJob ()
    {
        assertValid();
        Boolean valToReturn = AttributeDecoratorUtils.getValue (FIELD_RelatedToJob_Decorators, (WorkFlowTemplate)this, FIELD_RelatedToJob, _RelatedToJob);

        
        for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
        {
            valToReturn = bhd.getRelatedToJob ((WorkFlowTemplate)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 preRelatedToJobChange (Boolean newRelatedToJob) 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 postRelatedToJobChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute RelatedToJob.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setRelatedToJob (Boolean newRelatedToJob) throws FieldException
    {
        newRelatedToJob = AttributeDecoratorUtils.setValue (FIELD_RelatedToJob_Decorators, (WorkFlowTemplate)this, FIELD_RelatedToJob, newRelatedToJob);

        boolean oldAndNewIdentical = HELPER_RelatedToJob.compare (_RelatedToJob, newRelatedToJob);
        
        try
        {
            for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
            {
                newRelatedToJob = bhd.setRelatedToJob ((WorkFlowTemplate)this, newRelatedToJob);
                oldAndNewIdentical = HELPER_RelatedToJob.compare (_RelatedToJob, newRelatedToJob);
            }

            

            if (FIELD_RelatedToJob_Validators.length > 0)
            {
                Object newRelatedToJobObj = HELPER_RelatedToJob.toObject (newRelatedToJob);

                if (newRelatedToJobObj != null)
                {
                    int     loopMax = FIELD_RelatedToJob_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_WorkFlowTemplate.get (FIELD_RelatedToJob);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_RelatedToJob_Decorators, (WorkFlowTemplate)this, FIELD_RelatedToJob ,getWriteability_RelatedToJob ()) != FieldWriteability.FALSE, "Field  RelatedToJob is not writeable");
            preRelatedToJobChange (newRelatedToJob);
            markFieldChange (FIELD_RelatedToJob);
            _RelatedToJob = newRelatedToJob;            
            postFieldChange (FIELD_RelatedToJob);
            postRelatedToJobChange ();
        }
    }

    /**
     * Attribute IsSystemGenerated
     */
    public Boolean getIsSystemGenerated ()
    {
        assertValid();
        Boolean valToReturn = AttributeDecoratorUtils.getValue (FIELD_IsSystemGenerated_Decorators, (WorkFlowTemplate)this, FIELD_IsSystemGenerated, _IsSystemGenerated);

        
        for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
        {
            valToReturn = bhd.getIsSystemGenerated ((WorkFlowTemplate)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 preIsSystemGeneratedChange (Boolean newIsSystemGenerated) 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 postIsSystemGeneratedChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute IsSystemGenerated.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setIsSystemGenerated (Boolean newIsSystemGenerated) throws FieldException
    {
        newIsSystemGenerated = AttributeDecoratorUtils.setValue (FIELD_IsSystemGenerated_Decorators, (WorkFlowTemplate)this, FIELD_IsSystemGenerated, newIsSystemGenerated);

        boolean oldAndNewIdentical = HELPER_IsSystemGenerated.compare (_IsSystemGenerated, newIsSystemGenerated);
        
        try
        {
            for (WorkFlowTemplateBehaviourDecorator bhd : WorkFlowTemplate_BehaviourDecorators)
            {
                newIsSystemGenerated = bhd.setIsSystemGenerated ((WorkFlowTemplate)this, newIsSystemGenerated);
                oldAndNewIdentical = HELPER_IsSystemGenerated.compare (_IsSystemGenerated, newIsSystemGenerated);
            }

            

            if (FIELD_IsSystemGenerated_Validators.length > 0)
            {
                Object newIsSystemGeneratedObj = HELPER_IsSystemGenerated.toObject (newIsSystemGenerated);

                if (newIsSystemGeneratedObj != null)
                {
                    int     loopMax = FIELD_IsSystemGenerated_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_WorkFlowTemplate.get (FIELD_IsSystemGenerated);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_IsSystemGenerated_Decorators, (WorkFlowTemplate)this, FIELD_IsSystemGenerated ,getWriteability_IsSystemGenerated ()) != FieldWriteability.FALSE, "Field  IsSystemGenerated is not writeable");
            preIsSystemGeneratedChange (newIsSystemGenerated);
            markFieldChange (FIELD_IsSystemGenerated);
            _IsSystemGenerated = newIsSystemGenerated;            
            postFieldChange (FIELD_IsSystemGenerated);
            postIsSystemGeneratedChange ();
        }
    }



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

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


    public String getSingleAssocBackReference(String assocName)
    {
        if (assocName == null)
        {
            throw new RuntimeException ("Game over == null!");
        }
        else if (assocName.equals (SINGLEREFERENCE_WithdrawalMessage))
        {
            return null ;
        }
        else if (assocName.equals (SINGLEREFERENCE_HiringTeam))
        {
            return HiringTeam.MULTIPLEREFERENCE_WorkFlowTemplates ;
        }
        else
        {
            return super.getSingleAssocBackReference (assocName);
        }
    }
    
    
    public BaseBusinessClass getSingleAssoc (String assocName) throws StorageException
    {
        if (assocName == null)
        {
            throw new RuntimeException ("Game over == null!");
        }
        else if (assocName.equals (SINGLEREFERENCE_WithdrawalMessage))
        {
            return getWithdrawalMessage ();
        }
        else if (assocName.equals (SINGLEREFERENCE_HiringTeam))
        {
            return getHiringTeam ();
        }
        else
        {
            return super.getSingleAssoc (assocName);
        }
    }


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


    public Long getSingleAssocID (String assocName) throws StorageException
    {
        if (assocName == null)
        {
            throw new RuntimeException ("Game over == null!");
        }
        else if (assocName.equals (SINGLEREFERENCE_WithdrawalMessage))
        {
            return getWithdrawalMessageID ();
        }
        else if (assocName.equals (SINGLEREFERENCE_HiringTeam))
        {
            return getHiringTeamID ();
        }
        else
        {
            return super.getSingleAssocID (assocName);
        }
    }


    public void setSingleAssoc (String assocName, BaseBusinessClass newValue) throws StorageException, FieldException
    {
        if (assocName == null)
        {
            throw new RuntimeException ("Game over == null!");
        }
        else if (assocName.equals (SINGLEREFERENCE_WithdrawalMessage))
        {
            setWithdrawalMessage ((WorkFlowMessage)(newValue));
        }
        else if (assocName.equals (SINGLEREFERENCE_HiringTeam))
        {
            setHiringTeam ((HiringTeam)(newValue));
        }
        else
        {
            super.setSingleAssoc (assocName, newValue);
        }
    }



    /**
     * Get the reference WithdrawalMessage
     */
    public WorkFlowMessage getWithdrawalMessage () throws StorageException
    {
        assertValid();
        
        try
        {
            return (WorkFlowMessage)(_WithdrawalMessage.get ());
        }
        catch (ClassCastException e)
        {
            LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in WorkFlowTemplate:", this.getObjectID (), ", was trying to get WorkFlowMessage:",  getWithdrawalMessageID ());
            LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _WithdrawalMessage.get ().getClass ());
            throw e;
        }
    }


    /**
     * Get the object id for the referenced object.  Does not force a DB access.
     */
    public WorkFlowMessage getWithdrawalMessage (Get getType) throws StorageException
    {
        assertValid();
        return _WithdrawalMessage.get(getType);
    }


    /**
     * Get the object id for the referenced object.  Does not force a DB access.
     */
    public Long getWithdrawalMessageID ()
    {
        assertValid();
        
        if (_WithdrawalMessage == null)
        {
            return null;
        }
        else
        {
            return _WithdrawalMessage.getID ();
        }
    }

    /**
     * Called prior to the assoc changing.  Subclasses need not call super.  If a field exception
     * is thrown, the attribute change will fail.  The new value is different to the old value.
     */
    protected void preWithdrawalMessageChange (WorkFlowMessage newWithdrawalMessage) throws FieldException
    {
    }


    /**
     * Called after the assoc changes.
     * If a field exception is thrown, the value is still changed, however it 
     * may lead to the TX being rolled back
     */
    protected void postWithdrawalMessageChange () throws FieldException
    {
    }


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

        
    /**
     * Set the reference WithdrawalMessage.  Checks to ensure a new value
     * has been supplied.  If so, marks the reference as altered and sets it.
     */
    public void setWithdrawalMessage (WorkFlowMessage newWithdrawalMessage) throws StorageException, FieldException
    {
        if (_WithdrawalMessage.wouldReferencedChange (newWithdrawalMessage))
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (SINGLEREFERENCE_WithdrawalMessage_Decorators, (WorkFlowTemplate)this, SINGLEREFERENCE_WithdrawalMessage ,getWriteability_WithdrawalMessage ()) != FieldWriteability.FALSE, "Assoc WithdrawalMessage is not writeable");
            preWithdrawalMessageChange (newWithdrawalMessage);
            
            _WithdrawalMessage.set (newWithdrawalMessage);
                
            postWithdrawalMessageChange ();
        }
    }

    /**
     * Get the reference HiringTeam
     */
    public HiringTeam getHiringTeam () throws StorageException
    {
        assertValid();
        
        try
        {
            return (HiringTeam)(_HiringTeam.get ());
        }
        catch (ClassCastException e)
        {
            LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in WorkFlowTemplate:", this.getObjectID (), ", was trying to get HiringTeam:",  getHiringTeamID ());
            LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _HiringTeam.get ().getClass ());
            throw e;
        }
    }


    /**
     * Get the object id for the referenced object.  Does not force a DB access.
     */
    public HiringTeam getHiringTeam (Get getType) throws StorageException
    {
        assertValid();
        return _HiringTeam.get(getType);
    }


    /**
     * Get the object id for the referenced object.  Does not force a DB access.
     */
    public Long getHiringTeamID ()
    {
        assertValid();
        
        if (_HiringTeam == null)
        {
            return null;
        }
        else
        {
            return _HiringTeam.getID ();
        }
    }

    /**
     * Called prior to the assoc changing.  Subclasses need not call super.  If a field exception
     * is thrown, the attribute change will fail.  The new value is different to the old value.
     */
    protected void preHiringTeamChange (HiringTeam newHiringTeam) throws FieldException
    {
    }


    /**
     * Called after the assoc changes.
     * If a field exception is thrown, the value is still changed, however it 
     * may lead to the TX being rolled back
     */
    protected void postHiringTeamChange () throws FieldException
    {
    }


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

        
    /**
     * Set the reference HiringTeam.  Checks to ensure a new value
     * has been supplied.  If so, marks the reference as altered and sets it.
     */
    public void setHiringTeam (HiringTeam newHiringTeam) throws StorageException, FieldException
    {
        if (_HiringTeam.wouldReferencedChange (newHiringTeam))
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (SINGLEREFERENCE_HiringTeam_Decorators, (WorkFlowTemplate)this, SINGLEREFERENCE_HiringTeam ,getWriteability_HiringTeam ()) != FieldWriteability.FALSE, "Assoc HiringTeam is not writeable");
            preHiringTeamChange (newHiringTeam);
            HiringTeam oldHiringTeam = getHiringTeam ();

            if (oldHiringTeam != null)
            {
                // This is to stop validation from triggering when we are removed
                _HiringTeam.set (null);
                oldHiringTeam.removeFromWorkFlowTemplates ((WorkFlowTemplate)(this));
            }

            _HiringTeam.set (newHiringTeam);

            if (newHiringTeam != null)
            {
                newHiringTeam.addToWorkFlowTemplates ((WorkFlowTemplate)(this));
            }
                
            postHiringTeamChange ();
        }
    }

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

        return result;
    }


    /**
     * Get the reference instance for the multi assoc name.
     */
    public BaseBusinessClass getMultiAssocReferenceInstance(String attribName)
    {
        if (MULTIPLEREFERENCE_WorkFlowStages.equals(attribName))
        {
            return WorkFlowStage.REFERENCE_WorkFlowStage ;
        }
        if (MULTIPLEREFERENCE_Jobs.equals(attribName))
        {
            return Job.REFERENCE_Job ;
        }

        return super.getMultiAssocReferenceInstance(attribName);
    }


    public String getMultiAssocBackReference(String attribName)
    {
        if (MULTIPLEREFERENCE_WorkFlowStages.equals(attribName))
        {
            return WorkFlowStage.SINGLEREFERENCE_WorkFlowTemplate ;
        }
        if (MULTIPLEREFERENCE_Jobs.equals(attribName))
        {
            return Job.SINGLEREFERENCE_WorkFlowTemplate ;
        }

        return super.getMultiAssocBackReference(attribName);
    }


    /**
     * Get the assoc count for the multi assoc name.
     */
    public int getMultiAssocCount(String attribName) throws StorageException
    {
        if (MULTIPLEREFERENCE_WorkFlowStages.equals(attribName))
        {
            return this.getWorkFlowStagesCount();
        }
        if (MULTIPLEREFERENCE_Jobs.equals(attribName))
        {
            return this.getJobsCount();
        }

        return super.getMultiAssocCount(attribName);
    }


    /**
     * Get the assoc at a particular index
     */
    public BaseBusinessClass getMultiAssocAt(String attribName, int index) throws StorageException
    {
        if (MULTIPLEREFERENCE_WorkFlowStages.equals(attribName))
        {
            return this.getWorkFlowStagesAt(index);
        }
        if (MULTIPLEREFERENCE_Jobs.equals(attribName))
        {
            return this.getJobsAt(index);
        }

        return super.getMultiAssocAt(attribName, index);
    }


    /**
     * Add to a multi assoc by attribute name
     */
    public void addToMultiAssoc(String attribName, BaseBusinessClass newElement) throws StorageException
    {
        if (MULTIPLEREFERENCE_WorkFlowStages.equals(attribName))
        {
            addToWorkFlowStages((WorkFlowStage)newElement);
            return;
        }
        if (MULTIPLEREFERENCE_Jobs.equals(attribName))
        {
            addToJobs((Job)newElement);
            return;
        }

        super.addToMultiAssoc(attribName, newElement);
    }

    /**
     * Remove from a multi assoc by attribute name
     */
    public void removeFromMultiAssoc(String attribName, BaseBusinessClass oldElement) throws StorageException
    {
        if (MULTIPLEREFERENCE_WorkFlowStages.equals(attribName))
        {
            removeFromWorkFlowStages((WorkFlowStage)oldElement);
            return;
        }
        if (MULTIPLEREFERENCE_Jobs.equals(attribName))
        {
            removeFromJobs((Job)oldElement);
            return;
        }

        super.removeFromMultiAssoc(attribName, oldElement);
    }


    protected void __loadMultiAssoc (String attribName, BaseBusinessClass[] elements)
    {
        if (MULTIPLEREFERENCE_WorkFlowStages.equals(attribName))
        {
            _WorkFlowStages.__loadAssociation (elements);
            return;
        }
        if (MULTIPLEREFERENCE_Jobs.equals(attribName))
        {
            _Jobs.__loadAssociation (elements);
            return;
        }

        super.__loadMultiAssoc(attribName, elements);
    }


    protected boolean __isMultiAssocLoaded (String attribName)
    {
        if (MULTIPLEREFERENCE_WorkFlowStages.equals(attribName))
        {
            return _WorkFlowStages.isLoaded ();
        }
        if (MULTIPLEREFERENCE_Jobs.equals(attribName))
        {
            return _Jobs.isLoaded ();
        }

        return super.__isMultiAssocLoaded(attribName);
    }


    public FieldWriteability getWriteability_WorkFlowStages ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }
    
    
    public int getWorkFlowStagesCount () throws StorageException
    {
        assertValid();
        return _WorkFlowStages.getReferencedObjectsCount ();
    }


    public void addToWorkFlowStages (WorkFlowStage newElement) throws StorageException
    {
        if (_WorkFlowStages.wouldAddChange (newElement))
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (MULTIPLEREFERENCE_WorkFlowStages_Decorators, (WorkFlowTemplate)this, MULTIPLEREFERENCE_WorkFlowStages ,getWriteability_WorkFlowStages ()) != FieldWriteability.FALSE, "MultiAssoc WorkFlowStages is not writeable (add)");
            _WorkFlowStages.appendElement (newElement);

            try
            {
                if (newElement.getWorkFlowTemplate () != this)
                {
                    newElement.setWorkFlowTemplate ((WorkFlowTemplate)(this));
                }
            }
            catch (Exception e)
            {
                throw NestedException.wrap(e);
            }
        }
    }


    public void removeFromWorkFlowStages (WorkFlowStage elementToRemove) throws StorageException
    {
        if (_WorkFlowStages.wouldRemoveChange (elementToRemove))
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (MULTIPLEREFERENCE_WorkFlowStages_Decorators, (WorkFlowTemplate)this, MULTIPLEREFERENCE_WorkFlowStages ,getWriteability_WorkFlowStages ()) != FieldWriteability.FALSE, "MultiAssoc WorkFlowStages is not writeable (remove)");
            _WorkFlowStages.removeElement (elementToRemove);
            try
            {
                if (elementToRemove.getWorkFlowTemplate () != null)
                {
                    elementToRemove.setWorkFlowTemplate (null);
                }
            }
            catch (Exception e)
            {
                throw NestedException.wrap(e);
            }
        }
    }


    public WorkFlowStage getWorkFlowStagesAt (int index) throws StorageException
    {
        return (WorkFlowStage)(_WorkFlowStages.getElementAt (index));
    }


    public SortedSet<WorkFlowStage> getWorkFlowStagesSet () throws StorageException
    {
        return _WorkFlowStages.getSet ();
    }

    public FieldWriteability getWriteability_Jobs ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }
    
    
    public int getJobsCount () throws StorageException
    {
        assertValid();
        return _Jobs.getReferencedObjectsCount ();
    }


    public void addToJobs (Job newElement) throws StorageException
    {
        if (_Jobs.wouldAddChange (newElement))
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (MULTIPLEREFERENCE_Jobs_Decorators, (WorkFlowTemplate)this, MULTIPLEREFERENCE_Jobs ,getWriteability_Jobs ()) != FieldWriteability.FALSE, "MultiAssoc Jobs is not writeable (add)");
            _Jobs.appendElement (newElement);

            try
            {
                if (newElement.getWorkFlowTemplate () != this)
                {
                    newElement.setWorkFlowTemplate ((WorkFlowTemplate)(this));
                }
            }
            catch (Exception e)
            {
                throw NestedException.wrap(e);
            }
        }
    }


    public void removeFromJobs (Job elementToRemove) throws StorageException
    {
        if (_Jobs.wouldRemoveChange (elementToRemove))
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (MULTIPLEREFERENCE_Jobs_Decorators, (WorkFlowTemplate)this, MULTIPLEREFERENCE_Jobs ,getWriteability_Jobs ()) != FieldWriteability.FALSE, "MultiAssoc Jobs is not writeable (remove)");
            _Jobs.removeElement (elementToRemove);
            try
            {
                if (elementToRemove.getWorkFlowTemplate () != null)
                {
                    elementToRemove.setWorkFlowTemplate (null);
                }
            }
            catch (Exception e)
            {
                throw NestedException.wrap(e);
            }
        }
    }


    public Job getJobsAt (int index) throws StorageException
    {
        return (Job)(_Jobs.getElementAt (index));
    }


    public SortedSet<Job> getJobsSet () throws StorageException
    {
        return _Jobs.getSet ();
    }



    public void onDelete ()
    {
        try 
        {
            // Ensure we are removed from any loaded multi-associations that aren't mandatory
            if (_HiringTeam.isLoaded () || getTransaction ().isObjectLoaded (_HiringTeam.getReferencedType (), getHiringTeamID ()))
            {
                HiringTeam  referenced = getHiringTeam ();

                if (referenced != null)
                {
                    // Stop the callback
                    LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null WorkFlowTemplates from ", getObjectID (), " to ", referenced.getObjectID ());
                    _HiringTeam.set (null);
                    referenced.removeFromWorkFlowTemplates ((WorkFlowTemplate)this);
                }
            }
        
            for(WorkFlowStage referenced : CollectionUtils.reverse(getWorkFlowStagesSet()))
            { 
                LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null WorkFlowTemplate from ", getObjectID (), " to ", referenced.getObjectID ());
                referenced.setWorkFlowTemplate(null);
            }

            for(Job referenced : CollectionUtils.reverse(getJobsSet()))
            { 
                LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null WorkFlowTemplate from ", getObjectID (), " to ", referenced.getObjectID ());
                referenced.setWorkFlowTemplate(null);
            }

        }
        catch (Exception e)
        {
            throw NestedException.wrap(e);
        }

        super.onDelete ();
    }


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


    public WorkFlowTemplate referenceInstance ()
    {
        return REFERENCE_WorkFlowTemplate;
    }


    public WorkFlowTemplate getInTransaction (ObjectTransaction t) throws StorageException
    {
        return getWorkFlowTemplateByID (t, getObjectID());
    }
    
    
    public BaseBusinessClass dummyInstance ()
    {
        return DUMMY_WorkFlowTemplate;
    }


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



    /**
     * This is where an object returns the Persistent sets that will
     * store it into the database.
     * The should be entered into allSets
     */
    public void getPersistentSets (PersistentSetCollection allSets)
    {
        ObjectStatus        myStatus = getStatus ();
        PersistentSetStatus myPSetStatus = myStatus.getPSetStatus();
        ObjectID            myID = getID();

        super.getPersistentSets (allSets);
        
        PersistentSet   tl_work_flow_templatePSet = allSets.getPersistentSet (myID, "tl_work_flow_template", myPSetStatus);

        tl_work_flow_templatePSet.setAttrib (FIELD_ObjectID, myID);
        tl_work_flow_templatePSet.setAttrib (FIELD_TemplateName, HELPER_TemplateName.toObject (_TemplateName)); //
        tl_work_flow_templatePSet.setAttrib (FIELD_LandingButtonText, HELPER_LandingButtonText.toObject (_LandingButtonText)); //
        tl_work_flow_templatePSet.setAttrib (FIELD_VerificationHeaderText, HELPER_VerificationHeaderText.toObject (_VerificationHeaderText)); //
        tl_work_flow_templatePSet.setAttrib (FIELD_CaptureCV, HELPER_CaptureCV.toObject (_CaptureCV)); //
        tl_work_flow_templatePSet.setAttrib (FIELD_IsCVMandatory, HELPER_IsCVMandatory.toObject (_IsCVMandatory)); //
        tl_work_flow_templatePSet.setAttrib (FIELD_CaptureCL, HELPER_CaptureCL.toObject (_CaptureCL)); //
        tl_work_flow_templatePSet.setAttrib (FIELD_IsCLMandatory, HELPER_IsCLMandatory.toObject (_IsCLMandatory)); //
        tl_work_flow_templatePSet.setAttrib (FIELD_ApplicationButtonText, HELPER_ApplicationButtonText.toObject (_ApplicationButtonText)); //
        tl_work_flow_templatePSet.setAttrib (FIELD_ApplicationResponseAction, HELPER_ApplicationResponseAction.toObject (_ApplicationResponseAction)); //
        tl_work_flow_templatePSet.setAttrib (FIELD_ThankYouHeaderText, HELPER_ThankYouHeaderText.toObject (_ThankYouHeaderText)); //
        tl_work_flow_templatePSet.setAttrib (FIELD_ThankYouSecondaryText, HELPER_ThankYouSecondaryText.toObject (_ThankYouSecondaryText)); //
        tl_work_flow_templatePSet.setAttrib (FIELD_JobOutlineButtonText, HELPER_JobOutlineButtonText.toObject (_JobOutlineButtonText)); //
        tl_work_flow_templatePSet.setAttrib (FIELD_RelatedToJob, HELPER_RelatedToJob.toObject (_RelatedToJob)); //
        tl_work_flow_templatePSet.setAttrib (FIELD_IsSystemGenerated, HELPER_IsSystemGenerated.toObject (_IsSystemGenerated)); //
        _WithdrawalMessage.getPersistentSets (allSets);
        _HiringTeam.getPersistentSets (allSets);
        
    }


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

        _TemplateName = (String)(HELPER_TemplateName.fromObject (_TemplateName, tl_work_flow_templatePSet.getAttrib (FIELD_TemplateName))); //
        _LandingButtonText = (String)(HELPER_LandingButtonText.fromObject (_LandingButtonText, tl_work_flow_templatePSet.getAttrib (FIELD_LandingButtonText))); //
        _VerificationHeaderText = (String)(HELPER_VerificationHeaderText.fromObject (_VerificationHeaderText, tl_work_flow_templatePSet.getAttrib (FIELD_VerificationHeaderText))); //
        _CaptureCV = (Boolean)(HELPER_CaptureCV.fromObject (_CaptureCV, tl_work_flow_templatePSet.getAttrib (FIELD_CaptureCV))); //
        _IsCVMandatory = (Boolean)(HELPER_IsCVMandatory.fromObject (_IsCVMandatory, tl_work_flow_templatePSet.getAttrib (FIELD_IsCVMandatory))); //
        _CaptureCL = (Boolean)(HELPER_CaptureCL.fromObject (_CaptureCL, tl_work_flow_templatePSet.getAttrib (FIELD_CaptureCL))); //
        _IsCLMandatory = (Boolean)(HELPER_IsCLMandatory.fromObject (_IsCLMandatory, tl_work_flow_templatePSet.getAttrib (FIELD_IsCLMandatory))); //
        _ApplicationButtonText = (String)(HELPER_ApplicationButtonText.fromObject (_ApplicationButtonText, tl_work_flow_templatePSet.getAttrib (FIELD_ApplicationButtonText))); //
        _ApplicationResponseAction = (ResponseAction)(HELPER_ApplicationResponseAction.fromObject (_ApplicationResponseAction, tl_work_flow_templatePSet.getAttrib (FIELD_ApplicationResponseAction))); //
        _ThankYouHeaderText = (String)(HELPER_ThankYouHeaderText.fromObject (_ThankYouHeaderText, tl_work_flow_templatePSet.getAttrib (FIELD_ThankYouHeaderText))); //
        _ThankYouSecondaryText = (String)(HELPER_ThankYouSecondaryText.fromObject (_ThankYouSecondaryText, tl_work_flow_templatePSet.getAttrib (FIELD_ThankYouSecondaryText))); //
        _JobOutlineButtonText = (String)(HELPER_JobOutlineButtonText.fromObject (_JobOutlineButtonText, tl_work_flow_templatePSet.getAttrib (FIELD_JobOutlineButtonText))); //
        _RelatedToJob = (Boolean)(HELPER_RelatedToJob.fromObject (_RelatedToJob, tl_work_flow_templatePSet.getAttrib (FIELD_RelatedToJob))); //
        _IsSystemGenerated = (Boolean)(HELPER_IsSystemGenerated.fromObject (_IsSystemGenerated, tl_work_flow_templatePSet.getAttrib (FIELD_IsSystemGenerated))); //
        _WithdrawalMessage.setFromPersistentSets (objectID, allSets);
        _HiringTeam.setFromPersistentSets (objectID, allSets);
        
    }


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

        if (other instanceof WorkFlowTemplate)
        {
            WorkFlowTemplate otherWorkFlowTemplate = (WorkFlowTemplate)other;
            

            try
            {
                setTemplateName (otherWorkFlowTemplate.getTemplateName ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setLandingButtonText (otherWorkFlowTemplate.getLandingButtonText ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setVerificationHeaderText (otherWorkFlowTemplate.getVerificationHeaderText ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setCaptureCV (otherWorkFlowTemplate.getCaptureCV ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setIsCVMandatory (otherWorkFlowTemplate.getIsCVMandatory ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setCaptureCL (otherWorkFlowTemplate.getCaptureCL ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setIsCLMandatory (otherWorkFlowTemplate.getIsCLMandatory ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setApplicationButtonText (otherWorkFlowTemplate.getApplicationButtonText ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setApplicationResponseAction (otherWorkFlowTemplate.getApplicationResponseAction ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setThankYouHeaderText (otherWorkFlowTemplate.getThankYouHeaderText ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setThankYouSecondaryText (otherWorkFlowTemplate.getThankYouSecondaryText ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setJobOutlineButtonText (otherWorkFlowTemplate.getJobOutlineButtonText ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setRelatedToJob (otherWorkFlowTemplate.getRelatedToJob ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setIsSystemGenerated (otherWorkFlowTemplate.getIsSystemGenerated ());
            }
            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 BaseWorkFlowTemplate)
        {
            BaseWorkFlowTemplate sourceWorkFlowTemplate = (BaseWorkFlowTemplate)(source);

            _TemplateName = sourceWorkFlowTemplate._TemplateName;
            _LandingButtonText = sourceWorkFlowTemplate._LandingButtonText;
            _VerificationHeaderText = sourceWorkFlowTemplate._VerificationHeaderText;
            _CaptureCV = sourceWorkFlowTemplate._CaptureCV;
            _IsCVMandatory = sourceWorkFlowTemplate._IsCVMandatory;
            _CaptureCL = sourceWorkFlowTemplate._CaptureCL;
            _IsCLMandatory = sourceWorkFlowTemplate._IsCLMandatory;
            _ApplicationButtonText = sourceWorkFlowTemplate._ApplicationButtonText;
            _ApplicationResponseAction = sourceWorkFlowTemplate._ApplicationResponseAction;
            _ThankYouHeaderText = sourceWorkFlowTemplate._ThankYouHeaderText;
            _ThankYouSecondaryText = sourceWorkFlowTemplate._ThankYouSecondaryText;
            _JobOutlineButtonText = sourceWorkFlowTemplate._JobOutlineButtonText;
            _RelatedToJob = sourceWorkFlowTemplate._RelatedToJob;
            _IsSystemGenerated = sourceWorkFlowTemplate._IsSystemGenerated;
            
        }
    }


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

            _WithdrawalMessage.copyFrom (sourceWorkFlowTemplate._WithdrawalMessage, linkToGhosts);
            _HiringTeam.copyFrom (sourceWorkFlowTemplate._HiringTeam, linkToGhosts);
            
        }
    }


    /**
     * Set the associations in this to copies of the attributes in source.
     */
    public void copyAssociationsFrom (BaseBusinessClass source, boolean linkToGhosts)
    {
        super.copyAssociationsFrom (source, linkToGhosts);

        if (source instanceof BaseWorkFlowTemplate)
        {
            BaseWorkFlowTemplate sourceWorkFlowTemplate = (BaseWorkFlowTemplate)(source);

            _WorkFlowStages.copyFrom (sourceWorkFlowTemplate._WorkFlowStages, linkToGhosts);
            _Jobs.copyFrom (sourceWorkFlowTemplate._Jobs, linkToGhosts);
            
        }
    }


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

        _TemplateName = (String)(HELPER_TemplateName.readExternal (_TemplateName, vals.get(FIELD_TemplateName))); //
        _LandingButtonText = (String)(HELPER_LandingButtonText.readExternal (_LandingButtonText, vals.get(FIELD_LandingButtonText))); //
        _VerificationHeaderText = (String)(HELPER_VerificationHeaderText.readExternal (_VerificationHeaderText, vals.get(FIELD_VerificationHeaderText))); //
        _CaptureCV = (Boolean)(HELPER_CaptureCV.readExternal (_CaptureCV, vals.get(FIELD_CaptureCV))); //
        _IsCVMandatory = (Boolean)(HELPER_IsCVMandatory.readExternal (_IsCVMandatory, vals.get(FIELD_IsCVMandatory))); //
        _CaptureCL = (Boolean)(HELPER_CaptureCL.readExternal (_CaptureCL, vals.get(FIELD_CaptureCL))); //
        _IsCLMandatory = (Boolean)(HELPER_IsCLMandatory.readExternal (_IsCLMandatory, vals.get(FIELD_IsCLMandatory))); //
        _ApplicationButtonText = (String)(HELPER_ApplicationButtonText.readExternal (_ApplicationButtonText, vals.get(FIELD_ApplicationButtonText))); //
        _ApplicationResponseAction = (ResponseAction)(HELPER_ApplicationResponseAction.readExternal (_ApplicationResponseAction, vals.get(FIELD_ApplicationResponseAction))); //
        _ThankYouHeaderText = (String)(HELPER_ThankYouHeaderText.readExternal (_ThankYouHeaderText, vals.get(FIELD_ThankYouHeaderText))); //
        _ThankYouSecondaryText = (String)(HELPER_ThankYouSecondaryText.readExternal (_ThankYouSecondaryText, vals.get(FIELD_ThankYouSecondaryText))); //
        _JobOutlineButtonText = (String)(HELPER_JobOutlineButtonText.readExternal (_JobOutlineButtonText, vals.get(FIELD_JobOutlineButtonText))); //
        _RelatedToJob = (Boolean)(HELPER_RelatedToJob.readExternal (_RelatedToJob, vals.get(FIELD_RelatedToJob))); //
        _IsSystemGenerated = (Boolean)(HELPER_IsSystemGenerated.readExternal (_IsSystemGenerated, vals.get(FIELD_IsSystemGenerated))); //
        _WithdrawalMessage.readExternalData(vals.get(SINGLEREFERENCE_WithdrawalMessage));
        _HiringTeam.readExternalData(vals.get(SINGLEREFERENCE_HiringTeam));
        _WorkFlowStages.readExternalData(vals.get(MULTIPLEREFERENCE_WorkFlowStages));
        _Jobs.readExternalData(vals.get(MULTIPLEREFERENCE_Jobs));
        
    }


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

        vals.put (FIELD_TemplateName, HELPER_TemplateName.writeExternal (_TemplateName));
        vals.put (FIELD_LandingButtonText, HELPER_LandingButtonText.writeExternal (_LandingButtonText));
        vals.put (FIELD_VerificationHeaderText, HELPER_VerificationHeaderText.writeExternal (_VerificationHeaderText));
        vals.put (FIELD_CaptureCV, HELPER_CaptureCV.writeExternal (_CaptureCV));
        vals.put (FIELD_IsCVMandatory, HELPER_IsCVMandatory.writeExternal (_IsCVMandatory));
        vals.put (FIELD_CaptureCL, HELPER_CaptureCL.writeExternal (_CaptureCL));
        vals.put (FIELD_IsCLMandatory, HELPER_IsCLMandatory.writeExternal (_IsCLMandatory));
        vals.put (FIELD_ApplicationButtonText, HELPER_ApplicationButtonText.writeExternal (_ApplicationButtonText));
        vals.put (FIELD_ApplicationResponseAction, HELPER_ApplicationResponseAction.writeExternal (_ApplicationResponseAction));
        vals.put (FIELD_ThankYouHeaderText, HELPER_ThankYouHeaderText.writeExternal (_ThankYouHeaderText));
        vals.put (FIELD_ThankYouSecondaryText, HELPER_ThankYouSecondaryText.writeExternal (_ThankYouSecondaryText));
        vals.put (FIELD_JobOutlineButtonText, HELPER_JobOutlineButtonText.writeExternal (_JobOutlineButtonText));
        vals.put (FIELD_RelatedToJob, HELPER_RelatedToJob.writeExternal (_RelatedToJob));
        vals.put (FIELD_IsSystemGenerated, HELPER_IsSystemGenerated.writeExternal (_IsSystemGenerated));
        vals.put (SINGLEREFERENCE_WithdrawalMessage, _WithdrawalMessage.writeExternalData());
        vals.put (SINGLEREFERENCE_HiringTeam, _HiringTeam.writeExternalData());
        vals.put (MULTIPLEREFERENCE_WorkFlowStages, _WorkFlowStages.writeExternalData());
        vals.put (MULTIPLEREFERENCE_Jobs, _Jobs.writeExternalData());
        
    }


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

        if (other instanceof BaseWorkFlowTemplate)
        {
            BaseWorkFlowTemplate otherWorkFlowTemplate = (BaseWorkFlowTemplate)(other);

            
            if (!HELPER_TemplateName.compare(this._TemplateName, otherWorkFlowTemplate._TemplateName))
            {
                listener.notifyFieldChange(this, other, FIELD_TemplateName, HELPER_TemplateName.toObject(this._TemplateName), HELPER_TemplateName.toObject(otherWorkFlowTemplate._TemplateName));
            }
            if (!HELPER_LandingButtonText.compare(this._LandingButtonText, otherWorkFlowTemplate._LandingButtonText))
            {
                listener.notifyFieldChange(this, other, FIELD_LandingButtonText, HELPER_LandingButtonText.toObject(this._LandingButtonText), HELPER_LandingButtonText.toObject(otherWorkFlowTemplate._LandingButtonText));
            }
            if (!HELPER_VerificationHeaderText.compare(this._VerificationHeaderText, otherWorkFlowTemplate._VerificationHeaderText))
            {
                listener.notifyFieldChange(this, other, FIELD_VerificationHeaderText, HELPER_VerificationHeaderText.toObject(this._VerificationHeaderText), HELPER_VerificationHeaderText.toObject(otherWorkFlowTemplate._VerificationHeaderText));
            }
            if (!HELPER_CaptureCV.compare(this._CaptureCV, otherWorkFlowTemplate._CaptureCV))
            {
                listener.notifyFieldChange(this, other, FIELD_CaptureCV, HELPER_CaptureCV.toObject(this._CaptureCV), HELPER_CaptureCV.toObject(otherWorkFlowTemplate._CaptureCV));
            }
            if (!HELPER_IsCVMandatory.compare(this._IsCVMandatory, otherWorkFlowTemplate._IsCVMandatory))
            {
                listener.notifyFieldChange(this, other, FIELD_IsCVMandatory, HELPER_IsCVMandatory.toObject(this._IsCVMandatory), HELPER_IsCVMandatory.toObject(otherWorkFlowTemplate._IsCVMandatory));
            }
            if (!HELPER_CaptureCL.compare(this._CaptureCL, otherWorkFlowTemplate._CaptureCL))
            {
                listener.notifyFieldChange(this, other, FIELD_CaptureCL, HELPER_CaptureCL.toObject(this._CaptureCL), HELPER_CaptureCL.toObject(otherWorkFlowTemplate._CaptureCL));
            }
            if (!HELPER_IsCLMandatory.compare(this._IsCLMandatory, otherWorkFlowTemplate._IsCLMandatory))
            {
                listener.notifyFieldChange(this, other, FIELD_IsCLMandatory, HELPER_IsCLMandatory.toObject(this._IsCLMandatory), HELPER_IsCLMandatory.toObject(otherWorkFlowTemplate._IsCLMandatory));
            }
            if (!HELPER_ApplicationButtonText.compare(this._ApplicationButtonText, otherWorkFlowTemplate._ApplicationButtonText))
            {
                listener.notifyFieldChange(this, other, FIELD_ApplicationButtonText, HELPER_ApplicationButtonText.toObject(this._ApplicationButtonText), HELPER_ApplicationButtonText.toObject(otherWorkFlowTemplate._ApplicationButtonText));
            }
            if (!HELPER_ApplicationResponseAction.compare(this._ApplicationResponseAction, otherWorkFlowTemplate._ApplicationResponseAction))
            {
                listener.notifyFieldChange(this, other, FIELD_ApplicationResponseAction, HELPER_ApplicationResponseAction.toObject(this._ApplicationResponseAction), HELPER_ApplicationResponseAction.toObject(otherWorkFlowTemplate._ApplicationResponseAction));
            }
            if (!HELPER_ThankYouHeaderText.compare(this._ThankYouHeaderText, otherWorkFlowTemplate._ThankYouHeaderText))
            {
                listener.notifyFieldChange(this, other, FIELD_ThankYouHeaderText, HELPER_ThankYouHeaderText.toObject(this._ThankYouHeaderText), HELPER_ThankYouHeaderText.toObject(otherWorkFlowTemplate._ThankYouHeaderText));
            }
            if (!HELPER_ThankYouSecondaryText.compare(this._ThankYouSecondaryText, otherWorkFlowTemplate._ThankYouSecondaryText))
            {
                listener.notifyFieldChange(this, other, FIELD_ThankYouSecondaryText, HELPER_ThankYouSecondaryText.toObject(this._ThankYouSecondaryText), HELPER_ThankYouSecondaryText.toObject(otherWorkFlowTemplate._ThankYouSecondaryText));
            }
            if (!HELPER_JobOutlineButtonText.compare(this._JobOutlineButtonText, otherWorkFlowTemplate._JobOutlineButtonText))
            {
                listener.notifyFieldChange(this, other, FIELD_JobOutlineButtonText, HELPER_JobOutlineButtonText.toObject(this._JobOutlineButtonText), HELPER_JobOutlineButtonText.toObject(otherWorkFlowTemplate._JobOutlineButtonText));
            }
            if (!HELPER_RelatedToJob.compare(this._RelatedToJob, otherWorkFlowTemplate._RelatedToJob))
            {
                listener.notifyFieldChange(this, other, FIELD_RelatedToJob, HELPER_RelatedToJob.toObject(this._RelatedToJob), HELPER_RelatedToJob.toObject(otherWorkFlowTemplate._RelatedToJob));
            }
            if (!HELPER_IsSystemGenerated.compare(this._IsSystemGenerated, otherWorkFlowTemplate._IsSystemGenerated))
            {
                listener.notifyFieldChange(this, other, FIELD_IsSystemGenerated, HELPER_IsSystemGenerated.toObject(this._IsSystemGenerated), HELPER_IsSystemGenerated.toObject(otherWorkFlowTemplate._IsSystemGenerated));
            }

            // Compare single assocs
            _WithdrawalMessage.compare (otherWorkFlowTemplate._WithdrawalMessage, listener);
            _HiringTeam.compare (otherWorkFlowTemplate._HiringTeam, listener);
            

            // Compare multiple assocs
            _WorkFlowStages.compare (otherWorkFlowTemplate._WorkFlowStages, listener);
            _Jobs.compare (otherWorkFlowTemplate._Jobs, listener);
            
        }
    }


    public void visitTransients (AttributeVisitor visitor) throws StorageException
    {
        super.visitAttributes (visitor);

        
    }


    public void visitAttributes (AttributeVisitor visitor) throws StorageException
    {
        super.visitAttributes (visitor);

        visitor.visitField(this, FIELD_TemplateName, HELPER_TemplateName.toObject(getTemplateName()));
        visitor.visitField(this, FIELD_LandingButtonText, HELPER_LandingButtonText.toObject(getLandingButtonText()));
        visitor.visitField(this, FIELD_VerificationHeaderText, HELPER_VerificationHeaderText.toObject(getVerificationHeaderText()));
        visitor.visitField(this, FIELD_CaptureCV, HELPER_CaptureCV.toObject(getCaptureCV()));
        visitor.visitField(this, FIELD_IsCVMandatory, HELPER_IsCVMandatory.toObject(getIsCVMandatory()));
        visitor.visitField(this, FIELD_CaptureCL, HELPER_CaptureCL.toObject(getCaptureCL()));
        visitor.visitField(this, FIELD_IsCLMandatory, HELPER_IsCLMandatory.toObject(getIsCLMandatory()));
        visitor.visitField(this, FIELD_ApplicationButtonText, HELPER_ApplicationButtonText.toObject(getApplicationButtonText()));
        visitor.visitField(this, FIELD_ApplicationResponseAction, HELPER_ApplicationResponseAction.toObject(getApplicationResponseAction()));
        visitor.visitField(this, FIELD_ThankYouHeaderText, HELPER_ThankYouHeaderText.toObject(getThankYouHeaderText()));
        visitor.visitField(this, FIELD_ThankYouSecondaryText, HELPER_ThankYouSecondaryText.toObject(getThankYouSecondaryText()));
        visitor.visitField(this, FIELD_JobOutlineButtonText, HELPER_JobOutlineButtonText.toObject(getJobOutlineButtonText()));
        visitor.visitField(this, FIELD_RelatedToJob, HELPER_RelatedToJob.toObject(getRelatedToJob()));
        visitor.visitField(this, FIELD_IsSystemGenerated, HELPER_IsSystemGenerated.toObject(getIsSystemGenerated()));
        visitor.visitAssociation (_WithdrawalMessage);
        visitor.visitAssociation (_HiringTeam);
        visitor.visitAssociation (_WorkFlowStages);
        visitor.visitAssociation (_Jobs);
        
    }


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

        if (scope.includes (_WithdrawalMessage))
        {
            visitor.visit (_WithdrawalMessage);
        }
        if (scope.includes (_HiringTeam))
        {
            visitor.visit (_HiringTeam);
        }
        if (scope.includes (_WorkFlowStages))
        {
            visitor.visit (_WorkFlowStages);
        }
        if (scope.includes (_Jobs))
        {
            visitor.visit (_Jobs);
        }
        
    }


    public static WorkFlowTemplate createWorkFlowTemplate (ObjectTransaction transaction) throws StorageException
    {
        WorkFlowTemplate     result = new WorkFlowTemplate ();

        result.initialiseNewObject (transaction);

        return result;
    }


    public static WorkFlowTemplate getWorkFlowTemplateByID (ObjectTransaction transaction, Long objectID) throws StorageException
    {
        return (WorkFlowTemplate)(transaction.getObjectByID (REFERENCE_WorkFlowTemplate, objectID));
    }

    public boolean testFilter (String attribName, QueryFilter filter) throws StorageException
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (attribName.equals (FIELD_TemplateName))
        {
            return filter.matches (getTemplateName ());
        }
        else if (attribName.equals (FIELD_LandingButtonText))
        {
            return filter.matches (getLandingButtonText ());
        }
        else if (attribName.equals (FIELD_VerificationHeaderText))
        {
            return filter.matches (getVerificationHeaderText ());
        }
        else if (attribName.equals (FIELD_CaptureCV))
        {
            return filter.matches (getCaptureCV ());
        }
        else if (attribName.equals (FIELD_IsCVMandatory))
        {
            return filter.matches (getIsCVMandatory ());
        }
        else if (attribName.equals (FIELD_CaptureCL))
        {
            return filter.matches (getCaptureCL ());
        }
        else if (attribName.equals (FIELD_IsCLMandatory))
        {
            return filter.matches (getIsCLMandatory ());
        }
        else if (attribName.equals (FIELD_ApplicationButtonText))
        {
            return filter.matches (getApplicationButtonText ());
        }
        else if (attribName.equals (FIELD_ApplicationResponseAction))
        {
            return filter.matches (getApplicationResponseAction ());
        }
        else if (attribName.equals (FIELD_ThankYouHeaderText))
        {
            return filter.matches (getThankYouHeaderText ());
        }
        else if (attribName.equals (FIELD_ThankYouSecondaryText))
        {
            return filter.matches (getThankYouSecondaryText ());
        }
        else if (attribName.equals (FIELD_JobOutlineButtonText))
        {
            return filter.matches (getJobOutlineButtonText ());
        }
        else if (attribName.equals (FIELD_RelatedToJob))
        {
            return filter.matches (getRelatedToJob ());
        }
        else if (attribName.equals (FIELD_IsSystemGenerated))
        {
            return filter.matches (getIsSystemGenerated ());
        }
        else if (attribName.equals (SINGLEREFERENCE_WithdrawalMessage))
        {
            return filter.matches (getWithdrawalMessage ());
        }
        else if (attribName.equals (SINGLEREFERENCE_HiringTeam))
        {
            return filter.matches (getHiringTeam ());
        }
        else
        {
            return super.testFilter (attribName, filter);
        }
    }


    public static SearchAll SearchByAll () { return new SearchAll (); }

    public static class SearchAll extends SearchObject<WorkFlowTemplate>
    {
        public SearchAll andObjectID (QueryFilter<Long> filter)
        {
            filter.addFilter (context, "tl_work_flow_template.object_id", FIELD_ObjectID);
            return this;
        }

        public SearchAll andObjectCreated (QueryFilter<Date> filter)
        {
            filter.addFilter (context, "tl_work_flow_template.object_created_date", FIELD_ObjectCreated);
            return this;
        }

        public SearchAll andObjectLastModified (QueryFilter<Date> filter)
        {
            filter.addFilter (context, "tl_work_flow_template.object_last_updated_date", FIELD_ObjectLastModified);
            return this;
        }

            
        public SearchAll andTemplateName (QueryFilter<String> filter)
        {
            filter.addFilter (context, "tl_work_flow_template.template_name", "TemplateName");
            return this;
        }
            
        public SearchAll andLandingButtonText (QueryFilter<String> filter)
        {
            filter.addFilter (context, "tl_work_flow_template.landing_button_text", "LandingButtonText");
            return this;
        }
            
        public SearchAll andVerificationHeaderText (QueryFilter<String> filter)
        {
            filter.addFilter (context, "tl_work_flow_template.verification_header_text", "VerificationHeaderText");
            return this;
        }
            
        public SearchAll andCaptureCV (QueryFilter<Boolean> filter)
        {
            filter.addFilter (context, "tl_work_flow_template.capture_cv", "CaptureCV");
            return this;
        }
            
        public SearchAll andIsCVMandatory (QueryFilter<Boolean> filter)
        {
            filter.addFilter (context, "tl_work_flow_template.is_cv_mandatory", "IsCVMandatory");
            return this;
        }
            
        public SearchAll andCaptureCL (QueryFilter<Boolean> filter)
        {
            filter.addFilter (context, "tl_work_flow_template.capture_cl", "CaptureCL");
            return this;
        }
            
        public SearchAll andIsCLMandatory (QueryFilter<Boolean> filter)
        {
            filter.addFilter (context, "tl_work_flow_template.is_cl_mandatory", "IsCLMandatory");
            return this;
        }
            
        public SearchAll andApplicationButtonText (QueryFilter<String> filter)
        {
            filter.addFilter (context, "tl_work_flow_template.application_button_text", "ApplicationButtonText");
            return this;
        }
            
        public SearchAll andApplicationResponseAction (QueryFilter<ResponseAction> filter)
        {
            filter.addFilter (context, "tl_work_flow_template.application_response_action", "ApplicationResponseAction");
            return this;
        }
            
        public SearchAll andThankYouHeaderText (QueryFilter<String> filter)
        {
            filter.addFilter (context, "tl_work_flow_template.thank_you_header_text", "ThankYouHeaderText");
            return this;
        }
            
        public SearchAll andThankYouSecondaryText (QueryFilter<String> filter)
        {
            filter.addFilter (context, "tl_work_flow_template.thank_you_secondary_text", "ThankYouSecondaryText");
            return this;
        }
            
        public SearchAll andJobOutlineButtonText (QueryFilter<String> filter)
        {
            filter.addFilter (context, "tl_work_flow_template.job_outline_button_text", "JobOutlineButtonText");
            return this;
        }
            
        public SearchAll andRelatedToJob (QueryFilter<Boolean> filter)
        {
            filter.addFilter (context, "tl_work_flow_template.related_to_job", "RelatedToJob");
            return this;
        }
            
        public SearchAll andIsSystemGenerated (QueryFilter<Boolean> filter)
        {
            filter.addFilter (context, "tl_work_flow_template.is_system_generated", "IsSystemGenerated");
            return this;
        }
            
        public SearchAll andWithdrawalMessage (QueryFilter<WorkFlowMessage> filter)
        {
            filter.addFilter (context, "tl_work_flow_template.withdrawal_message_id", "WithdrawalMessage");
            return this;
        }
            
        public SearchAll andHiringTeam (QueryFilter<HiringTeam> filter)
        {
            filter.addFilter (context, "tl_work_flow_template.hiring_team_id", "HiringTeam");
            return this;
        }
            
        public WorkFlowTemplate[] search (ObjectTransaction transaction) throws StorageException
        {
            
            BaseBusinessClass[]     results = super.search (transaction, REFERENCE_WorkFlowTemplate, SEARCH_All, criteria);
            Set<WorkFlowTemplate>   typedResults = new LinkedHashSet <WorkFlowTemplate> ();
            for (BaseBusinessClass bbcResult : results)
            {
                WorkFlowTemplate aResult = (WorkFlowTemplate)bbcResult;
                
                typedResults.add (aResult);
            }
            
            return ObjstoreUtils.removeDeleted(transaction, typedResults).toArray (new WorkFlowTemplate[0]);
                            
        }
    }

        
    public static WorkFlowTemplate[] searchAll (ObjectTransaction transaction) throws StorageException
    {
        return SearchByAll ()
               .search (transaction);
    }



    public Object getAttribute (String attribName)
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (attribName.equals (FIELD_TemplateName))
        {
            return HELPER_TemplateName.toObject (getTemplateName ());
        }
        else if (attribName.equals (FIELD_LandingButtonText))
        {
            return HELPER_LandingButtonText.toObject (getLandingButtonText ());
        }
        else if (attribName.equals (FIELD_VerificationHeaderText))
        {
            return HELPER_VerificationHeaderText.toObject (getVerificationHeaderText ());
        }
        else if (attribName.equals (FIELD_CaptureCV))
        {
            return HELPER_CaptureCV.toObject (getCaptureCV ());
        }
        else if (attribName.equals (FIELD_IsCVMandatory))
        {
            return HELPER_IsCVMandatory.toObject (getIsCVMandatory ());
        }
        else if (attribName.equals (FIELD_CaptureCL))
        {
            return HELPER_CaptureCL.toObject (getCaptureCL ());
        }
        else if (attribName.equals (FIELD_IsCLMandatory))
        {
            return HELPER_IsCLMandatory.toObject (getIsCLMandatory ());
        }
        else if (attribName.equals (FIELD_ApplicationButtonText))
        {
            return HELPER_ApplicationButtonText.toObject (getApplicationButtonText ());
        }
        else if (attribName.equals (FIELD_ApplicationResponseAction))
        {
            return HELPER_ApplicationResponseAction.toObject (getApplicationResponseAction ());
        }
        else if (attribName.equals (FIELD_ThankYouHeaderText))
        {
            return HELPER_ThankYouHeaderText.toObject (getThankYouHeaderText ());
        }
        else if (attribName.equals (FIELD_ThankYouSecondaryText))
        {
            return HELPER_ThankYouSecondaryText.toObject (getThankYouSecondaryText ());
        }
        else if (attribName.equals (FIELD_JobOutlineButtonText))
        {
            return HELPER_JobOutlineButtonText.toObject (getJobOutlineButtonText ());
        }
        else if (attribName.equals (FIELD_RelatedToJob))
        {
            return HELPER_RelatedToJob.toObject (getRelatedToJob ());
        }
        else if (attribName.equals (FIELD_IsSystemGenerated))
        {
            return HELPER_IsSystemGenerated.toObject (getIsSystemGenerated ());
        }
        else
        {
            return super.getAttribute (attribName);
        }
    }


    public AttributeHelper getAttributeHelper (String attribName)
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (attribName.equals (FIELD_TemplateName))
        {
            return HELPER_TemplateName;
        }
        else if (attribName.equals (FIELD_LandingButtonText))
        {
            return HELPER_LandingButtonText;
        }
        else if (attribName.equals (FIELD_VerificationHeaderText))
        {
            return HELPER_VerificationHeaderText;
        }
        else if (attribName.equals (FIELD_CaptureCV))
        {
            return HELPER_CaptureCV;
        }
        else if (attribName.equals (FIELD_IsCVMandatory))
        {
            return HELPER_IsCVMandatory;
        }
        else if (attribName.equals (FIELD_CaptureCL))
        {
            return HELPER_CaptureCL;
        }
        else if (attribName.equals (FIELD_IsCLMandatory))
        {
            return HELPER_IsCLMandatory;
        }
        else if (attribName.equals (FIELD_ApplicationButtonText))
        {
            return HELPER_ApplicationButtonText;
        }
        else if (attribName.equals (FIELD_ApplicationResponseAction))
        {
            return HELPER_ApplicationResponseAction;
        }
        else if (attribName.equals (FIELD_ThankYouHeaderText))
        {
            return HELPER_ThankYouHeaderText;
        }
        else if (attribName.equals (FIELD_ThankYouSecondaryText))
        {
            return HELPER_ThankYouSecondaryText;
        }
        else if (attribName.equals (FIELD_JobOutlineButtonText))
        {
            return HELPER_JobOutlineButtonText;
        }
        else if (attribName.equals (FIELD_RelatedToJob))
        {
            return HELPER_RelatedToJob;
        }
        else if (attribName.equals (FIELD_IsSystemGenerated))
        {
            return HELPER_IsSystemGenerated;
        }
        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_TemplateName))
        {
            setTemplateName ((String)(HELPER_TemplateName.fromObject (_TemplateName, attribValue)));            
        }
        else if (attribName.equals (FIELD_LandingButtonText))
        {
            setLandingButtonText ((String)(HELPER_LandingButtonText.fromObject (_LandingButtonText, attribValue)));            
        }
        else if (attribName.equals (FIELD_VerificationHeaderText))
        {
            setVerificationHeaderText ((String)(HELPER_VerificationHeaderText.fromObject (_VerificationHeaderText, attribValue)));            
        }
        else if (attribName.equals (FIELD_CaptureCV))
        {
            setCaptureCV ((Boolean)(HELPER_CaptureCV.fromObject (_CaptureCV, attribValue)));            
        }
        else if (attribName.equals (FIELD_IsCVMandatory))
        {
            setIsCVMandatory ((Boolean)(HELPER_IsCVMandatory.fromObject (_IsCVMandatory, attribValue)));            
        }
        else if (attribName.equals (FIELD_CaptureCL))
        {
            setCaptureCL ((Boolean)(HELPER_CaptureCL.fromObject (_CaptureCL, attribValue)));            
        }
        else if (attribName.equals (FIELD_IsCLMandatory))
        {
            setIsCLMandatory ((Boolean)(HELPER_IsCLMandatory.fromObject (_IsCLMandatory, attribValue)));            
        }
        else if (attribName.equals (FIELD_ApplicationButtonText))
        {
            setApplicationButtonText ((String)(HELPER_ApplicationButtonText.fromObject (_ApplicationButtonText, attribValue)));            
        }
        else if (attribName.equals (FIELD_ApplicationResponseAction))
        {
            setApplicationResponseAction ((ResponseAction)(HELPER_ApplicationResponseAction.fromObject (_ApplicationResponseAction, attribValue)));            
        }
        else if (attribName.equals (FIELD_ThankYouHeaderText))
        {
            setThankYouHeaderText ((String)(HELPER_ThankYouHeaderText.fromObject (_ThankYouHeaderText, attribValue)));            
        }
        else if (attribName.equals (FIELD_ThankYouSecondaryText))
        {
            setThankYouSecondaryText ((String)(HELPER_ThankYouSecondaryText.fromObject (_ThankYouSecondaryText, attribValue)));            
        }
        else if (attribName.equals (FIELD_JobOutlineButtonText))
        {
            setJobOutlineButtonText ((String)(HELPER_JobOutlineButtonText.fromObject (_JobOutlineButtonText, attribValue)));            
        }
        else if (attribName.equals (FIELD_RelatedToJob))
        {
            setRelatedToJob ((Boolean)(HELPER_RelatedToJob.fromObject (_RelatedToJob, attribValue)));            
        }
        else if (attribName.equals (FIELD_IsSystemGenerated))
        {
            setIsSystemGenerated ((Boolean)(HELPER_IsSystemGenerated.fromObject (_IsSystemGenerated, attribValue)));            
        }
        else
        {
            super.setAttribute (attribName, attribValue);
        }
    }

    

    public boolean isWriteable (String fieldName)
    {        
        return getWriteable (fieldName) == FieldWriteability.TRUE;
    }

    public boolean isReadable ()
    {
        return super.isReadable();
    }

    public boolean isReadable (String fieldName)
    {
        return super.isReadable(fieldName);
    }


    public FieldWriteability getWriteable (String fieldName)
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (fieldName.equals (FIELD_TemplateName))
        {
            return getWriteability_TemplateName ();
        }
        else if (fieldName.equals (FIELD_LandingButtonText))
        {
            return getWriteability_LandingButtonText ();
        }
        else if (fieldName.equals (FIELD_VerificationHeaderText))
        {
            return getWriteability_VerificationHeaderText ();
        }
        else if (fieldName.equals (FIELD_CaptureCV))
        {
            return getWriteability_CaptureCV ();
        }
        else if (fieldName.equals (FIELD_IsCVMandatory))
        {
            return getWriteability_IsCVMandatory ();
        }
        else if (fieldName.equals (FIELD_CaptureCL))
        {
            return getWriteability_CaptureCL ();
        }
        else if (fieldName.equals (FIELD_IsCLMandatory))
        {
            return getWriteability_IsCLMandatory ();
        }
        else if (fieldName.equals (FIELD_ApplicationButtonText))
        {
            return getWriteability_ApplicationButtonText ();
        }
        else if (fieldName.equals (FIELD_ApplicationResponseAction))
        {
            return getWriteability_ApplicationResponseAction ();
        }
        else if (fieldName.equals (FIELD_ThankYouHeaderText))
        {
            return getWriteability_ThankYouHeaderText ();
        }
        else if (fieldName.equals (FIELD_ThankYouSecondaryText))
        {
            return getWriteability_ThankYouSecondaryText ();
        }
        else if (fieldName.equals (FIELD_JobOutlineButtonText))
        {
            return getWriteability_JobOutlineButtonText ();
        }
        else if (fieldName.equals (FIELD_RelatedToJob))
        {
            return getWriteability_RelatedToJob ();
        }
        else if (fieldName.equals (FIELD_IsSystemGenerated))
        {
            return getWriteability_IsSystemGenerated ();
        }
        else if (fieldName.equals (MULTIPLEREFERENCE_WorkFlowStages))
        {
            return getWriteability_WorkFlowStages ();
        }
        else if (fieldName.equals (MULTIPLEREFERENCE_Jobs))
        {
            return getWriteability_Jobs ();
        }
        else if (fieldName.equals (SINGLEREFERENCE_WithdrawalMessage))
        {
            return getWriteability_WithdrawalMessage ();
        }
        else if (fieldName.equals (SINGLEREFERENCE_HiringTeam))
        {
            return getWriteability_HiringTeam ();
        }
        else
        {
            return super.getWriteable (fieldName);
        }
    }


    public void putUnwriteable (Set<String> fields)
    {
        if (getWriteability_TemplateName () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_TemplateName);
        }
        
        if (getWriteability_LandingButtonText () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_LandingButtonText);
        }
        
        if (getWriteability_VerificationHeaderText () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_VerificationHeaderText);
        }
        
        if (getWriteability_CaptureCV () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_CaptureCV);
        }
        
        if (getWriteability_IsCVMandatory () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_IsCVMandatory);
        }
        
        if (getWriteability_CaptureCL () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_CaptureCL);
        }
        
        if (getWriteability_IsCLMandatory () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_IsCLMandatory);
        }
        
        if (getWriteability_ApplicationButtonText () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_ApplicationButtonText);
        }
        
        if (getWriteability_ApplicationResponseAction () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_ApplicationResponseAction);
        }
        
        if (getWriteability_ThankYouHeaderText () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_ThankYouHeaderText);
        }
        
        if (getWriteability_ThankYouSecondaryText () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_ThankYouSecondaryText);
        }
        
        if (getWriteability_JobOutlineButtonText () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_JobOutlineButtonText);
        }
        
        if (getWriteability_RelatedToJob () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_RelatedToJob);
        }
        
        if (getWriteability_IsSystemGenerated () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_IsSystemGenerated);
        }
        

        super.putUnwriteable (fields);
    }

    public String[] getAllTableNames()
    {
        return new String[] {"tl_work_flow_template"};
    }
    
    public boolean isPolymorphic(String tableName)
    {
        return super.isPolymorphic(tableName);
    }


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

        
        result.add(HELPER_TemplateName.getAttribObject (getClass (), _TemplateName, true, FIELD_TemplateName));
        result.add(HELPER_LandingButtonText.getAttribObject (getClass (), _LandingButtonText, false, FIELD_LandingButtonText));
        result.add(HELPER_VerificationHeaderText.getAttribObject (getClass (), _VerificationHeaderText, false, FIELD_VerificationHeaderText));
        result.add(HELPER_CaptureCV.getAttribObject (getClass (), _CaptureCV, false, FIELD_CaptureCV));
        result.add(HELPER_IsCVMandatory.getAttribObject (getClass (), _IsCVMandatory, false, FIELD_IsCVMandatory));
        result.add(HELPER_CaptureCL.getAttribObject (getClass (), _CaptureCL, false, FIELD_CaptureCL));
        result.add(HELPER_IsCLMandatory.getAttribObject (getClass (), _IsCLMandatory, false, FIELD_IsCLMandatory));
        result.add(HELPER_ApplicationButtonText.getAttribObject (getClass (), _ApplicationButtonText, false, FIELD_ApplicationButtonText));
        result.add(HELPER_ApplicationResponseAction.getAttribObject (getClass (), _ApplicationResponseAction, true, FIELD_ApplicationResponseAction));
        result.add(HELPER_ThankYouHeaderText.getAttribObject (getClass (), _ThankYouHeaderText, false, FIELD_ThankYouHeaderText));
        result.add(HELPER_ThankYouSecondaryText.getAttribObject (getClass (), _ThankYouSecondaryText, false, FIELD_ThankYouSecondaryText));
        result.add(HELPER_JobOutlineButtonText.getAttribObject (getClass (), _JobOutlineButtonText, false, FIELD_JobOutlineButtonText));
        result.add(HELPER_RelatedToJob.getAttribObject (getClass (), _RelatedToJob, false, FIELD_RelatedToJob));
        result.add(HELPER_IsSystemGenerated.getAttribObject (getClass (), _IsSystemGenerated, false, FIELD_IsSystemGenerated));

        return result;
    }


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


    public Object getAttributeMetadata (String attribute, String metadata)
    {
        if (ATTRIBUTES_METADATA_WorkFlowTemplate.containsKey (attribute))
        {
            return ((Map)ATTRIBUTES_METADATA_WorkFlowTemplate.get (attribute)).get(metadata);
        }
        else
        {
            return super.getAttributeMetadata (attribute, metadata);
        }
    }

    public void copyAllAttributeMetadata (Map copyInto)
    {
        super.copyAllAttributeMetadata(copyInto);

        copyInto.putAll(ATTRIBUTES_METADATA_WorkFlowTemplate);
    }
            

    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 WorkFlowTemplateBehaviourDecorator extends BaseBusinessClass.BBCBehaviourDecorator<WorkFlowTemplate>
    {

    /**
     * Get the attribute TemplateName
     */
    public String getTemplateName (WorkFlowTemplate obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute TemplateName.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setTemplateName (WorkFlowTemplate obj, String newTemplateName) throws FieldException
    {
        return newTemplateName;
    }

    /**
     * Get the attribute LandingButtonText
     */
    public String getLandingButtonText (WorkFlowTemplate obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute LandingButtonText.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setLandingButtonText (WorkFlowTemplate obj, String newLandingButtonText) throws FieldException
    {
        return newLandingButtonText;
    }

    /**
     * Get the attribute VerificationHeaderText
     */
    public String getVerificationHeaderText (WorkFlowTemplate obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute VerificationHeaderText.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setVerificationHeaderText (WorkFlowTemplate obj, String newVerificationHeaderText) throws FieldException
    {
        return newVerificationHeaderText;
    }

    /**
     * Get the attribute CaptureCV
     */
    public Boolean getCaptureCV (WorkFlowTemplate obj, Boolean original)
    {
        return original;
    }

    /**
     * Change the value set for attribute CaptureCV.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Boolean setCaptureCV (WorkFlowTemplate obj, Boolean newCaptureCV) throws FieldException
    {
        return newCaptureCV;
    }

    /**
     * Get the attribute IsCVMandatory
     */
    public Boolean getIsCVMandatory (WorkFlowTemplate obj, Boolean original)
    {
        return original;
    }

    /**
     * Change the value set for attribute IsCVMandatory.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Boolean setIsCVMandatory (WorkFlowTemplate obj, Boolean newIsCVMandatory) throws FieldException
    {
        return newIsCVMandatory;
    }

    /**
     * Get the attribute CaptureCL
     */
    public Boolean getCaptureCL (WorkFlowTemplate obj, Boolean original)
    {
        return original;
    }

    /**
     * Change the value set for attribute CaptureCL.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Boolean setCaptureCL (WorkFlowTemplate obj, Boolean newCaptureCL) throws FieldException
    {
        return newCaptureCL;
    }

    /**
     * Get the attribute IsCLMandatory
     */
    public Boolean getIsCLMandatory (WorkFlowTemplate obj, Boolean original)
    {
        return original;
    }

    /**
     * Change the value set for attribute IsCLMandatory.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Boolean setIsCLMandatory (WorkFlowTemplate obj, Boolean newIsCLMandatory) throws FieldException
    {
        return newIsCLMandatory;
    }

    /**
     * Get the attribute ApplicationButtonText
     */
    public String getApplicationButtonText (WorkFlowTemplate obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute ApplicationButtonText.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setApplicationButtonText (WorkFlowTemplate obj, String newApplicationButtonText) throws FieldException
    {
        return newApplicationButtonText;
    }

    /**
     * Get the attribute ApplicationResponseAction
     */
    public ResponseAction getApplicationResponseAction (WorkFlowTemplate obj, ResponseAction original)
    {
        return original;
    }

    /**
     * Change the value set for attribute ApplicationResponseAction.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public ResponseAction setApplicationResponseAction (WorkFlowTemplate obj, ResponseAction newApplicationResponseAction) throws FieldException
    {
        return newApplicationResponseAction;
    }

    /**
     * Get the attribute ThankYouHeaderText
     */
    public String getThankYouHeaderText (WorkFlowTemplate obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute ThankYouHeaderText.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setThankYouHeaderText (WorkFlowTemplate obj, String newThankYouHeaderText) throws FieldException
    {
        return newThankYouHeaderText;
    }

    /**
     * Get the attribute ThankYouSecondaryText
     */
    public String getThankYouSecondaryText (WorkFlowTemplate obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute ThankYouSecondaryText.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setThankYouSecondaryText (WorkFlowTemplate obj, String newThankYouSecondaryText) throws FieldException
    {
        return newThankYouSecondaryText;
    }

    /**
     * Get the attribute JobOutlineButtonText
     */
    public String getJobOutlineButtonText (WorkFlowTemplate obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute JobOutlineButtonText.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setJobOutlineButtonText (WorkFlowTemplate obj, String newJobOutlineButtonText) throws FieldException
    {
        return newJobOutlineButtonText;
    }

    /**
     * Get the attribute RelatedToJob
     */
    public Boolean getRelatedToJob (WorkFlowTemplate obj, Boolean original)
    {
        return original;
    }

    /**
     * Change the value set for attribute RelatedToJob.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Boolean setRelatedToJob (WorkFlowTemplate obj, Boolean newRelatedToJob) throws FieldException
    {
        return newRelatedToJob;
    }

    /**
     * Get the attribute IsSystemGenerated
     */
    public Boolean getIsSystemGenerated (WorkFlowTemplate obj, Boolean original)
    {
        return original;
    }

    /**
     * Change the value set for attribute IsSystemGenerated.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Boolean setIsSystemGenerated (WorkFlowTemplate obj, Boolean newIsSystemGenerated) throws FieldException
    {
        return newIsSystemGenerated;
    }

    }

    @Override
    public ORMPipeLine pipes()
    {
        return new WorkFlowTemplatePipeLineFactory<WorkFlowTemplate, WorkFlowTemplate> ((WorkFlowTemplate)this);
    }

    @Override
    public ORMPipeLine pipes(Collection _items)
    {
        return pipesWorkFlowTemplate(_items);
    }
      
    /**
     * Use this instead of pipes() to get rid of type casting.
     */  
    public WorkFlowTemplatePipeLineFactory<WorkFlowTemplate, WorkFlowTemplate> pipelineWorkFlowTemplate()
    {
        return (WorkFlowTemplatePipeLineFactory<WorkFlowTemplate, WorkFlowTemplate>) pipes();
    }
    
    public static WorkFlowTemplatePipeLineFactory<WorkFlowTemplate, WorkFlowTemplate> pipesWorkFlowTemplate(Collection<WorkFlowTemplate> items)
    {
        return REFERENCE_WorkFlowTemplate.new WorkFlowTemplatePipeLineFactory<WorkFlowTemplate, WorkFlowTemplate> (items);
    }
    
    public static WorkFlowTemplatePipeLineFactory<WorkFlowTemplate, WorkFlowTemplate> pipesWorkFlowTemplate(WorkFlowTemplate[] _items)
    {
        return pipesWorkFlowTemplate(Arrays.asList (_items));
    }
    
    public static WorkFlowTemplatePipeLineFactory<WorkFlowTemplate, WorkFlowTemplate> pipesWorkFlowTemplate()
    {
        return pipesWorkFlowTemplate((Collection)null);
    }
    
    
    public class WorkFlowTemplatePipeLineFactory<From extends BaseBusinessClass, Me extends WorkFlowTemplate> extends BaseBusinessClass.ORMPipeLine<From, Me>    
    {
        public <Prev> WorkFlowTemplatePipeLineFactory (PipeLine<From, Prev> pipeLine, Pipe<Prev, Me> nextPipe)
        {
            super (pipeLine, nextPipe);
        }
        
        public WorkFlowTemplatePipeLineFactory (From seed)
        {
            super(seed);
        }

        public WorkFlowTemplatePipeLineFactory (Collection<From> seed)
        {
            super(seed);
        }
        
        
        public PipeLine<From, ? extends Object> to(String name)
        {
            if (name.equals ("WorkFlowStages"))
            {
                return toWorkFlowStages ();
            }                
            if (name.equals ("Jobs"))
            {
                return toJobs ();
            }                
            if (name.equals ("TemplateName"))
            {
                return toTemplateName ();
            }                
            if (name.equals ("LandingButtonText"))
            {
                return toLandingButtonText ();
            }                
            if (name.equals ("VerificationHeaderText"))
            {
                return toVerificationHeaderText ();
            }                
            if (name.equals ("CaptureCV"))
            {
                return toCaptureCV ();
            }                
            if (name.equals ("IsCVMandatory"))
            {
                return toIsCVMandatory ();
            }                
            if (name.equals ("CaptureCL"))
            {
                return toCaptureCL ();
            }                
            if (name.equals ("IsCLMandatory"))
            {
                return toIsCLMandatory ();
            }                
            if (name.equals ("ApplicationButtonText"))
            {
                return toApplicationButtonText ();
            }                
            if (name.equals ("ApplicationResponseAction"))
            {
                return toApplicationResponseAction ();
            }                
            if (name.equals ("ThankYouHeaderText"))
            {
                return toThankYouHeaderText ();
            }                
            if (name.equals ("ThankYouSecondaryText"))
            {
                return toThankYouSecondaryText ();
            }                
            if (name.equals ("JobOutlineButtonText"))
            {
                return toJobOutlineButtonText ();
            }                
            if (name.equals ("RelatedToJob"))
            {
                return toRelatedToJob ();
            }                
            if (name.equals ("IsSystemGenerated"))
            {
                return toIsSystemGenerated ();
            }                
            if (name.equals ("WithdrawalMessage"))
            {
                return toWithdrawalMessage ();
            }                
            if (name.equals ("HiringTeam"))
            {
                return toHiringTeam ();
            }                
            
            
            return super.to(name);
        }
        
        
        public PipeLine<From, String> toTemplateName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_TemplateName));  }
        
        public PipeLine<From, String> toLandingButtonText () { return pipe(new ORMAttributePipe<Me, String>(FIELD_LandingButtonText));  }
        
        public PipeLine<From, String> toVerificationHeaderText () { return pipe(new ORMAttributePipe<Me, String>(FIELD_VerificationHeaderText));  }
        
        public PipeLine<From, Boolean> toCaptureCV () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_CaptureCV));  }
        
        public PipeLine<From, Boolean> toIsCVMandatory () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_IsCVMandatory));  }
        
        public PipeLine<From, Boolean> toCaptureCL () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_CaptureCL));  }
        
        public PipeLine<From, Boolean> toIsCLMandatory () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_IsCLMandatory));  }
        
        public PipeLine<From, String> toApplicationButtonText () { return pipe(new ORMAttributePipe<Me, String>(FIELD_ApplicationButtonText));  }
        
        public ResponseAction.ResponseActionPipeLineFactory<From, ResponseAction> toApplicationResponseAction () 
        { 
            return new ResponseAction.ResponseActionPipeLineFactory<> (this, new ORMAttributePipe<>(FIELD_ApplicationResponseAction));
        }
        
        public PipeLine<From, String> toThankYouHeaderText () { return pipe(new ORMAttributePipe<Me, String>(FIELD_ThankYouHeaderText));  }
        
        public PipeLine<From, String> toThankYouSecondaryText () { return pipe(new ORMAttributePipe<Me, String>(FIELD_ThankYouSecondaryText));  }
        
        public PipeLine<From, String> toJobOutlineButtonText () { return pipe(new ORMAttributePipe<Me, String>(FIELD_JobOutlineButtonText));  }
        
        public PipeLine<From, Boolean> toRelatedToJob () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_RelatedToJob));  }
        
        public PipeLine<From, Boolean> toIsSystemGenerated () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_IsSystemGenerated));  }

        public WorkFlowMessage.WorkFlowMessagePipeLineFactory<From, WorkFlowMessage> toWithdrawalMessage () { return toWithdrawalMessage (Filter.ALL); }

        public WorkFlowMessage.WorkFlowMessagePipeLineFactory<From, WorkFlowMessage> toWithdrawalMessage (Filter<WorkFlowMessage> filter) 
        { 
            return WorkFlowMessage.REFERENCE_WorkFlowMessage.new WorkFlowMessagePipeLineFactory<From, WorkFlowMessage> (this, new ORMSingleAssocPipe<Me, WorkFlowMessage>(SINGLEREFERENCE_WithdrawalMessage, filter)); 
        }

        public HiringTeam.HiringTeamPipeLineFactory<From, HiringTeam> toHiringTeam () { return toHiringTeam (Filter.ALL); }

        public HiringTeam.HiringTeamPipeLineFactory<From, HiringTeam> toHiringTeam (Filter<HiringTeam> filter) 
        { 
            return HiringTeam.REFERENCE_HiringTeam.new HiringTeamPipeLineFactory<From, HiringTeam> (this, new ORMSingleAssocPipe<Me, HiringTeam>(SINGLEREFERENCE_HiringTeam, filter)); 
        }

        public WorkFlowStage.WorkFlowStagePipeLineFactory<From, WorkFlowStage> toWorkFlowStages () { return toWorkFlowStages(Filter.ALL); }        

        public WorkFlowStage.WorkFlowStagePipeLineFactory<From, WorkFlowStage> toWorkFlowStages (Filter<WorkFlowStage> filter)
        {
            return WorkFlowStage.REFERENCE_WorkFlowStage.new WorkFlowStagePipeLineFactory<From, WorkFlowStage> (this, new ORMMultiAssocPipe<Me, WorkFlowStage>(MULTIPLEREFERENCE_WorkFlowStages, filter)); 
        }

        public Job.JobPipeLineFactory<From, Job> toJobs () { return toJobs(Filter.ALL); }        

        public Job.JobPipeLineFactory<From, Job> toJobs (Filter<Job> filter)
        {
            return Job.REFERENCE_Job.new JobPipeLineFactory<From, Job> (this, new ORMMultiAssocPipe<Me, Job>(MULTIPLEREFERENCE_Jobs, filter)); 
        }
    }
    
    public boolean isTransientAttrib(String attribName)
    {
        

        return super.isTransientAttrib(attribName);
    }

    public boolean isTransientSingleReference(String assocName)
    {
        

        return super.isTransientSingleReference(assocName);
    }
}

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

    public void assertValid ()
    {
    }


    public WorkFlowMessage getWithdrawalMessage () throws StorageException
    {
        return (WorkFlowMessage)(WorkFlowMessage.DUMMY_WorkFlowMessage);
    }


    /**
     * Get the object id for the referenced object.  Does not force a DB access.
     */
    public Long getWithdrawalMessageID ()
    {
        return WorkFlowMessage.DUMMY_WorkFlowMessage.getObjectID();
    }

    public HiringTeam getHiringTeam () throws StorageException
    {
        return (HiringTeam)(HiringTeam.DUMMY_HiringTeam);
    }


    /**
     * Get the object id for the referenced object.  Does not force a DB access.
     */
    public Long getHiringTeamID ()
    {
        return HiringTeam.DUMMY_HiringTeam.getObjectID();
    }

    public int getWorkFlowStagesCount () throws StorageException
    {
        return 0;
    }


    public WorkFlowStage getWorkFlowStagesAt (int index) throws StorageException
    {
        throw new RuntimeException ("No elements in a dummy object in association WorkFlowStages");
    }


    public SortedSet getWorkFlowStagesSet () throws StorageException
    {
        return new TreeSet();
    }

    public int getJobsCount () throws StorageException
    {
        return 0;
    }


    public Job getJobsAt (int index) throws StorageException
    {
        throw new RuntimeException ("No elements in a dummy object in association Jobs");
    }


    public SortedSet getJobsSet () throws StorageException
    {
        return new TreeSet();
    }

}

    
