/*
 * IMPORTANT!!!! XSL Autogenerated class, DO NOT EDIT!!!!!
 * Template: Infrastructure8.2 rev3 [oneit.objstore.BusinessObjectTemplate.xsl]
 *
 *   Version: 1.0
 *   Vendor: Apache Software Foundation (Xalan XSLTC)
 *   Vendor URL: http://xml.apache.org/xalan-j
 */


    package performa.orm;

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

import performa.orm.types.*;

import oneit.security.*;



public abstract class BaseJob extends BaseBusinessClass
{
    // Reference instance for the object
    public static final Job REFERENCE_Job = new Job ();

    // Reference instance for the object
    public static final Job DUMMY_Job = new DummyJob ();

    // Static constants corresponding to field names
    
    public static final String FIELD_JobTitle = "JobTitle";
    public static final String FIELD_JobDescription = "JobDescription";
    public static final String FIELD_JobStatus = "JobStatus";
    public static final String FIELD_OpenDate = "OpenDate";
    public static final String FIELD_ApplyBy = "ApplyBy";
    public static final String FIELD_IncludeAssessmentCriteria = "IncludeAssessmentCriteria";
    public static final String FIELD_AssessmentType = "AssessmentType";
    public static final String FIELD_RandomKey = "RandomKey";
    public static final String FIELD_JobType = "JobType";
    public static final String FIELD_Email = "Email";
    public static final String FIELD_CompletedDetails = "CompletedDetails";
    public static final String FIELD_CompletedRequirements = "CompletedRequirements";
    public static final String FIELD_CompletedCulture = "CompletedCulture";
    public static final String FIELD_CompletedAssessmentType = "CompletedAssessmentType";
    public static final String FIELD_SaveAssessmentTemplate = "SaveAssessmentTemplate";
    public static final String FIELD_SaveCultureTemplate = "SaveCultureTemplate";
    public static final String FIELD_AssessmentTemplateName = "AssessmentTemplateName";
    public static final String FIELD_CultureTemplateName = "CultureTemplateName";
    public static final String SINGLEREFERENCE_AssessmentTemplate = "AssessmentTemplate";
    public static final String SINGLEREFERENCE_CultureTemplate = "CultureTemplate";
    public static final String SINGLEREFERENCE_JobTemplate = "JobTemplate";
    public static final String SINGLEREFERENCE_Level = "Level";
    public static final String SINGLEREFERENCE_SecUser = "SecUser";
    public static final String MULTIPLEREFERENCE_JobApplications = "JobApplications";
    public static final String BACKREF_JobApplications = "";
    public static final String MULTIPLEREFERENCE_AssessmentCriterias = "AssessmentCriterias";
    public static final String BACKREF_AssessmentCriterias = "";
    public static final String MULTIPLEREFERENCE_CultureCriterias = "CultureCriterias";
    public static final String BACKREF_CultureCriterias = "";

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

    // Static constants corresponding to attribute helpers
    private static final DefaultAttributeHelper<Job> HELPER_JobTitle = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Job> HELPER_JobDescription = DefaultAttributeHelper.INSTANCE;
    private static final EnumeratedAttributeHelper<Job, JobStatus> HELPER_JobStatus =  new EnumeratedAttributeHelper<Job, JobStatus> (JobStatus.FACTORY_JobStatus);
    private static final DefaultAttributeHelper<Job> HELPER_OpenDate = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Job> HELPER_ApplyBy = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Job> HELPER_IncludeAssessmentCriteria = DefaultAttributeHelper.INSTANCE;
    private static final EnumeratedAttributeHelper<Job, AssessmentType> HELPER_AssessmentType =  new EnumeratedAttributeHelper<Job, AssessmentType> (AssessmentType.FACTORY_AssessmentType);
    private static final DefaultAttributeHelper<Job> HELPER_RandomKey = DefaultAttributeHelper.INSTANCE;
    private static final EnumeratedAttributeHelper<Job, JobType> HELPER_JobType =  new EnumeratedAttributeHelper<Job, JobType> (JobType.FACTORY_JobType);
    private static final DefaultAttributeHelper<Job> HELPER_Email = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Job> HELPER_CompletedDetails = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Job> HELPER_CompletedRequirements = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Job> HELPER_CompletedCulture = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Job> HELPER_CompletedAssessmentType = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Job> HELPER_SaveAssessmentTemplate = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Job> HELPER_SaveCultureTemplate = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Job> HELPER_AssessmentTemplateName = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Job> HELPER_CultureTemplateName = DefaultAttributeHelper.INSTANCE;
    

    // Private attributes corresponding to business object data
    private String _JobTitle;
    private String _JobDescription;
    private JobStatus _JobStatus;
    private Date _OpenDate;
    private Date _ApplyBy;
    private Boolean _IncludeAssessmentCriteria;
    private AssessmentType _AssessmentType;
    private String _RandomKey;
    private JobType _JobType;
    private String _Email;
    private Boolean _CompletedDetails;
    private Boolean _CompletedRequirements;
    private Boolean _CompletedCulture;
    private Boolean _CompletedAssessmentType;
    private Boolean _SaveAssessmentTemplate;
    private Boolean _SaveCultureTemplate;
    private String _AssessmentTemplateName;
    private String _CultureTemplateName;
    

    // Private attributes corresponding to single references
    private SingleAssociation<Job, AssessmentCriteriaTemplate> _AssessmentTemplate;
    private SingleAssociation<Job, CultureCriteriaTemplate> _CultureTemplate;
    private SingleAssociation<Job, Job> _JobTemplate;
    private SingleAssociation<Job, Level> _Level;
    private SingleAssociation<Job, SecUser> _SecUser;
    

    // Private attributes corresponding to multiple references
    private MultipleAssociation<Job, JobApplication> _JobApplications;
    private MultipleAssociation<Job, AssessmentCriteria> _AssessmentCriterias;
    private MultipleAssociation<Job, CultureCriteria> _CultureCriterias;
    

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

    // Arrays of validators for each attribute
    private static final AttributeValidator[] FIELD_Email_Validators;
    private static final AttributeValidator[] FIELD_CompletedDetails_Validators;
    private static final AttributeValidator[] FIELD_CompletedRequirements_Validators;
    private static final AttributeValidator[] FIELD_CompletedCulture_Validators;
    private static final AttributeValidator[] FIELD_CompletedAssessmentType_Validators;
    private static final AttributeValidator[] FIELD_SaveAssessmentTemplate_Validators;
    private static final AttributeValidator[] FIELD_SaveCultureTemplate_Validators;
    private static final AttributeValidator[] FIELD_AssessmentTemplateName_Validators;
    private static final AttributeValidator[] FIELD_CultureTemplateName_Validators;
    private static final AttributeValidator[] FIELD_JobTitle_Validators;
    private static final AttributeValidator[] FIELD_JobDescription_Validators;
    private static final AttributeValidator[] FIELD_JobStatus_Validators;
    private static final AttributeValidator[] FIELD_OpenDate_Validators;
    private static final AttributeValidator[] FIELD_ApplyBy_Validators;
    private static final AttributeValidator[] FIELD_IncludeAssessmentCriteria_Validators;
    private static final AttributeValidator[] FIELD_AssessmentType_Validators;
    private static final AttributeValidator[] FIELD_RandomKey_Validators;
    private static final AttributeValidator[] FIELD_JobType_Validators;
    

    // Arrays of behaviour decorators
    private static final JobBehaviourDecorator[] Job_BehaviourDecorators;
    
