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

    
package performa.orm;

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

import performa.orm.types.*;
import performa.orm.types.TimeZone;


public abstract class BaseCompany extends BaseBusinessClass
{
    // Reference instance for the object
    public static final Company REFERENCE_Company = new Company ();

    // Reference instance for the object
    public static final Company DUMMY_Company = new DummyCompany ();

    // Static constants corresponding to field names
    
    public static final String FIELD_CompanyName = "CompanyName";
    public static final String FIELD_CompanyLogo = "CompanyLogo";
    public static final String FIELD_HiringTeamType = "HiringTeamType";
    public static final String FIELD_Industry = "Industry";
    public static final String FIELD_TimeZone = "TimeZone";
    public static final String FIELD_IsVerified = "IsVerified";
    public static final String FIELD_State = "State";
    public static final String FIELD_Country = "Country";
    public static final String FIELD_PostCode = "PostCode";
    public static final String FIELD_City = "City";
    public static final String FIELD_HasClientSupport = "HasClientSupport";
    public static final String FIELD_StripeReference = "StripeReference";
    public static final String FIELD_StripeSubscription = "StripeSubscription";
    public static final String FIELD_NameOnCard = "NameOnCard";
    public static final String FIELD_CardPostCode = "CardPostCode";
    public static final String FIELD_CardID = "CardID";
    public static final String FIELD_PlanRenewedOn = "PlanRenewedOn";
    public static final String FIELD_UsedCredits = "UsedCredits";
    public static final String FIELD_CompanyStatus = "CompanyStatus";
    public static final String FIELD_HiringTeamName = "HiringTeamName";
    public static final String FIELD_ManageOwnBilling = "ManageOwnBilling";
    public static final String FIELD_HTCountry = "HTCountry";
    public static final String FIELD_IsLogoDeleted = "IsLogoDeleted";
    public static final String FIELD_CompletedProfile = "CompletedProfile";
    public static final String FIELD_PaymentJobCount = "PaymentJobCount";
    public static final String FIELD_StripeLast4 = "StripeLast4";
    public static final String FIELD_StripeBrand = "StripeBrand";
    public static final String SINGLEREFERENCE_Owner = "Owner";
    public static final String SINGLEREFERENCE_BillingTeam = "BillingTeam";
    public static final String SINGLEREFERENCE_AddedByUser = "AddedByUser";
    public static final String SINGLEREFERENCE_PaymentPlan = "PaymentPlan";
    public static final String MULTIPLEREFERENCE_Users = "Users";
    public static final String BACKREF_Users = "";
    public static final String MULTIPLEREFERENCE_Clients = "Clients";
    public static final String BACKREF_Clients = "";
    public static final String MULTIPLEREFERENCE_HiringTeams = "HiringTeams";
    public static final String BACKREF_HiringTeams = "";

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

    // Static constants corresponding to attribute helpers
    private static final DefaultAttributeHelper<Company> HELPER_CompanyName = DefaultAttributeHelper.INSTANCE;
    private static final BLOBAttributeHelper HELPER_CompanyLogo = BLOBAttributeHelper.INSTANCE;
    private static final EnumeratedAttributeHelper<Company, HiringTeamType> HELPER_HiringTeamType =  new EnumeratedAttributeHelper<Company, HiringTeamType> (HiringTeamType.FACTORY_HiringTeamType);
    private static final EnumeratedAttributeHelper<Company, Industry> HELPER_Industry =  new EnumeratedAttributeHelper<Company, Industry> (Industry.FACTORY_Industry);
    private static final EnumeratedAttributeHelper<Company, TimeZone> HELPER_TimeZone =  new EnumeratedAttributeHelper<Company, TimeZone> (TimeZone.FACTORY_TimeZone);
    private static final DefaultAttributeHelper<Company> HELPER_IsVerified = DefaultAttributeHelper.INSTANCE;
    private static final EnumeratedAttributeHelper<Company, State> HELPER_State =  new EnumeratedAttributeHelper<Company, State> (State.FACTORY_State);
    private static final EnumeratedAttributeHelper<Company, Countries> HELPER_Country =  new EnumeratedAttributeHelper<Company, Countries> (Countries.FACTORY_Countries);
    private static final DefaultAttributeHelper<Company> HELPER_PostCode = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Company> HELPER_City = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Company> HELPER_HasClientSupport = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Company> HELPER_StripeReference = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Company> HELPER_StripeSubscription = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Company> HELPER_NameOnCard = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Company> HELPER_CardPostCode = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Company> HELPER_CardID = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Company> HELPER_PlanRenewedOn = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Company> HELPER_UsedCredits = DefaultAttributeHelper.INSTANCE;
    private static final EnumeratedAttributeHelper<Company, CompanyStatus> HELPER_CompanyStatus =  new EnumeratedAttributeHelper<Company, CompanyStatus> (CompanyStatus.FACTORY_CompanyStatus);
    private static final DefaultAttributeHelper<Company> HELPER_HiringTeamName = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Company> HELPER_ManageOwnBilling = DefaultAttributeHelper.INSTANCE;
    private static final EnumeratedAttributeHelper<Company, Countries> HELPER_HTCountry =  new EnumeratedAttributeHelper<Company, Countries> (Countries.FACTORY_Countries);
    private static final DefaultAttributeHelper<Company> HELPER_IsLogoDeleted = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Company> HELPER_CompletedProfile = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Company> HELPER_PaymentJobCount = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Company> HELPER_StripeLast4 = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<Company> HELPER_StripeBrand = DefaultAttributeHelper.INSTANCE;
    

    // Private attributes corresponding to business object data
    private String _CompanyName;
    private BinaryContent _CompanyLogo;
    private HiringTeamType _HiringTeamType;
    private Industry _Industry;
    private TimeZone _TimeZone;
    private Boolean _IsVerified;
    private State _State;
    private Countries _Country;
    private String _PostCode;
    private String _City;
    private Boolean _HasClientSupport;
    private String _StripeReference;
    private String _StripeSubscription;
    private String _NameOnCard;
    private String _CardPostCode;
    private String _CardID;
    private Date _PlanRenewedOn;
    private Integer _UsedCredits;
    private CompanyStatus _CompanyStatus;
    private String _HiringTeamName;
    private Boolean _ManageOwnBilling;
    private Countries _HTCountry;
    private Boolean _IsLogoDeleted;
    private Boolean _CompletedProfile;
    private Integer _PaymentJobCount;
    private String _StripeLast4;
    private String _StripeBrand;
    

    // Private attributes corresponding to single references
    private SingleAssociation<Company, CompanyUser> _Owner;
    private SingleAssociation<Company, HiringTeam> _BillingTeam;
    private SingleAssociation<Company, CompanyUser> _AddedByUser;
    private SingleAssociation<Company, PaymentPlan> _PaymentPlan;
    

    // Private attributes corresponding to multiple references
    private MultipleAssociation<Company, CompanyUser> _Users;
    private MultipleAssociation<Company, Client> _Clients;
    private MultipleAssociation<Company, HiringTeam> _HiringTeams;
    

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

    // Arrays of validators for each attribute
    private static final AttributeValidator[] FIELD_HiringTeamName_Validators;
    private static final AttributeValidator[] FIELD_ManageOwnBilling_Validators;
    private static final AttributeValidator[] FIELD_HTCountry_Validators;
    private static final AttributeValidator[] FIELD_IsLogoDeleted_Validators;
    private static final AttributeValidator[] FIELD_CompletedProfile_Validators;
    private static final AttributeValidator[] FIELD_PaymentJobCount_Validators;
    private static final AttributeValidator[] FIELD_StripeLast4_Validators;
    private static final AttributeValidator[] FIELD_StripeBrand_Validators;
    private static final AttributeValidator[] FIELD_CompanyName_Validators;
    private static final AttributeValidator[] FIELD_CompanyLogo_Validators;
    private static final AttributeValidator[] FIELD_HiringTeamType_Validators;
    private static final AttributeValidator[] FIELD_Industry_Validators;
    private static final AttributeValidator[] FIELD_TimeZone_Validators;
    private static final AttributeValidator[] FIELD_IsVerified_Validators;
    private static final AttributeValidator[] FIELD_State_Validators;
    private static final AttributeValidator[] FIELD_Country_Validators;
    private static final AttributeValidator[] FIELD_PostCode_Validators;
    private static final AttributeValidator[] FIELD_City_Validators;
    private static final AttributeValidator[] FIELD_HasClientSupport_Validators;
    private static final AttributeValidator[] FIELD_StripeReference_Validators;
    private static final AttributeValidator[] FIELD_StripeSubscription_Validators;
    private static final AttributeValidator[] FIELD_NameOnCard_Validators;
    private static final AttributeValidator[] FIELD_CardPostCode_Validators;
    private static final AttributeValidator[] FIELD_CardID_Validators;
    private static final AttributeValidator[] FIELD_PlanRenewedOn_Validators;
    private static final AttributeValidator[] FIELD_UsedCredits_Validators;
    private static final AttributeValidator[] FIELD_CompanyStatus_Validators;
    

    // Arrays of AttributeDecorators for each attribute
    private static final AttributeDecorator<Company, String>[] FIELD_HiringTeamName_Decorators;
    private static final AttributeDecorator<Company, Boolean>[] FIELD_ManageOwnBilling_Decorators;
    private static final AttributeDecorator<Company, Countries>[] FIELD_HTCountry_Decorators;
    private static final AttributeDecorator<Company, Boolean>[] FIELD_IsLogoDeleted_Decorators;
    private static final AttributeDecorator<Company, Boolean>[] FIELD_CompletedProfile_Decorators;
    private static final AttributeDecorator<Company, Integer>[] FIELD_PaymentJobCount_Decorators;
    private static final AttributeDecorator<Company, String>[] FIELD_StripeLast4_Decorators;
    private static final AttributeDecorator<Company, String>[] FIELD_StripeBrand_Decorators;
    private static final AttributeDecorator<Company, String>[] FIELD_CompanyName_Decorators;
    private static final AttributeDecorator<Company, BinaryContent>[] FIELD_CompanyLogo_Decorators;
    private static final AttributeDecorator<Company, HiringTeamType>[] FIELD_HiringTeamType_Decorators;
    private static final AttributeDecorator<Company, Industry>[] FIELD_Industry_Decorators;
    private static final AttributeDecorator<Company, TimeZone>[] FIELD_TimeZone_Decorators;
    private static final AttributeDecorator<Company, Boolean>[] FIELD_IsVerified_Decorators;
    private static final AttributeDecorator<Company, State>[] FIELD_State_Decorators;
    private static final AttributeDecorator<Company, Countries>[] FIELD_Country_Decorators;
    private static final AttributeDecorator<Company, String>[] FIELD_PostCode_Decorators;
    private static final AttributeDecorator<Company, String>[] FIELD_City_Decorators;
    private static final AttributeDecorator<Company, Boolean>[] FIELD_HasClientSupport_Decorators;
    private static final AttributeDecorator<Company, String>[] FIELD_StripeReference_Decorators;
    private static final AttributeDecorator<Company, String>[] FIELD_StripeSubscription_Decorators;
    private static final AttributeDecorator<Company, String>[] FIELD_NameOnCard_Decorators;
    private static final AttributeDecorator<Company, String>[] FIELD_CardPostCode_Decorators;
    private static final AttributeDecorator<Company, String>[] FIELD_CardID_Decorators;
    private static final AttributeDecorator<Company, Date>[] FIELD_PlanRenewedOn_Decorators;
    private static final AttributeDecorator<Company, Integer>[] FIELD_UsedCredits_Decorators;
    private static final AttributeDecorator<Company, CompanyStatus>[] FIELD_CompanyStatus_Decorators;
    
    
    // Arrays of SingleAssocDecorators for each attribute
    private static final SingleAssocDecorator<Company, CompanyUser>[] SINGLEREFERENCE_Owner_Decorators;
    private static final SingleAssocDecorator<Company, HiringTeam>[] SINGLEREFERENCE_BillingTeam_Decorators;
    private static final SingleAssocDecorator<Company, CompanyUser>[] SINGLEREFERENCE_AddedByUser_Decorators;
    private static final SingleAssocDecorator<Company, PaymentPlan>[] SINGLEREFERENCE_PaymentPlan_Decorators;
    
    
    // Arrays of MultiAssocDecorators for each attribute
    private static final MultiAssocDecorator<Company, CompanyUser>[] MULTIPLEREFERENCE_Users_Decorators;
    private static final MultiAssocDecorator<Company, Client>[] MULTIPLEREFERENCE_Clients_Decorators;
    private static final MultiAssocDecorator<Company, HiringTeam>[] MULTIPLEREFERENCE_HiringTeams_Decorators;
    

    // Arrays of behaviour decorators
    private static final CompanyBehaviourDecorator[] Company_BehaviourDecorators;
    