    static
    {
        try
        {
            
            String tmp_JobApplications = JobApplication.BACKREF_Job;
            String tmp_AssessmentCriterias = AssessmentCriteria.BACKREF_Job;
            String tmp_CultureCriterias = CultureCriteria.BACKREF_Job;
            
            Map  validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping"));

            setupAssocMetaData_JobApplications();
            setupAssocMetaData_AssessmentCriterias();
            setupAssocMetaData_CultureCriterias();
            setupAssocMetaData_AssessmentTemplate();
            setupAssocMetaData_CultureTemplate();
            setupAssocMetaData_JobTemplate();
            setupAssocMetaData_Level();
            setupAssocMetaData_SecUser();
            FIELD_Email_Validators = (AttributeValidator[])setupAttribMetaData_Email(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_CompletedDetails_Validators = (AttributeValidator[])setupAttribMetaData_CompletedDetails(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_CompletedRequirements_Validators = (AttributeValidator[])setupAttribMetaData_CompletedRequirements(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_CompletedCulture_Validators = (AttributeValidator[])setupAttribMetaData_CompletedCulture(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_CompletedAssessmentType_Validators = (AttributeValidator[])setupAttribMetaData_CompletedAssessmentType(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_SaveAssessmentTemplate_Validators = (AttributeValidator[])setupAttribMetaData_SaveAssessmentTemplate(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_SaveCultureTemplate_Validators = (AttributeValidator[])setupAttribMetaData_SaveCultureTemplate(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_AssessmentTemplateName_Validators = (AttributeValidator[])setupAttribMetaData_AssessmentTemplateName(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_CultureTemplateName_Validators = (AttributeValidator[])setupAttribMetaData_CultureTemplateName(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_JobTitle_Validators = (AttributeValidator[])setupAttribMetaData_JobTitle(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_JobDescription_Validators = (AttributeValidator[])setupAttribMetaData_JobDescription(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_JobStatus_Validators = (AttributeValidator[])setupAttribMetaData_JobStatus(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_OpenDate_Validators = (AttributeValidator[])setupAttribMetaData_OpenDate(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_ApplyBy_Validators = (AttributeValidator[])setupAttribMetaData_ApplyBy(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_IncludeAssessmentCriteria_Validators = (AttributeValidator[])setupAttribMetaData_IncludeAssessmentCriteria(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_AssessmentType_Validators = (AttributeValidator[])setupAttribMetaData_AssessmentType(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_RandomKey_Validators = (AttributeValidator[])setupAttribMetaData_RandomKey(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_JobType_Validators = (AttributeValidator[])setupAttribMetaData_JobType(validatorMapping).toArray (new AttributeValidator[0]);
            

            REFERENCE_Job.initialiseReference ();
            DUMMY_Job.initialiseReference ();
            Job_BehaviourDecorators = BaseBusinessClass.getBBCBehaviours(Job.class).toArray(new JobBehaviourDecorator[0]);
        }
        catch (RuntimeException e)
        {
            LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR1, e, "Error initialising");
            throw e;
        }
    }

    
    // Meta Info setup
    private static void setupAssocMetaData_JobApplications()
    {
        Map metaInfo = new HashMap ();

        metaInfo.put ("backreferenceName", "Job");
        metaInfo.put ("name", "JobApplications");
        metaInfo.put ("type", "JobApplication");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.JobApplications:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (MULTIPLEREFERENCE_JobApplications, Collections.unmodifiableMap (metaInfo));
    }
    
    
    // Meta Info setup
    private static void setupAssocMetaData_AssessmentCriterias()
    {
        Map metaInfo = new HashMap ();

        metaInfo.put ("backreferenceName", "Job");
        metaInfo.put ("name", "AssessmentCriterias");
        metaInfo.put ("type", "AssessmentCriteria");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.AssessmentCriterias:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (MULTIPLEREFERENCE_AssessmentCriterias, Collections.unmodifiableMap (metaInfo));
    }
    
    
    // Meta Info setup
    private static void setupAssocMetaData_CultureCriterias()
    {
        Map metaInfo = new HashMap ();

        metaInfo.put ("backreferenceName", "Job");
        metaInfo.put ("name", "CultureCriterias");
        metaInfo.put ("type", "CultureCriteria");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.CultureCriterias:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (MULTIPLEREFERENCE_CultureCriterias, Collections.unmodifiableMap (metaInfo));
    }
    
    
    // Meta Info setup
    private static void setupAssocMetaData_AssessmentTemplate()
    {
        Map metaInfo = new HashMap ();

        metaInfo.put ("name", "AssessmentTemplate");
        metaInfo.put ("type", "AssessmentCriteriaTemplate");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.AssessmentTemplate:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (SINGLEREFERENCE_AssessmentTemplate, Collections.unmodifiableMap (metaInfo));
    }
    
    
    // Meta Info setup
    private static void setupAssocMetaData_CultureTemplate()
    {
        Map metaInfo = new HashMap ();

        metaInfo.put ("name", "CultureTemplate");
        metaInfo.put ("type", "CultureCriteriaTemplate");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.CultureTemplate:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (SINGLEREFERENCE_CultureTemplate, Collections.unmodifiableMap (metaInfo));
    }
    
    
    // Meta Info setup
    private static void setupAssocMetaData_JobTemplate()
    {
        Map metaInfo = new HashMap ();

        metaInfo.put ("name", "JobTemplate");
        metaInfo.put ("type", "Job");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.JobTemplate:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (SINGLEREFERENCE_JobTemplate, Collections.unmodifiableMap (metaInfo));
    }
    
    
    // Meta Info setup
    private static void setupAssocMetaData_Level()
    {
        Map metaInfo = new HashMap ();

        metaInfo.put ("dbcol", "level_id");
        metaInfo.put ("mandatory", "true");
        metaInfo.put ("name", "Level");
        metaInfo.put ("type", "Level");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.Level:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (SINGLEREFERENCE_Level, Collections.unmodifiableMap (metaInfo));
    }
    
    
    // Meta Info setup
    private static void setupAssocMetaData_SecUser()
    {
        Map metaInfo = new HashMap ();

        metaInfo.put ("dbcol", "secuser_id");
        metaInfo.put ("name", "SecUser");
        metaInfo.put ("type", "SecUser");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.SecUser:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (SINGLEREFERENCE_SecUser, Collections.unmodifiableMap (metaInfo));
    }
    
    
    // Meta Info setup
    private static List setupAttribMetaData_Email(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("name", "Email");
        metaInfo.put ("type", "String");
        metaInfo.put ("validators", "Email");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.Email:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (FIELD_Email, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("defaultValue", "Boolean.FALSE");
        metaInfo.put ("name", "CompletedDetails");
        metaInfo.put ("type", "Boolean");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.CompletedDetails:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (FIELD_CompletedDetails, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("defaultValue", "Boolean.FALSE");
        metaInfo.put ("name", "CompletedRequirements");
        metaInfo.put ("type", "Boolean");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.CompletedRequirements:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (FIELD_CompletedRequirements, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("defaultValue", "Boolean.FALSE");
        metaInfo.put ("name", "CompletedCulture");
        metaInfo.put ("type", "Boolean");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.CompletedCulture:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (FIELD_CompletedCulture, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("defaultValue", "Boolean.FALSE");
        metaInfo.put ("name", "CompletedAssessmentType");
        metaInfo.put ("type", "Boolean");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.CompletedAssessmentType:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (FIELD_CompletedAssessmentType, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("defaultValue", "Boolean.FALSE");
        metaInfo.put ("name", "SaveAssessmentTemplate");
        metaInfo.put ("type", "Boolean");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.SaveAssessmentTemplate:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (FIELD_SaveAssessmentTemplate, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("defaultValue", "Boolean.FALSE");
        metaInfo.put ("name", "SaveCultureTemplate");
        metaInfo.put ("type", "Boolean");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.SaveCultureTemplate:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (FIELD_SaveCultureTemplate, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("name", "AssessmentTemplateName");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.AssessmentTemplateName:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (FIELD_AssessmentTemplateName, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("name", "CultureTemplateName");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.CultureTemplateName:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (FIELD_CultureTemplateName, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("dbcol", "job_title");
        metaInfo.put ("length", "500");
        metaInfo.put ("mandatory", "true");
        metaInfo.put ("name", "JobTitle");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.JobTitle:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (FIELD_JobTitle, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("dbcol", "job_description");
        metaInfo.put ("mandatory", "true");
        metaInfo.put ("name", "JobDescription");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.JobDescription:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (FIELD_JobDescription, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
        metaInfo.put ("dbcol", "job_status");
        metaInfo.put ("defaultValue", "JobStatus.DRAFT");
        metaInfo.put ("mandatory", "true");
        metaInfo.put ("name", "JobStatus");
        metaInfo.put ("type", "JobStatus");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.JobStatus:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (FIELD_JobStatus, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("dbcol", "open_date");
        metaInfo.put ("name", "OpenDate");
        metaInfo.put ("type", "Date");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.OpenDate:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (FIELD_OpenDate, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("dbcol", "apply_by");
        metaInfo.put ("name", "ApplyBy");
        metaInfo.put ("type", "Date");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.ApplyBy:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (FIELD_ApplyBy, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("dbcol", "include_assessment_criteria");
        metaInfo.put ("defaultValue", "Boolean.TRUE");
        metaInfo.put ("mandatory", "true");
        metaInfo.put ("name", "IncludeAssessmentCriteria");
        metaInfo.put ("type", "Boolean");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.IncludeAssessmentCriteria:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (FIELD_IncludeAssessmentCriteria, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
        metaInfo.put ("dbcol", "assessment_type");
        metaInfo.put ("defaultValue", "AssessmentType.COMPREHENSIVE");
        metaInfo.put ("mandatory", "true");
        metaInfo.put ("name", "AssessmentType");
        metaInfo.put ("type", "AssessmentType");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.AssessmentType:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (FIELD_AssessmentType, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("dbcol", "random_key");
        metaInfo.put ("length", "10");
        metaInfo.put ("name", "RandomKey");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.RandomKey:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (FIELD_RandomKey, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
        metaInfo.put ("dbcol", "job_type");
        metaInfo.put ("defaultValue", "JobType.FULL_TIME");
        metaInfo.put ("mandatory", "true");
        metaInfo.put ("name", "JobType");
        metaInfo.put ("type", "JobType");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Job.JobType:", metaInfo);
        ATTRIBUTES_METADATA_Job.put (FIELD_JobType, Collections.unmodifiableMap (metaInfo));

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

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


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


    


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

        
        _JobTitle = (String)(HELPER_JobTitle.initialise (_JobTitle));
        _JobDescription = (String)(HELPER_JobDescription.initialise (_JobDescription));
        _JobStatus = (JobStatus)(JobStatus.DRAFT);
        _OpenDate = (Date)(HELPER_OpenDate.initialise (_OpenDate));
        _ApplyBy = (Date)(HELPER_ApplyBy.initialise (_ApplyBy));
        _IncludeAssessmentCriteria = (Boolean)(Boolean.TRUE);
        _AssessmentType = (AssessmentType)(AssessmentType.COMPREHENSIVE);
        _RandomKey = (String)(HELPER_RandomKey.initialise (_RandomKey));
        _JobType = (JobType)(JobType.FULL_TIME);
        _Email = (String)(HELPER_Email.initialise (_Email));
        _CompletedDetails = (Boolean)(Boolean.FALSE);
        _CompletedRequirements = (Boolean)(Boolean.FALSE);
        _CompletedCulture = (Boolean)(Boolean.FALSE);
        _CompletedAssessmentType = (Boolean)(Boolean.FALSE);
        _SaveAssessmentTemplate = (Boolean)(Boolean.FALSE);
        _SaveCultureTemplate = (Boolean)(Boolean.FALSE);
        _AssessmentTemplateName = (String)(HELPER_AssessmentTemplateName.initialise (_AssessmentTemplateName));
        _CultureTemplateName = (String)(HELPER_CultureTemplateName.initialise (_CultureTemplateName));
    }


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

        _AssessmentTemplate = new SingleAssociation<Job, AssessmentCriteriaTemplate> (this, SINGLEREFERENCE_AssessmentTemplate, null, AssessmentCriteriaTemplate.REFERENCE_AssessmentCriteriaTemplate, "");
        _CultureTemplate = new SingleAssociation<Job, CultureCriteriaTemplate> (this, SINGLEREFERENCE_CultureTemplate, null, CultureCriteriaTemplate.REFERENCE_CultureCriteriaTemplate, "");
        _JobTemplate = new SingleAssociation<Job, Job> (this, SINGLEREFERENCE_JobTemplate, null, Job.REFERENCE_Job, "");
        _Level = new SingleAssociation<Job, Level> (this, SINGLEREFERENCE_Level, null, Level.REFERENCE_Level, "tl_job");
        _SecUser = new SingleAssociation<Job, SecUser> (this, SINGLEREFERENCE_SecUser, null, SecUser.REFERENCE_SecUser, "tl_job");
        _JobApplications = new MultipleAssociation<Job, JobApplication> (this, MULTIPLEREFERENCE_JobApplications, JobApplication.SINGLEREFERENCE_Job, JobApplication.REFERENCE_JobApplication);
        _AssessmentCriterias = new MultipleAssociation<Job, AssessmentCriteria> (this, MULTIPLEREFERENCE_AssessmentCriterias, AssessmentCriteria.SINGLEREFERENCE_Job, AssessmentCriteria.REFERENCE_AssessmentCriteria);
        _CultureCriterias = new MultipleAssociation<Job, CultureCriteria> (this, MULTIPLEREFERENCE_CultureCriterias, CultureCriteria.SINGLEREFERENCE_Job, CultureCriteria.REFERENCE_CultureCriteria);
        
    }


    // Initialise the associations
    protected BaseBusinessClass initialiseReference ()
    {
        super.initialiseReference ();
        
        _AssessmentTemplate = new SingleAssociation<Job, AssessmentCriteriaTemplate> (this, SINGLEREFERENCE_AssessmentTemplate, null, AssessmentCriteriaTemplate.REFERENCE_AssessmentCriteriaTemplate, "");
        _CultureTemplate = new SingleAssociation<Job, CultureCriteriaTemplate> (this, SINGLEREFERENCE_CultureTemplate, null, CultureCriteriaTemplate.REFERENCE_CultureCriteriaTemplate, "");
        _JobTemplate = new SingleAssociation<Job, Job> (this, SINGLEREFERENCE_JobTemplate, null, Job.REFERENCE_Job, "");
        _Level = new SingleAssociation<Job, Level> (this, SINGLEREFERENCE_Level, null, Level.REFERENCE_Level, "tl_job");
        _SecUser = new SingleAssociation<Job, SecUser> (this, SINGLEREFERENCE_SecUser, null, SecUser.REFERENCE_SecUser, "tl_job");
        _JobApplications = new MultipleAssociation<Job, JobApplication> (this, MULTIPLEREFERENCE_JobApplications, JobApplication.SINGLEREFERENCE_Job, JobApplication.REFERENCE_JobApplication);
        _AssessmentCriterias = new MultipleAssociation<Job, AssessmentCriteria> (this, MULTIPLEREFERENCE_AssessmentCriterias, AssessmentCriteria.SINGLEREFERENCE_Job, AssessmentCriteria.REFERENCE_AssessmentCriteria);
        _CultureCriterias = new MultipleAssociation<Job, CultureCriteria> (this, MULTIPLEREFERENCE_CultureCriterias, CultureCriteria.SINGLEREFERENCE_Job, CultureCriteria.REFERENCE_CultureCriteria);
        
        
        return this;
    }

    

    /**
     * Get the attribute JobTitle
     */
    public String getJobTitle ()
    {
        assertValid();
        String valToReturn = _JobTitle;

            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                valToReturn = bhd.getJobTitle ((Job)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 preJobTitleChange (String newJobTitle) 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 postJobTitleChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute JobTitle.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setJobTitle (String newJobTitle) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_JobTitle.compare (_JobTitle, newJobTitle);
        
        try
        {
            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                newJobTitle = bhd.setJobTitle ((Job)this, newJobTitle);
                oldAndNewIdentical = HELPER_JobTitle.compare (_JobTitle, newJobTitle);
            }

            BusinessObjectParser.assertFieldCondition (newJobTitle != null, this, FIELD_JobTitle, "mandatory");
            

            if (FIELD_JobTitle_Validators.length > 0)
            {
                Object newJobTitleObj = HELPER_JobTitle.toObject (newJobTitle);

                if (newJobTitleObj != null)
                {
                    int     loopMax = FIELD_JobTitle_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Job.get (FIELD_JobTitle);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_JobTitle () != FieldWriteability.FALSE, "Field  JobTitle is not writeable");
            preJobTitleChange (newJobTitle);
            markFieldChange (FIELD_JobTitle);
            _JobTitle = newJobTitle;            
            postFieldChange (FIELD_JobTitle);
            postJobTitleChange ();
        }
    }

    /**
     * Get the attribute JobDescription
     */
    public String getJobDescription ()
    {
        assertValid();
        String valToReturn = _JobDescription;

            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                valToReturn = bhd.getJobDescription ((Job)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 preJobDescriptionChange (String newJobDescription) 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 postJobDescriptionChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute JobDescription.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setJobDescription (String newJobDescription) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_JobDescription.compare (_JobDescription, newJobDescription);
        
        try
        {
            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                newJobDescription = bhd.setJobDescription ((Job)this, newJobDescription);
                oldAndNewIdentical = HELPER_JobDescription.compare (_JobDescription, newJobDescription);
            }

            BusinessObjectParser.assertFieldCondition (newJobDescription != null, this, FIELD_JobDescription, "mandatory");
            

            if (FIELD_JobDescription_Validators.length > 0)
            {
                Object newJobDescriptionObj = HELPER_JobDescription.toObject (newJobDescription);

                if (newJobDescriptionObj != null)
                {
                    int     loopMax = FIELD_JobDescription_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Job.get (FIELD_JobDescription);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_JobDescription () != FieldWriteability.FALSE, "Field  JobDescription is not writeable");
            preJobDescriptionChange (newJobDescription);
            markFieldChange (FIELD_JobDescription);
            _JobDescription = newJobDescription;            
            postFieldChange (FIELD_JobDescription);
            postJobDescriptionChange ();
        }
    }

    /**
     * Get the attribute JobStatus
     */
    public JobStatus getJobStatus ()
    {
        assertValid();
        JobStatus valToReturn = _JobStatus;

            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                valToReturn = bhd.getJobStatus ((Job)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 preJobStatusChange (JobStatus newJobStatus) 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 postJobStatusChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute JobStatus.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setJobStatus (JobStatus newJobStatus) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_JobStatus.compare (_JobStatus, newJobStatus);
        
        try
        {
            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                newJobStatus = bhd.setJobStatus ((Job)this, newJobStatus);
                oldAndNewIdentical = HELPER_JobStatus.compare (_JobStatus, newJobStatus);
            }

            BusinessObjectParser.assertFieldCondition (newJobStatus != null, this, FIELD_JobStatus, "mandatory");
            

            if (FIELD_JobStatus_Validators.length > 0)
            {
                Object newJobStatusObj = HELPER_JobStatus.toObject (newJobStatus);

                if (newJobStatusObj != null)
                {
                    int     loopMax = FIELD_JobStatus_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Job.get (FIELD_JobStatus);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_JobStatus () != FieldWriteability.FALSE, "Field  JobStatus is not writeable");
            preJobStatusChange (newJobStatus);
            markFieldChange (FIELD_JobStatus);
            _JobStatus = newJobStatus;            
            postFieldChange (FIELD_JobStatus);
            postJobStatusChange ();
        }
    }

    /**
     * Get the attribute OpenDate
     */
    public Date getOpenDate ()
    {
        assertValid();
        Date valToReturn = _OpenDate;

            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                valToReturn = bhd.getOpenDate ((Job)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 preOpenDateChange (Date newOpenDate) 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 postOpenDateChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute OpenDate.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setOpenDate (Date newOpenDate) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_OpenDate.compare (_OpenDate, newOpenDate);
        
        try
        {
            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                newOpenDate = bhd.setOpenDate ((Job)this, newOpenDate);
                oldAndNewIdentical = HELPER_OpenDate.compare (_OpenDate, newOpenDate);
            }

            

            if (FIELD_OpenDate_Validators.length > 0)
            {
                Object newOpenDateObj = HELPER_OpenDate.toObject (newOpenDate);

                if (newOpenDateObj != null)
                {
                    int     loopMax = FIELD_OpenDate_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Job.get (FIELD_OpenDate);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_OpenDate () != FieldWriteability.FALSE, "Field  OpenDate is not writeable");
            preOpenDateChange (newOpenDate);
            markFieldChange (FIELD_OpenDate);
            _OpenDate = newOpenDate;            
            postFieldChange (FIELD_OpenDate);
            postOpenDateChange ();
        }
    }

    /**
     * Get the attribute ApplyBy
     */
    public Date getApplyBy ()
    {
        assertValid();
        Date valToReturn = _ApplyBy;

            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                valToReturn = bhd.getApplyBy ((Job)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 preApplyByChange (Date newApplyBy) 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 postApplyByChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute ApplyBy.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setApplyBy (Date newApplyBy) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_ApplyBy.compare (_ApplyBy, newApplyBy);
        
        try
        {
            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                newApplyBy = bhd.setApplyBy ((Job)this, newApplyBy);
                oldAndNewIdentical = HELPER_ApplyBy.compare (_ApplyBy, newApplyBy);
            }

            

            if (FIELD_ApplyBy_Validators.length > 0)
            {
                Object newApplyByObj = HELPER_ApplyBy.toObject (newApplyBy);

                if (newApplyByObj != null)
                {
                    int     loopMax = FIELD_ApplyBy_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Job.get (FIELD_ApplyBy);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_ApplyBy () != FieldWriteability.FALSE, "Field  ApplyBy is not writeable");
            preApplyByChange (newApplyBy);
            markFieldChange (FIELD_ApplyBy);
            _ApplyBy = newApplyBy;            
            postFieldChange (FIELD_ApplyBy);
            postApplyByChange ();
        }
    }

    /**
     * Get the attribute IncludeAssessmentCriteria
     */
    public Boolean getIncludeAssessmentCriteria ()
    {
        assertValid();
        Boolean valToReturn = _IncludeAssessmentCriteria;

            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                valToReturn = bhd.getIncludeAssessmentCriteria ((Job)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 preIncludeAssessmentCriteriaChange (Boolean newIncludeAssessmentCriteria) 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 postIncludeAssessmentCriteriaChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute IncludeAssessmentCriteria.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setIncludeAssessmentCriteria (Boolean newIncludeAssessmentCriteria) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_IncludeAssessmentCriteria.compare (_IncludeAssessmentCriteria, newIncludeAssessmentCriteria);
        
        try
        {
            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                newIncludeAssessmentCriteria = bhd.setIncludeAssessmentCriteria ((Job)this, newIncludeAssessmentCriteria);
                oldAndNewIdentical = HELPER_IncludeAssessmentCriteria.compare (_IncludeAssessmentCriteria, newIncludeAssessmentCriteria);
            }

            BusinessObjectParser.assertFieldCondition (newIncludeAssessmentCriteria != null, this, FIELD_IncludeAssessmentCriteria, "mandatory");
            

            if (FIELD_IncludeAssessmentCriteria_Validators.length > 0)
            {
                Object newIncludeAssessmentCriteriaObj = HELPER_IncludeAssessmentCriteria.toObject (newIncludeAssessmentCriteria);

                if (newIncludeAssessmentCriteriaObj != null)
                {
                    int     loopMax = FIELD_IncludeAssessmentCriteria_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Job.get (FIELD_IncludeAssessmentCriteria);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_IncludeAssessmentCriteria () != FieldWriteability.FALSE, "Field  IncludeAssessmentCriteria is not writeable");
            preIncludeAssessmentCriteriaChange (newIncludeAssessmentCriteria);
            markFieldChange (FIELD_IncludeAssessmentCriteria);
            _IncludeAssessmentCriteria = newIncludeAssessmentCriteria;            
            postFieldChange (FIELD_IncludeAssessmentCriteria);
            postIncludeAssessmentCriteriaChange ();
        }
    }

    /**
     * Get the attribute AssessmentType
     */
    public AssessmentType getAssessmentType ()
    {
        assertValid();
        AssessmentType valToReturn = _AssessmentType;

            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                valToReturn = bhd.getAssessmentType ((Job)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 preAssessmentTypeChange (AssessmentType newAssessmentType) 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 postAssessmentTypeChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute AssessmentType.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setAssessmentType (AssessmentType newAssessmentType) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_AssessmentType.compare (_AssessmentType, newAssessmentType);
        
        try
        {
            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                newAssessmentType = bhd.setAssessmentType ((Job)this, newAssessmentType);
                oldAndNewIdentical = HELPER_AssessmentType.compare (_AssessmentType, newAssessmentType);
            }

            BusinessObjectParser.assertFieldCondition (newAssessmentType != null, this, FIELD_AssessmentType, "mandatory");
            

            if (FIELD_AssessmentType_Validators.length > 0)
            {
                Object newAssessmentTypeObj = HELPER_AssessmentType.toObject (newAssessmentType);

                if (newAssessmentTypeObj != null)
                {
                    int     loopMax = FIELD_AssessmentType_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Job.get (FIELD_AssessmentType);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_AssessmentType () != FieldWriteability.FALSE, "Field  AssessmentType is not writeable");
            preAssessmentTypeChange (newAssessmentType);
            markFieldChange (FIELD_AssessmentType);
            _AssessmentType = newAssessmentType;            
            postFieldChange (FIELD_AssessmentType);
            postAssessmentTypeChange ();
        }
    }

    /**
     * Get the attribute RandomKey
     */
    public String getRandomKey ()
    {
        assertValid();
        String valToReturn = _RandomKey;

            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                valToReturn = bhd.getRandomKey ((Job)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 preRandomKeyChange (String newRandomKey) 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 postRandomKeyChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute RandomKey.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setRandomKey (String newRandomKey) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_RandomKey.compare (_RandomKey, newRandomKey);
        
        try
        {
            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                newRandomKey = bhd.setRandomKey ((Job)this, newRandomKey);
                oldAndNewIdentical = HELPER_RandomKey.compare (_RandomKey, newRandomKey);
            }

            

            if (FIELD_RandomKey_Validators.length > 0)
            {
                Object newRandomKeyObj = HELPER_RandomKey.toObject (newRandomKey);

                if (newRandomKeyObj != null)
                {
                    int     loopMax = FIELD_RandomKey_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Job.get (FIELD_RandomKey);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_RandomKey () != FieldWriteability.FALSE, "Field  RandomKey is not writeable");
            preRandomKeyChange (newRandomKey);
            markFieldChange (FIELD_RandomKey);
            _RandomKey = newRandomKey;            
            postFieldChange (FIELD_RandomKey);
            postRandomKeyChange ();
        }
    }

    /**
     * Get the attribute JobType
     */
    public JobType getJobType ()
    {
        assertValid();
        JobType valToReturn = _JobType;

            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                valToReturn = bhd.getJobType ((Job)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 preJobTypeChange (JobType newJobType) 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 postJobTypeChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute JobType.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setJobType (JobType newJobType) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_JobType.compare (_JobType, newJobType);
        
        try
        {
            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                newJobType = bhd.setJobType ((Job)this, newJobType);
                oldAndNewIdentical = HELPER_JobType.compare (_JobType, newJobType);
            }

            BusinessObjectParser.assertFieldCondition (newJobType != null, this, FIELD_JobType, "mandatory");
            

            if (FIELD_JobType_Validators.length > 0)
            {
                Object newJobTypeObj = HELPER_JobType.toObject (newJobType);

                if (newJobTypeObj != null)
                {
                    int     loopMax = FIELD_JobType_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Job.get (FIELD_JobType);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_JobType () != FieldWriteability.FALSE, "Field  JobType is not writeable");
            preJobTypeChange (newJobType);
            markFieldChange (FIELD_JobType);
            _JobType = newJobType;            
            postFieldChange (FIELD_JobType);
            postJobTypeChange ();
        }
    }

    /**
     * Get the attribute Email
     */
    public String getEmail ()
    {
        assertValid();
        String valToReturn = _Email;

            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                valToReturn = bhd.getEmail ((Job)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 preEmailChange (String newEmail) 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 postEmailChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute Email.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setEmail (String newEmail) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_Email.compare (_Email, newEmail);
        
        try
        {
            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                newEmail = bhd.setEmail ((Job)this, newEmail);
                oldAndNewIdentical = HELPER_Email.compare (_Email, newEmail);
            }

            

            if (FIELD_Email_Validators.length > 0)
            {
                Object newEmailObj = HELPER_Email.toObject (newEmail);

                if (newEmailObj != null)
                {
                    int     loopMax = FIELD_Email_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Job.get (FIELD_Email);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_Email () != FieldWriteability.FALSE, "Field  Email is not writeable");
            preEmailChange (newEmail);
            markFieldChange (FIELD_Email);
            _Email = newEmail;            
            postFieldChange (FIELD_Email);
            postEmailChange ();
        }
    }

    /**
     * Get the attribute CompletedDetails
     */
    public Boolean getCompletedDetails ()
    {
        assertValid();
        Boolean valToReturn = _CompletedDetails;

            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                valToReturn = bhd.getCompletedDetails ((Job)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 preCompletedDetailsChange (Boolean newCompletedDetails) 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 postCompletedDetailsChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute CompletedDetails.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setCompletedDetails (Boolean newCompletedDetails) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_CompletedDetails.compare (_CompletedDetails, newCompletedDetails);
        
        try
        {
            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                newCompletedDetails = bhd.setCompletedDetails ((Job)this, newCompletedDetails);
                oldAndNewIdentical = HELPER_CompletedDetails.compare (_CompletedDetails, newCompletedDetails);
            }

            

            if (FIELD_CompletedDetails_Validators.length > 0)
            {
                Object newCompletedDetailsObj = HELPER_CompletedDetails.toObject (newCompletedDetails);

                if (newCompletedDetailsObj != null)
                {
                    int     loopMax = FIELD_CompletedDetails_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Job.get (FIELD_CompletedDetails);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_CompletedDetails () != FieldWriteability.FALSE, "Field  CompletedDetails is not writeable");
            preCompletedDetailsChange (newCompletedDetails);
            markFieldChange (FIELD_CompletedDetails);
            _CompletedDetails = newCompletedDetails;            
            postFieldChange (FIELD_CompletedDetails);
            postCompletedDetailsChange ();
        }
    }

    /**
     * Get the attribute CompletedRequirements
     */
    public Boolean getCompletedRequirements ()
    {
        assertValid();
        Boolean valToReturn = _CompletedRequirements;

            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                valToReturn = bhd.getCompletedRequirements ((Job)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 preCompletedRequirementsChange (Boolean newCompletedRequirements) 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 postCompletedRequirementsChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute CompletedRequirements.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setCompletedRequirements (Boolean newCompletedRequirements) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_CompletedRequirements.compare (_CompletedRequirements, newCompletedRequirements);
        
        try
        {
            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                newCompletedRequirements = bhd.setCompletedRequirements ((Job)this, newCompletedRequirements);
                oldAndNewIdentical = HELPER_CompletedRequirements.compare (_CompletedRequirements, newCompletedRequirements);
            }

            

            if (FIELD_CompletedRequirements_Validators.length > 0)
            {
                Object newCompletedRequirementsObj = HELPER_CompletedRequirements.toObject (newCompletedRequirements);

                if (newCompletedRequirementsObj != null)
                {
                    int     loopMax = FIELD_CompletedRequirements_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Job.get (FIELD_CompletedRequirements);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_CompletedRequirements () != FieldWriteability.FALSE, "Field  CompletedRequirements is not writeable");
            preCompletedRequirementsChange (newCompletedRequirements);
            markFieldChange (FIELD_CompletedRequirements);
            _CompletedRequirements = newCompletedRequirements;            
            postFieldChange (FIELD_CompletedRequirements);
            postCompletedRequirementsChange ();
        }
    }

    /**
     * Get the attribute CompletedCulture
     */
    public Boolean getCompletedCulture ()
    {
        assertValid();
        Boolean valToReturn = _CompletedCulture;

            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                valToReturn = bhd.getCompletedCulture ((Job)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 preCompletedCultureChange (Boolean newCompletedCulture) 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 postCompletedCultureChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute CompletedCulture.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setCompletedCulture (Boolean newCompletedCulture) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_CompletedCulture.compare (_CompletedCulture, newCompletedCulture);
        
        try
        {
            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                newCompletedCulture = bhd.setCompletedCulture ((Job)this, newCompletedCulture);
                oldAndNewIdentical = HELPER_CompletedCulture.compare (_CompletedCulture, newCompletedCulture);
            }

            

            if (FIELD_CompletedCulture_Validators.length > 0)
            {
                Object newCompletedCultureObj = HELPER_CompletedCulture.toObject (newCompletedCulture);

                if (newCompletedCultureObj != null)
                {
                    int     loopMax = FIELD_CompletedCulture_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Job.get (FIELD_CompletedCulture);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_CompletedCulture () != FieldWriteability.FALSE, "Field  CompletedCulture is not writeable");
            preCompletedCultureChange (newCompletedCulture);
            markFieldChange (FIELD_CompletedCulture);
            _CompletedCulture = newCompletedCulture;            
            postFieldChange (FIELD_CompletedCulture);
            postCompletedCultureChange ();
        }
    }

    /**
     * Get the attribute CompletedAssessmentType
     */
    public Boolean getCompletedAssessmentType ()
    {
        assertValid();
        Boolean valToReturn = _CompletedAssessmentType;

            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                valToReturn = bhd.getCompletedAssessmentType ((Job)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 preCompletedAssessmentTypeChange (Boolean newCompletedAssessmentType) 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 postCompletedAssessmentTypeChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute CompletedAssessmentType.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setCompletedAssessmentType (Boolean newCompletedAssessmentType) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_CompletedAssessmentType.compare (_CompletedAssessmentType, newCompletedAssessmentType);
        
        try
        {
            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                newCompletedAssessmentType = bhd.setCompletedAssessmentType ((Job)this, newCompletedAssessmentType);
                oldAndNewIdentical = HELPER_CompletedAssessmentType.compare (_CompletedAssessmentType, newCompletedAssessmentType);
            }

            

            if (FIELD_CompletedAssessmentType_Validators.length > 0)
            {
                Object newCompletedAssessmentTypeObj = HELPER_CompletedAssessmentType.toObject (newCompletedAssessmentType);

                if (newCompletedAssessmentTypeObj != null)
                {
                    int     loopMax = FIELD_CompletedAssessmentType_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Job.get (FIELD_CompletedAssessmentType);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_CompletedAssessmentType () != FieldWriteability.FALSE, "Field  CompletedAssessmentType is not writeable");
            preCompletedAssessmentTypeChange (newCompletedAssessmentType);
            markFieldChange (FIELD_CompletedAssessmentType);
            _CompletedAssessmentType = newCompletedAssessmentType;            
            postFieldChange (FIELD_CompletedAssessmentType);
            postCompletedAssessmentTypeChange ();
        }
    }

    /**
     * Get the attribute SaveAssessmentTemplate
     */
    public Boolean getSaveAssessmentTemplate ()
    {
        assertValid();
        Boolean valToReturn = _SaveAssessmentTemplate;

            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                valToReturn = bhd.getSaveAssessmentTemplate ((Job)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 preSaveAssessmentTemplateChange (Boolean newSaveAssessmentTemplate) 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 postSaveAssessmentTemplateChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute SaveAssessmentTemplate.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setSaveAssessmentTemplate (Boolean newSaveAssessmentTemplate) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_SaveAssessmentTemplate.compare (_SaveAssessmentTemplate, newSaveAssessmentTemplate);
        
        try
        {
            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                newSaveAssessmentTemplate = bhd.setSaveAssessmentTemplate ((Job)this, newSaveAssessmentTemplate);
                oldAndNewIdentical = HELPER_SaveAssessmentTemplate.compare (_SaveAssessmentTemplate, newSaveAssessmentTemplate);
            }

            

            if (FIELD_SaveAssessmentTemplate_Validators.length > 0)
            {
                Object newSaveAssessmentTemplateObj = HELPER_SaveAssessmentTemplate.toObject (newSaveAssessmentTemplate);

                if (newSaveAssessmentTemplateObj != null)
                {
                    int     loopMax = FIELD_SaveAssessmentTemplate_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Job.get (FIELD_SaveAssessmentTemplate);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_SaveAssessmentTemplate () != FieldWriteability.FALSE, "Field  SaveAssessmentTemplate is not writeable");
            preSaveAssessmentTemplateChange (newSaveAssessmentTemplate);
            markFieldChange (FIELD_SaveAssessmentTemplate);
            _SaveAssessmentTemplate = newSaveAssessmentTemplate;            
            postFieldChange (FIELD_SaveAssessmentTemplate);
            postSaveAssessmentTemplateChange ();
        }
    }

    /**
     * Get the attribute SaveCultureTemplate
     */
    public Boolean getSaveCultureTemplate ()
    {
        assertValid();
        Boolean valToReturn = _SaveCultureTemplate;

            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                valToReturn = bhd.getSaveCultureTemplate ((Job)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 preSaveCultureTemplateChange (Boolean newSaveCultureTemplate) 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 postSaveCultureTemplateChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute SaveCultureTemplate.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setSaveCultureTemplate (Boolean newSaveCultureTemplate) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_SaveCultureTemplate.compare (_SaveCultureTemplate, newSaveCultureTemplate);
        
        try
        {
            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                newSaveCultureTemplate = bhd.setSaveCultureTemplate ((Job)this, newSaveCultureTemplate);
                oldAndNewIdentical = HELPER_SaveCultureTemplate.compare (_SaveCultureTemplate, newSaveCultureTemplate);
            }

            

            if (FIELD_SaveCultureTemplate_Validators.length > 0)
            {
                Object newSaveCultureTemplateObj = HELPER_SaveCultureTemplate.toObject (newSaveCultureTemplate);

                if (newSaveCultureTemplateObj != null)
                {
                    int     loopMax = FIELD_SaveCultureTemplate_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Job.get (FIELD_SaveCultureTemplate);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_SaveCultureTemplate () != FieldWriteability.FALSE, "Field  SaveCultureTemplate is not writeable");
            preSaveCultureTemplateChange (newSaveCultureTemplate);
            markFieldChange (FIELD_SaveCultureTemplate);
            _SaveCultureTemplate = newSaveCultureTemplate;            
            postFieldChange (FIELD_SaveCultureTemplate);
            postSaveCultureTemplateChange ();
        }
    }

    /**
     * Get the attribute AssessmentTemplateName
     */
    public String getAssessmentTemplateName ()
    {
        assertValid();
        String valToReturn = _AssessmentTemplateName;

            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                valToReturn = bhd.getAssessmentTemplateName ((Job)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 preAssessmentTemplateNameChange (String newAssessmentTemplateName) 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 postAssessmentTemplateNameChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute AssessmentTemplateName.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setAssessmentTemplateName (String newAssessmentTemplateName) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_AssessmentTemplateName.compare (_AssessmentTemplateName, newAssessmentTemplateName);
        
        try
        {
            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                newAssessmentTemplateName = bhd.setAssessmentTemplateName ((Job)this, newAssessmentTemplateName);
                oldAndNewIdentical = HELPER_AssessmentTemplateName.compare (_AssessmentTemplateName, newAssessmentTemplateName);
            }

            

            if (FIELD_AssessmentTemplateName_Validators.length > 0)
            {
                Object newAssessmentTemplateNameObj = HELPER_AssessmentTemplateName.toObject (newAssessmentTemplateName);

                if (newAssessmentTemplateNameObj != null)
                {
                    int     loopMax = FIELD_AssessmentTemplateName_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Job.get (FIELD_AssessmentTemplateName);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_AssessmentTemplateName () != FieldWriteability.FALSE, "Field  AssessmentTemplateName is not writeable");
            preAssessmentTemplateNameChange (newAssessmentTemplateName);
            markFieldChange (FIELD_AssessmentTemplateName);
            _AssessmentTemplateName = newAssessmentTemplateName;            
            postFieldChange (FIELD_AssessmentTemplateName);
            postAssessmentTemplateNameChange ();
        }
    }

    /**
     * Get the attribute CultureTemplateName
     */
    public String getCultureTemplateName ()
    {
        assertValid();
        String valToReturn = _CultureTemplateName;

            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                valToReturn = bhd.getCultureTemplateName ((Job)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 preCultureTemplateNameChange (String newCultureTemplateName) 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 postCultureTemplateNameChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute CultureTemplateName.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setCultureTemplateName (String newCultureTemplateName) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_CultureTemplateName.compare (_CultureTemplateName, newCultureTemplateName);
        
        try
        {
            for (JobBehaviourDecorator bhd : Job_BehaviourDecorators)
            {
                newCultureTemplateName = bhd.setCultureTemplateName ((Job)this, newCultureTemplateName);
                oldAndNewIdentical = HELPER_CultureTemplateName.compare (_CultureTemplateName, newCultureTemplateName);
            }

            

            if (FIELD_CultureTemplateName_Validators.length > 0)
            {
                Object newCultureTemplateNameObj = HELPER_CultureTemplateName.toObject (newCultureTemplateName);

                if (newCultureTemplateNameObj != null)
                {
                    int     loopMax = FIELD_CultureTemplateName_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Job.get (FIELD_CultureTemplateName);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_CultureTemplateName () != FieldWriteability.FALSE, "Field  CultureTemplateName is not writeable");
            preCultureTemplateNameChange (newCultureTemplateName);
            markFieldChange (FIELD_CultureTemplateName);
            _CultureTemplateName = newCultureTemplateName;            
            postFieldChange (FIELD_CultureTemplateName);
            postCultureTemplateNameChange ();
        }
    }



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

        
        result.add("AssessmentTemplate");
        
        result.add("CultureTemplate");
        
        result.add("JobTemplate");
        
        result.add("Level");
        
        result.add("SecUser");
        

        return result;
    }
    
    
    public BaseBusinessClass getSingleAssocReferenceInstance (String assocName)
    {
        if (assocName == null)
        {
            throw new RuntimeException ("Game over == null!");
        }
        else if (assocName.equals (SINGLEREFERENCE_AssessmentTemplate))
        {
            return _AssessmentTemplate.getReferencedType ();
        }else if (assocName.equals (SINGLEREFERENCE_CultureTemplate))
        {
            return _CultureTemplate.getReferencedType ();
        }else if (assocName.equals (SINGLEREFERENCE_JobTemplate))
        {
            return _JobTemplate.getReferencedType ();
        }else if (assocName.equals (SINGLEREFERENCE_Level))
        {
            return _Level.getReferencedType ();
        }else if (assocName.equals (SINGLEREFERENCE_SecUser))
        {
            return _SecUser.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_Level))
        {
            return null ;
        }else if (assocName.equals (SINGLEREFERENCE_SecUser))
        {
            return null ;
        }
        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_AssessmentTemplate))
        {
            return getAssessmentTemplate ();
        }else if (assocName.equals (SINGLEREFERENCE_CultureTemplate))
        {
            return getCultureTemplate ();
        }else if (assocName.equals (SINGLEREFERENCE_JobTemplate))
        {
            return getJobTemplate ();
        }else if (assocName.equals (SINGLEREFERENCE_Level))
        {
            return getLevel ();
        }else if (assocName.equals (SINGLEREFERENCE_SecUser))
        {
            return getSecUser ();
        }
        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_AssessmentTemplate))
        {
            return getAssessmentTemplate (getType);
        }else if (assocName.equals (SINGLEREFERENCE_CultureTemplate))
        {
            return getCultureTemplate (getType);
        }else if (assocName.equals (SINGLEREFERENCE_JobTemplate))
        {
            return getJobTemplate (getType);
        }else if (assocName.equals (SINGLEREFERENCE_Level))
        {
            return getLevel (getType);
        }else if (assocName.equals (SINGLEREFERENCE_SecUser))
        {
            return getSecUser (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_AssessmentTemplate))
        {
            return getAssessmentTemplateID ();
        }else if (assocName.equals (SINGLEREFERENCE_CultureTemplate))
        {
            return getCultureTemplateID ();
        }else if (assocName.equals (SINGLEREFERENCE_JobTemplate))
        {
            return getJobTemplateID ();
        }else if (assocName.equals (SINGLEREFERENCE_Level))
        {
            return getLevelID ();
        }else if (assocName.equals (SINGLEREFERENCE_SecUser))
        {
            return getSecUserID ();
        }
        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_AssessmentTemplate))
        {
            setAssessmentTemplate ((AssessmentCriteriaTemplate)(newValue));
        }else if (assocName.equals (SINGLEREFERENCE_CultureTemplate))
        {
            setCultureTemplate ((CultureCriteriaTemplate)(newValue));
        }else if (assocName.equals (SINGLEREFERENCE_JobTemplate))
        {
            setJobTemplate ((Job)(newValue));
        }else if (assocName.equals (SINGLEREFERENCE_Level))
        {
            setLevel ((Level)(newValue));
        }else if (assocName.equals (SINGLEREFERENCE_SecUser))
        {
            setSecUser ((SecUser)(newValue));
        }
        else
        {
            super.setSingleAssoc (assocName, newValue);
        }
    }



    /**
     * Get the reference AssessmentTemplate
     */
    public AssessmentCriteriaTemplate getAssessmentTemplate () throws StorageException
    {
        assertValid();
        
        try
        {
            return (AssessmentCriteriaTemplate)(_AssessmentTemplate.get ());
        }
        catch (ClassCastException e)
        {
            LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in Job:", this.getObjectID (), ", was trying to get AssessmentCriteriaTemplate:",  getAssessmentTemplateID ());
            LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _AssessmentTemplate.get ().getClass ());
            throw e;
        }
    }


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


    /**
     * Get the object id for the referenced object.  Does not force a DB access.
     */
    public Long getAssessmentTemplateID ()
    {
        assertValid();
        
        if (_AssessmentTemplate == null)
        {
            return null;
        }
        else
        {
            return _AssessmentTemplate.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 preAssessmentTemplateChange (AssessmentCriteriaTemplate newAssessmentTemplate) 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 postAssessmentTemplateChange () throws FieldException
    {
    }



    
    public FieldWriteability getWriteability_AssessmentTemplate ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }
    
    
    /**
     * Set the reference AssessmentTemplate.  Checks to ensure a new value
     * has been supplied.  If so, marks the reference as altered and sets it.
     */
    public void setAssessmentTemplate (AssessmentCriteriaTemplate newAssessmentTemplate) throws StorageException, FieldException
    {
        

        if (_AssessmentTemplate.wouldReferencedChange (newAssessmentTemplate))
        {
            assertValid();
            Debug.assertion (getWriteability_AssessmentTemplate () != FieldWriteability.FALSE, "Assoc AssessmentTemplate is not writeable");
            preAssessmentTemplateChange (newAssessmentTemplate);
            
                    _AssessmentTemplate.set (newAssessmentTemplate);
                
            postAssessmentTemplateChange ();
        }
    }

    /**
     * Get the reference CultureTemplate
     */
    public CultureCriteriaTemplate getCultureTemplate () throws StorageException
    {
        assertValid();
        
        try
        {
            return (CultureCriteriaTemplate)(_CultureTemplate.get ());
        }
        catch (ClassCastException e)
        {
            LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in Job:", this.getObjectID (), ", was trying to get CultureCriteriaTemplate:",  getCultureTemplateID ());
            LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _CultureTemplate.get ().getClass ());
            throw e;
        }
    }


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


    /**
     * Get the object id for the referenced object.  Does not force a DB access.
     */
    public Long getCultureTemplateID ()
    {
        assertValid();
        
        if (_CultureTemplate == null)
        {
            return null;
        }
        else
        {
            return _CultureTemplate.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 preCultureTemplateChange (CultureCriteriaTemplate newCultureTemplate) 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 postCultureTemplateChange () throws FieldException
    {
    }



    
    public FieldWriteability getWriteability_CultureTemplate ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }
    
    
    /**
     * Set the reference CultureTemplate.  Checks to ensure a new value
     * has been supplied.  If so, marks the reference as altered and sets it.
     */
    public void setCultureTemplate (CultureCriteriaTemplate newCultureTemplate) throws StorageException, FieldException
    {
        

        if (_CultureTemplate.wouldReferencedChange (newCultureTemplate))
        {
            assertValid();
            Debug.assertion (getWriteability_CultureTemplate () != FieldWriteability.FALSE, "Assoc CultureTemplate is not writeable");
            preCultureTemplateChange (newCultureTemplate);
            
                    _CultureTemplate.set (newCultureTemplate);
                
            postCultureTemplateChange ();
        }
    }

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


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


    /**
     * Get the object id for the referenced object.  Does not force a DB access.
     */
    public Long getJobTemplateID ()
    {
        assertValid();
        
        if (_JobTemplate == null)
        {
            return null;
        }
        else
        {
            return _JobTemplate.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 preJobTemplateChange (Job newJobTemplate) 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 postJobTemplateChange () throws FieldException
    {
    }



    
    public FieldWriteability getWriteability_JobTemplate ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }
    
    
    /**
     * Set the reference JobTemplate.  Checks to ensure a new value
     * has been supplied.  If so, marks the reference as altered and sets it.
     */
    public void setJobTemplate (Job newJobTemplate) throws StorageException, FieldException
    {
        

        if (_JobTemplate.wouldReferencedChange (newJobTemplate))
        {
            assertValid();
            Debug.assertion (getWriteability_JobTemplate () != FieldWriteability.FALSE, "Assoc JobTemplate is not writeable");
            preJobTemplateChange (newJobTemplate);
            
                    _JobTemplate.set (newJobTemplate);
                
            postJobTemplateChange ();
        }
    }

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


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


    /**
     * Get the object id for the referenced object.  Does not force a DB access.
     */
    public Long getLevelID ()
    {
        assertValid();
        
        if (_Level == null)
        {
            return null;
        }
        else
        {
            return _Level.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 preLevelChange (Level newLevel) 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 postLevelChange () throws FieldException
    {
    }



    
    public FieldWriteability getWriteability_Level ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }
    
    
    /**
     * Set the reference Level.  Checks to ensure a new value
     * has been supplied.  If so, marks the reference as altered and sets it.
     */
    public void setLevel (Level newLevel) throws StorageException, FieldException
    {
        BusinessObjectParser.assertFieldCondition (newLevel != null, this, SINGLEREFERENCE_Level, "mandatory");
        

        if (_Level.wouldReferencedChange (newLevel))
        {
            assertValid();
            Debug.assertion (getWriteability_Level () != FieldWriteability.FALSE, "Assoc Level is not writeable");
            preLevelChange (newLevel);
            
                    _Level.set (newLevel);
                
            postLevelChange ();
        }
    }

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


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


    /**
     * Get the object id for the referenced object.  Does not force a DB access.
     */
    public Long getSecUserID ()
    {
        assertValid();
        
        if (_SecUser == null)
        {
            return null;
        }
        else
        {
            return _SecUser.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 preSecUserChange (SecUser newSecUser) 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 postSecUserChange () throws FieldException
    {
    }



    
    public FieldWriteability getWriteability_SecUser ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }
    
    
    /**
     * Set the reference SecUser.  Checks to ensure a new value
     * has been supplied.  If so, marks the reference as altered and sets it.
     */
    public void setSecUser (SecUser newSecUser) throws StorageException, FieldException
    {
        

        if (_SecUser.wouldReferencedChange (newSecUser))
        {
            assertValid();
            Debug.assertion (getWriteability_SecUser () != FieldWriteability.FALSE, "Assoc SecUser is not writeable");
            preSecUserChange (newSecUser);
            
                    _SecUser.set (newSecUser);
                
            postSecUserChange ();
        }
    }

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

        
        result.add("JobApplications");
        
        result.add("AssessmentCriterias");
        
        result.add("CultureCriterias");
        

        return result;
    }


    /**
     * Get the reference instance for the multi assoc name.
     */
    public BaseBusinessClass getMultiAssocReferenceInstance(String attribName)
    {
        
        if (MULTIPLEREFERENCE_JobApplications.equals(attribName))
        {
            return JobApplication.REFERENCE_JobApplication ;
        }
        
        if (MULTIPLEREFERENCE_AssessmentCriterias.equals(attribName))
        {
            return AssessmentCriteria.REFERENCE_AssessmentCriteria ;
        }
        
        if (MULTIPLEREFERENCE_CultureCriterias.equals(attribName))
        {
            return CultureCriteria.REFERENCE_CultureCriteria ;
        }
        

        return super.getMultiAssocReferenceInstance(attribName);
    }


    public String getMultiAssocBackReference(String attribName)
    {
        
        if (MULTIPLEREFERENCE_JobApplications.equals(attribName))
        {
            return JobApplication.SINGLEREFERENCE_Job ;
        }
        
        if (MULTIPLEREFERENCE_AssessmentCriterias.equals(attribName))
        {
            return AssessmentCriteria.SINGLEREFERENCE_Job ;
        }
        
        if (MULTIPLEREFERENCE_CultureCriterias.equals(attribName))
        {
            return CultureCriteria.SINGLEREFERENCE_Job ;
        }
        

        return super.getMultiAssocBackReference(attribName);
    }


    /**
     * Get the assoc count for the multi assoc name.
     */
    public int getMultiAssocCount(String attribName) throws StorageException
    {
        
        if (MULTIPLEREFERENCE_JobApplications.equals(attribName))
        {
            return this.getJobApplicationsCount();
        }
        
        if (MULTIPLEREFERENCE_AssessmentCriterias.equals(attribName))
        {
            return this.getAssessmentCriteriasCount();
        }
        
        if (MULTIPLEREFERENCE_CultureCriterias.equals(attribName))
        {
            return this.getCultureCriteriasCount();
        }
        

        return super.getMultiAssocCount(attribName);
    }


    /**
     * Get the assoc at a particular index
     */
    public BaseBusinessClass getMultiAssocAt(String attribName, int index) throws StorageException
    {
        
        if (MULTIPLEREFERENCE_JobApplications.equals(attribName))
        {
            return this.getJobApplicationsAt(index);
        }
        
        if (MULTIPLEREFERENCE_AssessmentCriterias.equals(attribName))
        {
            return this.getAssessmentCriteriasAt(index);
        }
        
        if (MULTIPLEREFERENCE_CultureCriterias.equals(attribName))
        {
            return this.getCultureCriteriasAt(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_JobApplications.equals(attribName))
        {
            addToJobApplications((JobApplication)newElement);

            return;
        }
        
        if (MULTIPLEREFERENCE_AssessmentCriterias.equals(attribName))
        {
            addToAssessmentCriterias((AssessmentCriteria)newElement);

            return;
        }
        
        if (MULTIPLEREFERENCE_CultureCriterias.equals(attribName))
        {
            addToCultureCriterias((CultureCriteria)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_JobApplications.equals(attribName))
        {
            removeFromJobApplications((JobApplication)oldElement);

            return;
        }
        
        if (MULTIPLEREFERENCE_AssessmentCriterias.equals(attribName))
        {
            removeFromAssessmentCriterias((AssessmentCriteria)oldElement);

            return;
        }
        
        if (MULTIPLEREFERENCE_CultureCriterias.equals(attribName))
        {
            removeFromCultureCriterias((CultureCriteria)oldElement);

            return;
        }
        

        super.removeFromMultiAssoc(attribName, oldElement);
    }


    protected void __loadMultiAssoc (String attribName, BaseBusinessClass[] elements)
    {
        
        if (MULTIPLEREFERENCE_JobApplications.equals(attribName))
        {
            _JobApplications.__loadAssociation (elements);
            return;
        }
        
        if (MULTIPLEREFERENCE_AssessmentCriterias.equals(attribName))
        {
            _AssessmentCriterias.__loadAssociation (elements);
            return;
        }
        
        if (MULTIPLEREFERENCE_CultureCriterias.equals(attribName))
        {
            _CultureCriterias.__loadAssociation (elements);
            return;
        }
        

        super.__loadMultiAssoc(attribName, elements);
    }


    protected boolean __isMultiAssocLoaded (String attribName)
    {
        
        if (MULTIPLEREFERENCE_JobApplications.equals(attribName))
        {
            return _JobApplications.isLoaded ();
        }
        
        if (MULTIPLEREFERENCE_AssessmentCriterias.equals(attribName))
        {
            return _AssessmentCriterias.isLoaded ();
        }
        
        if (MULTIPLEREFERENCE_CultureCriterias.equals(attribName))
        {
            return _CultureCriterias.isLoaded ();
        }
        

        return super.__isMultiAssocLoaded(attribName);
    }

    

    public FieldWriteability getWriteability_JobApplications ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }
    
    
    public int getJobApplicationsCount () throws StorageException
    {
        assertValid();
        return _JobApplications.getReferencedObjectsCount ();
    }


    public void addToJobApplications (JobApplication newElement) throws StorageException
    {
        if (_JobApplications.wouldAddChange (newElement))
        {
            assertValid();
            Debug.assertion (getWriteability_JobApplications () != FieldWriteability.FALSE, "MultiAssoc JobApplications is not writeable (add)");
            _JobApplications.appendElement (newElement);

            try
            {
                if (newElement.getJob () != this)
                {
                    newElement.setJob ((Job)(this));
                }
            }
            catch (Exception e)
            {
                throw NestedException.wrap(e);
            }
        }
    }


    public void removeFromJobApplications (JobApplication elementToRemove) throws StorageException
    {
        if (_JobApplications.wouldRemoveChange (elementToRemove))
        {
            assertValid();
            Debug.assertion (getWriteability_JobApplications () != FieldWriteability.FALSE, "MultiAssoc JobApplications is not writeable (remove)");
            _JobApplications.removeElement (elementToRemove);
            try
            {
                if (elementToRemove.getJob () != null)
                {
                    elementToRemove.setJob (null);
                }
            }
            catch (Exception e)
            {
                throw NestedException.wrap(e);
            }
        }
    }


    public JobApplication getJobApplicationsAt (int index) throws StorageException
    {
        return (JobApplication)(_JobApplications.getElementAt (index));
    }


    public SortedSet<JobApplication> getJobApplicationsSet () throws StorageException
    {
        return _JobApplications.getSet ();
    }

    public FieldWriteability getWriteability_AssessmentCriterias ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }
    
    
    public int getAssessmentCriteriasCount () throws StorageException
    {
        assertValid();
        return _AssessmentCriterias.getReferencedObjectsCount ();
    }


    public void addToAssessmentCriterias (AssessmentCriteria newElement) throws StorageException
    {
        if (_AssessmentCriterias.wouldAddChange (newElement))
        {
            assertValid();
            Debug.assertion (getWriteability_AssessmentCriterias () != FieldWriteability.FALSE, "MultiAssoc AssessmentCriterias is not writeable (add)");
            _AssessmentCriterias.appendElement (newElement);

            try
            {
                if (newElement.getJob () != this)
                {
                    newElement.setJob ((Job)(this));
                }
            }
            catch (Exception e)
            {
                throw NestedException.wrap(e);
            }
        }
    }


    public void removeFromAssessmentCriterias (AssessmentCriteria elementToRemove) throws StorageException
    {
        if (_AssessmentCriterias.wouldRemoveChange (elementToRemove))
        {
            assertValid();
            Debug.assertion (getWriteability_AssessmentCriterias () != FieldWriteability.FALSE, "MultiAssoc AssessmentCriterias is not writeable (remove)");
            _AssessmentCriterias.removeElement (elementToRemove);
            try
            {
                if (elementToRemove.getJob () != null)
                {
                    elementToRemove.setJob (null);
                }
            }
            catch (Exception e)
            {
                throw NestedException.wrap(e);
            }
        }
    }


    public AssessmentCriteria getAssessmentCriteriasAt (int index) throws StorageException
    {
        return (AssessmentCriteria)(_AssessmentCriterias.getElementAt (index));
    }


    public SortedSet<AssessmentCriteria> getAssessmentCriteriasSet () throws StorageException
    {
        return _AssessmentCriterias.getSet ();
    }

    public FieldWriteability getWriteability_CultureCriterias ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }
    
    
    public int getCultureCriteriasCount () throws StorageException
    {
        assertValid();
        return _CultureCriterias.getReferencedObjectsCount ();
    }


    public void addToCultureCriterias (CultureCriteria newElement) throws StorageException
    {
        if (_CultureCriterias.wouldAddChange (newElement))
        {
            assertValid();
            Debug.assertion (getWriteability_CultureCriterias () != FieldWriteability.FALSE, "MultiAssoc CultureCriterias is not writeable (add)");
            _CultureCriterias.appendElement (newElement);

            try
            {
                if (newElement.getJob () != this)
                {
                    newElement.setJob ((Job)(this));
                }
            }
            catch (Exception e)
            {
                throw NestedException.wrap(e);
            }
        }
    }


    public void removeFromCultureCriterias (CultureCriteria elementToRemove) throws StorageException
    {
        if (_CultureCriterias.wouldRemoveChange (elementToRemove))
        {
            assertValid();
            Debug.assertion (getWriteability_CultureCriterias () != FieldWriteability.FALSE, "MultiAssoc CultureCriterias is not writeable (remove)");
            _CultureCriterias.removeElement (elementToRemove);
            try
            {
                if (elementToRemove.getJob () != null)
                {
                    elementToRemove.setJob (null);
                }
            }
            catch (Exception e)
            {
                throw NestedException.wrap(e);
            }
        }
    }


    public CultureCriteria getCultureCriteriasAt (int index) throws StorageException
    {
        return (CultureCriteria)(_CultureCriterias.getElementAt (index));
    }


    public SortedSet<CultureCriteria> getCultureCriteriasSet () throws StorageException
    {
        return _CultureCriterias.getSet ();
    }



    public void onDelete ()
    {
        try 
        {
            for(JobApplication referenced : CollectionUtils.reverse(getJobApplicationsSet()))
            { 
                LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null Job from ", getObjectID (), " to ", referenced.getObjectID ());
                referenced.setJob(null);
            }

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

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

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

        super.onDelete ();
    }


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


    public Job referenceInstance ()
    {
        return REFERENCE_Job;
    }


    public Job getInTransaction (ObjectTransaction t) throws StorageException
    {
        return getJobByID (t, getObjectID());
    }
    
    
    public BaseBusinessClass dummyInstance ()
    {
        return DUMMY_Job;
    }


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





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

        tl_jobPSet.setAttrib (FIELD_ObjectID, myID);
        tl_jobPSet.setAttrib (FIELD_JobTitle, HELPER_JobTitle.toObject (_JobTitle)); //
        tl_jobPSet.setAttrib (FIELD_JobDescription, HELPER_JobDescription.toObject (_JobDescription)); //
        tl_jobPSet.setAttrib (FIELD_JobStatus, HELPER_JobStatus.toObject (_JobStatus)); //
        tl_jobPSet.setAttrib (FIELD_OpenDate, HELPER_OpenDate.toObject (_OpenDate)); //
        tl_jobPSet.setAttrib (FIELD_ApplyBy, HELPER_ApplyBy.toObject (_ApplyBy)); //
        tl_jobPSet.setAttrib (FIELD_IncludeAssessmentCriteria, HELPER_IncludeAssessmentCriteria.toObject (_IncludeAssessmentCriteria)); //
        tl_jobPSet.setAttrib (FIELD_AssessmentType, HELPER_AssessmentType.toObject (_AssessmentType)); //
        tl_jobPSet.setAttrib (FIELD_RandomKey, HELPER_RandomKey.toObject (_RandomKey)); //
        tl_jobPSet.setAttrib (FIELD_JobType, HELPER_JobType.toObject (_JobType)); //
        _Level.getPersistentSets (allSets);
        _SecUser.getPersistentSets (allSets);
        
    }


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

        
        PersistentSet   tl_jobPSet = allSets.getPersistentSet (objectID, "tl_job");

        _JobTitle = (String)(HELPER_JobTitle.fromObject (_JobTitle, tl_jobPSet.getAttrib (FIELD_JobTitle))); //
        _JobDescription = (String)(HELPER_JobDescription.fromObject (_JobDescription, tl_jobPSet.getAttrib (FIELD_JobDescription))); //
        _JobStatus = (JobStatus)(HELPER_JobStatus.fromObject (_JobStatus, tl_jobPSet.getAttrib (FIELD_JobStatus))); //
        _OpenDate = (Date)(HELPER_OpenDate.fromObject (_OpenDate, tl_jobPSet.getAttrib (FIELD_OpenDate))); //
        _ApplyBy = (Date)(HELPER_ApplyBy.fromObject (_ApplyBy, tl_jobPSet.getAttrib (FIELD_ApplyBy))); //
        _IncludeAssessmentCriteria = (Boolean)(HELPER_IncludeAssessmentCriteria.fromObject (_IncludeAssessmentCriteria, tl_jobPSet.getAttrib (FIELD_IncludeAssessmentCriteria))); //
        _AssessmentType = (AssessmentType)(HELPER_AssessmentType.fromObject (_AssessmentType, tl_jobPSet.getAttrib (FIELD_AssessmentType))); //
        _RandomKey = (String)(HELPER_RandomKey.fromObject (_RandomKey, tl_jobPSet.getAttrib (FIELD_RandomKey))); //
        _JobType = (JobType)(HELPER_JobType.fromObject (_JobType, tl_jobPSet.getAttrib (FIELD_JobType))); //
        _Level.setFromPersistentSets (objectID, allSets);
        _SecUser.setFromPersistentSets (objectID, allSets);
        
    }





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

        if (other instanceof Job)
        {
            Job otherJob = (Job)other;
            
            try
            {
                setJobTitle (otherJob.getJobTitle ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setJobDescription (otherJob.getJobDescription ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setJobStatus (otherJob.getJobStatus ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setOpenDate (otherJob.getOpenDate ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setApplyBy (otherJob.getApplyBy ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setIncludeAssessmentCriteria (otherJob.getIncludeAssessmentCriteria ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setAssessmentType (otherJob.getAssessmentType ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setRandomKey (otherJob.getRandomKey ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setJobType (otherJob.getJobType ());
            }
            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 BaseJob)
        {
            BaseJob sourceJob = (BaseJob)(source);

            _JobTitle = sourceJob._JobTitle;
            _JobDescription = sourceJob._JobDescription;
            _JobStatus = sourceJob._JobStatus;
            _OpenDate = sourceJob._OpenDate;
            _ApplyBy = sourceJob._ApplyBy;
            _IncludeAssessmentCriteria = sourceJob._IncludeAssessmentCriteria;
            _AssessmentType = sourceJob._AssessmentType;
            _RandomKey = sourceJob._RandomKey;
            _JobType = sourceJob._JobType;
            _Email = sourceJob._Email;
            _CompletedDetails = sourceJob._CompletedDetails;
            _CompletedRequirements = sourceJob._CompletedRequirements;
            _CompletedCulture = sourceJob._CompletedCulture;
            _CompletedAssessmentType = sourceJob._CompletedAssessmentType;
            _SaveAssessmentTemplate = sourceJob._SaveAssessmentTemplate;
            _SaveCultureTemplate = sourceJob._SaveCultureTemplate;
            _AssessmentTemplateName = sourceJob._AssessmentTemplateName;
            _CultureTemplateName = sourceJob._CultureTemplateName;
            
        }
    }


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

            _AssessmentTemplate.copyFrom (sourceJob._AssessmentTemplate, linkToGhosts);
            _CultureTemplate.copyFrom (sourceJob._CultureTemplate, linkToGhosts);
            _JobTemplate.copyFrom (sourceJob._JobTemplate, linkToGhosts);
            _Level.copyFrom (sourceJob._Level, linkToGhosts);
            _SecUser.copyFrom (sourceJob._SecUser, 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 BaseJob)
        {
            BaseJob sourceJob = (BaseJob)(source);

            _JobApplications.copyFrom (sourceJob._JobApplications, linkToGhosts);
            _AssessmentCriterias.copyFrom (sourceJob._AssessmentCriterias, linkToGhosts);
            _CultureCriterias.copyFrom (sourceJob._CultureCriterias, linkToGhosts);
            
        }
    }


    public void validate (ValidationContext context)
    {
        super.validate (context);

        
        context.check (getLevelID() != null, this, SINGLEREFERENCE_Level, "mandatory");
        
    }


    /**
     * Subclasses must override this to read in their attributes
     */
    protected void readExternalData(Map<String, Object> vals) throws IOException, ClassNotFoundException
    {
        super.readExternalData(vals);

        _JobTitle = (String)(HELPER_JobTitle.readExternal (_JobTitle, vals.get(FIELD_JobTitle))); //
        _JobDescription = (String)(HELPER_JobDescription.readExternal (_JobDescription, vals.get(FIELD_JobDescription))); //
        _JobStatus = (JobStatus)(HELPER_JobStatus.readExternal (_JobStatus, vals.get(FIELD_JobStatus))); //
        _OpenDate = (Date)(HELPER_OpenDate.readExternal (_OpenDate, vals.get(FIELD_OpenDate))); //
        _ApplyBy = (Date)(HELPER_ApplyBy.readExternal (_ApplyBy, vals.get(FIELD_ApplyBy))); //
        _IncludeAssessmentCriteria = (Boolean)(HELPER_IncludeAssessmentCriteria.readExternal (_IncludeAssessmentCriteria, vals.get(FIELD_IncludeAssessmentCriteria))); //
        _AssessmentType = (AssessmentType)(HELPER_AssessmentType.readExternal (_AssessmentType, vals.get(FIELD_AssessmentType))); //
        _RandomKey = (String)(HELPER_RandomKey.readExternal (_RandomKey, vals.get(FIELD_RandomKey))); //
        _JobType = (JobType)(HELPER_JobType.readExternal (_JobType, vals.get(FIELD_JobType))); //
        _Email = (String)(HELPER_Email.readExternal (_Email, vals.get(FIELD_Email))); //
        _CompletedDetails = (Boolean)(HELPER_CompletedDetails.readExternal (_CompletedDetails, vals.get(FIELD_CompletedDetails))); //
        _CompletedRequirements = (Boolean)(HELPER_CompletedRequirements.readExternal (_CompletedRequirements, vals.get(FIELD_CompletedRequirements))); //
        _CompletedCulture = (Boolean)(HELPER_CompletedCulture.readExternal (_CompletedCulture, vals.get(FIELD_CompletedCulture))); //
        _CompletedAssessmentType = (Boolean)(HELPER_CompletedAssessmentType.readExternal (_CompletedAssessmentType, vals.get(FIELD_CompletedAssessmentType))); //
        _SaveAssessmentTemplate = (Boolean)(HELPER_SaveAssessmentTemplate.readExternal (_SaveAssessmentTemplate, vals.get(FIELD_SaveAssessmentTemplate))); //
        _SaveCultureTemplate = (Boolean)(HELPER_SaveCultureTemplate.readExternal (_SaveCultureTemplate, vals.get(FIELD_SaveCultureTemplate))); //
        _AssessmentTemplateName = (String)(HELPER_AssessmentTemplateName.readExternal (_AssessmentTemplateName, vals.get(FIELD_AssessmentTemplateName))); //
        _CultureTemplateName = (String)(HELPER_CultureTemplateName.readExternal (_CultureTemplateName, vals.get(FIELD_CultureTemplateName))); //
        _AssessmentTemplate.readExternalData(vals.get(SINGLEREFERENCE_AssessmentTemplate));
        _CultureTemplate.readExternalData(vals.get(SINGLEREFERENCE_CultureTemplate));
        _JobTemplate.readExternalData(vals.get(SINGLEREFERENCE_JobTemplate));
        _Level.readExternalData(vals.get(SINGLEREFERENCE_Level));
        _SecUser.readExternalData(vals.get(SINGLEREFERENCE_SecUser));
        _JobApplications.readExternalData(vals.get(MULTIPLEREFERENCE_JobApplications));
        _AssessmentCriterias.readExternalData(vals.get(MULTIPLEREFERENCE_AssessmentCriterias));
        _CultureCriterias.readExternalData(vals.get(MULTIPLEREFERENCE_CultureCriterias));
        
    }


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

        vals.put (FIELD_JobTitle, HELPER_JobTitle.writeExternal (_JobTitle));
        vals.put (FIELD_JobDescription, HELPER_JobDescription.writeExternal (_JobDescription));
        vals.put (FIELD_JobStatus, HELPER_JobStatus.writeExternal (_JobStatus));
        vals.put (FIELD_OpenDate, HELPER_OpenDate.writeExternal (_OpenDate));
        vals.put (FIELD_ApplyBy, HELPER_ApplyBy.writeExternal (_ApplyBy));
        vals.put (FIELD_IncludeAssessmentCriteria, HELPER_IncludeAssessmentCriteria.writeExternal (_IncludeAssessmentCriteria));
        vals.put (FIELD_AssessmentType, HELPER_AssessmentType.writeExternal (_AssessmentType));
        vals.put (FIELD_RandomKey, HELPER_RandomKey.writeExternal (_RandomKey));
        vals.put (FIELD_JobType, HELPER_JobType.writeExternal (_JobType));
        vals.put (FIELD_Email, HELPER_Email.writeExternal (_Email));
        vals.put (FIELD_CompletedDetails, HELPER_CompletedDetails.writeExternal (_CompletedDetails));
        vals.put (FIELD_CompletedRequirements, HELPER_CompletedRequirements.writeExternal (_CompletedRequirements));
        vals.put (FIELD_CompletedCulture, HELPER_CompletedCulture.writeExternal (_CompletedCulture));
        vals.put (FIELD_CompletedAssessmentType, HELPER_CompletedAssessmentType.writeExternal (_CompletedAssessmentType));
        vals.put (FIELD_SaveAssessmentTemplate, HELPER_SaveAssessmentTemplate.writeExternal (_SaveAssessmentTemplate));
        vals.put (FIELD_SaveCultureTemplate, HELPER_SaveCultureTemplate.writeExternal (_SaveCultureTemplate));
        vals.put (FIELD_AssessmentTemplateName, HELPER_AssessmentTemplateName.writeExternal (_AssessmentTemplateName));
        vals.put (FIELD_CultureTemplateName, HELPER_CultureTemplateName.writeExternal (_CultureTemplateName));
        vals.put (SINGLEREFERENCE_AssessmentTemplate, _AssessmentTemplate.writeExternalData());
        vals.put (SINGLEREFERENCE_CultureTemplate, _CultureTemplate.writeExternalData());
        vals.put (SINGLEREFERENCE_JobTemplate, _JobTemplate.writeExternalData());
        vals.put (SINGLEREFERENCE_Level, _Level.writeExternalData());
        vals.put (SINGLEREFERENCE_SecUser, _SecUser.writeExternalData());
        vals.put (MULTIPLEREFERENCE_JobApplications, _JobApplications.writeExternalData());
        vals.put (MULTIPLEREFERENCE_AssessmentCriterias, _AssessmentCriterias.writeExternalData());
        vals.put (MULTIPLEREFERENCE_CultureCriterias, _CultureCriterias.writeExternalData());
        
    }


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

        if (other instanceof BaseJob)
        {
            BaseJob otherJob = (BaseJob)(other);

            
            if (!HELPER_JobTitle.compare(this._JobTitle, otherJob._JobTitle))
            {
                listener.notifyFieldChange(this, other, FIELD_JobTitle, HELPER_JobTitle.toObject(this._JobTitle), HELPER_JobTitle.toObject(otherJob._JobTitle));
            }
            if (!HELPER_JobDescription.compare(this._JobDescription, otherJob._JobDescription))
            {
                listener.notifyFieldChange(this, other, FIELD_JobDescription, HELPER_JobDescription.toObject(this._JobDescription), HELPER_JobDescription.toObject(otherJob._JobDescription));
            }
            if (!HELPER_JobStatus.compare(this._JobStatus, otherJob._JobStatus))
            {
                listener.notifyFieldChange(this, other, FIELD_JobStatus, HELPER_JobStatus.toObject(this._JobStatus), HELPER_JobStatus.toObject(otherJob._JobStatus));
            }
            if (!HELPER_OpenDate.compare(this._OpenDate, otherJob._OpenDate))
            {
                listener.notifyFieldChange(this, other, FIELD_OpenDate, HELPER_OpenDate.toObject(this._OpenDate), HELPER_OpenDate.toObject(otherJob._OpenDate));
            }
            if (!HELPER_ApplyBy.compare(this._ApplyBy, otherJob._ApplyBy))
            {
                listener.notifyFieldChange(this, other, FIELD_ApplyBy, HELPER_ApplyBy.toObject(this._ApplyBy), HELPER_ApplyBy.toObject(otherJob._ApplyBy));
            }
            if (!HELPER_IncludeAssessmentCriteria.compare(this._IncludeAssessmentCriteria, otherJob._IncludeAssessmentCriteria))
            {
                listener.notifyFieldChange(this, other, FIELD_IncludeAssessmentCriteria, HELPER_IncludeAssessmentCriteria.toObject(this._IncludeAssessmentCriteria), HELPER_IncludeAssessmentCriteria.toObject(otherJob._IncludeAssessmentCriteria));
            }
            if (!HELPER_AssessmentType.compare(this._AssessmentType, otherJob._AssessmentType))
            {
                listener.notifyFieldChange(this, other, FIELD_AssessmentType, HELPER_AssessmentType.toObject(this._AssessmentType), HELPER_AssessmentType.toObject(otherJob._AssessmentType));
            }
            if (!HELPER_RandomKey.compare(this._RandomKey, otherJob._RandomKey))
            {
                listener.notifyFieldChange(this, other, FIELD_RandomKey, HELPER_RandomKey.toObject(this._RandomKey), HELPER_RandomKey.toObject(otherJob._RandomKey));
            }
            if (!HELPER_JobType.compare(this._JobType, otherJob._JobType))
            {
                listener.notifyFieldChange(this, other, FIELD_JobType, HELPER_JobType.toObject(this._JobType), HELPER_JobType.toObject(otherJob._JobType));
            }

            // Compare single assocs
            _AssessmentTemplate.compare (otherJob._AssessmentTemplate, listener);
            _CultureTemplate.compare (otherJob._CultureTemplate, listener);
            _JobTemplate.compare (otherJob._JobTemplate, listener);
            _Level.compare (otherJob._Level, listener);
            _SecUser.compare (otherJob._SecUser, listener);
            

            // Compare multiple assocs
            _JobApplications.compare (otherJob._JobApplications, listener);
            _AssessmentCriterias.compare (otherJob._AssessmentCriterias, listener);
            _CultureCriterias.compare (otherJob._CultureCriterias, listener);
            
        }
    }


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

        visitor.visitField(this, FIELD_Email, HELPER_Email.toObject(getEmail()));
        visitor.visitField(this, FIELD_CompletedDetails, HELPER_CompletedDetails.toObject(getCompletedDetails()));
        visitor.visitField(this, FIELD_CompletedRequirements, HELPER_CompletedRequirements.toObject(getCompletedRequirements()));
        visitor.visitField(this, FIELD_CompletedCulture, HELPER_CompletedCulture.toObject(getCompletedCulture()));
        visitor.visitField(this, FIELD_CompletedAssessmentType, HELPER_CompletedAssessmentType.toObject(getCompletedAssessmentType()));
        visitor.visitField(this, FIELD_SaveAssessmentTemplate, HELPER_SaveAssessmentTemplate.toObject(getSaveAssessmentTemplate()));
        visitor.visitField(this, FIELD_SaveCultureTemplate, HELPER_SaveCultureTemplate.toObject(getSaveCultureTemplate()));
        visitor.visitField(this, FIELD_AssessmentTemplateName, HELPER_AssessmentTemplateName.toObject(getAssessmentTemplateName()));
        visitor.visitField(this, FIELD_CultureTemplateName, HELPER_CultureTemplateName.toObject(getCultureTemplateName()));
        
    }


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

        visitor.visitField(this, FIELD_JobTitle, HELPER_JobTitle.toObject(getJobTitle()));
        visitor.visitField(this, FIELD_JobDescription, HELPER_JobDescription.toObject(getJobDescription()));
        visitor.visitField(this, FIELD_JobStatus, HELPER_JobStatus.toObject(getJobStatus()));
        visitor.visitField(this, FIELD_OpenDate, HELPER_OpenDate.toObject(getOpenDate()));
        visitor.visitField(this, FIELD_ApplyBy, HELPER_ApplyBy.toObject(getApplyBy()));
        visitor.visitField(this, FIELD_IncludeAssessmentCriteria, HELPER_IncludeAssessmentCriteria.toObject(getIncludeAssessmentCriteria()));
        visitor.visitField(this, FIELD_AssessmentType, HELPER_AssessmentType.toObject(getAssessmentType()));
        visitor.visitField(this, FIELD_RandomKey, HELPER_RandomKey.toObject(getRandomKey()));
        visitor.visitField(this, FIELD_JobType, HELPER_JobType.toObject(getJobType()));
        visitor.visitAssociation (_AssessmentTemplate);
        visitor.visitAssociation (_CultureTemplate);
        visitor.visitAssociation (_JobTemplate);
        visitor.visitAssociation (_Level);
        visitor.visitAssociation (_SecUser);
        visitor.visitAssociation (_JobApplications);
        visitor.visitAssociation (_AssessmentCriterias);
        visitor.visitAssociation (_CultureCriterias);
        
    }


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

        if (scope.includes (_AssessmentTemplate))
        {
            visitor.visit (_AssessmentTemplate);
        }
        if (scope.includes (_CultureTemplate))
        {
            visitor.visit (_CultureTemplate);
        }
        if (scope.includes (_JobTemplate))
        {
            visitor.visit (_JobTemplate);
        }
        if (scope.includes (_Level))
        {
            visitor.visit (_Level);
        }
        if (scope.includes (_SecUser))
        {
            visitor.visit (_SecUser);
        }
        if (scope.includes (_JobApplications))
        {
            visitor.visit (_JobApplications);
        }
        if (scope.includes (_AssessmentCriterias))
        {
            visitor.visit (_AssessmentCriterias);
        }
        if (scope.includes (_CultureCriterias))
        {
            visitor.visit (_CultureCriterias);
        }
        
    }


    public static Job createJob (ObjectTransaction transaction) throws StorageException
    {
        Job     result = new Job ();

        result.initialiseNewObject (transaction);

        return result;
    }


    public static Job getJobByID (ObjectTransaction transaction, Long objectID) throws StorageException
    {
        return (Job)(transaction.getObjectByID (REFERENCE_Job, objectID));
    }

    public boolean testFilter (String attribName, QueryFilter filter) throws StorageException
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (attribName.equals (FIELD_JobTitle))
        {
            return filter.matches (getJobTitle ());
        }
        else if (attribName.equals (FIELD_JobDescription))
        {
            return filter.matches (getJobDescription ());
        }
        else if (attribName.equals (FIELD_JobStatus))
        {
            return filter.matches (getJobStatus ());
        }
        else if (attribName.equals (FIELD_OpenDate))
        {
            return filter.matches (getOpenDate ());
        }
        else if (attribName.equals (FIELD_ApplyBy))
        {
            return filter.matches (getApplyBy ());
        }
        else if (attribName.equals (FIELD_IncludeAssessmentCriteria))
        {
            return filter.matches (getIncludeAssessmentCriteria ());
        }
        else if (attribName.equals (FIELD_AssessmentType))
        {
            return filter.matches (getAssessmentType ());
        }
        else if (attribName.equals (FIELD_RandomKey))
        {
            return filter.matches (getRandomKey ());
        }
        else if (attribName.equals (FIELD_JobType))
        {
            return filter.matches (getJobType ());
        }
        else if (attribName.equals (SINGLEREFERENCE_Level))
        {
            return filter.matches (getLevel ());
        }
        else if (attribName.equals (SINGLEREFERENCE_SecUser))
        {
            return filter.matches (getSecUser ());
        }
        else
        {
            return super.testFilter (attribName, filter);
        }
    }


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

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

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

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

            
            public SearchAll andJobTitle (QueryFilter<String> filter)
            {
                filter.addFilter (context, "tl_job.job_title", "JobTitle");
                return this;
            }
            
            public SearchAll andJobDescription (QueryFilter<String> filter)
            {
                filter.addFilter (context, "tl_job.job_description", "JobDescription");
                return this;
            }
            
            public SearchAll andJobStatus (QueryFilter<JobStatus> filter)
            {
                filter.addFilter (context, "tl_job.job_status", "JobStatus");
                return this;
            }
            
            public SearchAll andOpenDate (QueryFilter<Date> filter)
            {
                filter.addFilter (context, "tl_job.open_date", "OpenDate");
                return this;
            }
            
            public SearchAll andApplyBy (QueryFilter<Date> filter)
            {
                filter.addFilter (context, "tl_job.apply_by", "ApplyBy");
                return this;
            }
            
            public SearchAll andIncludeAssessmentCriteria (QueryFilter<Boolean> filter)
            {
                filter.addFilter (context, "tl_job.include_assessment_criteria", "IncludeAssessmentCriteria");
                return this;
            }
            
            public SearchAll andAssessmentType (QueryFilter<AssessmentType> filter)
            {
                filter.addFilter (context, "tl_job.assessment_type", "AssessmentType");
                return this;
            }
            
            public SearchAll andRandomKey (QueryFilter<String> filter)
            {
                filter.addFilter (context, "tl_job.random_key", "RandomKey");
                return this;
            }
            
            public SearchAll andJobType (QueryFilter<JobType> filter)
            {
                filter.addFilter (context, "tl_job.job_type", "JobType");
                return this;
            }
            
            public SearchAll andLevel (QueryFilter<Level> filter)
            {
                filter.addFilter (context, "tl_job.level_id", "Level");
                return this;
            }
            
            public SearchAll andSecUser (QueryFilter<SecUser> filter)
            {
                filter.addFilter (context, "tl_job.secuser_id", "SecUser");
                return this;
            }
            
                public Job[]
             search (ObjectTransaction transaction) throws StorageException
        {
            
            
            BaseBusinessClass[]     results = super.search (transaction, REFERENCE_Job, SEARCH_All, criteria);
            Set<Job>   typedResults = new LinkedHashSet <Job> ();
            for (BaseBusinessClass bbcResult : results)
            {
                Job aResult = (Job)bbcResult;
                
                typedResults.add (aResult);
            }
            
                    return ObjstoreUtils.removeDeleted(transaction, typedResults).toArray (new Job[0]);
                            
        }
    }

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

    public static SearchJobKey SearchByJobKey () { return new SearchJobKey (); }

    public static class SearchJobKey extends SearchObject<Job>
    {
        
        public SearchJobKey byID (Long ID)
        {
            by ("ID", ID);
            return this;
        }
        
        public SearchJobKey byKey (String Key)
        {
            by ("Key", Key);
            return this;
        }
        
            public SearchJobKey andObjectID (QueryFilter<Long> filter)
            {
                filter.addFilter (context, "tl_job.object_id", FIELD_ObjectID);
                return this;
            }

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

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

            
            public SearchJobKey andJobTitle (QueryFilter<String> filter)
            {
                filter.addFilter (context, "tl_job.job_title", "JobTitle");
                return this;
            }
            
            public SearchJobKey andJobDescription (QueryFilter<String> filter)
            {
                filter.addFilter (context, "tl_job.job_description", "JobDescription");
                return this;
            }
            
            public SearchJobKey andJobStatus (QueryFilter<JobStatus> filter)
            {
                filter.addFilter (context, "tl_job.job_status", "JobStatus");
                return this;
            }
            
            public SearchJobKey andOpenDate (QueryFilter<Date> filter)
            {
                filter.addFilter (context, "tl_job.open_date", "OpenDate");
                return this;
            }
            
            public SearchJobKey andApplyBy (QueryFilter<Date> filter)
            {
                filter.addFilter (context, "tl_job.apply_by", "ApplyBy");
                return this;
            }
            
            public SearchJobKey andIncludeAssessmentCriteria (QueryFilter<Boolean> filter)
            {
                filter.addFilter (context, "tl_job.include_assessment_criteria", "IncludeAssessmentCriteria");
                return this;
            }
            
            public SearchJobKey andAssessmentType (QueryFilter<AssessmentType> filter)
            {
                filter.addFilter (context, "tl_job.assessment_type", "AssessmentType");
                return this;
            }
            
            public SearchJobKey andRandomKey (QueryFilter<String> filter)
            {
                filter.addFilter (context, "tl_job.random_key", "RandomKey");
                return this;
            }
            
            public SearchJobKey andJobType (QueryFilter<JobType> filter)
            {
                filter.addFilter (context, "tl_job.job_type", "JobType");
                return this;
            }
            
            public SearchJobKey andLevel (QueryFilter<Level> filter)
            {
                filter.addFilter (context, "tl_job.level_id", "Level");
                return this;
            }
            
            public SearchJobKey andSecUser (QueryFilter<SecUser> filter)
            {
                filter.addFilter (context, "tl_job.secuser_id", "SecUser");
                return this;
            }
            
                public Job search (ObjectTransaction transaction) throws StorageException
        {
            
            
            BaseBusinessClass[]     results = super.search (transaction, REFERENCE_Job, SEARCH_JobKey, criteria);
            Set<Job>   typedResults = new LinkedHashSet <Job> ();
            for (BaseBusinessClass bbcResult : results)
            {
                Job aResult = (Job)bbcResult;
                
                typedResults.add (aResult);
            }
            
                    return (Job)singletonResult(ObjstoreUtils.removeDeleted(transaction, typedResults).toArray(new BaseBusinessClass[0]), "Job", "");
                            
        }
    }

        
                public static Job searchJobKey (ObjectTransaction transaction, Long ID, String Key) throws StorageException
        {
            return SearchByJobKey ()
            .byID  (ID)
            .byKey  (Key)
            .search (transaction);
        }



    public Object getAttribute (String attribName)
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (attribName.equals (FIELD_JobTitle))
        {
            return HELPER_JobTitle.toObject (getJobTitle ());
        }
        else if (attribName.equals (FIELD_JobDescription))
        {
            return HELPER_JobDescription.toObject (getJobDescription ());
        }
        else if (attribName.equals (FIELD_JobStatus))
        {
            return HELPER_JobStatus.toObject (getJobStatus ());
        }
        else if (attribName.equals (FIELD_OpenDate))
        {
            return HELPER_OpenDate.toObject (getOpenDate ());
        }
        else if (attribName.equals (FIELD_ApplyBy))
        {
            return HELPER_ApplyBy.toObject (getApplyBy ());
        }
        else if (attribName.equals (FIELD_IncludeAssessmentCriteria))
        {
            return HELPER_IncludeAssessmentCriteria.toObject (getIncludeAssessmentCriteria ());
        }
        else if (attribName.equals (FIELD_AssessmentType))
        {
            return HELPER_AssessmentType.toObject (getAssessmentType ());
        }
        else if (attribName.equals (FIELD_RandomKey))
        {
            return HELPER_RandomKey.toObject (getRandomKey ());
        }
        else if (attribName.equals (FIELD_JobType))
        {
            return HELPER_JobType.toObject (getJobType ());
        }
        else if (attribName.equals (FIELD_Email))
        {
            return HELPER_Email.toObject (getEmail ());
        }
        else if (attribName.equals (FIELD_CompletedDetails))
        {
            return HELPER_CompletedDetails.toObject (getCompletedDetails ());
        }
        else if (attribName.equals (FIELD_CompletedRequirements))
        {
            return HELPER_CompletedRequirements.toObject (getCompletedRequirements ());
        }
        else if (attribName.equals (FIELD_CompletedCulture))
        {
            return HELPER_CompletedCulture.toObject (getCompletedCulture ());
        }
        else if (attribName.equals (FIELD_CompletedAssessmentType))
        {
            return HELPER_CompletedAssessmentType.toObject (getCompletedAssessmentType ());
        }
        else if (attribName.equals (FIELD_SaveAssessmentTemplate))
        {
            return HELPER_SaveAssessmentTemplate.toObject (getSaveAssessmentTemplate ());
        }
        else if (attribName.equals (FIELD_SaveCultureTemplate))
        {
            return HELPER_SaveCultureTemplate.toObject (getSaveCultureTemplate ());
        }
        else if (attribName.equals (FIELD_AssessmentTemplateName))
        {
            return HELPER_AssessmentTemplateName.toObject (getAssessmentTemplateName ());
        }
        else if (attribName.equals (FIELD_CultureTemplateName))
        {
            return HELPER_CultureTemplateName.toObject (getCultureTemplateName ());
        }
        else
        {
            return super.getAttribute (attribName);
        }
    }


    public AttributeHelper getAttributeHelper (String attribName)
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (attribName.equals (FIELD_JobTitle))
        {
            return HELPER_JobTitle;
        }
        else if (attribName.equals (FIELD_JobDescription))
        {
            return HELPER_JobDescription;
        }
        else if (attribName.equals (FIELD_JobStatus))
        {
            return HELPER_JobStatus;
        }
        else if (attribName.equals (FIELD_OpenDate))
        {
            return HELPER_OpenDate;
        }
        else if (attribName.equals (FIELD_ApplyBy))
        {
            return HELPER_ApplyBy;
        }
        else if (attribName.equals (FIELD_IncludeAssessmentCriteria))
        {
            return HELPER_IncludeAssessmentCriteria;
        }
        else if (attribName.equals (FIELD_AssessmentType))
        {
            return HELPER_AssessmentType;
        }
        else if (attribName.equals (FIELD_RandomKey))
        {
            return HELPER_RandomKey;
        }
        else if (attribName.equals (FIELD_JobType))
        {
            return HELPER_JobType;
        }
        else if (attribName.equals (FIELD_Email))
        {
            return HELPER_Email;
        }
        else if (attribName.equals (FIELD_CompletedDetails))
        {
            return HELPER_CompletedDetails;
        }
        else if (attribName.equals (FIELD_CompletedRequirements))
        {
            return HELPER_CompletedRequirements;
        }
        else if (attribName.equals (FIELD_CompletedCulture))
        {
            return HELPER_CompletedCulture;
        }
        else if (attribName.equals (FIELD_CompletedAssessmentType))
        {
            return HELPER_CompletedAssessmentType;
        }
        else if (attribName.equals (FIELD_SaveAssessmentTemplate))
        {
            return HELPER_SaveAssessmentTemplate;
        }
        else if (attribName.equals (FIELD_SaveCultureTemplate))
        {
            return HELPER_SaveCultureTemplate;
        }
        else if (attribName.equals (FIELD_AssessmentTemplateName))
        {
            return HELPER_AssessmentTemplateName;
        }
        else if (attribName.equals (FIELD_CultureTemplateName))
        {
            return HELPER_CultureTemplateName;
        }
        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_JobTitle))
        {
            setJobTitle ((String)(HELPER_JobTitle.fromObject (_JobTitle, attribValue)));            
        }
        else if (attribName.equals (FIELD_JobDescription))
        {
            setJobDescription ((String)(HELPER_JobDescription.fromObject (_JobDescription, attribValue)));            
        }
        else if (attribName.equals (FIELD_JobStatus))
        {
            setJobStatus ((JobStatus)(HELPER_JobStatus.fromObject (_JobStatus, attribValue)));            
        }
        else if (attribName.equals (FIELD_OpenDate))
        {
            setOpenDate ((Date)(HELPER_OpenDate.fromObject (_OpenDate, attribValue)));            
        }
        else if (attribName.equals (FIELD_ApplyBy))
        {
            setApplyBy ((Date)(HELPER_ApplyBy.fromObject (_ApplyBy, attribValue)));            
        }
        else if (attribName.equals (FIELD_IncludeAssessmentCriteria))
        {
            setIncludeAssessmentCriteria ((Boolean)(HELPER_IncludeAssessmentCriteria.fromObject (_IncludeAssessmentCriteria, attribValue)));            
        }
        else if (attribName.equals (FIELD_AssessmentType))
        {
            setAssessmentType ((AssessmentType)(HELPER_AssessmentType.fromObject (_AssessmentType, attribValue)));            
        }
        else if (attribName.equals (FIELD_RandomKey))
        {
            setRandomKey ((String)(HELPER_RandomKey.fromObject (_RandomKey, attribValue)));            
        }
        else if (attribName.equals (FIELD_JobType))
        {
            setJobType ((JobType)(HELPER_JobType.fromObject (_JobType, attribValue)));            
        }
        else if (attribName.equals (FIELD_Email))
        {
            setEmail ((String)(HELPER_Email.fromObject (_Email, attribValue)));            
        }
        else if (attribName.equals (FIELD_CompletedDetails))
        {
            setCompletedDetails ((Boolean)(HELPER_CompletedDetails.fromObject (_CompletedDetails, attribValue)));            
        }
        else if (attribName.equals (FIELD_CompletedRequirements))
        {
            setCompletedRequirements ((Boolean)(HELPER_CompletedRequirements.fromObject (_CompletedRequirements, attribValue)));            
        }
        else if (attribName.equals (FIELD_CompletedCulture))
        {
            setCompletedCulture ((Boolean)(HELPER_CompletedCulture.fromObject (_CompletedCulture, attribValue)));            
        }
        else if (attribName.equals (FIELD_CompletedAssessmentType))
        {
            setCompletedAssessmentType ((Boolean)(HELPER_CompletedAssessmentType.fromObject (_CompletedAssessmentType, attribValue)));            
        }
        else if (attribName.equals (FIELD_SaveAssessmentTemplate))
        {
            setSaveAssessmentTemplate ((Boolean)(HELPER_SaveAssessmentTemplate.fromObject (_SaveAssessmentTemplate, attribValue)));            
        }
        else if (attribName.equals (FIELD_SaveCultureTemplate))
        {
            setSaveCultureTemplate ((Boolean)(HELPER_SaveCultureTemplate.fromObject (_SaveCultureTemplate, attribValue)));            
        }
        else if (attribName.equals (FIELD_AssessmentTemplateName))
        {
            setAssessmentTemplateName ((String)(HELPER_AssessmentTemplateName.fromObject (_AssessmentTemplateName, attribValue)));            
        }
        else if (attribName.equals (FIELD_CultureTemplateName))
        {
            setCultureTemplateName ((String)(HELPER_CultureTemplateName.fromObject (_CultureTemplateName, attribValue)));            
        }
        else
        {
            super.setAttribute (attribName, attribValue);
        }
    }



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


    public FieldWriteability getWriteable (String fieldName)
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (fieldName.equals (FIELD_JobTitle))
        {
            return getWriteability_JobTitle ();
        }
        else if (fieldName.equals (FIELD_JobDescription))
        {
            return getWriteability_JobDescription ();
        }
        else if (fieldName.equals (FIELD_JobStatus))
        {
            return getWriteability_JobStatus ();
        }
        else if (fieldName.equals (FIELD_OpenDate))
        {
            return getWriteability_OpenDate ();
        }
        else if (fieldName.equals (FIELD_ApplyBy))
        {
            return getWriteability_ApplyBy ();
        }
        else if (fieldName.equals (FIELD_IncludeAssessmentCriteria))
        {
            return getWriteability_IncludeAssessmentCriteria ();
        }
        else if (fieldName.equals (FIELD_AssessmentType))
        {
            return getWriteability_AssessmentType ();
        }
        else if (fieldName.equals (FIELD_RandomKey))
        {
            return getWriteability_RandomKey ();
        }
        else if (fieldName.equals (FIELD_JobType))
        {
            return getWriteability_JobType ();
        }
        else if (fieldName.equals (MULTIPLEREFERENCE_JobApplications))
        {
            return getWriteability_JobApplications ();
        }
        else if (fieldName.equals (MULTIPLEREFERENCE_AssessmentCriterias))
        {
            return getWriteability_AssessmentCriterias ();
        }
        else if (fieldName.equals (MULTIPLEREFERENCE_CultureCriterias))
        {
            return getWriteability_CultureCriterias ();
        }
        else if (fieldName.equals (SINGLEREFERENCE_Level))
        {
            return getWriteability_Level ();
        }
        else if (fieldName.equals (SINGLEREFERENCE_SecUser))
        {
            return getWriteability_SecUser ();
        }
        else if (fieldName.equals (FIELD_Email))
        {
            return getWriteability_Email ();
        }
        else if (fieldName.equals (FIELD_CompletedDetails))
        {
            return getWriteability_CompletedDetails ();
        }
        else if (fieldName.equals (FIELD_CompletedRequirements))
        {
            return getWriteability_CompletedRequirements ();
        }
        else if (fieldName.equals (FIELD_CompletedCulture))
        {
            return getWriteability_CompletedCulture ();
        }
        else if (fieldName.equals (FIELD_CompletedAssessmentType))
        {
            return getWriteability_CompletedAssessmentType ();
        }
        else if (fieldName.equals (FIELD_SaveAssessmentTemplate))
        {
            return getWriteability_SaveAssessmentTemplate ();
        }
        else if (fieldName.equals (FIELD_SaveCultureTemplate))
        {
            return getWriteability_SaveCultureTemplate ();
        }
        else if (fieldName.equals (FIELD_AssessmentTemplateName))
        {
            return getWriteability_AssessmentTemplateName ();
        }
        else if (fieldName.equals (FIELD_CultureTemplateName))
        {
            return getWriteability_CultureTemplateName ();
        }
        else if (fieldName.equals (SINGLEREFERENCE_AssessmentTemplate))
        {
            return getWriteability_AssessmentTemplate ();
        }
        else if (fieldName.equals (SINGLEREFERENCE_CultureTemplate))
        {
            return getWriteability_CultureTemplate ();
        }
        else if (fieldName.equals (SINGLEREFERENCE_JobTemplate))
        {
            return getWriteability_JobTemplate ();
        }
        else
        {
            return super.getWriteable (fieldName);
        }
    }


    public void putUnwriteable (Set<String> fields)
    {
        
            if (getWriteability_JobTitle () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_JobTitle);
            }
        
            if (getWriteability_JobDescription () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_JobDescription);
            }
        
            if (getWriteability_JobStatus () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_JobStatus);
            }
        
            if (getWriteability_OpenDate () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_OpenDate);
            }
        
            if (getWriteability_ApplyBy () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_ApplyBy);
            }
        
            if (getWriteability_IncludeAssessmentCriteria () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_IncludeAssessmentCriteria);
            }
        
            if (getWriteability_AssessmentType () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_AssessmentType);
            }
        
            if (getWriteability_RandomKey () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_RandomKey);
            }
        
            if (getWriteability_JobType () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_JobType);
            }
        
            if (getWriteability_Email () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_Email);
            }
        
            if (getWriteability_CompletedDetails () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_CompletedDetails);
            }
        
            if (getWriteability_CompletedRequirements () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_CompletedRequirements);
            }
        
            if (getWriteability_CompletedCulture () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_CompletedCulture);
            }
        
            if (getWriteability_CompletedAssessmentType () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_CompletedAssessmentType);
            }
        
            if (getWriteability_SaveAssessmentTemplate () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_SaveAssessmentTemplate);
            }
        
            if (getWriteability_SaveCultureTemplate () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_SaveCultureTemplate);
            }
        
            if (getWriteability_AssessmentTemplateName () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_AssessmentTemplateName);
            }
        
            if (getWriteability_CultureTemplateName () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_CultureTemplateName);
            }
        

        super.putUnwriteable (fields);
    }

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

        
        result.add(HELPER_JobTitle.getAttribObject (getClass (), _JobTitle, true, FIELD_JobTitle));
        result.add(HELPER_JobDescription.getAttribObject (getClass (), _JobDescription, true, FIELD_JobDescription));
        result.add(HELPER_JobStatus.getAttribObject (getClass (), _JobStatus, true, FIELD_JobStatus));
        result.add(HELPER_OpenDate.getAttribObject (getClass (), _OpenDate, false, FIELD_OpenDate));
        result.add(HELPER_ApplyBy.getAttribObject (getClass (), _ApplyBy, false, FIELD_ApplyBy));
        result.add(HELPER_IncludeAssessmentCriteria.getAttribObject (getClass (), _IncludeAssessmentCriteria, true, FIELD_IncludeAssessmentCriteria));
        result.add(HELPER_AssessmentType.getAttribObject (getClass (), _AssessmentType, true, FIELD_AssessmentType));
        result.add(HELPER_RandomKey.getAttribObject (getClass (), _RandomKey, false, FIELD_RandomKey));
        result.add(HELPER_JobType.getAttribObject (getClass (), _JobType, true, FIELD_JobType));
        result.add(HELPER_Email.getAttribObject (getClass (), _Email, false, FIELD_Email));
        result.add(HELPER_CompletedDetails.getAttribObject (getClass (), _CompletedDetails, false, FIELD_CompletedDetails));
        result.add(HELPER_CompletedRequirements.getAttribObject (getClass (), _CompletedRequirements, false, FIELD_CompletedRequirements));
        result.add(HELPER_CompletedCulture.getAttribObject (getClass (), _CompletedCulture, false, FIELD_CompletedCulture));
        result.add(HELPER_CompletedAssessmentType.getAttribObject (getClass (), _CompletedAssessmentType, false, FIELD_CompletedAssessmentType));
        result.add(HELPER_SaveAssessmentTemplate.getAttribObject (getClass (), _SaveAssessmentTemplate, false, FIELD_SaveAssessmentTemplate));
        result.add(HELPER_SaveCultureTemplate.getAttribObject (getClass (), _SaveCultureTemplate, false, FIELD_SaveCultureTemplate));
        result.add(HELPER_AssessmentTemplateName.getAttribObject (getClass (), _AssessmentTemplateName, false, FIELD_AssessmentTemplateName));
        result.add(HELPER_CultureTemplateName.getAttribObject (getClass (), _CultureTemplateName, false, FIELD_CultureTemplateName));

        return result;
    }


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


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

    public void preCommit (boolean willBeStored) throws Exception
    {
        super.preCommit(willBeStored);
        
        if(willBeStored)
        {
        
        }
    }

    public oneit.servlets.objstore.binary.BinaryContentHandler getBinaryContentHandler(String attribName)
    {
        
        
        return super.getBinaryContentHandler(attribName);
    }

    public static class JobBehaviourDecorator extends BaseBusinessClass.BBCBehaviourDecorator<Job>
    {

    /**
     * Get the attribute JobTitle
     */
    public String getJobTitle (Job obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute JobTitle.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setJobTitle (Job obj, String newJobTitle) throws FieldException
    {
        return newJobTitle;
    }

    /**
     * Get the attribute JobDescription
     */
    public String getJobDescription (Job obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute JobDescription.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setJobDescription (Job obj, String newJobDescription) throws FieldException
    {
        return newJobDescription;
    }

    /**
     * Get the attribute JobStatus
     */
    public JobStatus getJobStatus (Job obj, JobStatus original)
    {
        return original;
    }

    /**
     * Change the value set for attribute JobStatus.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public JobStatus setJobStatus (Job obj, JobStatus newJobStatus) throws FieldException
    {
        return newJobStatus;
    }

    /**
     * Get the attribute OpenDate
     */
    public Date getOpenDate (Job obj, Date original)
    {
        return original;
    }

    /**
     * Change the value set for attribute OpenDate.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Date setOpenDate (Job obj, Date newOpenDate) throws FieldException
    {
        return newOpenDate;
    }

    /**
     * Get the attribute ApplyBy
     */
    public Date getApplyBy (Job obj, Date original)
    {
        return original;
    }

    /**
     * Change the value set for attribute ApplyBy.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Date setApplyBy (Job obj, Date newApplyBy) throws FieldException
    {
        return newApplyBy;
    }

    /**
     * Get the attribute IncludeAssessmentCriteria
     */
    public Boolean getIncludeAssessmentCriteria (Job obj, Boolean original)
    {
        return original;
    }

    /**
     * Change the value set for attribute IncludeAssessmentCriteria.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Boolean setIncludeAssessmentCriteria (Job obj, Boolean newIncludeAssessmentCriteria) throws FieldException
    {
        return newIncludeAssessmentCriteria;
    }

    /**
     * Get the attribute AssessmentType
     */
    public AssessmentType getAssessmentType (Job obj, AssessmentType original)
    {
        return original;
    }

    /**
     * Change the value set for attribute AssessmentType.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public AssessmentType setAssessmentType (Job obj, AssessmentType newAssessmentType) throws FieldException
    {
        return newAssessmentType;
    }

    /**
     * Get the attribute RandomKey
     */
    public String getRandomKey (Job obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute RandomKey.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setRandomKey (Job obj, String newRandomKey) throws FieldException
    {
        return newRandomKey;
    }

    /**
     * Get the attribute JobType
     */
    public JobType getJobType (Job obj, JobType original)
    {
        return original;
    }

    /**
     * Change the value set for attribute JobType.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public JobType setJobType (Job obj, JobType newJobType) throws FieldException
    {
        return newJobType;
    }

    /**
     * Get the attribute Email
     */
    public String getEmail (Job obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute Email.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setEmail (Job obj, String newEmail) throws FieldException
    {
        return newEmail;
    }

    /**
     * Get the attribute CompletedDetails
     */
    public Boolean getCompletedDetails (Job obj, Boolean original)
    {
        return original;
    }

    /**
     * Change the value set for attribute CompletedDetails.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Boolean setCompletedDetails (Job obj, Boolean newCompletedDetails) throws FieldException
    {
        return newCompletedDetails;
    }

    /**
     * Get the attribute CompletedRequirements
     */
    public Boolean getCompletedRequirements (Job obj, Boolean original)
    {
        return original;
    }

    /**
     * Change the value set for attribute CompletedRequirements.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Boolean setCompletedRequirements (Job obj, Boolean newCompletedRequirements) throws FieldException
    {
        return newCompletedRequirements;
    }

    /**
     * Get the attribute CompletedCulture
     */
    public Boolean getCompletedCulture (Job obj, Boolean original)
    {
        return original;
    }

    /**
     * Change the value set for attribute CompletedCulture.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Boolean setCompletedCulture (Job obj, Boolean newCompletedCulture) throws FieldException
    {
        return newCompletedCulture;
    }

    /**
     * Get the attribute CompletedAssessmentType
     */
    public Boolean getCompletedAssessmentType (Job obj, Boolean original)
    {
        return original;
    }

    /**
     * Change the value set for attribute CompletedAssessmentType.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Boolean setCompletedAssessmentType (Job obj, Boolean newCompletedAssessmentType) throws FieldException
    {
        return newCompletedAssessmentType;
    }

    /**
     * Get the attribute SaveAssessmentTemplate
     */
    public Boolean getSaveAssessmentTemplate (Job obj, Boolean original)
    {
        return original;
    }

    /**
     * Change the value set for attribute SaveAssessmentTemplate.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Boolean setSaveAssessmentTemplate (Job obj, Boolean newSaveAssessmentTemplate) throws FieldException
    {
        return newSaveAssessmentTemplate;
    }

    /**
     * Get the attribute SaveCultureTemplate
     */
    public Boolean getSaveCultureTemplate (Job obj, Boolean original)
    {
        return original;
    }

    /**
     * Change the value set for attribute SaveCultureTemplate.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Boolean setSaveCultureTemplate (Job obj, Boolean newSaveCultureTemplate) throws FieldException
    {
        return newSaveCultureTemplate;
    }

    /**
     * Get the attribute AssessmentTemplateName
     */
    public String getAssessmentTemplateName (Job obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute AssessmentTemplateName.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setAssessmentTemplateName (Job obj, String newAssessmentTemplateName) throws FieldException
    {
        return newAssessmentTemplateName;
    }

    /**
     * Get the attribute CultureTemplateName
     */
    public String getCultureTemplateName (Job obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute CultureTemplateName.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setCultureTemplateName (Job obj, String newCultureTemplateName) throws FieldException
    {
        return newCultureTemplateName;
    }

    }

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

        public JobPipeLineFactory (Collection<From> seed)
        {
            super(seed);
        }
        
        
        public PipeLine<From, ? extends Object> to(String name)
        {
            if (name.equals ("JobApplications"))
            {
                return toJobApplications ();
            }                
            if (name.equals ("AssessmentCriterias"))
            {
                return toAssessmentCriterias ();
            }                
            if (name.equals ("CultureCriterias"))
            {
                return toCultureCriterias ();
            }                
            if (name.equals ("Email"))
            {
                return toEmail ();
            }                
            if (name.equals ("CompletedDetails"))
            {
                return toCompletedDetails ();
            }                
            if (name.equals ("CompletedRequirements"))
            {
                return toCompletedRequirements ();
            }                
            if (name.equals ("CompletedCulture"))
            {
                return toCompletedCulture ();
            }                
            if (name.equals ("CompletedAssessmentType"))
            {
                return toCompletedAssessmentType ();
            }                
            if (name.equals ("SaveAssessmentTemplate"))
            {
                return toSaveAssessmentTemplate ();
            }                
            if (name.equals ("SaveCultureTemplate"))
            {
                return toSaveCultureTemplate ();
            }                
            if (name.equals ("AssessmentTemplateName"))
            {
                return toAssessmentTemplateName ();
            }                
            if (name.equals ("CultureTemplateName"))
            {
                return toCultureTemplateName ();
            }                
            if (name.equals ("AssessmentTemplate"))
            {
                return toAssessmentTemplate ();
            }                
            if (name.equals ("CultureTemplate"))
            {
                return toCultureTemplate ();
            }                
            if (name.equals ("JobTemplate"))
            {
                return toJobTemplate ();
            }                
            if (name.equals ("JobTitle"))
            {
                return toJobTitle ();
            }                
            if (name.equals ("JobDescription"))
            {
                return toJobDescription ();
            }                
            if (name.equals ("JobStatus"))
            {
                return toJobStatus ();
            }                
            if (name.equals ("OpenDate"))
            {
                return toOpenDate ();
            }                
            if (name.equals ("ApplyBy"))
            {
                return toApplyBy ();
            }                
            if (name.equals ("IncludeAssessmentCriteria"))
            {
                return toIncludeAssessmentCriteria ();
            }                
            if (name.equals ("AssessmentType"))
            {
                return toAssessmentType ();
            }                
            if (name.equals ("RandomKey"))
            {
                return toRandomKey ();
            }                
            if (name.equals ("JobType"))
            {
                return toJobType ();
            }                
            if (name.equals ("Level"))
            {
                return toLevel ();
            }                
            if (name.equals ("SecUser"))
            {
                return toSecUser ();
            }                
            
            
            return super.to(name);
        }
        
        
        public PipeLine<From, String> toEmail () { return pipe(new ORMAttributePipe<Me, String>(FIELD_Email));  }
        
        public PipeLine<From, Boolean> toCompletedDetails () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_CompletedDetails));  }
        
        public PipeLine<From, Boolean> toCompletedRequirements () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_CompletedRequirements));  }
        
        public PipeLine<From, Boolean> toCompletedCulture () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_CompletedCulture));  }
        
        public PipeLine<From, Boolean> toCompletedAssessmentType () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_CompletedAssessmentType));  }
        
        public PipeLine<From, Boolean> toSaveAssessmentTemplate () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_SaveAssessmentTemplate));  }
        
        public PipeLine<From, Boolean> toSaveCultureTemplate () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_SaveCultureTemplate));  }
        
        public PipeLine<From, String> toAssessmentTemplateName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_AssessmentTemplateName));  }
        
        public PipeLine<From, String> toCultureTemplateName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_CultureTemplateName));  }
        
        public PipeLine<From, String> toJobTitle () { return pipe(new ORMAttributePipe<Me, String>(FIELD_JobTitle));  }
        
        public PipeLine<From, String> toJobDescription () { return pipe(new ORMAttributePipe<Me, String>(FIELD_JobDescription));  }
        
        public PipeLine<From, JobStatus> toJobStatus () { return pipe(new ORMAttributePipe<Me, JobStatus>(FIELD_JobStatus));  }
        
        public PipeLine<From, Date> toOpenDate () { return pipe(new ORMAttributePipe<Me, Date>(FIELD_OpenDate));  }
        
        public PipeLine<From, Date> toApplyBy () { return pipe(new ORMAttributePipe<Me, Date>(FIELD_ApplyBy));  }
        
        public PipeLine<From, Boolean> toIncludeAssessmentCriteria () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_IncludeAssessmentCriteria));  }
        
        public PipeLine<From, AssessmentType> toAssessmentType () { return pipe(new ORMAttributePipe<Me, AssessmentType>(FIELD_AssessmentType));  }
        
        public PipeLine<From, String> toRandomKey () { return pipe(new ORMAttributePipe<Me, String>(FIELD_RandomKey));  }
        
        public PipeLine<From, JobType> toJobType () { return pipe(new ORMAttributePipe<Me, JobType>(FIELD_JobType));  }
        public AssessmentCriteriaTemplate.AssessmentCriteriaTemplatePipeLineFactory<From, AssessmentCriteriaTemplate> toAssessmentTemplate () { return toAssessmentTemplate (Filter.ALL); }

        public AssessmentCriteriaTemplate.AssessmentCriteriaTemplatePipeLineFactory<From, AssessmentCriteriaTemplate> toAssessmentTemplate (Filter<AssessmentCriteriaTemplate> filter) 
        { 
            return AssessmentCriteriaTemplate.REFERENCE_AssessmentCriteriaTemplate.new AssessmentCriteriaTemplatePipeLineFactory<From, AssessmentCriteriaTemplate> (this, new ORMSingleAssocPipe<Me, AssessmentCriteriaTemplate>(SINGLEREFERENCE_AssessmentTemplate, filter)); 
        }
        public CultureCriteriaTemplate.CultureCriteriaTemplatePipeLineFactory<From, CultureCriteriaTemplate> toCultureTemplate () { return toCultureTemplate (Filter.ALL); }

        public CultureCriteriaTemplate.CultureCriteriaTemplatePipeLineFactory<From, CultureCriteriaTemplate> toCultureTemplate (Filter<CultureCriteriaTemplate> filter) 
        { 
            return CultureCriteriaTemplate.REFERENCE_CultureCriteriaTemplate.new CultureCriteriaTemplatePipeLineFactory<From, CultureCriteriaTemplate> (this, new ORMSingleAssocPipe<Me, CultureCriteriaTemplate>(SINGLEREFERENCE_CultureTemplate, filter)); 
        }
        public Job.JobPipeLineFactory<From, Job> toJobTemplate () { return toJobTemplate (Filter.ALL); }

        public Job.JobPipeLineFactory<From, Job> toJobTemplate (Filter<Job> filter) 
        { 
            return Job.REFERENCE_Job.new JobPipeLineFactory<From, Job> (this, new ORMSingleAssocPipe<Me, Job>(SINGLEREFERENCE_JobTemplate, filter)); 
        }
        public Level.LevelPipeLineFactory<From, Level> toLevel () { return toLevel (Filter.ALL); }

        public Level.LevelPipeLineFactory<From, Level> toLevel (Filter<Level> filter) 
        { 
            return Level.REFERENCE_Level.new LevelPipeLineFactory<From, Level> (this, new ORMSingleAssocPipe<Me, Level>(SINGLEREFERENCE_Level, filter)); 
        }
        public SecUser.SecUserPipeLineFactory<From, SecUser> toSecUser () { return toSecUser (Filter.ALL); }

        public SecUser.SecUserPipeLineFactory<From, SecUser> toSecUser (Filter<SecUser> filter) 
        { 
            return SecUser.REFERENCE_SecUser.new SecUserPipeLineFactory<From, SecUser> (this, new ORMSingleAssocPipe<Me, SecUser>(SINGLEREFERENCE_SecUser, filter)); 
        }
        public JobApplication.JobApplicationPipeLineFactory<From, JobApplication> toJobApplications () { return toJobApplications(Filter.ALL); }        

        public JobApplication.JobApplicationPipeLineFactory<From, JobApplication> toJobApplications (Filter<JobApplication> filter)
        {
            return JobApplication.REFERENCE_JobApplication.new JobApplicationPipeLineFactory<From, JobApplication> (this, new ORMMultiAssocPipe<Me, JobApplication>(MULTIPLEREFERENCE_JobApplications, filter)); 
        }
        public AssessmentCriteria.AssessmentCriteriaPipeLineFactory<From, AssessmentCriteria> toAssessmentCriterias () { return toAssessmentCriterias(Filter.ALL); }        

        public AssessmentCriteria.AssessmentCriteriaPipeLineFactory<From, AssessmentCriteria> toAssessmentCriterias (Filter<AssessmentCriteria> filter)
        {
            return AssessmentCriteria.REFERENCE_AssessmentCriteria.new AssessmentCriteriaPipeLineFactory<From, AssessmentCriteria> (this, new ORMMultiAssocPipe<Me, AssessmentCriteria>(MULTIPLEREFERENCE_AssessmentCriterias, filter)); 
        }
        public CultureCriteria.CultureCriteriaPipeLineFactory<From, CultureCriteria> toCultureCriterias () { return toCultureCriterias(Filter.ALL); }        

        public CultureCriteria.CultureCriteriaPipeLineFactory<From, CultureCriteria> toCultureCriterias (Filter<CultureCriteria> filter)
        {
            return CultureCriteria.REFERENCE_CultureCriteria.new CultureCriteriaPipeLineFactory<From, CultureCriteria> (this, new ORMMultiAssocPipe<Me, CultureCriteria>(MULTIPLEREFERENCE_CultureCriterias, filter)); 
        }
        
    }
    
    public boolean isTransientAttrib(String attribName)
    {
        
        if(CollectionUtils.equals(attribName, "Email"))
        {
            return true;
        }
        
        if(CollectionUtils.equals(attribName, "CompletedDetails"))
        {
            return true;
        }
        
        if(CollectionUtils.equals(attribName, "CompletedRequirements"))
        {
            return true;
        }
        
        if(CollectionUtils.equals(attribName, "CompletedCulture"))
        {
            return true;
        }
        
        if(CollectionUtils.equals(attribName, "CompletedAssessmentType"))
        {
            return true;
        }
        
        if(CollectionUtils.equals(attribName, "SaveAssessmentTemplate"))
        {
            return true;
        }
        
        if(CollectionUtils.equals(attribName, "SaveCultureTemplate"))
        {
            return true;
        }
        
        if(CollectionUtils.equals(attribName, "AssessmentTemplateName"))
        {
            return true;
        }
        
        if(CollectionUtils.equals(attribName, "CultureTemplateName"))
        {
            return true;
        }
        

        return super.isTransientAttrib(attribName);
    }

    public boolean isTransientSingleReference(String assocName)
    {
        
        if(CollectionUtils.equals(assocName, "AssessmentTemplate"))
        {
            return true;
        }
        
        if(CollectionUtils.equals(assocName, "CultureTemplate"))
        {
            return true;
        }
        
        if(CollectionUtils.equals(assocName, "JobTemplate"))
        {
            return true;
        }
        

        return super.isTransientSingleReference(assocName);
    }
}

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

    public void assertValid ()
    {
    }


    public AssessmentCriteriaTemplate getAssessmentTemplate () throws StorageException
    {
        return (AssessmentCriteriaTemplate)(AssessmentCriteriaTemplate.DUMMY_AssessmentCriteriaTemplate);
    }


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

    public CultureCriteriaTemplate getCultureTemplate () throws StorageException
    {
        return (CultureCriteriaTemplate)(CultureCriteriaTemplate.DUMMY_CultureCriteriaTemplate);
    }


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

    public Job getJobTemplate () throws StorageException
    {
        return (Job)(Job.DUMMY_Job);
    }


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

    public Level getLevel () throws StorageException
    {
        return (Level)(Level.DUMMY_Level);
    }


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

    public SecUser getSecUser () throws StorageException
    {
        return (SecUser)(SecUser.DUMMY_SecUser);
    }


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

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


    public JobApplication getJobApplicationsAt (int index) throws StorageException
    {
        throw new RuntimeException ("No elements in a dummy object in association JobApplications");
    }


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

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


    public AssessmentCriteria getAssessmentCriteriasAt (int index) throws StorageException
    {
        throw new RuntimeException ("No elements in a dummy object in association AssessmentCriterias");
    }


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

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


    public CultureCriteria getCultureCriteriasAt (int index) throws StorageException
    {
        throw new RuntimeException ("No elements in a dummy object in association CultureCriterias");
    }


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

}

    