    static
    {
        try
        {
            
            String tmp_Users = CompanyUser.BACKREF_Company;
            String tmp_Clients = Client.BACKREF_Company;
            String tmp_HiringTeams = HiringTeam.BACKREF_Company;
            
            Map  validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping"));

            setupAssocMetaData_Users();
            setupAssocMetaData_Clients();
            setupAssocMetaData_HiringTeams();
            setupAssocMetaData_Owner();
            setupAssocMetaData_BillingTeam();
            setupAssocMetaData_AddedByUser();
            setupAssocMetaData_PaymentPlan();
            FIELD_HiringTeamName_Validators = (AttributeValidator[])setupAttribMetaData_HiringTeamName(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_ManageOwnBilling_Validators = (AttributeValidator[])setupAttribMetaData_ManageOwnBilling(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_HTCountry_Validators = (AttributeValidator[])setupAttribMetaData_HTCountry(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_IsLogoDeleted_Validators = (AttributeValidator[])setupAttribMetaData_IsLogoDeleted(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_CompletedProfile_Validators = (AttributeValidator[])setupAttribMetaData_CompletedProfile(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_PaymentJobCount_Validators = (AttributeValidator[])setupAttribMetaData_PaymentJobCount(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_StripeLast4_Validators = (AttributeValidator[])setupAttribMetaData_StripeLast4(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_StripeBrand_Validators = (AttributeValidator[])setupAttribMetaData_StripeBrand(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_CompanyName_Validators = (AttributeValidator[])setupAttribMetaData_CompanyName(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_CompanyLogo_Validators = (AttributeValidator[])setupAttribMetaData_CompanyLogo(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_HiringTeamType_Validators = (AttributeValidator[])setupAttribMetaData_HiringTeamType(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_Industry_Validators = (AttributeValidator[])setupAttribMetaData_Industry(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_TimeZone_Validators = (AttributeValidator[])setupAttribMetaData_TimeZone(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_IsVerified_Validators = (AttributeValidator[])setupAttribMetaData_IsVerified(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_State_Validators = (AttributeValidator[])setupAttribMetaData_State(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_Country_Validators = (AttributeValidator[])setupAttribMetaData_Country(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_PostCode_Validators = (AttributeValidator[])setupAttribMetaData_PostCode(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_City_Validators = (AttributeValidator[])setupAttribMetaData_City(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_HasClientSupport_Validators = (AttributeValidator[])setupAttribMetaData_HasClientSupport(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_StripeReference_Validators = (AttributeValidator[])setupAttribMetaData_StripeReference(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_StripeSubscription_Validators = (AttributeValidator[])setupAttribMetaData_StripeSubscription(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_NameOnCard_Validators = (AttributeValidator[])setupAttribMetaData_NameOnCard(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_CardPostCode_Validators = (AttributeValidator[])setupAttribMetaData_CardPostCode(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_CardID_Validators = (AttributeValidator[])setupAttribMetaData_CardID(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_PlanRenewedOn_Validators = (AttributeValidator[])setupAttribMetaData_PlanRenewedOn(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_UsedCredits_Validators = (AttributeValidator[])setupAttribMetaData_UsedCredits(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_CompanyStatus_Validators = (AttributeValidator[])setupAttribMetaData_CompanyStatus(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_HiringTeamName_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_HiringTeamName).toArray (new AttributeDecorator[0]);
            FIELD_ManageOwnBilling_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_ManageOwnBilling).toArray (new AttributeDecorator[0]);
            FIELD_HTCountry_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_HTCountry).toArray (new AttributeDecorator[0]);
            FIELD_IsLogoDeleted_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_IsLogoDeleted).toArray (new AttributeDecorator[0]);
            FIELD_CompletedProfile_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_CompletedProfile).toArray (new AttributeDecorator[0]);
            FIELD_PaymentJobCount_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_PaymentJobCount).toArray (new AttributeDecorator[0]);
            FIELD_StripeLast4_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_StripeLast4).toArray (new AttributeDecorator[0]);
            FIELD_StripeBrand_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_StripeBrand).toArray (new AttributeDecorator[0]);
            FIELD_CompanyName_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_CompanyName).toArray (new AttributeDecorator[0]);
            FIELD_CompanyLogo_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_CompanyLogo).toArray (new AttributeDecorator[0]);
            FIELD_HiringTeamType_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_HiringTeamType).toArray (new AttributeDecorator[0]);
            FIELD_Industry_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_Industry).toArray (new AttributeDecorator[0]);
            FIELD_TimeZone_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_TimeZone).toArray (new AttributeDecorator[0]);
            FIELD_IsVerified_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_IsVerified).toArray (new AttributeDecorator[0]);
            FIELD_State_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_State).toArray (new AttributeDecorator[0]);
            FIELD_Country_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_Country).toArray (new AttributeDecorator[0]);
            FIELD_PostCode_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_PostCode).toArray (new AttributeDecorator[0]);
            FIELD_City_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_City).toArray (new AttributeDecorator[0]);
            FIELD_HasClientSupport_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_HasClientSupport).toArray (new AttributeDecorator[0]);
            FIELD_StripeReference_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_StripeReference).toArray (new AttributeDecorator[0]);
            FIELD_StripeSubscription_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_StripeSubscription).toArray (new AttributeDecorator[0]);
            FIELD_NameOnCard_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_NameOnCard).toArray (new AttributeDecorator[0]);
            FIELD_CardPostCode_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_CardPostCode).toArray (new AttributeDecorator[0]);
            FIELD_CardID_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_CardID).toArray (new AttributeDecorator[0]);
            FIELD_PlanRenewedOn_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_PlanRenewedOn).toArray (new AttributeDecorator[0]);
            FIELD_UsedCredits_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_UsedCredits).toArray (new AttributeDecorator[0]);
            FIELD_CompanyStatus_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_Company, FIELD_CompanyStatus).toArray (new AttributeDecorator[0]);
            SINGLEREFERENCE_Owner_Decorators = (SingleAssocDecorator[])AttributeDecoratorUtils.getSingleAssocDecorators(REFERENCE_Company, SINGLEREFERENCE_Owner).toArray (new SingleAssocDecorator[0]);
            SINGLEREFERENCE_BillingTeam_Decorators = (SingleAssocDecorator[])AttributeDecoratorUtils.getSingleAssocDecorators(REFERENCE_Company, SINGLEREFERENCE_BillingTeam).toArray (new SingleAssocDecorator[0]);
            SINGLEREFERENCE_AddedByUser_Decorators = (SingleAssocDecorator[])AttributeDecoratorUtils.getSingleAssocDecorators(REFERENCE_Company, SINGLEREFERENCE_AddedByUser).toArray (new SingleAssocDecorator[0]);
            SINGLEREFERENCE_PaymentPlan_Decorators = (SingleAssocDecorator[])AttributeDecoratorUtils.getSingleAssocDecorators(REFERENCE_Company, SINGLEREFERENCE_PaymentPlan).toArray (new SingleAssocDecorator[0]);
            MULTIPLEREFERENCE_Users_Decorators = (MultiAssocDecorator[])AttributeDecoratorUtils.getMultiAssocDecorators(REFERENCE_Company, MULTIPLEREFERENCE_Users).toArray (new MultiAssocDecorator[0]);
            MULTIPLEREFERENCE_Clients_Decorators = (MultiAssocDecorator[])AttributeDecoratorUtils.getMultiAssocDecorators(REFERENCE_Company, MULTIPLEREFERENCE_Clients).toArray (new MultiAssocDecorator[0]);
            MULTIPLEREFERENCE_HiringTeams_Decorators = (MultiAssocDecorator[])AttributeDecoratorUtils.getMultiAssocDecorators(REFERENCE_Company, MULTIPLEREFERENCE_HiringTeams).toArray (new MultiAssocDecorator[0]);
            

            REFERENCE_Company.initialiseReference ();
            DUMMY_Company.initialiseReference ();
            Company_BehaviourDecorators = BaseBusinessClass.getBBCBehaviours(Company.class).toArray(new CompanyBehaviourDecorator[0]);
        }
        catch (RuntimeException e)
        {
            LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR1, e, "Error initialising");
            throw e;
        }
    }

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

        metaInfo.put ("backreferenceName", "Company");
        metaInfo.put ("name", "Users");
        metaInfo.put ("type", "CompanyUser");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.Users:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (MULTIPLEREFERENCE_Users, Collections.unmodifiableMap (metaInfo));
    }
    
    
    private static void setupAssocMetaData_Clients()
    {
        Map metaInfo = new HashMap ();

        metaInfo.put ("backreferenceName", "Company");
        metaInfo.put ("name", "Clients");
        metaInfo.put ("type", "Client");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.Clients:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (MULTIPLEREFERENCE_Clients, Collections.unmodifiableMap (metaInfo));
    }
    
    
    private static void setupAssocMetaData_HiringTeams()
    {
        Map metaInfo = new HashMap ();

        metaInfo.put ("backreferenceName", "Company");
        metaInfo.put ("name", "HiringTeams");
        metaInfo.put ("type", "HiringTeam");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.HiringTeams:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (MULTIPLEREFERENCE_HiringTeams, Collections.unmodifiableMap (metaInfo));
    }
    
    
    private static void setupAssocMetaData_Owner()
    {
        Map metaInfo = new HashMap ();

        metaInfo.put ("name", "Owner");
        metaInfo.put ("type", "CompanyUser");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.Owner:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (SINGLEREFERENCE_Owner, Collections.unmodifiableMap (metaInfo));
    }
    
    
    private static void setupAssocMetaData_BillingTeam()
    {
        Map metaInfo = new HashMap ();

        metaInfo.put ("name", "BillingTeam");
        metaInfo.put ("type", "HiringTeam");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.BillingTeam:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (SINGLEREFERENCE_BillingTeam, Collections.unmodifiableMap (metaInfo));
    }
    
    
    private static void setupAssocMetaData_AddedByUser()
    {
        Map metaInfo = new HashMap ();

        metaInfo.put ("dbcol", "added_by_user_id");
        metaInfo.put ("mandatory", "true");
        metaInfo.put ("name", "AddedByUser");
        metaInfo.put ("type", "CompanyUser");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.AddedByUser:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (SINGLEREFERENCE_AddedByUser, Collections.unmodifiableMap (metaInfo));
    }
    
    
    private static void setupAssocMetaData_PaymentPlan()
    {
        Map metaInfo = new HashMap ();

        metaInfo.put ("dbcol", "payment_plan_id");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "PaymentPlan");
        metaInfo.put ("type", "PaymentPlan");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.PaymentPlan:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (SINGLEREFERENCE_PaymentPlan, Collections.unmodifiableMap (metaInfo));
    }
    
    
    private static List setupAttribMetaData_HiringTeamName(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("name", "HiringTeamName");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.HiringTeamName:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_HiringTeamName, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("defaultValue", "Boolean.FALSE");
        metaInfo.put ("name", "ManageOwnBilling");
        metaInfo.put ("type", "Boolean");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.ManageOwnBilling:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_ManageOwnBilling, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
        metaInfo.put ("name", "HTCountry");
        metaInfo.put ("type", "Countries");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.HTCountry:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_HTCountry, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("defaultValue", "Boolean.FALSE");
        metaInfo.put ("name", "IsLogoDeleted");
        metaInfo.put ("type", "Boolean");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.IsLogoDeleted:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_IsLogoDeleted, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("defaultValue", "Boolean.FALSE");
        metaInfo.put ("name", "CompletedProfile");
        metaInfo.put ("type", "Boolean");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.CompletedProfile:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_CompletedProfile, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("name", "PaymentJobCount");
        metaInfo.put ("type", "Integer");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.PaymentJobCount:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_PaymentJobCount, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("name", "StripeLast4");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.StripeLast4:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_StripeLast4, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("name", "StripeBrand");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.StripeBrand:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_StripeBrand, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("dbcol", "company_name");
        metaInfo.put ("length", "100");
        metaInfo.put ("mandatory", "true");
        metaInfo.put ("name", "CompanyName");
        metaInfo.put ("type", "String");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.CompanyName:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_CompanyName, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("attribHelper", "BLOBAttributeHelper");
        metaInfo.put ("attribHelperInstance", "BLOBAttributeHelper.INSTANCE");
        metaInfo.put ("binaryHandler", "loggedin");
        metaInfo.put ("dbcol", "company_logo");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "CompanyLogo");
        metaInfo.put ("type", "BinaryContent");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.CompanyLogo:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_CompanyLogo, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
        metaInfo.put ("dbcol", "hiring_team_type");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "HiringTeamType");
        metaInfo.put ("type", "HiringTeamType");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.HiringTeamType:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_HiringTeamType, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
        metaInfo.put ("dbcol", "industry");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "Industry");
        metaInfo.put ("type", "Industry");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.Industry:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_Industry, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
        metaInfo.put ("dbcol", "time_zone");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "TimeZone");
        metaInfo.put ("type", "TimeZone");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.TimeZone:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_TimeZone, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("dbcol", "is_verified");
        metaInfo.put ("defaultValue", "Boolean.FALSE");
        metaInfo.put ("name", "IsVerified");
        metaInfo.put ("type", "Boolean");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.IsVerified:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_IsVerified, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
        metaInfo.put ("dbcol", "state");
        metaInfo.put ("defaultValue", "State.WA");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "State");
        metaInfo.put ("type", "State");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.State:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_State, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
        metaInfo.put ("dbcol", "country");
        metaInfo.put ("defaultValue", "Countries.AU");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "Country");
        metaInfo.put ("type", "Countries");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.Country:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_Country, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("dbcol", "post_code");
        metaInfo.put ("length", "10");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "PostCode");
        metaInfo.put ("type", "String");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.PostCode:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_PostCode, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("dbcol", "city");
        metaInfo.put ("length", "100");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "City");
        metaInfo.put ("type", "String");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.City:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_City, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("dbcol", "has_client_support");
        metaInfo.put ("defaultValue", "Boolean.FALSE");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "HasClientSupport");
        metaInfo.put ("type", "Boolean");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.HasClientSupport:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_HasClientSupport, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("dbcol", "stripe_reference");
        metaInfo.put ("length", "100");
        metaInfo.put ("name", "StripeReference");
        metaInfo.put ("type", "String");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.StripeReference:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_StripeReference, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("dbcol", "stripe_subscription");
        metaInfo.put ("length", "100");
        metaInfo.put ("name", "StripeSubscription");
        metaInfo.put ("type", "String");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.StripeSubscription:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_StripeSubscription, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("dbcol", "name_on_card");
        metaInfo.put ("length", "100");
        metaInfo.put ("name", "NameOnCard");
        metaInfo.put ("type", "String");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.NameOnCard:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_NameOnCard, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("dbcol", "card_post_code");
        metaInfo.put ("length", "10");
        metaInfo.put ("name", "CardPostCode");
        metaInfo.put ("type", "String");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.CardPostCode:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_CardPostCode, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("dbcol", "card_id");
        metaInfo.put ("length", "100");
        metaInfo.put ("name", "CardID");
        metaInfo.put ("type", "String");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.CardID:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_CardID, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("dbcol", "plan_renewed_on");
        metaInfo.put ("mandatory", "false");
        metaInfo.put ("name", "PlanRenewedOn");
        metaInfo.put ("type", "Date");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.PlanRenewedOn:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_PlanRenewedOn, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("dbcol", "used_credits");
        metaInfo.put ("name", "UsedCredits");
        metaInfo.put ("type", "Integer");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.UsedCredits:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_UsedCredits, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
        metaInfo.put ("dbcol", "company_status");
        metaInfo.put ("defaultValue", "CompanyStatus.ACTIVE");
        metaInfo.put ("mandatory", "true");
        metaInfo.put ("name", "CompanyStatus");
        metaInfo.put ("type", "CompanyStatus");
        metaInfo.put (METADATA_DB_TABLENAME, "tl_company");
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Company.CompanyStatus:", metaInfo);
        ATTRIBUTES_METADATA_Company.put (FIELD_CompanyStatus, Collections.unmodifiableMap (metaInfo));

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

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


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

    


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

        
        _CompanyName = (String)(HELPER_CompanyName.initialise (_CompanyName));
        _CompanyLogo = (BinaryContent)(HELPER_CompanyLogo.initialise (_CompanyLogo));
        _HiringTeamType = (HiringTeamType)(HELPER_HiringTeamType.initialise (_HiringTeamType));
        _Industry = (Industry)(HELPER_Industry.initialise (_Industry));
        _TimeZone = (TimeZone)(HELPER_TimeZone.initialise (_TimeZone));
        _IsVerified = (Boolean)(Boolean.FALSE);
        _State = (State)(State.WA);
        _Country = (Countries)(Countries.AU);
        _PostCode = (String)(HELPER_PostCode.initialise (_PostCode));
        _City = (String)(HELPER_City.initialise (_City));
        _HasClientSupport = (Boolean)(Boolean.FALSE);
        _StripeReference = (String)(HELPER_StripeReference.initialise (_StripeReference));
        _StripeSubscription = (String)(HELPER_StripeSubscription.initialise (_StripeSubscription));
        _NameOnCard = (String)(HELPER_NameOnCard.initialise (_NameOnCard));
        _CardPostCode = (String)(HELPER_CardPostCode.initialise (_CardPostCode));
        _CardID = (String)(HELPER_CardID.initialise (_CardID));
        _PlanRenewedOn = (Date)(HELPER_PlanRenewedOn.initialise (_PlanRenewedOn));
        _UsedCredits = (Integer)(HELPER_UsedCredits.initialise (_UsedCredits));
        _CompanyStatus = (CompanyStatus)(CompanyStatus.ACTIVE);
        _HiringTeamName = (String)(HELPER_HiringTeamName.initialise (_HiringTeamName));
        _ManageOwnBilling = (Boolean)(Boolean.FALSE);
        _HTCountry = (Countries)(HELPER_HTCountry.initialise (_HTCountry));
        _IsLogoDeleted = (Boolean)(Boolean.FALSE);
        _CompletedProfile = (Boolean)(Boolean.FALSE);
        _PaymentJobCount = (Integer)(HELPER_PaymentJobCount.initialise (_PaymentJobCount));
        _StripeLast4 = (String)(HELPER_StripeLast4.initialise (_StripeLast4));
        _StripeBrand = (String)(HELPER_StripeBrand.initialise (_StripeBrand));
    }


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

        _Owner = new SingleAssociation<Company, CompanyUser> (this, SINGLEREFERENCE_Owner, null, CompanyUser.REFERENCE_CompanyUser, "");
        _BillingTeam = new SingleAssociation<Company, HiringTeam> (this, SINGLEREFERENCE_BillingTeam, null, HiringTeam.REFERENCE_HiringTeam, "");
        _AddedByUser = new SingleAssociation<Company, CompanyUser> (this, SINGLEREFERENCE_AddedByUser, null, CompanyUser.REFERENCE_CompanyUser, "tl_company");
        _PaymentPlan = new SingleAssociation<Company, PaymentPlan> (this, SINGLEREFERENCE_PaymentPlan, null, PaymentPlan.REFERENCE_PaymentPlan, "tl_company");
        _Users = new MultipleAssociation<Company, CompanyUser> (this, MULTIPLEREFERENCE_Users, CompanyUser.SINGLEREFERENCE_Company, CompanyUser.REFERENCE_CompanyUser);_Clients = new MultipleAssociation<Company, Client> (this, MULTIPLEREFERENCE_Clients, Client.SINGLEREFERENCE_Company, Client.REFERENCE_Client);_HiringTeams = new MultipleAssociation<Company, HiringTeam> (this, MULTIPLEREFERENCE_HiringTeams, HiringTeam.SINGLEREFERENCE_Company, HiringTeam.REFERENCE_HiringTeam);
    }


    protected BaseBusinessClass initialiseReference ()
    {
        super.initialiseReference ();
        
        _Owner = new SingleAssociation<Company, CompanyUser> (this, SINGLEREFERENCE_Owner, null, CompanyUser.REFERENCE_CompanyUser, "");
        _BillingTeam = new SingleAssociation<Company, HiringTeam> (this, SINGLEREFERENCE_BillingTeam, null, HiringTeam.REFERENCE_HiringTeam, "");
        _AddedByUser = new SingleAssociation<Company, CompanyUser> (this, SINGLEREFERENCE_AddedByUser, null, CompanyUser.REFERENCE_CompanyUser, "tl_company");
        _PaymentPlan = new SingleAssociation<Company, PaymentPlan> (this, SINGLEREFERENCE_PaymentPlan, null, PaymentPlan.REFERENCE_PaymentPlan, "tl_company");
        _Users = new MultipleAssociation<Company, CompanyUser> (this, MULTIPLEREFERENCE_Users, CompanyUser.SINGLEREFERENCE_Company, CompanyUser.REFERENCE_CompanyUser);_Clients = new MultipleAssociation<Company, Client> (this, MULTIPLEREFERENCE_Clients, Client.SINGLEREFERENCE_Company, Client.REFERENCE_Client);_HiringTeams = new MultipleAssociation<Company, HiringTeam> (this, MULTIPLEREFERENCE_HiringTeams, HiringTeam.SINGLEREFERENCE_Company, HiringTeam.REFERENCE_HiringTeam);
        
        return this;
    }


    /**
     * Attribute CompanyName
     */
    public String getCompanyName ()
    {
        assertValid();
        String valToReturn = AttributeDecoratorUtils.getValue (FIELD_CompanyName_Decorators, (Company)this, FIELD_CompanyName, _CompanyName);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getCompanyName ((Company)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 preCompanyNameChange (String newCompanyName) 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 postCompanyNameChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute CompanyName.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setCompanyName (String newCompanyName) throws FieldException
    {
        newCompanyName = AttributeDecoratorUtils.setValue (FIELD_CompanyName_Decorators, (Company)this, FIELD_CompanyName, newCompanyName);

        boolean oldAndNewIdentical = HELPER_CompanyName.compare (_CompanyName, newCompanyName);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newCompanyName = bhd.setCompanyName ((Company)this, newCompanyName);
                oldAndNewIdentical = HELPER_CompanyName.compare (_CompanyName, newCompanyName);
            }

            BusinessObjectParser.assertFieldCondition (newCompanyName != null, this, FIELD_CompanyName, "mandatory");
            

            if (FIELD_CompanyName_Validators.length > 0)
            {
                Object newCompanyNameObj = HELPER_CompanyName.toObject (newCompanyName);

                if (newCompanyNameObj != null)
                {
                    int     loopMax = FIELD_CompanyName_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_CompanyName);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_CompanyName_Decorators, (Company)this, FIELD_CompanyName ,getWriteability_CompanyName ()) != FieldWriteability.FALSE, "Field  CompanyName is not writeable");
            preCompanyNameChange (newCompanyName);
            markFieldChange (FIELD_CompanyName);
            _CompanyName = newCompanyName;            
            postFieldChange (FIELD_CompanyName);
            postCompanyNameChange ();
        }
    }

    /**
     * Attribute CompanyLogo
     */
    public BinaryContent getCompanyLogo ()
    {
        assertValid();
        BinaryContent valToReturn = AttributeDecoratorUtils.getValue (FIELD_CompanyLogo_Decorators, (Company)this, FIELD_CompanyLogo, _CompanyLogo);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getCompanyLogo ((Company)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 preCompanyLogoChange (BinaryContent newCompanyLogo) 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 postCompanyLogoChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute CompanyLogo.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setCompanyLogo (BinaryContent newCompanyLogo) throws FieldException
    {
        newCompanyLogo = AttributeDecoratorUtils.setValue (FIELD_CompanyLogo_Decorators, (Company)this, FIELD_CompanyLogo, newCompanyLogo);

        boolean oldAndNewIdentical = HELPER_CompanyLogo.compare (_CompanyLogo, newCompanyLogo);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newCompanyLogo = bhd.setCompanyLogo ((Company)this, newCompanyLogo);
                oldAndNewIdentical = HELPER_CompanyLogo.compare (_CompanyLogo, newCompanyLogo);
            }

            

            if (FIELD_CompanyLogo_Validators.length > 0)
            {
                Object newCompanyLogoObj = HELPER_CompanyLogo.toObject (newCompanyLogo);

                if (newCompanyLogoObj != null)
                {
                    int     loopMax = FIELD_CompanyLogo_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_CompanyLogo);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_CompanyLogo_Decorators, (Company)this, FIELD_CompanyLogo ,getWriteability_CompanyLogo ()) != FieldWriteability.FALSE, "Field  CompanyLogo is not writeable");
            preCompanyLogoChange (newCompanyLogo);
            markFieldChange (FIELD_CompanyLogo);
            _CompanyLogo = newCompanyLogo;            
            postFieldChange (FIELD_CompanyLogo);
            postCompanyLogoChange ();
        }
    }

    /**
     * Attribute HiringTeamType
     */
    public HiringTeamType getHiringTeamType ()
    {
        assertValid();
        HiringTeamType valToReturn = AttributeDecoratorUtils.getValue (FIELD_HiringTeamType_Decorators, (Company)this, FIELD_HiringTeamType, _HiringTeamType);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getHiringTeamType ((Company)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 preHiringTeamTypeChange (HiringTeamType newHiringTeamType) 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 postHiringTeamTypeChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute HiringTeamType.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setHiringTeamType (HiringTeamType newHiringTeamType) throws FieldException
    {
        newHiringTeamType = AttributeDecoratorUtils.setValue (FIELD_HiringTeamType_Decorators, (Company)this, FIELD_HiringTeamType, newHiringTeamType);

        boolean oldAndNewIdentical = HELPER_HiringTeamType.compare (_HiringTeamType, newHiringTeamType);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newHiringTeamType = bhd.setHiringTeamType ((Company)this, newHiringTeamType);
                oldAndNewIdentical = HELPER_HiringTeamType.compare (_HiringTeamType, newHiringTeamType);
            }

            

            if (FIELD_HiringTeamType_Validators.length > 0)
            {
                Object newHiringTeamTypeObj = HELPER_HiringTeamType.toObject (newHiringTeamType);

                if (newHiringTeamTypeObj != null)
                {
                    int     loopMax = FIELD_HiringTeamType_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_HiringTeamType);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_HiringTeamType_Decorators, (Company)this, FIELD_HiringTeamType ,getWriteability_HiringTeamType ()) != FieldWriteability.FALSE, "Field  HiringTeamType is not writeable");
            preHiringTeamTypeChange (newHiringTeamType);
            markFieldChange (FIELD_HiringTeamType);
            _HiringTeamType = newHiringTeamType;            
            postFieldChange (FIELD_HiringTeamType);
            postHiringTeamTypeChange ();
        }
    }

    /**
     * Attribute Industry
     */
    public Industry getIndustry ()
    {
        assertValid();
        Industry valToReturn = AttributeDecoratorUtils.getValue (FIELD_Industry_Decorators, (Company)this, FIELD_Industry, _Industry);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getIndustry ((Company)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 preIndustryChange (Industry newIndustry) 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 postIndustryChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute Industry.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setIndustry (Industry newIndustry) throws FieldException
    {
        newIndustry = AttributeDecoratorUtils.setValue (FIELD_Industry_Decorators, (Company)this, FIELD_Industry, newIndustry);

        boolean oldAndNewIdentical = HELPER_Industry.compare (_Industry, newIndustry);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newIndustry = bhd.setIndustry ((Company)this, newIndustry);
                oldAndNewIdentical = HELPER_Industry.compare (_Industry, newIndustry);
            }

            

            if (FIELD_Industry_Validators.length > 0)
            {
                Object newIndustryObj = HELPER_Industry.toObject (newIndustry);

                if (newIndustryObj != null)
                {
                    int     loopMax = FIELD_Industry_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_Industry);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_Industry_Decorators, (Company)this, FIELD_Industry ,getWriteability_Industry ()) != FieldWriteability.FALSE, "Field  Industry is not writeable");
            preIndustryChange (newIndustry);
            markFieldChange (FIELD_Industry);
            _Industry = newIndustry;            
            postFieldChange (FIELD_Industry);
            postIndustryChange ();
        }
    }

    /**
     * Attribute TimeZone
     */
    public TimeZone getTimeZone ()
    {
        assertValid();
        TimeZone valToReturn = AttributeDecoratorUtils.getValue (FIELD_TimeZone_Decorators, (Company)this, FIELD_TimeZone, _TimeZone);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getTimeZone ((Company)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 preTimeZoneChange (TimeZone newTimeZone) 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 postTimeZoneChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute TimeZone.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setTimeZone (TimeZone newTimeZone) throws FieldException
    {
        newTimeZone = AttributeDecoratorUtils.setValue (FIELD_TimeZone_Decorators, (Company)this, FIELD_TimeZone, newTimeZone);

        boolean oldAndNewIdentical = HELPER_TimeZone.compare (_TimeZone, newTimeZone);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newTimeZone = bhd.setTimeZone ((Company)this, newTimeZone);
                oldAndNewIdentical = HELPER_TimeZone.compare (_TimeZone, newTimeZone);
            }

            

            if (FIELD_TimeZone_Validators.length > 0)
            {
                Object newTimeZoneObj = HELPER_TimeZone.toObject (newTimeZone);

                if (newTimeZoneObj != null)
                {
                    int     loopMax = FIELD_TimeZone_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_TimeZone);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_TimeZone_Decorators, (Company)this, FIELD_TimeZone ,getWriteability_TimeZone ()) != FieldWriteability.FALSE, "Field  TimeZone is not writeable");
            preTimeZoneChange (newTimeZone);
            markFieldChange (FIELD_TimeZone);
            _TimeZone = newTimeZone;            
            postFieldChange (FIELD_TimeZone);
            postTimeZoneChange ();
        }
    }

    /**
     * Attribute IsVerified
     */
    public Boolean getIsVerified ()
    {
        assertValid();
        Boolean valToReturn = AttributeDecoratorUtils.getValue (FIELD_IsVerified_Decorators, (Company)this, FIELD_IsVerified, _IsVerified);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getIsVerified ((Company)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 preIsVerifiedChange (Boolean newIsVerified) 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 postIsVerifiedChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute IsVerified.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setIsVerified (Boolean newIsVerified) throws FieldException
    {
        newIsVerified = AttributeDecoratorUtils.setValue (FIELD_IsVerified_Decorators, (Company)this, FIELD_IsVerified, newIsVerified);

        boolean oldAndNewIdentical = HELPER_IsVerified.compare (_IsVerified, newIsVerified);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newIsVerified = bhd.setIsVerified ((Company)this, newIsVerified);
                oldAndNewIdentical = HELPER_IsVerified.compare (_IsVerified, newIsVerified);
            }

            

            if (FIELD_IsVerified_Validators.length > 0)
            {
                Object newIsVerifiedObj = HELPER_IsVerified.toObject (newIsVerified);

                if (newIsVerifiedObj != null)
                {
                    int     loopMax = FIELD_IsVerified_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_IsVerified);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_IsVerified_Decorators, (Company)this, FIELD_IsVerified ,getWriteability_IsVerified ()) != FieldWriteability.FALSE, "Field  IsVerified is not writeable");
            preIsVerifiedChange (newIsVerified);
            markFieldChange (FIELD_IsVerified);
            _IsVerified = newIsVerified;            
            postFieldChange (FIELD_IsVerified);
            postIsVerifiedChange ();
        }
    }

    /**
     * Attribute State
     */
    public State getState ()
    {
        assertValid();
        State valToReturn = AttributeDecoratorUtils.getValue (FIELD_State_Decorators, (Company)this, FIELD_State, _State);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getState ((Company)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 preStateChange (State newState) 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 postStateChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute State.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setState (State newState) throws FieldException
    {
        newState = AttributeDecoratorUtils.setValue (FIELD_State_Decorators, (Company)this, FIELD_State, newState);

        boolean oldAndNewIdentical = HELPER_State.compare (_State, newState);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newState = bhd.setState ((Company)this, newState);
                oldAndNewIdentical = HELPER_State.compare (_State, newState);
            }

            

            if (FIELD_State_Validators.length > 0)
            {
                Object newStateObj = HELPER_State.toObject (newState);

                if (newStateObj != null)
                {
                    int     loopMax = FIELD_State_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_State);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_State_Decorators, (Company)this, FIELD_State ,getWriteability_State ()) != FieldWriteability.FALSE, "Field  State is not writeable");
            preStateChange (newState);
            markFieldChange (FIELD_State);
            _State = newState;            
            postFieldChange (FIELD_State);
            postStateChange ();
        }
    }

    /**
     * Attribute Country
     */
    public Countries getCountry ()
    {
        assertValid();
        Countries valToReturn = AttributeDecoratorUtils.getValue (FIELD_Country_Decorators, (Company)this, FIELD_Country, _Country);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getCountry ((Company)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 preCountryChange (Countries newCountry) 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 postCountryChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute Country.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setCountry (Countries newCountry) throws FieldException
    {
        newCountry = AttributeDecoratorUtils.setValue (FIELD_Country_Decorators, (Company)this, FIELD_Country, newCountry);

        boolean oldAndNewIdentical = HELPER_Country.compare (_Country, newCountry);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newCountry = bhd.setCountry ((Company)this, newCountry);
                oldAndNewIdentical = HELPER_Country.compare (_Country, newCountry);
            }

            

            if (FIELD_Country_Validators.length > 0)
            {
                Object newCountryObj = HELPER_Country.toObject (newCountry);

                if (newCountryObj != null)
                {
                    int     loopMax = FIELD_Country_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_Country);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_Country_Decorators, (Company)this, FIELD_Country ,getWriteability_Country ()) != FieldWriteability.FALSE, "Field  Country is not writeable");
            preCountryChange (newCountry);
            markFieldChange (FIELD_Country);
            _Country = newCountry;            
            postFieldChange (FIELD_Country);
            postCountryChange ();
        }
    }

    /**
     * Attribute PostCode
     */
    public String getPostCode ()
    {
        assertValid();
        String valToReturn = AttributeDecoratorUtils.getValue (FIELD_PostCode_Decorators, (Company)this, FIELD_PostCode, _PostCode);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getPostCode ((Company)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 prePostCodeChange (String newPostCode) 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 postPostCodeChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute PostCode.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setPostCode (String newPostCode) throws FieldException
    {
        newPostCode = AttributeDecoratorUtils.setValue (FIELD_PostCode_Decorators, (Company)this, FIELD_PostCode, newPostCode);

        boolean oldAndNewIdentical = HELPER_PostCode.compare (_PostCode, newPostCode);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newPostCode = bhd.setPostCode ((Company)this, newPostCode);
                oldAndNewIdentical = HELPER_PostCode.compare (_PostCode, newPostCode);
            }

            

            if (FIELD_PostCode_Validators.length > 0)
            {
                Object newPostCodeObj = HELPER_PostCode.toObject (newPostCode);

                if (newPostCodeObj != null)
                {
                    int     loopMax = FIELD_PostCode_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_PostCode);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_PostCode_Decorators, (Company)this, FIELD_PostCode ,getWriteability_PostCode ()) != FieldWriteability.FALSE, "Field  PostCode is not writeable");
            prePostCodeChange (newPostCode);
            markFieldChange (FIELD_PostCode);
            _PostCode = newPostCode;            
            postFieldChange (FIELD_PostCode);
            postPostCodeChange ();
        }
    }

    /**
     * Attribute City
     */
    public String getCity ()
    {
        assertValid();
        String valToReturn = AttributeDecoratorUtils.getValue (FIELD_City_Decorators, (Company)this, FIELD_City, _City);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getCity ((Company)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 preCityChange (String newCity) 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 postCityChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute City.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setCity (String newCity) throws FieldException
    {
        newCity = AttributeDecoratorUtils.setValue (FIELD_City_Decorators, (Company)this, FIELD_City, newCity);

        boolean oldAndNewIdentical = HELPER_City.compare (_City, newCity);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newCity = bhd.setCity ((Company)this, newCity);
                oldAndNewIdentical = HELPER_City.compare (_City, newCity);
            }

            

            if (FIELD_City_Validators.length > 0)
            {
                Object newCityObj = HELPER_City.toObject (newCity);

                if (newCityObj != null)
                {
                    int     loopMax = FIELD_City_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_City);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_City_Decorators, (Company)this, FIELD_City ,getWriteability_City ()) != FieldWriteability.FALSE, "Field  City is not writeable");
            preCityChange (newCity);
            markFieldChange (FIELD_City);
            _City = newCity;            
            postFieldChange (FIELD_City);
            postCityChange ();
        }
    }

    /**
     * Attribute HasClientSupport
     */
    public Boolean getHasClientSupport ()
    {
        assertValid();
        Boolean valToReturn = AttributeDecoratorUtils.getValue (FIELD_HasClientSupport_Decorators, (Company)this, FIELD_HasClientSupport, _HasClientSupport);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getHasClientSupport ((Company)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 preHasClientSupportChange (Boolean newHasClientSupport) 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 postHasClientSupportChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute HasClientSupport.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setHasClientSupport (Boolean newHasClientSupport) throws FieldException
    {
        newHasClientSupport = AttributeDecoratorUtils.setValue (FIELD_HasClientSupport_Decorators, (Company)this, FIELD_HasClientSupport, newHasClientSupport);

        boolean oldAndNewIdentical = HELPER_HasClientSupport.compare (_HasClientSupport, newHasClientSupport);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newHasClientSupport = bhd.setHasClientSupport ((Company)this, newHasClientSupport);
                oldAndNewIdentical = HELPER_HasClientSupport.compare (_HasClientSupport, newHasClientSupport);
            }

            

            if (FIELD_HasClientSupport_Validators.length > 0)
            {
                Object newHasClientSupportObj = HELPER_HasClientSupport.toObject (newHasClientSupport);

                if (newHasClientSupportObj != null)
                {
                    int     loopMax = FIELD_HasClientSupport_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_HasClientSupport);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_HasClientSupport_Decorators, (Company)this, FIELD_HasClientSupport ,getWriteability_HasClientSupport ()) != FieldWriteability.FALSE, "Field  HasClientSupport is not writeable");
            preHasClientSupportChange (newHasClientSupport);
            markFieldChange (FIELD_HasClientSupport);
            _HasClientSupport = newHasClientSupport;            
            postFieldChange (FIELD_HasClientSupport);
            postHasClientSupportChange ();
        }
    }

    /**
     * Attribute StripeReference
     */
    public String getStripeReference ()
    {
        assertValid();
        String valToReturn = AttributeDecoratorUtils.getValue (FIELD_StripeReference_Decorators, (Company)this, FIELD_StripeReference, _StripeReference);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getStripeReference ((Company)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 preStripeReferenceChange (String newStripeReference) 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 postStripeReferenceChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute StripeReference.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setStripeReference (String newStripeReference) throws FieldException
    {
        newStripeReference = AttributeDecoratorUtils.setValue (FIELD_StripeReference_Decorators, (Company)this, FIELD_StripeReference, newStripeReference);

        boolean oldAndNewIdentical = HELPER_StripeReference.compare (_StripeReference, newStripeReference);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newStripeReference = bhd.setStripeReference ((Company)this, newStripeReference);
                oldAndNewIdentical = HELPER_StripeReference.compare (_StripeReference, newStripeReference);
            }

            

            if (FIELD_StripeReference_Validators.length > 0)
            {
                Object newStripeReferenceObj = HELPER_StripeReference.toObject (newStripeReference);

                if (newStripeReferenceObj != null)
                {
                    int     loopMax = FIELD_StripeReference_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_StripeReference);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_StripeReference_Decorators, (Company)this, FIELD_StripeReference ,getWriteability_StripeReference ()) != FieldWriteability.FALSE, "Field  StripeReference is not writeable");
            preStripeReferenceChange (newStripeReference);
            markFieldChange (FIELD_StripeReference);
            _StripeReference = newStripeReference;            
            postFieldChange (FIELD_StripeReference);
            postStripeReferenceChange ();
        }
    }

    /**
     * Attribute StripeSubscription
     */
    public String getStripeSubscription ()
    {
        assertValid();
        String valToReturn = AttributeDecoratorUtils.getValue (FIELD_StripeSubscription_Decorators, (Company)this, FIELD_StripeSubscription, _StripeSubscription);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getStripeSubscription ((Company)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 preStripeSubscriptionChange (String newStripeSubscription) 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 postStripeSubscriptionChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute StripeSubscription.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setStripeSubscription (String newStripeSubscription) throws FieldException
    {
        newStripeSubscription = AttributeDecoratorUtils.setValue (FIELD_StripeSubscription_Decorators, (Company)this, FIELD_StripeSubscription, newStripeSubscription);

        boolean oldAndNewIdentical = HELPER_StripeSubscription.compare (_StripeSubscription, newStripeSubscription);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newStripeSubscription = bhd.setStripeSubscription ((Company)this, newStripeSubscription);
                oldAndNewIdentical = HELPER_StripeSubscription.compare (_StripeSubscription, newStripeSubscription);
            }

            

            if (FIELD_StripeSubscription_Validators.length > 0)
            {
                Object newStripeSubscriptionObj = HELPER_StripeSubscription.toObject (newStripeSubscription);

                if (newStripeSubscriptionObj != null)
                {
                    int     loopMax = FIELD_StripeSubscription_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_StripeSubscription);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_StripeSubscription_Decorators, (Company)this, FIELD_StripeSubscription ,getWriteability_StripeSubscription ()) != FieldWriteability.FALSE, "Field  StripeSubscription is not writeable");
            preStripeSubscriptionChange (newStripeSubscription);
            markFieldChange (FIELD_StripeSubscription);
            _StripeSubscription = newStripeSubscription;            
            postFieldChange (FIELD_StripeSubscription);
            postStripeSubscriptionChange ();
        }
    }

    /**
     * Attribute NameOnCard
     */
    public String getNameOnCard ()
    {
        assertValid();
        String valToReturn = AttributeDecoratorUtils.getValue (FIELD_NameOnCard_Decorators, (Company)this, FIELD_NameOnCard, _NameOnCard);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getNameOnCard ((Company)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 preNameOnCardChange (String newNameOnCard) 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 postNameOnCardChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute NameOnCard.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setNameOnCard (String newNameOnCard) throws FieldException
    {
        newNameOnCard = AttributeDecoratorUtils.setValue (FIELD_NameOnCard_Decorators, (Company)this, FIELD_NameOnCard, newNameOnCard);

        boolean oldAndNewIdentical = HELPER_NameOnCard.compare (_NameOnCard, newNameOnCard);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newNameOnCard = bhd.setNameOnCard ((Company)this, newNameOnCard);
                oldAndNewIdentical = HELPER_NameOnCard.compare (_NameOnCard, newNameOnCard);
            }

            

            if (FIELD_NameOnCard_Validators.length > 0)
            {
                Object newNameOnCardObj = HELPER_NameOnCard.toObject (newNameOnCard);

                if (newNameOnCardObj != null)
                {
                    int     loopMax = FIELD_NameOnCard_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_NameOnCard);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_NameOnCard_Decorators, (Company)this, FIELD_NameOnCard ,getWriteability_NameOnCard ()) != FieldWriteability.FALSE, "Field  NameOnCard is not writeable");
            preNameOnCardChange (newNameOnCard);
            markFieldChange (FIELD_NameOnCard);
            _NameOnCard = newNameOnCard;            
            postFieldChange (FIELD_NameOnCard);
            postNameOnCardChange ();
        }
    }

    /**
     * Attribute CardPostCode
     */
    public String getCardPostCode ()
    {
        assertValid();
        String valToReturn = AttributeDecoratorUtils.getValue (FIELD_CardPostCode_Decorators, (Company)this, FIELD_CardPostCode, _CardPostCode);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getCardPostCode ((Company)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 preCardPostCodeChange (String newCardPostCode) 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 postCardPostCodeChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute CardPostCode.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setCardPostCode (String newCardPostCode) throws FieldException
    {
        newCardPostCode = AttributeDecoratorUtils.setValue (FIELD_CardPostCode_Decorators, (Company)this, FIELD_CardPostCode, newCardPostCode);

        boolean oldAndNewIdentical = HELPER_CardPostCode.compare (_CardPostCode, newCardPostCode);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newCardPostCode = bhd.setCardPostCode ((Company)this, newCardPostCode);
                oldAndNewIdentical = HELPER_CardPostCode.compare (_CardPostCode, newCardPostCode);
            }

            

            if (FIELD_CardPostCode_Validators.length > 0)
            {
                Object newCardPostCodeObj = HELPER_CardPostCode.toObject (newCardPostCode);

                if (newCardPostCodeObj != null)
                {
                    int     loopMax = FIELD_CardPostCode_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_CardPostCode);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_CardPostCode_Decorators, (Company)this, FIELD_CardPostCode ,getWriteability_CardPostCode ()) != FieldWriteability.FALSE, "Field  CardPostCode is not writeable");
            preCardPostCodeChange (newCardPostCode);
            markFieldChange (FIELD_CardPostCode);
            _CardPostCode = newCardPostCode;            
            postFieldChange (FIELD_CardPostCode);
            postCardPostCodeChange ();
        }
    }

    /**
     * Attribute CardID
     */
    public String getCardID ()
    {
        assertValid();
        String valToReturn = AttributeDecoratorUtils.getValue (FIELD_CardID_Decorators, (Company)this, FIELD_CardID, _CardID);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getCardID ((Company)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 preCardIDChange (String newCardID) 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 postCardIDChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute CardID.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setCardID (String newCardID) throws FieldException
    {
        newCardID = AttributeDecoratorUtils.setValue (FIELD_CardID_Decorators, (Company)this, FIELD_CardID, newCardID);

        boolean oldAndNewIdentical = HELPER_CardID.compare (_CardID, newCardID);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newCardID = bhd.setCardID ((Company)this, newCardID);
                oldAndNewIdentical = HELPER_CardID.compare (_CardID, newCardID);
            }

            

            if (FIELD_CardID_Validators.length > 0)
            {
                Object newCardIDObj = HELPER_CardID.toObject (newCardID);

                if (newCardIDObj != null)
                {
                    int     loopMax = FIELD_CardID_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_CardID);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_CardID_Decorators, (Company)this, FIELD_CardID ,getWriteability_CardID ()) != FieldWriteability.FALSE, "Field  CardID is not writeable");
            preCardIDChange (newCardID);
            markFieldChange (FIELD_CardID);
            _CardID = newCardID;            
            postFieldChange (FIELD_CardID);
            postCardIDChange ();
        }
    }

    /**
     * Attribute PlanRenewedOn
     */
    public Date getPlanRenewedOn ()
    {
        assertValid();
        Date valToReturn = AttributeDecoratorUtils.getValue (FIELD_PlanRenewedOn_Decorators, (Company)this, FIELD_PlanRenewedOn, _PlanRenewedOn);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getPlanRenewedOn ((Company)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 prePlanRenewedOnChange (Date newPlanRenewedOn) 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 postPlanRenewedOnChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute PlanRenewedOn.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setPlanRenewedOn (Date newPlanRenewedOn) throws FieldException
    {
        newPlanRenewedOn = AttributeDecoratorUtils.setValue (FIELD_PlanRenewedOn_Decorators, (Company)this, FIELD_PlanRenewedOn, newPlanRenewedOn);

        boolean oldAndNewIdentical = HELPER_PlanRenewedOn.compare (_PlanRenewedOn, newPlanRenewedOn);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newPlanRenewedOn = bhd.setPlanRenewedOn ((Company)this, newPlanRenewedOn);
                oldAndNewIdentical = HELPER_PlanRenewedOn.compare (_PlanRenewedOn, newPlanRenewedOn);
            }

            

            if (FIELD_PlanRenewedOn_Validators.length > 0)
            {
                Object newPlanRenewedOnObj = HELPER_PlanRenewedOn.toObject (newPlanRenewedOn);

                if (newPlanRenewedOnObj != null)
                {
                    int     loopMax = FIELD_PlanRenewedOn_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_PlanRenewedOn);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_PlanRenewedOn_Decorators, (Company)this, FIELD_PlanRenewedOn ,getWriteability_PlanRenewedOn ()) != FieldWriteability.FALSE, "Field  PlanRenewedOn is not writeable");
            prePlanRenewedOnChange (newPlanRenewedOn);
            markFieldChange (FIELD_PlanRenewedOn);
            _PlanRenewedOn = newPlanRenewedOn;            
            postFieldChange (FIELD_PlanRenewedOn);
            postPlanRenewedOnChange ();
        }
    }

    /**
     * Attribute UsedCredits
     */
    public Integer getUsedCredits ()
    {
        assertValid();
        Integer valToReturn = AttributeDecoratorUtils.getValue (FIELD_UsedCredits_Decorators, (Company)this, FIELD_UsedCredits, _UsedCredits);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getUsedCredits ((Company)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 preUsedCreditsChange (Integer newUsedCredits) 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 postUsedCreditsChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute UsedCredits.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setUsedCredits (Integer newUsedCredits) throws FieldException
    {
        newUsedCredits = AttributeDecoratorUtils.setValue (FIELD_UsedCredits_Decorators, (Company)this, FIELD_UsedCredits, newUsedCredits);

        boolean oldAndNewIdentical = HELPER_UsedCredits.compare (_UsedCredits, newUsedCredits);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newUsedCredits = bhd.setUsedCredits ((Company)this, newUsedCredits);
                oldAndNewIdentical = HELPER_UsedCredits.compare (_UsedCredits, newUsedCredits);
            }

            

            if (FIELD_UsedCredits_Validators.length > 0)
            {
                Object newUsedCreditsObj = HELPER_UsedCredits.toObject (newUsedCredits);

                if (newUsedCreditsObj != null)
                {
                    int     loopMax = FIELD_UsedCredits_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_UsedCredits);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_UsedCredits_Decorators, (Company)this, FIELD_UsedCredits ,getWriteability_UsedCredits ()) != FieldWriteability.FALSE, "Field  UsedCredits is not writeable");
            preUsedCreditsChange (newUsedCredits);
            markFieldChange (FIELD_UsedCredits);
            _UsedCredits = newUsedCredits;            
            postFieldChange (FIELD_UsedCredits);
            postUsedCreditsChange ();
        }
    }

    /**
     * Attribute CompanyStatus
     */
    public CompanyStatus getCompanyStatus ()
    {
        assertValid();
        CompanyStatus valToReturn = AttributeDecoratorUtils.getValue (FIELD_CompanyStatus_Decorators, (Company)this, FIELD_CompanyStatus, _CompanyStatus);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getCompanyStatus ((Company)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 preCompanyStatusChange (CompanyStatus newCompanyStatus) 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 postCompanyStatusChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute CompanyStatus.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setCompanyStatus (CompanyStatus newCompanyStatus) throws FieldException
    {
        newCompanyStatus = AttributeDecoratorUtils.setValue (FIELD_CompanyStatus_Decorators, (Company)this, FIELD_CompanyStatus, newCompanyStatus);

        boolean oldAndNewIdentical = HELPER_CompanyStatus.compare (_CompanyStatus, newCompanyStatus);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newCompanyStatus = bhd.setCompanyStatus ((Company)this, newCompanyStatus);
                oldAndNewIdentical = HELPER_CompanyStatus.compare (_CompanyStatus, newCompanyStatus);
            }

            BusinessObjectParser.assertFieldCondition (newCompanyStatus != null, this, FIELD_CompanyStatus, "mandatory");
            

            if (FIELD_CompanyStatus_Validators.length > 0)
            {
                Object newCompanyStatusObj = HELPER_CompanyStatus.toObject (newCompanyStatus);

                if (newCompanyStatusObj != null)
                {
                    int     loopMax = FIELD_CompanyStatus_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_CompanyStatus);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_CompanyStatus_Decorators, (Company)this, FIELD_CompanyStatus ,getWriteability_CompanyStatus ()) != FieldWriteability.FALSE, "Field  CompanyStatus is not writeable");
            preCompanyStatusChange (newCompanyStatus);
            markFieldChange (FIELD_CompanyStatus);
            _CompanyStatus = newCompanyStatus;            
            postFieldChange (FIELD_CompanyStatus);
            postCompanyStatusChange ();
        }
    }

    /**
     * Attribute HiringTeamName
     */
    public String getHiringTeamName ()
    {
        assertValid();
        String valToReturn = AttributeDecoratorUtils.getValue (FIELD_HiringTeamName_Decorators, (Company)this, FIELD_HiringTeamName, _HiringTeamName);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getHiringTeamName ((Company)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 preHiringTeamNameChange (String newHiringTeamName) 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 postHiringTeamNameChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute HiringTeamName.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setHiringTeamName (String newHiringTeamName) throws FieldException
    {
        newHiringTeamName = AttributeDecoratorUtils.setValue (FIELD_HiringTeamName_Decorators, (Company)this, FIELD_HiringTeamName, newHiringTeamName);

        boolean oldAndNewIdentical = HELPER_HiringTeamName.compare (_HiringTeamName, newHiringTeamName);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newHiringTeamName = bhd.setHiringTeamName ((Company)this, newHiringTeamName);
                oldAndNewIdentical = HELPER_HiringTeamName.compare (_HiringTeamName, newHiringTeamName);
            }

            

            if (FIELD_HiringTeamName_Validators.length > 0)
            {
                Object newHiringTeamNameObj = HELPER_HiringTeamName.toObject (newHiringTeamName);

                if (newHiringTeamNameObj != null)
                {
                    int     loopMax = FIELD_HiringTeamName_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_HiringTeamName);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_HiringTeamName_Decorators, (Company)this, FIELD_HiringTeamName ,getWriteability_HiringTeamName ()) != FieldWriteability.FALSE, "Field  HiringTeamName is not writeable");
            preHiringTeamNameChange (newHiringTeamName);
            markFieldChange (FIELD_HiringTeamName);
            _HiringTeamName = newHiringTeamName;            
            postFieldChange (FIELD_HiringTeamName);
            postHiringTeamNameChange ();
        }
    }

    /**
     * Attribute ManageOwnBilling
     */
    public Boolean getManageOwnBilling ()
    {
        assertValid();
        Boolean valToReturn = AttributeDecoratorUtils.getValue (FIELD_ManageOwnBilling_Decorators, (Company)this, FIELD_ManageOwnBilling, _ManageOwnBilling);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getManageOwnBilling ((Company)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 preManageOwnBillingChange (Boolean newManageOwnBilling) 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 postManageOwnBillingChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute ManageOwnBilling.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setManageOwnBilling (Boolean newManageOwnBilling) throws FieldException
    {
        newManageOwnBilling = AttributeDecoratorUtils.setValue (FIELD_ManageOwnBilling_Decorators, (Company)this, FIELD_ManageOwnBilling, newManageOwnBilling);

        boolean oldAndNewIdentical = HELPER_ManageOwnBilling.compare (_ManageOwnBilling, newManageOwnBilling);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newManageOwnBilling = bhd.setManageOwnBilling ((Company)this, newManageOwnBilling);
                oldAndNewIdentical = HELPER_ManageOwnBilling.compare (_ManageOwnBilling, newManageOwnBilling);
            }

            

            if (FIELD_ManageOwnBilling_Validators.length > 0)
            {
                Object newManageOwnBillingObj = HELPER_ManageOwnBilling.toObject (newManageOwnBilling);

                if (newManageOwnBillingObj != null)
                {
                    int     loopMax = FIELD_ManageOwnBilling_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_ManageOwnBilling);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_ManageOwnBilling_Decorators, (Company)this, FIELD_ManageOwnBilling ,getWriteability_ManageOwnBilling ()) != FieldWriteability.FALSE, "Field  ManageOwnBilling is not writeable");
            preManageOwnBillingChange (newManageOwnBilling);
            markFieldChange (FIELD_ManageOwnBilling);
            _ManageOwnBilling = newManageOwnBilling;            
            postFieldChange (FIELD_ManageOwnBilling);
            postManageOwnBillingChange ();
        }
    }

    /**
     * Attribute HTCountry
     */
    public Countries getHTCountry ()
    {
        assertValid();
        Countries valToReturn = AttributeDecoratorUtils.getValue (FIELD_HTCountry_Decorators, (Company)this, FIELD_HTCountry, _HTCountry);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getHTCountry ((Company)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 preHTCountryChange (Countries newHTCountry) 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 postHTCountryChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute HTCountry.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setHTCountry (Countries newHTCountry) throws FieldException
    {
        newHTCountry = AttributeDecoratorUtils.setValue (FIELD_HTCountry_Decorators, (Company)this, FIELD_HTCountry, newHTCountry);

        boolean oldAndNewIdentical = HELPER_HTCountry.compare (_HTCountry, newHTCountry);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newHTCountry = bhd.setHTCountry ((Company)this, newHTCountry);
                oldAndNewIdentical = HELPER_HTCountry.compare (_HTCountry, newHTCountry);
            }

            

            if (FIELD_HTCountry_Validators.length > 0)
            {
                Object newHTCountryObj = HELPER_HTCountry.toObject (newHTCountry);

                if (newHTCountryObj != null)
                {
                    int     loopMax = FIELD_HTCountry_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_HTCountry);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_HTCountry_Decorators, (Company)this, FIELD_HTCountry ,getWriteability_HTCountry ()) != FieldWriteability.FALSE, "Field  HTCountry is not writeable");
            preHTCountryChange (newHTCountry);
            markFieldChange (FIELD_HTCountry);
            _HTCountry = newHTCountry;            
            postFieldChange (FIELD_HTCountry);
            postHTCountryChange ();
        }
    }

    /**
     * Attribute IsLogoDeleted
     */
    public Boolean getIsLogoDeleted ()
    {
        assertValid();
        Boolean valToReturn = AttributeDecoratorUtils.getValue (FIELD_IsLogoDeleted_Decorators, (Company)this, FIELD_IsLogoDeleted, _IsLogoDeleted);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getIsLogoDeleted ((Company)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 preIsLogoDeletedChange (Boolean newIsLogoDeleted) 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 postIsLogoDeletedChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute IsLogoDeleted.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setIsLogoDeleted (Boolean newIsLogoDeleted) throws FieldException
    {
        newIsLogoDeleted = AttributeDecoratorUtils.setValue (FIELD_IsLogoDeleted_Decorators, (Company)this, FIELD_IsLogoDeleted, newIsLogoDeleted);

        boolean oldAndNewIdentical = HELPER_IsLogoDeleted.compare (_IsLogoDeleted, newIsLogoDeleted);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newIsLogoDeleted = bhd.setIsLogoDeleted ((Company)this, newIsLogoDeleted);
                oldAndNewIdentical = HELPER_IsLogoDeleted.compare (_IsLogoDeleted, newIsLogoDeleted);
            }

            

            if (FIELD_IsLogoDeleted_Validators.length > 0)
            {
                Object newIsLogoDeletedObj = HELPER_IsLogoDeleted.toObject (newIsLogoDeleted);

                if (newIsLogoDeletedObj != null)
                {
                    int     loopMax = FIELD_IsLogoDeleted_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_IsLogoDeleted);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_IsLogoDeleted_Decorators, (Company)this, FIELD_IsLogoDeleted ,getWriteability_IsLogoDeleted ()) != FieldWriteability.FALSE, "Field  IsLogoDeleted is not writeable");
            preIsLogoDeletedChange (newIsLogoDeleted);
            markFieldChange (FIELD_IsLogoDeleted);
            _IsLogoDeleted = newIsLogoDeleted;            
            postFieldChange (FIELD_IsLogoDeleted);
            postIsLogoDeletedChange ();
        }
    }

    /**
     * Attribute CompletedProfile
     */
    public Boolean getCompletedProfile ()
    {
        assertValid();
        Boolean valToReturn = AttributeDecoratorUtils.getValue (FIELD_CompletedProfile_Decorators, (Company)this, FIELD_CompletedProfile, _CompletedProfile);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getCompletedProfile ((Company)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 preCompletedProfileChange (Boolean newCompletedProfile) 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 postCompletedProfileChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute CompletedProfile.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setCompletedProfile (Boolean newCompletedProfile) throws FieldException
    {
        newCompletedProfile = AttributeDecoratorUtils.setValue (FIELD_CompletedProfile_Decorators, (Company)this, FIELD_CompletedProfile, newCompletedProfile);

        boolean oldAndNewIdentical = HELPER_CompletedProfile.compare (_CompletedProfile, newCompletedProfile);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newCompletedProfile = bhd.setCompletedProfile ((Company)this, newCompletedProfile);
                oldAndNewIdentical = HELPER_CompletedProfile.compare (_CompletedProfile, newCompletedProfile);
            }

            

            if (FIELD_CompletedProfile_Validators.length > 0)
            {
                Object newCompletedProfileObj = HELPER_CompletedProfile.toObject (newCompletedProfile);

                if (newCompletedProfileObj != null)
                {
                    int     loopMax = FIELD_CompletedProfile_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_CompletedProfile);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_CompletedProfile_Decorators, (Company)this, FIELD_CompletedProfile ,getWriteability_CompletedProfile ()) != FieldWriteability.FALSE, "Field  CompletedProfile is not writeable");
            preCompletedProfileChange (newCompletedProfile);
            markFieldChange (FIELD_CompletedProfile);
            _CompletedProfile = newCompletedProfile;            
            postFieldChange (FIELD_CompletedProfile);
            postCompletedProfileChange ();
        }
    }

    /**
     * Attribute PaymentJobCount
     */
    public Integer getPaymentJobCount ()
    {
        assertValid();
        Integer valToReturn = AttributeDecoratorUtils.getValue (FIELD_PaymentJobCount_Decorators, (Company)this, FIELD_PaymentJobCount, _PaymentJobCount);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getPaymentJobCount ((Company)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 prePaymentJobCountChange (Integer newPaymentJobCount) 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 postPaymentJobCountChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute PaymentJobCount.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setPaymentJobCount (Integer newPaymentJobCount) throws FieldException
    {
        newPaymentJobCount = AttributeDecoratorUtils.setValue (FIELD_PaymentJobCount_Decorators, (Company)this, FIELD_PaymentJobCount, newPaymentJobCount);

        boolean oldAndNewIdentical = HELPER_PaymentJobCount.compare (_PaymentJobCount, newPaymentJobCount);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newPaymentJobCount = bhd.setPaymentJobCount ((Company)this, newPaymentJobCount);
                oldAndNewIdentical = HELPER_PaymentJobCount.compare (_PaymentJobCount, newPaymentJobCount);
            }

            

            if (FIELD_PaymentJobCount_Validators.length > 0)
            {
                Object newPaymentJobCountObj = HELPER_PaymentJobCount.toObject (newPaymentJobCount);

                if (newPaymentJobCountObj != null)
                {
                    int     loopMax = FIELD_PaymentJobCount_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_PaymentJobCount);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_PaymentJobCount_Decorators, (Company)this, FIELD_PaymentJobCount ,getWriteability_PaymentJobCount ()) != FieldWriteability.FALSE, "Field  PaymentJobCount is not writeable");
            prePaymentJobCountChange (newPaymentJobCount);
            markFieldChange (FIELD_PaymentJobCount);
            _PaymentJobCount = newPaymentJobCount;            
            postFieldChange (FIELD_PaymentJobCount);
            postPaymentJobCountChange ();
        }
    }

    /**
     * Attribute StripeLast4
     */
    public String getStripeLast4 ()
    {
        assertValid();
        String valToReturn = AttributeDecoratorUtils.getValue (FIELD_StripeLast4_Decorators, (Company)this, FIELD_StripeLast4, _StripeLast4);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getStripeLast4 ((Company)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 preStripeLast4Change (String newStripeLast4) 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 postStripeLast4Change () throws FieldException
    {
    }

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

    /**
     * Set the attribute StripeLast4.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setStripeLast4 (String newStripeLast4) throws FieldException
    {
        newStripeLast4 = AttributeDecoratorUtils.setValue (FIELD_StripeLast4_Decorators, (Company)this, FIELD_StripeLast4, newStripeLast4);

        boolean oldAndNewIdentical = HELPER_StripeLast4.compare (_StripeLast4, newStripeLast4);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newStripeLast4 = bhd.setStripeLast4 ((Company)this, newStripeLast4);
                oldAndNewIdentical = HELPER_StripeLast4.compare (_StripeLast4, newStripeLast4);
            }

            

            if (FIELD_StripeLast4_Validators.length > 0)
            {
                Object newStripeLast4Obj = HELPER_StripeLast4.toObject (newStripeLast4);

                if (newStripeLast4Obj != null)
                {
                    int     loopMax = FIELD_StripeLast4_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_StripeLast4);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_StripeLast4_Decorators, (Company)this, FIELD_StripeLast4 ,getWriteability_StripeLast4 ()) != FieldWriteability.FALSE, "Field  StripeLast4 is not writeable");
            preStripeLast4Change (newStripeLast4);
            markFieldChange (FIELD_StripeLast4);
            _StripeLast4 = newStripeLast4;            
            postFieldChange (FIELD_StripeLast4);
            postStripeLast4Change ();
        }
    }

    /**
     * Attribute StripeBrand
     */
    public String getStripeBrand ()
    {
        assertValid();
        String valToReturn = AttributeDecoratorUtils.getValue (FIELD_StripeBrand_Decorators, (Company)this, FIELD_StripeBrand, _StripeBrand);

        
        for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
        {
            valToReturn = bhd.getStripeBrand ((Company)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 preStripeBrandChange (String newStripeBrand) 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 postStripeBrandChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute StripeBrand.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setStripeBrand (String newStripeBrand) throws FieldException
    {
        newStripeBrand = AttributeDecoratorUtils.setValue (FIELD_StripeBrand_Decorators, (Company)this, FIELD_StripeBrand, newStripeBrand);

        boolean oldAndNewIdentical = HELPER_StripeBrand.compare (_StripeBrand, newStripeBrand);
        
        try
        {
            for (CompanyBehaviourDecorator bhd : Company_BehaviourDecorators)
            {
                newStripeBrand = bhd.setStripeBrand ((Company)this, newStripeBrand);
                oldAndNewIdentical = HELPER_StripeBrand.compare (_StripeBrand, newStripeBrand);
            }

            

            if (FIELD_StripeBrand_Validators.length > 0)
            {
                Object newStripeBrandObj = HELPER_StripeBrand.toObject (newStripeBrand);

                if (newStripeBrandObj != null)
                {
                    int     loopMax = FIELD_StripeBrand_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_Company.get (FIELD_StripeBrand);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_StripeBrand_Decorators, (Company)this, FIELD_StripeBrand ,getWriteability_StripeBrand ()) != FieldWriteability.FALSE, "Field  StripeBrand is not writeable");
            preStripeBrandChange (newStripeBrand);
            markFieldChange (FIELD_StripeBrand);
            _StripeBrand = newStripeBrand;            
            postFieldChange (FIELD_StripeBrand);
            postStripeBrandChange ();
        }
    }



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

        return result;
    }
    
    
    public BaseBusinessClass getSingleAssocReferenceInstance (String assocName)
    {
        if (assocName == null)
        {
            throw new RuntimeException ("Game over == null!");
        }
        else if (assocName.equals (SINGLEREFERENCE_Owner))
        {
            return _Owner.getReferencedType ();
        }
        else if (assocName.equals (SINGLEREFERENCE_BillingTeam))
        {
            return _BillingTeam.getReferencedType ();
        }
        else if (assocName.equals (SINGLEREFERENCE_AddedByUser))
        {
            return _AddedByUser.getReferencedType ();
        }
        else if (assocName.equals (SINGLEREFERENCE_PaymentPlan))
        {
            return _PaymentPlan.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_AddedByUser))
        {
            return null ;
        }
        else if (assocName.equals (SINGLEREFERENCE_PaymentPlan))
        {
            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_Owner))
        {
            return getOwner ();
        }
        else if (assocName.equals (SINGLEREFERENCE_BillingTeam))
        {
            return getBillingTeam ();
        }
        else if (assocName.equals (SINGLEREFERENCE_AddedByUser))
        {
            return getAddedByUser ();
        }
        else if (assocName.equals (SINGLEREFERENCE_PaymentPlan))
        {
            return getPaymentPlan ();
        }
        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_Owner))
        {
            return getOwner (getType);
        }
        else if (assocName.equals (SINGLEREFERENCE_BillingTeam))
        {
            return getBillingTeam (getType);
        }
        else if (assocName.equals (SINGLEREFERENCE_AddedByUser))
        {
            return getAddedByUser (getType);
        }
        else if (assocName.equals (SINGLEREFERENCE_PaymentPlan))
        {
            return getPaymentPlan (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_Owner))
        {
            return getOwnerID ();
        }
        else if (assocName.equals (SINGLEREFERENCE_BillingTeam))
        {
            return getBillingTeamID ();
        }
        else if (assocName.equals (SINGLEREFERENCE_AddedByUser))
        {
            return getAddedByUserID ();
        }
        else if (assocName.equals (SINGLEREFERENCE_PaymentPlan))
        {
            return getPaymentPlanID ();
        }
        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_Owner))
        {
            setOwner ((CompanyUser)(newValue));
        }
        else if (assocName.equals (SINGLEREFERENCE_BillingTeam))
        {
            setBillingTeam ((HiringTeam)(newValue));
        }
        else if (assocName.equals (SINGLEREFERENCE_AddedByUser))
        {
            setAddedByUser ((CompanyUser)(newValue));
        }
        else if (assocName.equals (SINGLEREFERENCE_PaymentPlan))
        {
            setPaymentPlan ((PaymentPlan)(newValue));
        }
        else
        {
            super.setSingleAssoc (assocName, newValue);
        }
    }



    /**
     * Get the reference Owner
     */
    public CompanyUser getOwner () throws StorageException
    {
        assertValid();
        
        try
        {
            return (CompanyUser)(_Owner.get ());
        }
        catch (ClassCastException e)
        {
            LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in Company:", this.getObjectID (), ", was trying to get CompanyUser:",  getOwnerID ());
            LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _Owner.get ().getClass ());
            throw e;
        }
    }


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


    /**
     * Get the object id for the referenced object.  Does not force a DB access.
     */
    public Long getOwnerID ()
    {
        assertValid();
        
        if (_Owner == null)
        {
            return null;
        }
        else
        {
            return _Owner.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 preOwnerChange (CompanyUser newOwner) 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 postOwnerChange () throws FieldException
    {
    }


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

        
    /**
     * Set the reference Owner.  Checks to ensure a new value
     * has been supplied.  If so, marks the reference as altered and sets it.
     */
    public void setOwner (CompanyUser newOwner) throws StorageException, FieldException
    {
        if (_Owner.wouldReferencedChange (newOwner))
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (SINGLEREFERENCE_Owner_Decorators, (Company)this, SINGLEREFERENCE_Owner ,getWriteability_Owner ()) != FieldWriteability.FALSE, "Assoc Owner is not writeable");
            preOwnerChange (newOwner);
            
            _Owner.set (newOwner);
                
            postOwnerChange ();
        }
    }

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


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


    /**
     * Get the object id for the referenced object.  Does not force a DB access.
     */
    public Long getBillingTeamID ()
    {
        assertValid();
        
        if (_BillingTeam == null)
        {
            return null;
        }
        else
        {
            return _BillingTeam.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 preBillingTeamChange (HiringTeam newBillingTeam) 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 postBillingTeamChange () throws FieldException
    {
    }


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

        
    /**
     * Set the reference BillingTeam.  Checks to ensure a new value
     * has been supplied.  If so, marks the reference as altered and sets it.
     */
    public void setBillingTeam (HiringTeam newBillingTeam) throws StorageException, FieldException
    {
        if (_BillingTeam.wouldReferencedChange (newBillingTeam))
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (SINGLEREFERENCE_BillingTeam_Decorators, (Company)this, SINGLEREFERENCE_BillingTeam ,getWriteability_BillingTeam ()) != FieldWriteability.FALSE, "Assoc BillingTeam is not writeable");
            preBillingTeamChange (newBillingTeam);
            
            _BillingTeam.set (newBillingTeam);
                
            postBillingTeamChange ();
        }
    }

    /**
     * Get the reference AddedByUser
     */
    public CompanyUser getAddedByUser () throws StorageException
    {
        assertValid();
        
        try
        {
            return (CompanyUser)(_AddedByUser.get ());
        }
        catch (ClassCastException e)
        {
            LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in Company:", this.getObjectID (), ", was trying to get CompanyUser:",  getAddedByUserID ());
            LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _AddedByUser.get ().getClass ());
            throw e;
        }
    }


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


    /**
     * Get the object id for the referenced object.  Does not force a DB access.
     */
    public Long getAddedByUserID ()
    {
        assertValid();
        
        if (_AddedByUser == null)
        {
            return null;
        }
        else
        {
            return _AddedByUser.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 preAddedByUserChange (CompanyUser newAddedByUser) 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 postAddedByUserChange () throws FieldException
    {
    }


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

        
    /**
     * Set the reference AddedByUser.  Checks to ensure a new value
     * has been supplied.  If so, marks the reference as altered and sets it.
     */
    public void setAddedByUser (CompanyUser newAddedByUser) throws StorageException, FieldException
    {
        BusinessObjectParser.assertFieldCondition (newAddedByUser != null, this, SINGLEREFERENCE_AddedByUser, "mandatory");

        if (_AddedByUser.wouldReferencedChange (newAddedByUser))
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (SINGLEREFERENCE_AddedByUser_Decorators, (Company)this, SINGLEREFERENCE_AddedByUser ,getWriteability_AddedByUser ()) != FieldWriteability.FALSE, "Assoc AddedByUser is not writeable");
            preAddedByUserChange (newAddedByUser);
            
            _AddedByUser.set (newAddedByUser);
                
            postAddedByUserChange ();
        }
    }

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


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


    /**
     * Get the object id for the referenced object.  Does not force a DB access.
     */
    public Long getPaymentPlanID ()
    {
        assertValid();
        
        if (_PaymentPlan == null)
        {
            return null;
        }
        else
        {
            return _PaymentPlan.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 prePaymentPlanChange (PaymentPlan newPaymentPlan) 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 postPaymentPlanChange () throws FieldException
    {
    }


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

        
    /**
     * Set the reference PaymentPlan.  Checks to ensure a new value
     * has been supplied.  If so, marks the reference as altered and sets it.
     */
    public void setPaymentPlan (PaymentPlan newPaymentPlan) throws StorageException, FieldException
    {
        if (_PaymentPlan.wouldReferencedChange (newPaymentPlan))
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (SINGLEREFERENCE_PaymentPlan_Decorators, (Company)this, SINGLEREFERENCE_PaymentPlan ,getWriteability_PaymentPlan ()) != FieldWriteability.FALSE, "Assoc PaymentPlan is not writeable");
            prePaymentPlanChange (newPaymentPlan);
            
            _PaymentPlan.set (newPaymentPlan);
                
            postPaymentPlanChange ();
        }
    }

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

        return result;
    }


    /**
     * Get the reference instance for the multi assoc name.
     */
    public BaseBusinessClass getMultiAssocReferenceInstance(String attribName)
    {
        if (MULTIPLEREFERENCE_Users.equals(attribName))
        {
            return CompanyUser.REFERENCE_CompanyUser ;
        }
        if (MULTIPLEREFERENCE_Clients.equals(attribName))
        {
            return Client.REFERENCE_Client ;
        }
        if (MULTIPLEREFERENCE_HiringTeams.equals(attribName))
        {
            return HiringTeam.REFERENCE_HiringTeam ;
        }

        return super.getMultiAssocReferenceInstance(attribName);
    }


    public String getMultiAssocBackReference(String attribName)
    {
        if (MULTIPLEREFERENCE_Users.equals(attribName))
        {
            return CompanyUser.SINGLEREFERENCE_Company ;
        }
        if (MULTIPLEREFERENCE_Clients.equals(attribName))
        {
            return Client.SINGLEREFERENCE_Company ;
        }
        if (MULTIPLEREFERENCE_HiringTeams.equals(attribName))
        {
            return HiringTeam.SINGLEREFERENCE_Company ;
        }

        return super.getMultiAssocBackReference(attribName);
    }


    /**
     * Get the assoc count for the multi assoc name.
     */
    public int getMultiAssocCount(String attribName) throws StorageException
    {
        if (MULTIPLEREFERENCE_Users.equals(attribName))
        {
            return this.getUsersCount();
        }
        if (MULTIPLEREFERENCE_Clients.equals(attribName))
        {
            return this.getClientsCount();
        }
        if (MULTIPLEREFERENCE_HiringTeams.equals(attribName))
        {
            return this.getHiringTeamsCount();
        }

        return super.getMultiAssocCount(attribName);
    }


    /**
     * Get the assoc at a particular index
     */
    public BaseBusinessClass getMultiAssocAt(String attribName, int index) throws StorageException
    {
        if (MULTIPLEREFERENCE_Users.equals(attribName))
        {
            return this.getUsersAt(index);
        }
        if (MULTIPLEREFERENCE_Clients.equals(attribName))
        {
            return this.getClientsAt(index);
        }
        if (MULTIPLEREFERENCE_HiringTeams.equals(attribName))
        {
            return this.getHiringTeamsAt(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_Users.equals(attribName))
        {
            addToUsers((CompanyUser)newElement);
            return;
        }
        if (MULTIPLEREFERENCE_Clients.equals(attribName))
        {
            addToClients((Client)newElement);
            return;
        }
        if (MULTIPLEREFERENCE_HiringTeams.equals(attribName))
        {
            addToHiringTeams((HiringTeam)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_Users.equals(attribName))
        {
            removeFromUsers((CompanyUser)oldElement);
            return;
        }
        if (MULTIPLEREFERENCE_Clients.equals(attribName))
        {
            removeFromClients((Client)oldElement);
            return;
        }
        if (MULTIPLEREFERENCE_HiringTeams.equals(attribName))
        {
            removeFromHiringTeams((HiringTeam)oldElement);
            return;
        }

        super.removeFromMultiAssoc(attribName, oldElement);
    }


    protected void __loadMultiAssoc (String attribName, BaseBusinessClass[] elements)
    {
        if (MULTIPLEREFERENCE_Users.equals(attribName))
        {
            _Users.__loadAssociation (elements);
            return;
        }
        if (MULTIPLEREFERENCE_Clients.equals(attribName))
        {
            _Clients.__loadAssociation (elements);
            return;
        }
        if (MULTIPLEREFERENCE_HiringTeams.equals(attribName))
        {
            _HiringTeams.__loadAssociation (elements);
            return;
        }

        super.__loadMultiAssoc(attribName, elements);
    }


    protected boolean __isMultiAssocLoaded (String attribName)
    {
        if (MULTIPLEREFERENCE_Users.equals(attribName))
        {
            return _Users.isLoaded ();
        }
        if (MULTIPLEREFERENCE_Clients.equals(attribName))
        {
            return _Clients.isLoaded ();
        }
        if (MULTIPLEREFERENCE_HiringTeams.equals(attribName))
        {
            return _HiringTeams.isLoaded ();
        }

        return super.__isMultiAssocLoaded(attribName);
    }


    public FieldWriteability getWriteability_Users ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }
    
    
    public int getUsersCount () throws StorageException
    {
        assertValid();
        return _Users.getReferencedObjectsCount ();
    }


    public void addToUsers (CompanyUser newElement) throws StorageException
    {
        if (_Users.wouldAddChange (newElement))
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (MULTIPLEREFERENCE_Users_Decorators, (Company)this, MULTIPLEREFERENCE_Users ,getWriteability_Users ()) != FieldWriteability.FALSE, "MultiAssoc Users is not writeable (add)");
            _Users.appendElement (newElement);

            try
            {
                if (newElement.getCompany () != this)
                {
                    newElement.setCompany ((Company)(this));
                }
            }
            catch (Exception e)
            {
                throw NestedException.wrap(e);
            }
        }
    }


    public void removeFromUsers (CompanyUser elementToRemove) throws StorageException
    {
        if (_Users.wouldRemoveChange (elementToRemove))
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (MULTIPLEREFERENCE_Users_Decorators, (Company)this, MULTIPLEREFERENCE_Users ,getWriteability_Users ()) != FieldWriteability.FALSE, "MultiAssoc Users is not writeable (remove)");
            _Users.removeElement (elementToRemove);
            try
            {
                if (elementToRemove.getCompany () != null)
                {
                    elementToRemove.setCompany (null);
                }
            }
            catch (Exception e)
            {
                throw NestedException.wrap(e);
            }
        }
    }


    public CompanyUser getUsersAt (int index) throws StorageException
    {
        return (CompanyUser)(_Users.getElementAt (index));
    }


    public SortedSet<CompanyUser> getUsersSet () throws StorageException
    {
        return _Users.getSet ();
    }

    public FieldWriteability getWriteability_Clients ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }
    
    
    public int getClientsCount () throws StorageException
    {
        assertValid();
        return _Clients.getReferencedObjectsCount ();
    }


    public void addToClients (Client newElement) throws StorageException
    {
        if (_Clients.wouldAddChange (newElement))
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (MULTIPLEREFERENCE_Clients_Decorators, (Company)this, MULTIPLEREFERENCE_Clients ,getWriteability_Clients ()) != FieldWriteability.FALSE, "MultiAssoc Clients is not writeable (add)");
            _Clients.appendElement (newElement);

            try
            {
                if (newElement.getCompany () != this)
                {
                    newElement.setCompany ((Company)(this));
                }
            }
            catch (Exception e)
            {
                throw NestedException.wrap(e);
            }
        }
    }


    public void removeFromClients (Client elementToRemove) throws StorageException
    {
        if (_Clients.wouldRemoveChange (elementToRemove))
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (MULTIPLEREFERENCE_Clients_Decorators, (Company)this, MULTIPLEREFERENCE_Clients ,getWriteability_Clients ()) != FieldWriteability.FALSE, "MultiAssoc Clients is not writeable (remove)");
            _Clients.removeElement (elementToRemove);
            try
            {
                if (elementToRemove.getCompany () != null)
                {
                    elementToRemove.setCompany (null);
                }
            }
            catch (Exception e)
            {
                throw NestedException.wrap(e);
            }
        }
    }


    public Client getClientsAt (int index) throws StorageException
    {
        return (Client)(_Clients.getElementAt (index));
    }


    public SortedSet<Client> getClientsSet () throws StorageException
    {
        return _Clients.getSet ();
    }

    public FieldWriteability getWriteability_HiringTeams ()
    {
        return getFieldWritabilityUtil (FieldWriteability.TRUE);
    }
    
    
    public int getHiringTeamsCount () throws StorageException
    {
        assertValid();
        return _HiringTeams.getReferencedObjectsCount ();
    }


    public void addToHiringTeams (HiringTeam newElement) throws StorageException
    {
        if (_HiringTeams.wouldAddChange (newElement))
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (MULTIPLEREFERENCE_HiringTeams_Decorators, (Company)this, MULTIPLEREFERENCE_HiringTeams ,getWriteability_HiringTeams ()) != FieldWriteability.FALSE, "MultiAssoc HiringTeams is not writeable (add)");
            _HiringTeams.appendElement (newElement);

            try
            {
                if (newElement.getCompany () != this)
                {
                    newElement.setCompany ((Company)(this));
                }
            }
            catch (Exception e)
            {
                throw NestedException.wrap(e);
            }
        }
    }


    public void removeFromHiringTeams (HiringTeam elementToRemove) throws StorageException
    {
        if (_HiringTeams.wouldRemoveChange (elementToRemove))
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (MULTIPLEREFERENCE_HiringTeams_Decorators, (Company)this, MULTIPLEREFERENCE_HiringTeams ,getWriteability_HiringTeams ()) != FieldWriteability.FALSE, "MultiAssoc HiringTeams is not writeable (remove)");
            _HiringTeams.removeElement (elementToRemove);
            try
            {
                if (elementToRemove.getCompany () != null)
                {
                    elementToRemove.setCompany (null);
                }
            }
            catch (Exception e)
            {
                throw NestedException.wrap(e);
            }
        }
    }


    public HiringTeam getHiringTeamsAt (int index) throws StorageException
    {
        return (HiringTeam)(_HiringTeams.getElementAt (index));
    }


    public SortedSet<HiringTeam> getHiringTeamsSet () throws StorageException
    {
        return _HiringTeams.getSet ();
    }



    public void onDelete ()
    {
        try 
        {
            for(CompanyUser referenced : CollectionUtils.reverse(getUsersSet()))
            { 
                LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null Company from ", getObjectID (), " to ", referenced.getObjectID ());
                referenced.setCompany(null);
            }

            for(Client referenced : CollectionUtils.reverse(getClientsSet()))
            { 
                LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null Company from ", getObjectID (), " to ", referenced.getObjectID ());
                referenced.setCompany(null);
            }

            for(HiringTeam referenced : CollectionUtils.reverse(getHiringTeamsSet()))
            { 
                LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null Company from ", getObjectID (), " to ", referenced.getObjectID ());
                referenced.setCompany(null);
            }

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

        super.onDelete ();
    }


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


    public Company referenceInstance ()
    {
        return REFERENCE_Company;
    }


    public Company getInTransaction (ObjectTransaction t) throws StorageException
    {
        return getCompanyByID (t, getObjectID());
    }
    
    
    public BaseBusinessClass dummyInstance ()
    {
        return DUMMY_Company;
    }


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



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

        tl_companyPSet.setAttrib (FIELD_ObjectID, myID);
        tl_companyPSet.setAttrib (FIELD_CompanyName, HELPER_CompanyName.toObject (_CompanyName)); //
        tl_companyPSet.setAttrib (FIELD_CompanyLogo, HELPER_CompanyLogo.toObject (_CompanyLogo)); //
        tl_companyPSet.setAttrib (FIELD_HiringTeamType, HELPER_HiringTeamType.toObject (_HiringTeamType)); //
        tl_companyPSet.setAttrib (FIELD_Industry, HELPER_Industry.toObject (_Industry)); //
        tl_companyPSet.setAttrib (FIELD_TimeZone, HELPER_TimeZone.toObject (_TimeZone)); //
        tl_companyPSet.setAttrib (FIELD_IsVerified, HELPER_IsVerified.toObject (_IsVerified)); //
        tl_companyPSet.setAttrib (FIELD_State, HELPER_State.toObject (_State)); //
        tl_companyPSet.setAttrib (FIELD_Country, HELPER_Country.toObject (_Country)); //
        tl_companyPSet.setAttrib (FIELD_PostCode, HELPER_PostCode.toObject (_PostCode)); //
        tl_companyPSet.setAttrib (FIELD_City, HELPER_City.toObject (_City)); //
        tl_companyPSet.setAttrib (FIELD_HasClientSupport, HELPER_HasClientSupport.toObject (_HasClientSupport)); //
        tl_companyPSet.setAttrib (FIELD_StripeReference, HELPER_StripeReference.toObject (_StripeReference)); //
        tl_companyPSet.setAttrib (FIELD_StripeSubscription, HELPER_StripeSubscription.toObject (_StripeSubscription)); //
        tl_companyPSet.setAttrib (FIELD_NameOnCard, HELPER_NameOnCard.toObject (_NameOnCard)); //
        tl_companyPSet.setAttrib (FIELD_CardPostCode, HELPER_CardPostCode.toObject (_CardPostCode)); //
        tl_companyPSet.setAttrib (FIELD_CardID, HELPER_CardID.toObject (_CardID)); //
        tl_companyPSet.setAttrib (FIELD_PlanRenewedOn, HELPER_PlanRenewedOn.toObject (_PlanRenewedOn)); //
        tl_companyPSet.setAttrib (FIELD_UsedCredits, HELPER_UsedCredits.toObject (_UsedCredits)); //
        tl_companyPSet.setAttrib (FIELD_CompanyStatus, HELPER_CompanyStatus.toObject (_CompanyStatus)); //
        _AddedByUser.getPersistentSets (allSets);
        _PaymentPlan.getPersistentSets (allSets);
        
    }


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

        _CompanyName = (String)(HELPER_CompanyName.fromObject (_CompanyName, tl_companyPSet.getAttrib (FIELD_CompanyName))); //
        _CompanyLogo = (BinaryContent)(HELPER_CompanyLogo.fromObject (_CompanyLogo, tl_companyPSet.getAttrib (FIELD_CompanyLogo))); //
        _HiringTeamType = (HiringTeamType)(HELPER_HiringTeamType.fromObject (_HiringTeamType, tl_companyPSet.getAttrib (FIELD_HiringTeamType))); //
        _Industry = (Industry)(HELPER_Industry.fromObject (_Industry, tl_companyPSet.getAttrib (FIELD_Industry))); //
        _TimeZone = (TimeZone)(HELPER_TimeZone.fromObject (_TimeZone, tl_companyPSet.getAttrib (FIELD_TimeZone))); //
        _IsVerified = (Boolean)(HELPER_IsVerified.fromObject (_IsVerified, tl_companyPSet.getAttrib (FIELD_IsVerified))); //
        _State = (State)(HELPER_State.fromObject (_State, tl_companyPSet.getAttrib (FIELD_State))); //
        _Country = (Countries)(HELPER_Country.fromObject (_Country, tl_companyPSet.getAttrib (FIELD_Country))); //
        _PostCode = (String)(HELPER_PostCode.fromObject (_PostCode, tl_companyPSet.getAttrib (FIELD_PostCode))); //
        _City = (String)(HELPER_City.fromObject (_City, tl_companyPSet.getAttrib (FIELD_City))); //
        _HasClientSupport = (Boolean)(HELPER_HasClientSupport.fromObject (_HasClientSupport, tl_companyPSet.getAttrib (FIELD_HasClientSupport))); //
        _StripeReference = (String)(HELPER_StripeReference.fromObject (_StripeReference, tl_companyPSet.getAttrib (FIELD_StripeReference))); //
        _StripeSubscription = (String)(HELPER_StripeSubscription.fromObject (_StripeSubscription, tl_companyPSet.getAttrib (FIELD_StripeSubscription))); //
        _NameOnCard = (String)(HELPER_NameOnCard.fromObject (_NameOnCard, tl_companyPSet.getAttrib (FIELD_NameOnCard))); //
        _CardPostCode = (String)(HELPER_CardPostCode.fromObject (_CardPostCode, tl_companyPSet.getAttrib (FIELD_CardPostCode))); //
        _CardID = (String)(HELPER_CardID.fromObject (_CardID, tl_companyPSet.getAttrib (FIELD_CardID))); //
        _PlanRenewedOn = (Date)(HELPER_PlanRenewedOn.fromObject (_PlanRenewedOn, tl_companyPSet.getAttrib (FIELD_PlanRenewedOn))); //
        _UsedCredits = (Integer)(HELPER_UsedCredits.fromObject (_UsedCredits, tl_companyPSet.getAttrib (FIELD_UsedCredits))); //
        _CompanyStatus = (CompanyStatus)(HELPER_CompanyStatus.fromObject (_CompanyStatus, tl_companyPSet.getAttrib (FIELD_CompanyStatus))); //
        _AddedByUser.setFromPersistentSets (objectID, allSets);
        _PaymentPlan.setFromPersistentSets (objectID, allSets);
        
    }


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

        if (other instanceof Company)
        {
            Company otherCompany = (Company)other;
            

            try
            {
                setCompanyName (otherCompany.getCompanyName ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setCompanyLogo (otherCompany.getCompanyLogo ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setHiringTeamType (otherCompany.getHiringTeamType ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setIndustry (otherCompany.getIndustry ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setTimeZone (otherCompany.getTimeZone ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setIsVerified (otherCompany.getIsVerified ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setState (otherCompany.getState ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setCountry (otherCompany.getCountry ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setPostCode (otherCompany.getPostCode ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setCity (otherCompany.getCity ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setHasClientSupport (otherCompany.getHasClientSupport ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setStripeReference (otherCompany.getStripeReference ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setStripeSubscription (otherCompany.getStripeSubscription ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setNameOnCard (otherCompany.getNameOnCard ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setCardPostCode (otherCompany.getCardPostCode ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setCardID (otherCompany.getCardID ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setPlanRenewedOn (otherCompany.getPlanRenewedOn ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setUsedCredits (otherCompany.getUsedCredits ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setCompanyStatus (otherCompany.getCompanyStatus ());
            }
            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 BaseCompany)
        {
            BaseCompany sourceCompany = (BaseCompany)(source);

            _CompanyName = sourceCompany._CompanyName;
            _CompanyLogo = sourceCompany._CompanyLogo;
            _HiringTeamType = sourceCompany._HiringTeamType;
            _Industry = sourceCompany._Industry;
            _TimeZone = sourceCompany._TimeZone;
            _IsVerified = sourceCompany._IsVerified;
            _State = sourceCompany._State;
            _Country = sourceCompany._Country;
            _PostCode = sourceCompany._PostCode;
            _City = sourceCompany._City;
            _HasClientSupport = sourceCompany._HasClientSupport;
            _StripeReference = sourceCompany._StripeReference;
            _StripeSubscription = sourceCompany._StripeSubscription;
            _NameOnCard = sourceCompany._NameOnCard;
            _CardPostCode = sourceCompany._CardPostCode;
            _CardID = sourceCompany._CardID;
            _PlanRenewedOn = sourceCompany._PlanRenewedOn;
            _UsedCredits = sourceCompany._UsedCredits;
            _CompanyStatus = sourceCompany._CompanyStatus;
            _HiringTeamName = sourceCompany._HiringTeamName;
            _ManageOwnBilling = sourceCompany._ManageOwnBilling;
            _HTCountry = sourceCompany._HTCountry;
            _IsLogoDeleted = sourceCompany._IsLogoDeleted;
            _CompletedProfile = sourceCompany._CompletedProfile;
            _PaymentJobCount = sourceCompany._PaymentJobCount;
            _StripeLast4 = sourceCompany._StripeLast4;
            _StripeBrand = sourceCompany._StripeBrand;
            
        }
    }


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

            _Owner.copyFrom (sourceCompany._Owner, linkToGhosts);
            _BillingTeam.copyFrom (sourceCompany._BillingTeam, linkToGhosts);
            _AddedByUser.copyFrom (sourceCompany._AddedByUser, linkToGhosts);
            _PaymentPlan.copyFrom (sourceCompany._PaymentPlan, 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 BaseCompany)
        {
            BaseCompany sourceCompany = (BaseCompany)(source);

            _Users.copyFrom (sourceCompany._Users, linkToGhosts);
            _Clients.copyFrom (sourceCompany._Clients, linkToGhosts);
            _HiringTeams.copyFrom (sourceCompany._HiringTeams, linkToGhosts);
            
        }
    }


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

        
        context.check (getAddedByUserID() != null, this, SINGLEREFERENCE_AddedByUser, "mandatory");
        
    }


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

        _CompanyName = (String)(HELPER_CompanyName.readExternal (_CompanyName, vals.get(FIELD_CompanyName))); //
        _CompanyLogo = (BinaryContent)(HELPER_CompanyLogo.readExternal (_CompanyLogo, vals.get(FIELD_CompanyLogo))); //
        _HiringTeamType = (HiringTeamType)(HELPER_HiringTeamType.readExternal (_HiringTeamType, vals.get(FIELD_HiringTeamType))); //
        _Industry = (Industry)(HELPER_Industry.readExternal (_Industry, vals.get(FIELD_Industry))); //
        _TimeZone = (TimeZone)(HELPER_TimeZone.readExternal (_TimeZone, vals.get(FIELD_TimeZone))); //
        _IsVerified = (Boolean)(HELPER_IsVerified.readExternal (_IsVerified, vals.get(FIELD_IsVerified))); //
        _State = (State)(HELPER_State.readExternal (_State, vals.get(FIELD_State))); //
        _Country = (Countries)(HELPER_Country.readExternal (_Country, vals.get(FIELD_Country))); //
        _PostCode = (String)(HELPER_PostCode.readExternal (_PostCode, vals.get(FIELD_PostCode))); //
        _City = (String)(HELPER_City.readExternal (_City, vals.get(FIELD_City))); //
        _HasClientSupport = (Boolean)(HELPER_HasClientSupport.readExternal (_HasClientSupport, vals.get(FIELD_HasClientSupport))); //
        _StripeReference = (String)(HELPER_StripeReference.readExternal (_StripeReference, vals.get(FIELD_StripeReference))); //
        _StripeSubscription = (String)(HELPER_StripeSubscription.readExternal (_StripeSubscription, vals.get(FIELD_StripeSubscription))); //
        _NameOnCard = (String)(HELPER_NameOnCard.readExternal (_NameOnCard, vals.get(FIELD_NameOnCard))); //
        _CardPostCode = (String)(HELPER_CardPostCode.readExternal (_CardPostCode, vals.get(FIELD_CardPostCode))); //
        _CardID = (String)(HELPER_CardID.readExternal (_CardID, vals.get(FIELD_CardID))); //
        _PlanRenewedOn = (Date)(HELPER_PlanRenewedOn.readExternal (_PlanRenewedOn, vals.get(FIELD_PlanRenewedOn))); //
        _UsedCredits = (Integer)(HELPER_UsedCredits.readExternal (_UsedCredits, vals.get(FIELD_UsedCredits))); //
        _CompanyStatus = (CompanyStatus)(HELPER_CompanyStatus.readExternal (_CompanyStatus, vals.get(FIELD_CompanyStatus))); //
        _HiringTeamName = (String)(HELPER_HiringTeamName.readExternal (_HiringTeamName, vals.get(FIELD_HiringTeamName))); //
        _ManageOwnBilling = (Boolean)(HELPER_ManageOwnBilling.readExternal (_ManageOwnBilling, vals.get(FIELD_ManageOwnBilling))); //
        _HTCountry = (Countries)(HELPER_HTCountry.readExternal (_HTCountry, vals.get(FIELD_HTCountry))); //
        _IsLogoDeleted = (Boolean)(HELPER_IsLogoDeleted.readExternal (_IsLogoDeleted, vals.get(FIELD_IsLogoDeleted))); //
        _CompletedProfile = (Boolean)(HELPER_CompletedProfile.readExternal (_CompletedProfile, vals.get(FIELD_CompletedProfile))); //
        _PaymentJobCount = (Integer)(HELPER_PaymentJobCount.readExternal (_PaymentJobCount, vals.get(FIELD_PaymentJobCount))); //
        _StripeLast4 = (String)(HELPER_StripeLast4.readExternal (_StripeLast4, vals.get(FIELD_StripeLast4))); //
        _StripeBrand = (String)(HELPER_StripeBrand.readExternal (_StripeBrand, vals.get(FIELD_StripeBrand))); //
        _Owner.readExternalData(vals.get(SINGLEREFERENCE_Owner));
        _BillingTeam.readExternalData(vals.get(SINGLEREFERENCE_BillingTeam));
        _AddedByUser.readExternalData(vals.get(SINGLEREFERENCE_AddedByUser));
        _PaymentPlan.readExternalData(vals.get(SINGLEREFERENCE_PaymentPlan));
        _Users.readExternalData(vals.get(MULTIPLEREFERENCE_Users));
        _Clients.readExternalData(vals.get(MULTIPLEREFERENCE_Clients));
        _HiringTeams.readExternalData(vals.get(MULTIPLEREFERENCE_HiringTeams));
        
    }


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

        vals.put (FIELD_CompanyName, HELPER_CompanyName.writeExternal (_CompanyName));
        vals.put (FIELD_CompanyLogo, HELPER_CompanyLogo.writeExternal (_CompanyLogo));
        vals.put (FIELD_HiringTeamType, HELPER_HiringTeamType.writeExternal (_HiringTeamType));
        vals.put (FIELD_Industry, HELPER_Industry.writeExternal (_Industry));
        vals.put (FIELD_TimeZone, HELPER_TimeZone.writeExternal (_TimeZone));
        vals.put (FIELD_IsVerified, HELPER_IsVerified.writeExternal (_IsVerified));
        vals.put (FIELD_State, HELPER_State.writeExternal (_State));
        vals.put (FIELD_Country, HELPER_Country.writeExternal (_Country));
        vals.put (FIELD_PostCode, HELPER_PostCode.writeExternal (_PostCode));
        vals.put (FIELD_City, HELPER_City.writeExternal (_City));
        vals.put (FIELD_HasClientSupport, HELPER_HasClientSupport.writeExternal (_HasClientSupport));
        vals.put (FIELD_StripeReference, HELPER_StripeReference.writeExternal (_StripeReference));
        vals.put (FIELD_StripeSubscription, HELPER_StripeSubscription.writeExternal (_StripeSubscription));
        vals.put (FIELD_NameOnCard, HELPER_NameOnCard.writeExternal (_NameOnCard));
        vals.put (FIELD_CardPostCode, HELPER_CardPostCode.writeExternal (_CardPostCode));
        vals.put (FIELD_CardID, HELPER_CardID.writeExternal (_CardID));
        vals.put (FIELD_PlanRenewedOn, HELPER_PlanRenewedOn.writeExternal (_PlanRenewedOn));
        vals.put (FIELD_UsedCredits, HELPER_UsedCredits.writeExternal (_UsedCredits));
        vals.put (FIELD_CompanyStatus, HELPER_CompanyStatus.writeExternal (_CompanyStatus));
        vals.put (FIELD_HiringTeamName, HELPER_HiringTeamName.writeExternal (_HiringTeamName));
        vals.put (FIELD_ManageOwnBilling, HELPER_ManageOwnBilling.writeExternal (_ManageOwnBilling));
        vals.put (FIELD_HTCountry, HELPER_HTCountry.writeExternal (_HTCountry));
        vals.put (FIELD_IsLogoDeleted, HELPER_IsLogoDeleted.writeExternal (_IsLogoDeleted));
        vals.put (FIELD_CompletedProfile, HELPER_CompletedProfile.writeExternal (_CompletedProfile));
        vals.put (FIELD_PaymentJobCount, HELPER_PaymentJobCount.writeExternal (_PaymentJobCount));
        vals.put (FIELD_StripeLast4, HELPER_StripeLast4.writeExternal (_StripeLast4));
        vals.put (FIELD_StripeBrand, HELPER_StripeBrand.writeExternal (_StripeBrand));
        vals.put (SINGLEREFERENCE_Owner, _Owner.writeExternalData());
        vals.put (SINGLEREFERENCE_BillingTeam, _BillingTeam.writeExternalData());
        vals.put (SINGLEREFERENCE_AddedByUser, _AddedByUser.writeExternalData());
        vals.put (SINGLEREFERENCE_PaymentPlan, _PaymentPlan.writeExternalData());
        vals.put (MULTIPLEREFERENCE_Users, _Users.writeExternalData());
        vals.put (MULTIPLEREFERENCE_Clients, _Clients.writeExternalData());
        vals.put (MULTIPLEREFERENCE_HiringTeams, _HiringTeams.writeExternalData());
        
    }


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

        if (other instanceof BaseCompany)
        {
            BaseCompany otherCompany = (BaseCompany)(other);

            
            if (!HELPER_CompanyName.compare(this._CompanyName, otherCompany._CompanyName))
            {
                listener.notifyFieldChange(this, other, FIELD_CompanyName, HELPER_CompanyName.toObject(this._CompanyName), HELPER_CompanyName.toObject(otherCompany._CompanyName));
            }
            if (!HELPER_CompanyLogo.compare(this._CompanyLogo, otherCompany._CompanyLogo))
            {
                listener.notifyFieldChange(this, other, FIELD_CompanyLogo, HELPER_CompanyLogo.toObject(this._CompanyLogo), HELPER_CompanyLogo.toObject(otherCompany._CompanyLogo));
            }
            if (!HELPER_HiringTeamType.compare(this._HiringTeamType, otherCompany._HiringTeamType))
            {
                listener.notifyFieldChange(this, other, FIELD_HiringTeamType, HELPER_HiringTeamType.toObject(this._HiringTeamType), HELPER_HiringTeamType.toObject(otherCompany._HiringTeamType));
            }
            if (!HELPER_Industry.compare(this._Industry, otherCompany._Industry))
            {
                listener.notifyFieldChange(this, other, FIELD_Industry, HELPER_Industry.toObject(this._Industry), HELPER_Industry.toObject(otherCompany._Industry));
            }
            if (!HELPER_TimeZone.compare(this._TimeZone, otherCompany._TimeZone))
            {
                listener.notifyFieldChange(this, other, FIELD_TimeZone, HELPER_TimeZone.toObject(this._TimeZone), HELPER_TimeZone.toObject(otherCompany._TimeZone));
            }
            if (!HELPER_IsVerified.compare(this._IsVerified, otherCompany._IsVerified))
            {
                listener.notifyFieldChange(this, other, FIELD_IsVerified, HELPER_IsVerified.toObject(this._IsVerified), HELPER_IsVerified.toObject(otherCompany._IsVerified));
            }
            if (!HELPER_State.compare(this._State, otherCompany._State))
            {
                listener.notifyFieldChange(this, other, FIELD_State, HELPER_State.toObject(this._State), HELPER_State.toObject(otherCompany._State));
            }
            if (!HELPER_Country.compare(this._Country, otherCompany._Country))
            {
                listener.notifyFieldChange(this, other, FIELD_Country, HELPER_Country.toObject(this._Country), HELPER_Country.toObject(otherCompany._Country));
            }
            if (!HELPER_PostCode.compare(this._PostCode, otherCompany._PostCode))
            {
                listener.notifyFieldChange(this, other, FIELD_PostCode, HELPER_PostCode.toObject(this._PostCode), HELPER_PostCode.toObject(otherCompany._PostCode));
            }
            if (!HELPER_City.compare(this._City, otherCompany._City))
            {
                listener.notifyFieldChange(this, other, FIELD_City, HELPER_City.toObject(this._City), HELPER_City.toObject(otherCompany._City));
            }
            if (!HELPER_HasClientSupport.compare(this._HasClientSupport, otherCompany._HasClientSupport))
            {
                listener.notifyFieldChange(this, other, FIELD_HasClientSupport, HELPER_HasClientSupport.toObject(this._HasClientSupport), HELPER_HasClientSupport.toObject(otherCompany._HasClientSupport));
            }
            if (!HELPER_StripeReference.compare(this._StripeReference, otherCompany._StripeReference))
            {
                listener.notifyFieldChange(this, other, FIELD_StripeReference, HELPER_StripeReference.toObject(this._StripeReference), HELPER_StripeReference.toObject(otherCompany._StripeReference));
            }
            if (!HELPER_StripeSubscription.compare(this._StripeSubscription, otherCompany._StripeSubscription))
            {
                listener.notifyFieldChange(this, other, FIELD_StripeSubscription, HELPER_StripeSubscription.toObject(this._StripeSubscription), HELPER_StripeSubscription.toObject(otherCompany._StripeSubscription));
            }
            if (!HELPER_NameOnCard.compare(this._NameOnCard, otherCompany._NameOnCard))
            {
                listener.notifyFieldChange(this, other, FIELD_NameOnCard, HELPER_NameOnCard.toObject(this._NameOnCard), HELPER_NameOnCard.toObject(otherCompany._NameOnCard));
            }
            if (!HELPER_CardPostCode.compare(this._CardPostCode, otherCompany._CardPostCode))
            {
                listener.notifyFieldChange(this, other, FIELD_CardPostCode, HELPER_CardPostCode.toObject(this._CardPostCode), HELPER_CardPostCode.toObject(otherCompany._CardPostCode));
            }
            if (!HELPER_CardID.compare(this._CardID, otherCompany._CardID))
            {
                listener.notifyFieldChange(this, other, FIELD_CardID, HELPER_CardID.toObject(this._CardID), HELPER_CardID.toObject(otherCompany._CardID));
            }
            if (!HELPER_PlanRenewedOn.compare(this._PlanRenewedOn, otherCompany._PlanRenewedOn))
            {
                listener.notifyFieldChange(this, other, FIELD_PlanRenewedOn, HELPER_PlanRenewedOn.toObject(this._PlanRenewedOn), HELPER_PlanRenewedOn.toObject(otherCompany._PlanRenewedOn));
            }
            if (!HELPER_UsedCredits.compare(this._UsedCredits, otherCompany._UsedCredits))
            {
                listener.notifyFieldChange(this, other, FIELD_UsedCredits, HELPER_UsedCredits.toObject(this._UsedCredits), HELPER_UsedCredits.toObject(otherCompany._UsedCredits));
            }
            if (!HELPER_CompanyStatus.compare(this._CompanyStatus, otherCompany._CompanyStatus))
            {
                listener.notifyFieldChange(this, other, FIELD_CompanyStatus, HELPER_CompanyStatus.toObject(this._CompanyStatus), HELPER_CompanyStatus.toObject(otherCompany._CompanyStatus));
            }

            // Compare single assocs
            _Owner.compare (otherCompany._Owner, listener);
            _BillingTeam.compare (otherCompany._BillingTeam, listener);
            _AddedByUser.compare (otherCompany._AddedByUser, listener);
            _PaymentPlan.compare (otherCompany._PaymentPlan, listener);
            

            // Compare multiple assocs
            _Users.compare (otherCompany._Users, listener);
            _Clients.compare (otherCompany._Clients, listener);
            _HiringTeams.compare (otherCompany._HiringTeams, listener);
            
        }
    }


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

        visitor.visitField(this, FIELD_HiringTeamName, HELPER_HiringTeamName.toObject(getHiringTeamName()));
        visitor.visitField(this, FIELD_ManageOwnBilling, HELPER_ManageOwnBilling.toObject(getManageOwnBilling()));
        visitor.visitField(this, FIELD_HTCountry, HELPER_HTCountry.toObject(getHTCountry()));
        visitor.visitField(this, FIELD_IsLogoDeleted, HELPER_IsLogoDeleted.toObject(getIsLogoDeleted()));
        visitor.visitField(this, FIELD_CompletedProfile, HELPER_CompletedProfile.toObject(getCompletedProfile()));
        visitor.visitField(this, FIELD_PaymentJobCount, HELPER_PaymentJobCount.toObject(getPaymentJobCount()));
        visitor.visitField(this, FIELD_StripeLast4, HELPER_StripeLast4.toObject(getStripeLast4()));
        visitor.visitField(this, FIELD_StripeBrand, HELPER_StripeBrand.toObject(getStripeBrand()));
        
    }


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

        visitor.visitField(this, FIELD_CompanyName, HELPER_CompanyName.toObject(getCompanyName()));
        visitor.visitField(this, FIELD_CompanyLogo, HELPER_CompanyLogo.toObject(getCompanyLogo()));
        visitor.visitField(this, FIELD_HiringTeamType, HELPER_HiringTeamType.toObject(getHiringTeamType()));
        visitor.visitField(this, FIELD_Industry, HELPER_Industry.toObject(getIndustry()));
        visitor.visitField(this, FIELD_TimeZone, HELPER_TimeZone.toObject(getTimeZone()));
        visitor.visitField(this, FIELD_IsVerified, HELPER_IsVerified.toObject(getIsVerified()));
        visitor.visitField(this, FIELD_State, HELPER_State.toObject(getState()));
        visitor.visitField(this, FIELD_Country, HELPER_Country.toObject(getCountry()));
        visitor.visitField(this, FIELD_PostCode, HELPER_PostCode.toObject(getPostCode()));
        visitor.visitField(this, FIELD_City, HELPER_City.toObject(getCity()));
        visitor.visitField(this, FIELD_HasClientSupport, HELPER_HasClientSupport.toObject(getHasClientSupport()));
        visitor.visitField(this, FIELD_StripeReference, HELPER_StripeReference.toObject(getStripeReference()));
        visitor.visitField(this, FIELD_StripeSubscription, HELPER_StripeSubscription.toObject(getStripeSubscription()));
        visitor.visitField(this, FIELD_NameOnCard, HELPER_NameOnCard.toObject(getNameOnCard()));
        visitor.visitField(this, FIELD_CardPostCode, HELPER_CardPostCode.toObject(getCardPostCode()));
        visitor.visitField(this, FIELD_CardID, HELPER_CardID.toObject(getCardID()));
        visitor.visitField(this, FIELD_PlanRenewedOn, HELPER_PlanRenewedOn.toObject(getPlanRenewedOn()));
        visitor.visitField(this, FIELD_UsedCredits, HELPER_UsedCredits.toObject(getUsedCredits()));
        visitor.visitField(this, FIELD_CompanyStatus, HELPER_CompanyStatus.toObject(getCompanyStatus()));
        visitor.visitAssociation (_Owner);
        visitor.visitAssociation (_BillingTeam);
        visitor.visitAssociation (_AddedByUser);
        visitor.visitAssociation (_PaymentPlan);
        visitor.visitAssociation (_Users);
        visitor.visitAssociation (_Clients);
        visitor.visitAssociation (_HiringTeams);
        
    }


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

        if (scope.includes (_Owner))
        {
            visitor.visit (_Owner);
        }
        if (scope.includes (_BillingTeam))
        {
            visitor.visit (_BillingTeam);
        }
        if (scope.includes (_AddedByUser))
        {
            visitor.visit (_AddedByUser);
        }
        if (scope.includes (_PaymentPlan))
        {
            visitor.visit (_PaymentPlan);
        }
        if (scope.includes (_Users))
        {
            visitor.visit (_Users);
        }
        if (scope.includes (_Clients))
        {
            visitor.visit (_Clients);
        }
        if (scope.includes (_HiringTeams))
        {
            visitor.visit (_HiringTeams);
        }
        
    }


    public static Company createCompany (ObjectTransaction transaction) throws StorageException
    {
        Company     result = new Company ();

        result.initialiseNewObject (transaction);

        return result;
    }


    public static Company getCompanyByID (ObjectTransaction transaction, Long objectID) throws StorageException
    {
        return (Company)(transaction.getObjectByID (REFERENCE_Company, objectID));
    }

    public boolean testFilter (String attribName, QueryFilter filter) throws StorageException
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (attribName.equals (FIELD_CompanyName))
        {
            return filter.matches (getCompanyName ());
        }
        else if (attribName.equals (FIELD_CompanyLogo))
        {
            return filter.matches (getCompanyLogo ());
        }
        else if (attribName.equals (FIELD_HiringTeamType))
        {
            return filter.matches (getHiringTeamType ());
        }
        else if (attribName.equals (FIELD_Industry))
        {
            return filter.matches (getIndustry ());
        }
        else if (attribName.equals (FIELD_TimeZone))
        {
            return filter.matches (getTimeZone ());
        }
        else if (attribName.equals (FIELD_IsVerified))
        {
            return filter.matches (getIsVerified ());
        }
        else if (attribName.equals (FIELD_State))
        {
            return filter.matches (getState ());
        }
        else if (attribName.equals (FIELD_Country))
        {
            return filter.matches (getCountry ());
        }
        else if (attribName.equals (FIELD_PostCode))
        {
            return filter.matches (getPostCode ());
        }
        else if (attribName.equals (FIELD_City))
        {
            return filter.matches (getCity ());
        }
        else if (attribName.equals (FIELD_HasClientSupport))
        {
            return filter.matches (getHasClientSupport ());
        }
        else if (attribName.equals (FIELD_StripeReference))
        {
            return filter.matches (getStripeReference ());
        }
        else if (attribName.equals (FIELD_StripeSubscription))
        {
            return filter.matches (getStripeSubscription ());
        }
        else if (attribName.equals (FIELD_NameOnCard))
        {
            return filter.matches (getNameOnCard ());
        }
        else if (attribName.equals (FIELD_CardPostCode))
        {
            return filter.matches (getCardPostCode ());
        }
        else if (attribName.equals (FIELD_CardID))
        {
            return filter.matches (getCardID ());
        }
        else if (attribName.equals (FIELD_PlanRenewedOn))
        {
            return filter.matches (getPlanRenewedOn ());
        }
        else if (attribName.equals (FIELD_UsedCredits))
        {
            return filter.matches (getUsedCredits ());
        }
        else if (attribName.equals (FIELD_CompanyStatus))
        {
            return filter.matches (getCompanyStatus ());
        }
        else if (attribName.equals (SINGLEREFERENCE_AddedByUser))
        {
            return filter.matches (getAddedByUser ());
        }
        else if (attribName.equals (SINGLEREFERENCE_PaymentPlan))
        {
            return filter.matches (getPaymentPlan ());
        }
        else
        {
            return super.testFilter (attribName, filter);
        }
    }


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

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

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

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

            
        public SearchAll andCompanyName (QueryFilter<String> filter)
        {
            filter.addFilter (context, "tl_company.company_name", "CompanyName");
            return this;
        }
            
        public SearchAll andCompanyLogo (QueryFilter<BinaryContent> filter)
        {
            filter.addFilter (context, "tl_company.company_logo", "CompanyLogo");
            return this;
        }
            
        public SearchAll andHiringTeamType (QueryFilter<HiringTeamType> filter)
        {
            filter.addFilter (context, "tl_company.hiring_team_type", "HiringTeamType");
            return this;
        }
            
        public SearchAll andIndustry (QueryFilter<Industry> filter)
        {
            filter.addFilter (context, "tl_company.industry", "Industry");
            return this;
        }
            
        public SearchAll andTimeZone (QueryFilter<TimeZone> filter)
        {
            filter.addFilter (context, "tl_company.time_zone", "TimeZone");
            return this;
        }
            
        public SearchAll andIsVerified (QueryFilter<Boolean> filter)
        {
            filter.addFilter (context, "tl_company.is_verified", "IsVerified");
            return this;
        }
            
        public SearchAll andState (QueryFilter<State> filter)
        {
            filter.addFilter (context, "tl_company.state", "State");
            return this;
        }
            
        public SearchAll andCountry (QueryFilter<Countries> filter)
        {
            filter.addFilter (context, "tl_company.country", "Country");
            return this;
        }
            
        public SearchAll andPostCode (QueryFilter<String> filter)
        {
            filter.addFilter (context, "tl_company.post_code", "PostCode");
            return this;
        }
            
        public SearchAll andCity (QueryFilter<String> filter)
        {
            filter.addFilter (context, "tl_company.city", "City");
            return this;
        }
            
        public SearchAll andHasClientSupport (QueryFilter<Boolean> filter)
        {
            filter.addFilter (context, "tl_company.has_client_support", "HasClientSupport");
            return this;
        }
            
        public SearchAll andStripeReference (QueryFilter<String> filter)
        {
            filter.addFilter (context, "tl_company.stripe_reference", "StripeReference");
            return this;
        }
            
        public SearchAll andStripeSubscription (QueryFilter<String> filter)
        {
            filter.addFilter (context, "tl_company.stripe_subscription", "StripeSubscription");
            return this;
        }
            
        public SearchAll andNameOnCard (QueryFilter<String> filter)
        {
            filter.addFilter (context, "tl_company.name_on_card", "NameOnCard");
            return this;
        }
            
        public SearchAll andCardPostCode (QueryFilter<String> filter)
        {
            filter.addFilter (context, "tl_company.card_post_code", "CardPostCode");
            return this;
        }
            
        public SearchAll andCardID (QueryFilter<String> filter)
        {
            filter.addFilter (context, "tl_company.card_id", "CardID");
            return this;
        }
            
        public SearchAll andPlanRenewedOn (QueryFilter<Date> filter)
        {
            filter.addFilter (context, "tl_company.plan_renewed_on", "PlanRenewedOn");
            return this;
        }
            
        public SearchAll andUsedCredits (QueryFilter<Integer> filter)
        {
            filter.addFilter (context, "tl_company.used_credits", "UsedCredits");
            return this;
        }
            
        public SearchAll andCompanyStatus (QueryFilter<CompanyStatus> filter)
        {
            filter.addFilter (context, "tl_company.company_status", "CompanyStatus");
            return this;
        }
            
        public SearchAll andAddedByUser (QueryFilter<CompanyUser> filter)
        {
            filter.addFilter (context, "tl_company.added_by_user_id", "AddedByUser");
            return this;
        }
            
        public SearchAll andPaymentPlan (QueryFilter<PaymentPlan> filter)
        {
            filter.addFilter (context, "tl_company.payment_plan_id", "PaymentPlan");
            return this;
        }
            
        public Company[] search (ObjectTransaction transaction) throws StorageException
        {
            
            BaseBusinessClass[]     results = super.search (transaction, REFERENCE_Company, SEARCH_All, criteria);
            Set<Company>   typedResults = new LinkedHashSet <Company> ();
            for (BaseBusinessClass bbcResult : results)
            {
                Company aResult = (Company)bbcResult;
                
                typedResults.add (aResult);
            }
            
            return ObjstoreUtils.removeDeleted(transaction, typedResults).toArray (new Company[0]);
                            
        }
    }

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



    public Object getAttribute (String attribName)
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (attribName.equals (FIELD_CompanyName))
        {
            return HELPER_CompanyName.toObject (getCompanyName ());
        }
        else if (attribName.equals (FIELD_CompanyLogo))
        {
            return HELPER_CompanyLogo.toObject (getCompanyLogo ());
        }
        else if (attribName.equals (FIELD_HiringTeamType))
        {
            return HELPER_HiringTeamType.toObject (getHiringTeamType ());
        }
        else if (attribName.equals (FIELD_Industry))
        {
            return HELPER_Industry.toObject (getIndustry ());
        }
        else if (attribName.equals (FIELD_TimeZone))
        {
            return HELPER_TimeZone.toObject (getTimeZone ());
        }
        else if (attribName.equals (FIELD_IsVerified))
        {
            return HELPER_IsVerified.toObject (getIsVerified ());
        }
        else if (attribName.equals (FIELD_State))
        {
            return HELPER_State.toObject (getState ());
        }
        else if (attribName.equals (FIELD_Country))
        {
            return HELPER_Country.toObject (getCountry ());
        }
        else if (attribName.equals (FIELD_PostCode))
        {
            return HELPER_PostCode.toObject (getPostCode ());
        }
        else if (attribName.equals (FIELD_City))
        {
            return HELPER_City.toObject (getCity ());
        }
        else if (attribName.equals (FIELD_HasClientSupport))
        {
            return HELPER_HasClientSupport.toObject (getHasClientSupport ());
        }
        else if (attribName.equals (FIELD_StripeReference))
        {
            return HELPER_StripeReference.toObject (getStripeReference ());
        }
        else if (attribName.equals (FIELD_StripeSubscription))
        {
            return HELPER_StripeSubscription.toObject (getStripeSubscription ());
        }
        else if (attribName.equals (FIELD_NameOnCard))
        {
            return HELPER_NameOnCard.toObject (getNameOnCard ());
        }
        else if (attribName.equals (FIELD_CardPostCode))
        {
            return HELPER_CardPostCode.toObject (getCardPostCode ());
        }
        else if (attribName.equals (FIELD_CardID))
        {
            return HELPER_CardID.toObject (getCardID ());
        }
        else if (attribName.equals (FIELD_PlanRenewedOn))
        {
            return HELPER_PlanRenewedOn.toObject (getPlanRenewedOn ());
        }
        else if (attribName.equals (FIELD_UsedCredits))
        {
            return HELPER_UsedCredits.toObject (getUsedCredits ());
        }
        else if (attribName.equals (FIELD_CompanyStatus))
        {
            return HELPER_CompanyStatus.toObject (getCompanyStatus ());
        }
        else if (attribName.equals (FIELD_HiringTeamName))
        {
            return HELPER_HiringTeamName.toObject (getHiringTeamName ());
        }
        else if (attribName.equals (FIELD_ManageOwnBilling))
        {
            return HELPER_ManageOwnBilling.toObject (getManageOwnBilling ());
        }
        else if (attribName.equals (FIELD_HTCountry))
        {
            return HELPER_HTCountry.toObject (getHTCountry ());
        }
        else if (attribName.equals (FIELD_IsLogoDeleted))
        {
            return HELPER_IsLogoDeleted.toObject (getIsLogoDeleted ());
        }
        else if (attribName.equals (FIELD_CompletedProfile))
        {
            return HELPER_CompletedProfile.toObject (getCompletedProfile ());
        }
        else if (attribName.equals (FIELD_PaymentJobCount))
        {
            return HELPER_PaymentJobCount.toObject (getPaymentJobCount ());
        }
        else if (attribName.equals (FIELD_StripeLast4))
        {
            return HELPER_StripeLast4.toObject (getStripeLast4 ());
        }
        else if (attribName.equals (FIELD_StripeBrand))
        {
            return HELPER_StripeBrand.toObject (getStripeBrand ());
        }
        else
        {
            return super.getAttribute (attribName);
        }
    }


    public AttributeHelper getAttributeHelper (String attribName)
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (attribName.equals (FIELD_CompanyName))
        {
            return HELPER_CompanyName;
        }
        else if (attribName.equals (FIELD_CompanyLogo))
        {
            return HELPER_CompanyLogo;
        }
        else if (attribName.equals (FIELD_HiringTeamType))
        {
            return HELPER_HiringTeamType;
        }
        else if (attribName.equals (FIELD_Industry))
        {
            return HELPER_Industry;
        }
        else if (attribName.equals (FIELD_TimeZone))
        {
            return HELPER_TimeZone;
        }
        else if (attribName.equals (FIELD_IsVerified))
        {
            return HELPER_IsVerified;
        }
        else if (attribName.equals (FIELD_State))
        {
            return HELPER_State;
        }
        else if (attribName.equals (FIELD_Country))
        {
            return HELPER_Country;
        }
        else if (attribName.equals (FIELD_PostCode))
        {
            return HELPER_PostCode;
        }
        else if (attribName.equals (FIELD_City))
        {
            return HELPER_City;
        }
        else if (attribName.equals (FIELD_HasClientSupport))
        {
            return HELPER_HasClientSupport;
        }
        else if (attribName.equals (FIELD_StripeReference))
        {
            return HELPER_StripeReference;
        }
        else if (attribName.equals (FIELD_StripeSubscription))
        {
            return HELPER_StripeSubscription;
        }
        else if (attribName.equals (FIELD_NameOnCard))
        {
            return HELPER_NameOnCard;
        }
        else if (attribName.equals (FIELD_CardPostCode))
        {
            return HELPER_CardPostCode;
        }
        else if (attribName.equals (FIELD_CardID))
        {
            return HELPER_CardID;
        }
        else if (attribName.equals (FIELD_PlanRenewedOn))
        {
            return HELPER_PlanRenewedOn;
        }
        else if (attribName.equals (FIELD_UsedCredits))
        {
            return HELPER_UsedCredits;
        }
        else if (attribName.equals (FIELD_CompanyStatus))
        {
            return HELPER_CompanyStatus;
        }
        else if (attribName.equals (FIELD_HiringTeamName))
        {
            return HELPER_HiringTeamName;
        }
        else if (attribName.equals (FIELD_ManageOwnBilling))
        {
            return HELPER_ManageOwnBilling;
        }
        else if (attribName.equals (FIELD_HTCountry))
        {
            return HELPER_HTCountry;
        }
        else if (attribName.equals (FIELD_IsLogoDeleted))
        {
            return HELPER_IsLogoDeleted;
        }
        else if (attribName.equals (FIELD_CompletedProfile))
        {
            return HELPER_CompletedProfile;
        }
        else if (attribName.equals (FIELD_PaymentJobCount))
        {
            return HELPER_PaymentJobCount;
        }
        else if (attribName.equals (FIELD_StripeLast4))
        {
            return HELPER_StripeLast4;
        }
        else if (attribName.equals (FIELD_StripeBrand))
        {
            return HELPER_StripeBrand;
        }
        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_CompanyName))
        {
            setCompanyName ((String)(HELPER_CompanyName.fromObject (_CompanyName, attribValue)));            
        }
        else if (attribName.equals (FIELD_CompanyLogo))
        {
            setCompanyLogo ((BinaryContent)(HELPER_CompanyLogo.fromObject (_CompanyLogo, attribValue)));            
        }
        else if (attribName.equals (FIELD_HiringTeamType))
        {
            setHiringTeamType ((HiringTeamType)(HELPER_HiringTeamType.fromObject (_HiringTeamType, attribValue)));            
        }
        else if (attribName.equals (FIELD_Industry))
        {
            setIndustry ((Industry)(HELPER_Industry.fromObject (_Industry, attribValue)));            
        }
        else if (attribName.equals (FIELD_TimeZone))
        {
            setTimeZone ((TimeZone)(HELPER_TimeZone.fromObject (_TimeZone, attribValue)));            
        }
        else if (attribName.equals (FIELD_IsVerified))
        {
            setIsVerified ((Boolean)(HELPER_IsVerified.fromObject (_IsVerified, attribValue)));            
        }
        else if (attribName.equals (FIELD_State))
        {
            setState ((State)(HELPER_State.fromObject (_State, attribValue)));            
        }
        else if (attribName.equals (FIELD_Country))
        {
            setCountry ((Countries)(HELPER_Country.fromObject (_Country, attribValue)));            
        }
        else if (attribName.equals (FIELD_PostCode))
        {
            setPostCode ((String)(HELPER_PostCode.fromObject (_PostCode, attribValue)));            
        }
        else if (attribName.equals (FIELD_City))
        {
            setCity ((String)(HELPER_City.fromObject (_City, attribValue)));            
        }
        else if (attribName.equals (FIELD_HasClientSupport))
        {
            setHasClientSupport ((Boolean)(HELPER_HasClientSupport.fromObject (_HasClientSupport, attribValue)));            
        }
        else if (attribName.equals (FIELD_StripeReference))
        {
            setStripeReference ((String)(HELPER_StripeReference.fromObject (_StripeReference, attribValue)));            
        }
        else if (attribName.equals (FIELD_StripeSubscription))
        {
            setStripeSubscription ((String)(HELPER_StripeSubscription.fromObject (_StripeSubscription, attribValue)));            
        }
        else if (attribName.equals (FIELD_NameOnCard))
        {
            setNameOnCard ((String)(HELPER_NameOnCard.fromObject (_NameOnCard, attribValue)));            
        }
        else if (attribName.equals (FIELD_CardPostCode))
        {
            setCardPostCode ((String)(HELPER_CardPostCode.fromObject (_CardPostCode, attribValue)));            
        }
        else if (attribName.equals (FIELD_CardID))
        {
            setCardID ((String)(HELPER_CardID.fromObject (_CardID, attribValue)));            
        }
        else if (attribName.equals (FIELD_PlanRenewedOn))
        {
            setPlanRenewedOn ((Date)(HELPER_PlanRenewedOn.fromObject (_PlanRenewedOn, attribValue)));            
        }
        else if (attribName.equals (FIELD_UsedCredits))
        {
            setUsedCredits ((Integer)(HELPER_UsedCredits.fromObject (_UsedCredits, attribValue)));            
        }
        else if (attribName.equals (FIELD_CompanyStatus))
        {
            setCompanyStatus ((CompanyStatus)(HELPER_CompanyStatus.fromObject (_CompanyStatus, attribValue)));            
        }
        else if (attribName.equals (FIELD_HiringTeamName))
        {
            setHiringTeamName ((String)(HELPER_HiringTeamName.fromObject (_HiringTeamName, attribValue)));            
        }
        else if (attribName.equals (FIELD_ManageOwnBilling))
        {
            setManageOwnBilling ((Boolean)(HELPER_ManageOwnBilling.fromObject (_ManageOwnBilling, attribValue)));            
        }
        else if (attribName.equals (FIELD_HTCountry))
        {
            setHTCountry ((Countries)(HELPER_HTCountry.fromObject (_HTCountry, attribValue)));            
        }
        else if (attribName.equals (FIELD_IsLogoDeleted))
        {
            setIsLogoDeleted ((Boolean)(HELPER_IsLogoDeleted.fromObject (_IsLogoDeleted, attribValue)));            
        }
        else if (attribName.equals (FIELD_CompletedProfile))
        {
            setCompletedProfile ((Boolean)(HELPER_CompletedProfile.fromObject (_CompletedProfile, attribValue)));            
        }
        else if (attribName.equals (FIELD_PaymentJobCount))
        {
            setPaymentJobCount ((Integer)(HELPER_PaymentJobCount.fromObject (_PaymentJobCount, attribValue)));            
        }
        else if (attribName.equals (FIELD_StripeLast4))
        {
            setStripeLast4 ((String)(HELPER_StripeLast4.fromObject (_StripeLast4, attribValue)));            
        }
        else if (attribName.equals (FIELD_StripeBrand))
        {
            setStripeBrand ((String)(HELPER_StripeBrand.fromObject (_StripeBrand, attribValue)));            
        }
        else
        {
            super.setAttribute (attribName, attribValue);
        }
    }

    

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

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

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


    public FieldWriteability getWriteable (String fieldName)
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (fieldName.equals (FIELD_CompanyName))
        {
            return getWriteability_CompanyName ();
        }
        else if (fieldName.equals (FIELD_CompanyLogo))
        {
            return getWriteability_CompanyLogo ();
        }
        else if (fieldName.equals (FIELD_HiringTeamType))
        {
            return getWriteability_HiringTeamType ();
        }
        else if (fieldName.equals (FIELD_Industry))
        {
            return getWriteability_Industry ();
        }
        else if (fieldName.equals (FIELD_TimeZone))
        {
            return getWriteability_TimeZone ();
        }
        else if (fieldName.equals (FIELD_IsVerified))
        {
            return getWriteability_IsVerified ();
        }
        else if (fieldName.equals (FIELD_State))
        {
            return getWriteability_State ();
        }
        else if (fieldName.equals (FIELD_Country))
        {
            return getWriteability_Country ();
        }
        else if (fieldName.equals (FIELD_PostCode))
        {
            return getWriteability_PostCode ();
        }
        else if (fieldName.equals (FIELD_City))
        {
            return getWriteability_City ();
        }
        else if (fieldName.equals (FIELD_HasClientSupport))
        {
            return getWriteability_HasClientSupport ();
        }
        else if (fieldName.equals (FIELD_StripeReference))
        {
            return getWriteability_StripeReference ();
        }
        else if (fieldName.equals (FIELD_StripeSubscription))
        {
            return getWriteability_StripeSubscription ();
        }
        else if (fieldName.equals (FIELD_NameOnCard))
        {
            return getWriteability_NameOnCard ();
        }
        else if (fieldName.equals (FIELD_CardPostCode))
        {
            return getWriteability_CardPostCode ();
        }
        else if (fieldName.equals (FIELD_CardID))
        {
            return getWriteability_CardID ();
        }
        else if (fieldName.equals (FIELD_PlanRenewedOn))
        {
            return getWriteability_PlanRenewedOn ();
        }
        else if (fieldName.equals (FIELD_UsedCredits))
        {
            return getWriteability_UsedCredits ();
        }
        else if (fieldName.equals (FIELD_CompanyStatus))
        {
            return getWriteability_CompanyStatus ();
        }
        else if (fieldName.equals (MULTIPLEREFERENCE_Users))
        {
            return getWriteability_Users ();
        }
        else if (fieldName.equals (MULTIPLEREFERENCE_Clients))
        {
            return getWriteability_Clients ();
        }
        else if (fieldName.equals (MULTIPLEREFERENCE_HiringTeams))
        {
            return getWriteability_HiringTeams ();
        }
        else if (fieldName.equals (SINGLEREFERENCE_AddedByUser))
        {
            return getWriteability_AddedByUser ();
        }
        else if (fieldName.equals (SINGLEREFERENCE_PaymentPlan))
        {
            return getWriteability_PaymentPlan ();
        }
        else if (fieldName.equals (FIELD_HiringTeamName))
        {
            return getWriteability_HiringTeamName ();
        }
        else if (fieldName.equals (FIELD_ManageOwnBilling))
        {
            return getWriteability_ManageOwnBilling ();
        }
        else if (fieldName.equals (FIELD_HTCountry))
        {
            return getWriteability_HTCountry ();
        }
        else if (fieldName.equals (FIELD_IsLogoDeleted))
        {
            return getWriteability_IsLogoDeleted ();
        }
        else if (fieldName.equals (FIELD_CompletedProfile))
        {
            return getWriteability_CompletedProfile ();
        }
        else if (fieldName.equals (FIELD_PaymentJobCount))
        {
            return getWriteability_PaymentJobCount ();
        }
        else if (fieldName.equals (FIELD_StripeLast4))
        {
            return getWriteability_StripeLast4 ();
        }
        else if (fieldName.equals (FIELD_StripeBrand))
        {
            return getWriteability_StripeBrand ();
        }
        else if (fieldName.equals (SINGLEREFERENCE_Owner))
        {
            return getWriteability_Owner ();
        }
        else if (fieldName.equals (SINGLEREFERENCE_BillingTeam))
        {
            return getWriteability_BillingTeam ();
        }
        else
        {
            return super.getWriteable (fieldName);
        }
    }


    public void putUnwriteable (Set<String> fields)
    {
        if (getWriteability_CompanyName () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_CompanyName);
        }
        
        if (getWriteability_CompanyLogo () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_CompanyLogo);
        }
        
        if (getWriteability_HiringTeamType () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_HiringTeamType);
        }
        
        if (getWriteability_Industry () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_Industry);
        }
        
        if (getWriteability_TimeZone () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_TimeZone);
        }
        
        if (getWriteability_IsVerified () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_IsVerified);
        }
        
        if (getWriteability_State () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_State);
        }
        
        if (getWriteability_Country () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_Country);
        }
        
        if (getWriteability_PostCode () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_PostCode);
        }
        
        if (getWriteability_City () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_City);
        }
        
        if (getWriteability_HasClientSupport () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_HasClientSupport);
        }
        
        if (getWriteability_StripeReference () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_StripeReference);
        }
        
        if (getWriteability_StripeSubscription () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_StripeSubscription);
        }
        
        if (getWriteability_NameOnCard () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_NameOnCard);
        }
        
        if (getWriteability_CardPostCode () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_CardPostCode);
        }
        
        if (getWriteability_CardID () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_CardID);
        }
        
        if (getWriteability_PlanRenewedOn () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_PlanRenewedOn);
        }
        
        if (getWriteability_UsedCredits () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_UsedCredits);
        }
        
        if (getWriteability_CompanyStatus () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_CompanyStatus);
        }
        
        if (getWriteability_HiringTeamName () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_HiringTeamName);
        }
        
        if (getWriteability_ManageOwnBilling () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_ManageOwnBilling);
        }
        
        if (getWriteability_HTCountry () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_HTCountry);
        }
        
        if (getWriteability_IsLogoDeleted () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_IsLogoDeleted);
        }
        
        if (getWriteability_CompletedProfile () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_CompletedProfile);
        }
        
        if (getWriteability_PaymentJobCount () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_PaymentJobCount);
        }
        
        if (getWriteability_StripeLast4 () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_StripeLast4);
        }
        
        if (getWriteability_StripeBrand () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_StripeBrand);
        }
        

        super.putUnwriteable (fields);
    }

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


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

        
        result.add(HELPER_CompanyName.getAttribObject (getClass (), _CompanyName, true, FIELD_CompanyName));
        result.add(HELPER_CompanyLogo.getAttribObject (getClass (), _CompanyLogo, false, FIELD_CompanyLogo));
        result.add(HELPER_HiringTeamType.getAttribObject (getClass (), _HiringTeamType, false, FIELD_HiringTeamType));
        result.add(HELPER_Industry.getAttribObject (getClass (), _Industry, false, FIELD_Industry));
        result.add(HELPER_TimeZone.getAttribObject (getClass (), _TimeZone, false, FIELD_TimeZone));
        result.add(HELPER_IsVerified.getAttribObject (getClass (), _IsVerified, false, FIELD_IsVerified));
        result.add(HELPER_State.getAttribObject (getClass (), _State, false, FIELD_State));
        result.add(HELPER_Country.getAttribObject (getClass (), _Country, false, FIELD_Country));
        result.add(HELPER_PostCode.getAttribObject (getClass (), _PostCode, false, FIELD_PostCode));
        result.add(HELPER_City.getAttribObject (getClass (), _City, false, FIELD_City));
        result.add(HELPER_HasClientSupport.getAttribObject (getClass (), _HasClientSupport, false, FIELD_HasClientSupport));
        result.add(HELPER_StripeReference.getAttribObject (getClass (), _StripeReference, false, FIELD_StripeReference));
        result.add(HELPER_StripeSubscription.getAttribObject (getClass (), _StripeSubscription, false, FIELD_StripeSubscription));
        result.add(HELPER_NameOnCard.getAttribObject (getClass (), _NameOnCard, false, FIELD_NameOnCard));
        result.add(HELPER_CardPostCode.getAttribObject (getClass (), _CardPostCode, false, FIELD_CardPostCode));
        result.add(HELPER_CardID.getAttribObject (getClass (), _CardID, false, FIELD_CardID));
        result.add(HELPER_PlanRenewedOn.getAttribObject (getClass (), _PlanRenewedOn, false, FIELD_PlanRenewedOn));
        result.add(HELPER_UsedCredits.getAttribObject (getClass (), _UsedCredits, false, FIELD_UsedCredits));
        result.add(HELPER_CompanyStatus.getAttribObject (getClass (), _CompanyStatus, true, FIELD_CompanyStatus));
        result.add(HELPER_HiringTeamName.getAttribObject (getClass (), _HiringTeamName, false, FIELD_HiringTeamName));
        result.add(HELPER_ManageOwnBilling.getAttribObject (getClass (), _ManageOwnBilling, false, FIELD_ManageOwnBilling));
        result.add(HELPER_HTCountry.getAttribObject (getClass (), _HTCountry, false, FIELD_HTCountry));
        result.add(HELPER_IsLogoDeleted.getAttribObject (getClass (), _IsLogoDeleted, false, FIELD_IsLogoDeleted));
        result.add(HELPER_CompletedProfile.getAttribObject (getClass (), _CompletedProfile, false, FIELD_CompletedProfile));
        result.add(HELPER_PaymentJobCount.getAttribObject (getClass (), _PaymentJobCount, false, FIELD_PaymentJobCount));
        result.add(HELPER_StripeLast4.getAttribObject (getClass (), _StripeLast4, false, FIELD_StripeLast4));
        result.add(HELPER_StripeBrand.getAttribObject (getClass (), _StripeBrand, false, FIELD_StripeBrand));

        return result;
    }


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


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

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

        copyInto.putAll(ATTRIBUTES_METADATA_Company);
    }
            

    public void preCommit (boolean willBeStored) throws Exception
    {
        super.preCommit(willBeStored);
        
        if(willBeStored)
        {
        
          {  
            oneit.servlets.objstore.binary.BinaryContentHandler bchandler = oneit.servlets.objstore.binary.BinaryContentServlet.getHandler("loggedin");
              
            if(bchandler != null)
            {
                bchandler.preCommit(willBeStored, this, "CompanyLogo");
            }
            else
            {
                LogMgr.log(BUSINESS_OBJECTS, LogLevel.SYSTEMWARNING, "Unknown BinaryContentHandler loggedin on attribute CompanyLogo");
            }
          }
          
        }
    }

    public oneit.servlets.objstore.binary.BinaryContentHandler getBinaryContentHandler(String attribName)
    {
        if(CollectionUtils.equals(attribName, "CompanyLogo"))      
        {  
            return oneit.servlets.objstore.binary.BinaryContentServlet.getHandler("loggedin");
        }     
          
        
        return super.getBinaryContentHandler(attribName);
    }

    public static class CompanyBehaviourDecorator extends BaseBusinessClass.BBCBehaviourDecorator<Company>
    {

    /**
     * Get the attribute CompanyName
     */
    public String getCompanyName (Company obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute CompanyName.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setCompanyName (Company obj, String newCompanyName) throws FieldException
    {
        return newCompanyName;
    }

    /**
     * Get the attribute CompanyLogo
     */
    public BinaryContent getCompanyLogo (Company obj, BinaryContent original)
    {
        return original;
    }

    /**
     * Change the value set for attribute CompanyLogo.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public BinaryContent setCompanyLogo (Company obj, BinaryContent newCompanyLogo) throws FieldException
    {
        return newCompanyLogo;
    }

    /**
     * Get the attribute HiringTeamType
     */
    public HiringTeamType getHiringTeamType (Company obj, HiringTeamType original)
    {
        return original;
    }

    /**
     * Change the value set for attribute HiringTeamType.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public HiringTeamType setHiringTeamType (Company obj, HiringTeamType newHiringTeamType) throws FieldException
    {
        return newHiringTeamType;
    }

    /**
     * Get the attribute Industry
     */
    public Industry getIndustry (Company obj, Industry original)
    {
        return original;
    }

    /**
     * Change the value set for attribute Industry.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Industry setIndustry (Company obj, Industry newIndustry) throws FieldException
    {
        return newIndustry;
    }

    /**
     * Get the attribute TimeZone
     */
    public TimeZone getTimeZone (Company obj, TimeZone original)
    {
        return original;
    }

    /**
     * Change the value set for attribute TimeZone.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public TimeZone setTimeZone (Company obj, TimeZone newTimeZone) throws FieldException
    {
        return newTimeZone;
    }

    /**
     * Get the attribute IsVerified
     */
    public Boolean getIsVerified (Company obj, Boolean original)
    {
        return original;
    }

    /**
     * Change the value set for attribute IsVerified.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Boolean setIsVerified (Company obj, Boolean newIsVerified) throws FieldException
    {
        return newIsVerified;
    }

    /**
     * Get the attribute State
     */
    public State getState (Company obj, State original)
    {
        return original;
    }

    /**
     * Change the value set for attribute State.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public State setState (Company obj, State newState) throws FieldException
    {
        return newState;
    }

    /**
     * Get the attribute Country
     */
    public Countries getCountry (Company obj, Countries original)
    {
        return original;
    }

    /**
     * Change the value set for attribute Country.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Countries setCountry (Company obj, Countries newCountry) throws FieldException
    {
        return newCountry;
    }

    /**
     * Get the attribute PostCode
     */
    public String getPostCode (Company obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute PostCode.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setPostCode (Company obj, String newPostCode) throws FieldException
    {
        return newPostCode;
    }

    /**
     * Get the attribute City
     */
    public String getCity (Company obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute City.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setCity (Company obj, String newCity) throws FieldException
    {
        return newCity;
    }

    /**
     * Get the attribute HasClientSupport
     */
    public Boolean getHasClientSupport (Company obj, Boolean original)
    {
        return original;
    }

    /**
     * Change the value set for attribute HasClientSupport.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Boolean setHasClientSupport (Company obj, Boolean newHasClientSupport) throws FieldException
    {
        return newHasClientSupport;
    }

    /**
     * Get the attribute StripeReference
     */
    public String getStripeReference (Company obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute StripeReference.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setStripeReference (Company obj, String newStripeReference) throws FieldException
    {
        return newStripeReference;
    }

    /**
     * Get the attribute StripeSubscription
     */
    public String getStripeSubscription (Company obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute StripeSubscription.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setStripeSubscription (Company obj, String newStripeSubscription) throws FieldException
    {
        return newStripeSubscription;
    }

    /**
     * Get the attribute NameOnCard
     */
    public String getNameOnCard (Company obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute NameOnCard.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setNameOnCard (Company obj, String newNameOnCard) throws FieldException
    {
        return newNameOnCard;
    }

    /**
     * Get the attribute CardPostCode
     */
    public String getCardPostCode (Company obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute CardPostCode.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setCardPostCode (Company obj, String newCardPostCode) throws FieldException
    {
        return newCardPostCode;
    }

    /**
     * Get the attribute CardID
     */
    public String getCardID (Company obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute CardID.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setCardID (Company obj, String newCardID) throws FieldException
    {
        return newCardID;
    }

    /**
     * Get the attribute PlanRenewedOn
     */
    public Date getPlanRenewedOn (Company obj, Date original)
    {
        return original;
    }

    /**
     * Change the value set for attribute PlanRenewedOn.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Date setPlanRenewedOn (Company obj, Date newPlanRenewedOn) throws FieldException
    {
        return newPlanRenewedOn;
    }

    /**
     * Get the attribute UsedCredits
     */
    public Integer getUsedCredits (Company obj, Integer original)
    {
        return original;
    }

    /**
     * Change the value set for attribute UsedCredits.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Integer setUsedCredits (Company obj, Integer newUsedCredits) throws FieldException
    {
        return newUsedCredits;
    }

    /**
     * Get the attribute CompanyStatus
     */
    public CompanyStatus getCompanyStatus (Company obj, CompanyStatus original)
    {
        return original;
    }

    /**
     * Change the value set for attribute CompanyStatus.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public CompanyStatus setCompanyStatus (Company obj, CompanyStatus newCompanyStatus) throws FieldException
    {
        return newCompanyStatus;
    }

    /**
     * Get the attribute HiringTeamName
     */
    public String getHiringTeamName (Company obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute HiringTeamName.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setHiringTeamName (Company obj, String newHiringTeamName) throws FieldException
    {
        return newHiringTeamName;
    }

    /**
     * Get the attribute ManageOwnBilling
     */
    public Boolean getManageOwnBilling (Company obj, Boolean original)
    {
        return original;
    }

    /**
     * Change the value set for attribute ManageOwnBilling.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Boolean setManageOwnBilling (Company obj, Boolean newManageOwnBilling) throws FieldException
    {
        return newManageOwnBilling;
    }

    /**
     * Get the attribute HTCountry
     */
    public Countries getHTCountry (Company obj, Countries original)
    {
        return original;
    }

    /**
     * Change the value set for attribute HTCountry.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Countries setHTCountry (Company obj, Countries newHTCountry) throws FieldException
    {
        return newHTCountry;
    }

    /**
     * Get the attribute IsLogoDeleted
     */
    public Boolean getIsLogoDeleted (Company obj, Boolean original)
    {
        return original;
    }

    /**
     * Change the value set for attribute IsLogoDeleted.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Boolean setIsLogoDeleted (Company obj, Boolean newIsLogoDeleted) throws FieldException
    {
        return newIsLogoDeleted;
    }

    /**
     * Get the attribute CompletedProfile
     */
    public Boolean getCompletedProfile (Company obj, Boolean original)
    {
        return original;
    }

    /**
     * Change the value set for attribute CompletedProfile.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Boolean setCompletedProfile (Company obj, Boolean newCompletedProfile) throws FieldException
    {
        return newCompletedProfile;
    }

    /**
     * Get the attribute PaymentJobCount
     */
    public Integer getPaymentJobCount (Company obj, Integer original)
    {
        return original;
    }

    /**
     * Change the value set for attribute PaymentJobCount.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public Integer setPaymentJobCount (Company obj, Integer newPaymentJobCount) throws FieldException
    {
        return newPaymentJobCount;
    }

    /**
     * Get the attribute StripeLast4
     */
    public String getStripeLast4 (Company obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute StripeLast4.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setStripeLast4 (Company obj, String newStripeLast4) throws FieldException
    {
        return newStripeLast4;
    }

    /**
     * Get the attribute StripeBrand
     */
    public String getStripeBrand (Company obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute StripeBrand.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setStripeBrand (Company obj, String newStripeBrand) throws FieldException
    {
        return newStripeBrand;
    }

    }

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

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

        public CompanyPipeLineFactory (Collection<From> seed)
        {
            super(seed);
        }
        
        
        public PipeLine<From, ? extends Object> to(String name)
        {
            if (name.equals ("Users"))
            {
                return toUsers ();
            }                
            if (name.equals ("Clients"))
            {
                return toClients ();
            }                
            if (name.equals ("HiringTeams"))
            {
                return toHiringTeams ();
            }                
            if (name.equals ("HiringTeamName"))
            {
                return toHiringTeamName ();
            }                
            if (name.equals ("ManageOwnBilling"))
            {
                return toManageOwnBilling ();
            }                
            if (name.equals ("HTCountry"))
            {
                return toHTCountry ();
            }                
            if (name.equals ("IsLogoDeleted"))
            {
                return toIsLogoDeleted ();
            }                
            if (name.equals ("CompletedProfile"))
            {
                return toCompletedProfile ();
            }                
            if (name.equals ("PaymentJobCount"))
            {
                return toPaymentJobCount ();
            }                
            if (name.equals ("StripeLast4"))
            {
                return toStripeLast4 ();
            }                
            if (name.equals ("StripeBrand"))
            {
                return toStripeBrand ();
            }                
            if (name.equals ("Owner"))
            {
                return toOwner ();
            }                
            if (name.equals ("BillingTeam"))
            {
                return toBillingTeam ();
            }                
            if (name.equals ("CompanyName"))
            {
                return toCompanyName ();
            }                
            if (name.equals ("CompanyLogo"))
            {
                return toCompanyLogo ();
            }                
            if (name.equals ("HiringTeamType"))
            {
                return toHiringTeamType ();
            }                
            if (name.equals ("Industry"))
            {
                return toIndustry ();
            }                
            if (name.equals ("TimeZone"))
            {
                return toTimeZone ();
            }                
            if (name.equals ("IsVerified"))
            {
                return toIsVerified ();
            }                
            if (name.equals ("State"))
            {
                return toState ();
            }                
            if (name.equals ("Country"))
            {
                return toCountry ();
            }                
            if (name.equals ("PostCode"))
            {
                return toPostCode ();
            }                
            if (name.equals ("City"))
            {
                return toCity ();
            }                
            if (name.equals ("HasClientSupport"))
            {
                return toHasClientSupport ();
            }                
            if (name.equals ("StripeReference"))
            {
                return toStripeReference ();
            }                
            if (name.equals ("StripeSubscription"))
            {
                return toStripeSubscription ();
            }                
            if (name.equals ("NameOnCard"))
            {
                return toNameOnCard ();
            }                
            if (name.equals ("CardPostCode"))
            {
                return toCardPostCode ();
            }                
            if (name.equals ("CardID"))
            {
                return toCardID ();
            }                
            if (name.equals ("PlanRenewedOn"))
            {
                return toPlanRenewedOn ();
            }                
            if (name.equals ("UsedCredits"))
            {
                return toUsedCredits ();
            }                
            if (name.equals ("CompanyStatus"))
            {
                return toCompanyStatus ();
            }                
            if (name.equals ("AddedByUser"))
            {
                return toAddedByUser ();
            }                
            if (name.equals ("PaymentPlan"))
            {
                return toPaymentPlan ();
            }                
            
            
            return super.to(name);
        }
        
        
        public PipeLine<From, String> toHiringTeamName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_HiringTeamName));  }
        
        public PipeLine<From, Boolean> toManageOwnBilling () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_ManageOwnBilling));  }
        
        public Countries.CountriesPipeLineFactory<From, Countries> toHTCountry () 
        { 
            return new Countries.CountriesPipeLineFactory<> (this, new ORMAttributePipe<>(FIELD_HTCountry));
        }
        
        public PipeLine<From, Boolean> toIsLogoDeleted () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_IsLogoDeleted));  }
        
        public PipeLine<From, Boolean> toCompletedProfile () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_CompletedProfile));  }
        
        public PipeLine<From, Integer> toPaymentJobCount () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_PaymentJobCount));  }
        
        public PipeLine<From, String> toStripeLast4 () { return pipe(new ORMAttributePipe<Me, String>(FIELD_StripeLast4));  }
        
        public PipeLine<From, String> toStripeBrand () { return pipe(new ORMAttributePipe<Me, String>(FIELD_StripeBrand));  }
        
        public PipeLine<From, String> toCompanyName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_CompanyName));  }
        
        public PipeLine<From, BinaryContent> toCompanyLogo () { return pipe(new ORMAttributePipe<Me, BinaryContent>(FIELD_CompanyLogo));  }
        
        public HiringTeamType.HiringTeamTypePipeLineFactory<From, HiringTeamType> toHiringTeamType () 
        { 
            return new HiringTeamType.HiringTeamTypePipeLineFactory<> (this, new ORMAttributePipe<>(FIELD_HiringTeamType));
        }
        
        public Industry.IndustryPipeLineFactory<From, Industry> toIndustry () 
        { 
            return new Industry.IndustryPipeLineFactory<> (this, new ORMAttributePipe<>(FIELD_Industry));
        }
        
        public TimeZone.TimeZonePipeLineFactory<From, TimeZone> toTimeZone () 
        { 
            return new TimeZone.TimeZonePipeLineFactory<> (this, new ORMAttributePipe<>(FIELD_TimeZone));
        }
        
        public PipeLine<From, Boolean> toIsVerified () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_IsVerified));  }
        
        public State.StatePipeLineFactory<From, State> toState () 
        { 
            return new State.StatePipeLineFactory<> (this, new ORMAttributePipe<>(FIELD_State));
        }
        
        public Countries.CountriesPipeLineFactory<From, Countries> toCountry () 
        { 
            return new Countries.CountriesPipeLineFactory<> (this, new ORMAttributePipe<>(FIELD_Country));
        }
        
        public PipeLine<From, String> toPostCode () { return pipe(new ORMAttributePipe<Me, String>(FIELD_PostCode));  }
        
        public PipeLine<From, String> toCity () { return pipe(new ORMAttributePipe<Me, String>(FIELD_City));  }
        
        public PipeLine<From, Boolean> toHasClientSupport () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_HasClientSupport));  }
        
        public PipeLine<From, String> toStripeReference () { return pipe(new ORMAttributePipe<Me, String>(FIELD_StripeReference));  }
        
        public PipeLine<From, String> toStripeSubscription () { return pipe(new ORMAttributePipe<Me, String>(FIELD_StripeSubscription));  }
        
        public PipeLine<From, String> toNameOnCard () { return pipe(new ORMAttributePipe<Me, String>(FIELD_NameOnCard));  }
        
        public PipeLine<From, String> toCardPostCode () { return pipe(new ORMAttributePipe<Me, String>(FIELD_CardPostCode));  }
        
        public PipeLine<From, String> toCardID () { return pipe(new ORMAttributePipe<Me, String>(FIELD_CardID));  }
        
        public PipeLine<From, Date> toPlanRenewedOn () { return pipe(new ORMAttributePipe<Me, Date>(FIELD_PlanRenewedOn));  }
        
        public PipeLine<From, Integer> toUsedCredits () { return pipe(new ORMAttributePipe<Me, Integer>(FIELD_UsedCredits));  }
        
        public CompanyStatus.CompanyStatusPipeLineFactory<From, CompanyStatus> toCompanyStatus () 
        { 
            return new CompanyStatus.CompanyStatusPipeLineFactory<> (this, new ORMAttributePipe<>(FIELD_CompanyStatus));
        }

        public CompanyUser.CompanyUserPipeLineFactory<From, CompanyUser> toOwner () { return toOwner (Filter.ALL); }

        public CompanyUser.CompanyUserPipeLineFactory<From, CompanyUser> toOwner (Filter<CompanyUser> filter) 
        { 
            return CompanyUser.REFERENCE_CompanyUser.new CompanyUserPipeLineFactory<From, CompanyUser> (this, new ORMSingleAssocPipe<Me, CompanyUser>(SINGLEREFERENCE_Owner, filter)); 
        }

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

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

        public CompanyUser.CompanyUserPipeLineFactory<From, CompanyUser> toAddedByUser () { return toAddedByUser (Filter.ALL); }

        public CompanyUser.CompanyUserPipeLineFactory<From, CompanyUser> toAddedByUser (Filter<CompanyUser> filter) 
        { 
            return CompanyUser.REFERENCE_CompanyUser.new CompanyUserPipeLineFactory<From, CompanyUser> (this, new ORMSingleAssocPipe<Me, CompanyUser>(SINGLEREFERENCE_AddedByUser, filter)); 
        }

        public PaymentPlan.PaymentPlanPipeLineFactory<From, PaymentPlan> toPaymentPlan () { return toPaymentPlan (Filter.ALL); }

        public PaymentPlan.PaymentPlanPipeLineFactory<From, PaymentPlan> toPaymentPlan (Filter<PaymentPlan> filter) 
        { 
            return PaymentPlan.REFERENCE_PaymentPlan.new PaymentPlanPipeLineFactory<From, PaymentPlan> (this, new ORMSingleAssocPipe<Me, PaymentPlan>(SINGLEREFERENCE_PaymentPlan, filter)); 
        }

        public CompanyUser.CompanyUserPipeLineFactory<From, CompanyUser> toUsers () { return toUsers(Filter.ALL); }        

        public CompanyUser.CompanyUserPipeLineFactory<From, CompanyUser> toUsers (Filter<CompanyUser> filter)
        {
            return CompanyUser.REFERENCE_CompanyUser.new CompanyUserPipeLineFactory<From, CompanyUser> (this, new ORMMultiAssocPipe<Me, CompanyUser>(MULTIPLEREFERENCE_Users, filter)); 
        }

        public Client.ClientPipeLineFactory<From, Client> toClients () { return toClients(Filter.ALL); }        

        public Client.ClientPipeLineFactory<From, Client> toClients (Filter<Client> filter)
        {
            return Client.REFERENCE_Client.new ClientPipeLineFactory<From, Client> (this, new ORMMultiAssocPipe<Me, Client>(MULTIPLEREFERENCE_Clients, filter)); 
        }

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

        public HiringTeam.HiringTeamPipeLineFactory<From, HiringTeam> toHiringTeams (Filter<HiringTeam> filter)
        {
            return HiringTeam.REFERENCE_HiringTeam.new HiringTeamPipeLineFactory<From, HiringTeam> (this, new ORMMultiAssocPipe<Me, HiringTeam>(MULTIPLEREFERENCE_HiringTeams, filter)); 
        }
    }
    
    public boolean isTransientAttrib(String attribName)
    {
        
        if(CollectionUtils.equals(attribName, "HiringTeamName"))
        {
            return true;
        }
        
        if(CollectionUtils.equals(attribName, "ManageOwnBilling"))
        {
            return true;
        }
        
        if(CollectionUtils.equals(attribName, "HTCountry"))
        {
            return true;
        }
        
        if(CollectionUtils.equals(attribName, "IsLogoDeleted"))
        {
            return true;
        }
        
        if(CollectionUtils.equals(attribName, "CompletedProfile"))
        {
            return true;
        }
        
        if(CollectionUtils.equals(attribName, "PaymentJobCount"))
        {
            return true;
        }
        
        if(CollectionUtils.equals(attribName, "StripeLast4"))
        {
            return true;
        }
        
        if(CollectionUtils.equals(attribName, "StripeBrand"))
        {
            return true;
        }
        

        return super.isTransientAttrib(attribName);
    }

    public boolean isTransientSingleReference(String assocName)
    {
        
        if(CollectionUtils.equals(assocName, "Owner"))
        {
            return true;
        }
        
        if(CollectionUtils.equals(assocName, "BillingTeam"))
        {
            return true;
        }
        

        return super.isTransientSingleReference(assocName);
    }
}

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

    public void assertValid ()
    {
    }


    public CompanyUser getOwner () throws StorageException
    {
        return (CompanyUser)(CompanyUser.DUMMY_CompanyUser);
    }


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

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


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

    public CompanyUser getAddedByUser () throws StorageException
    {
        return (CompanyUser)(CompanyUser.DUMMY_CompanyUser);
    }


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

    public PaymentPlan getPaymentPlan () throws StorageException
    {
        return (PaymentPlan)(PaymentPlan.DUMMY_PaymentPlan);
    }


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

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


    public CompanyUser getUsersAt (int index) throws StorageException
    {
        throw new RuntimeException ("No elements in a dummy object in association Users");
    }


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

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


    public Client getClientsAt (int index) throws StorageException
    {
        throw new RuntimeException ("No elements in a dummy object in association Clients");
    }


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

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


    public HiringTeam getHiringTeamsAt (int index) throws StorageException
    {
        throw new RuntimeException ("No elements in a dummy object in association HiringTeams");
    }


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

}

    
