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


    package performa.orm;

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

import oneit.servlets.orm.*;

import performa.orm.types.*;



public abstract class BaseInviteTeammateNPO extends NonPersistentBO
{
    // Reference instance for the object
    public static final InviteTeammateNPO REFERENCE_InviteTeammateNPO = new InviteTeammateNPO ();

    // Reference instance for the object
    public static final InviteTeammateNPO DUMMY_InviteTeammateNPO = new DummyInviteTeammateNPO ();

    // Static constants corresponding to field names
    
    public static final String FIELD_UserEmail = "UserEmail";
    public static final String FIELD_FirstName = "FirstName";
    public static final String FIELD_LastName = "LastName";
    public static final String FIELD_RoleType = "RoleType";
    public static final String MULTIPLEREFERENCE_HiringTeams = "HiringTeams";
    public static final String BACKREF_HiringTeams = "";

    // Static constants corresponding to searches
    

    // Static constants corresponding to attribute helpers
    private static final DefaultAttributeHelper<InviteTeammateNPO> HELPER_UserEmail = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<InviteTeammateNPO> HELPER_FirstName = DefaultAttributeHelper.INSTANCE;
    private static final DefaultAttributeHelper<InviteTeammateNPO> HELPER_LastName = DefaultAttributeHelper.INSTANCE;
    private static final EnumeratedAttributeHelper<InviteTeammateNPO, RoleType> HELPER_RoleType =  new EnumeratedAttributeHelper<InviteTeammateNPO, RoleType> (RoleType.FACTORY_RoleType);
    

    // Private attributes corresponding to business object data
    private String _UserEmail;
    private String _FirstName;
    private String _LastName;
    private RoleType _RoleType;
    

    // Private attributes corresponding to single references
    

    // Private attributes corresponding to multiple references
    private MultipleAssociation<InviteTeammateNPO, HiringTeamLinkNPO> _HiringTeams;
    

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

    // Arrays of validators for each attribute
    private static final AttributeValidator[] FIELD_UserEmail_Validators;
    private static final AttributeValidator[] FIELD_FirstName_Validators;
    private static final AttributeValidator[] FIELD_LastName_Validators;
    private static final AttributeValidator[] FIELD_RoleType_Validators;
    

    // Arrays of behaviour decorators
    private static final InviteTeammateNPOBehaviourDecorator[] InviteTeammateNPO_BehaviourDecorators;
    
    static
    {
        try
        {
            
            String tmp_HiringTeams = HiringTeamLinkNPO.BACKREF_InviteTeammate;
            
            Map  validatorMapping = ((Map)ConfigMgr.getConfigObject ("CONFIG.ORMVALIDATOR", "ValidatorMapping"));

            setupAssocMetaData_HiringTeams();
            FIELD_UserEmail_Validators = (AttributeValidator[])setupAttribMetaData_UserEmail(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_FirstName_Validators = (AttributeValidator[])setupAttribMetaData_FirstName(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_LastName_Validators = (AttributeValidator[])setupAttribMetaData_LastName(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_RoleType_Validators = (AttributeValidator[])setupAttribMetaData_RoleType(validatorMapping).toArray (new AttributeValidator[0]);
            

            REFERENCE_InviteTeammateNPO.initialiseReference ();
            DUMMY_InviteTeammateNPO.initialiseReference ();
            InviteTeammateNPO_BehaviourDecorators = BaseBusinessClass.getBBCBehaviours(InviteTeammateNPO.class).toArray(new InviteTeammateNPOBehaviourDecorator[0]);
        }
        catch (RuntimeException e)
        {
            LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR1, e, "Error initialising");
            throw e;
        }
    }

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

        metaInfo.put ("backreferenceName", "InviteTeammate");
        metaInfo.put ("name", "HiringTeams");
        metaInfo.put ("type", "HiringTeamLinkNPO");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for InviteTeammateNPO.HiringTeams:", metaInfo);
        ATTRIBUTES_METADATA_InviteTeammateNPO.put (MULTIPLEREFERENCE_HiringTeams, Collections.unmodifiableMap (metaInfo));
    }
    
    
    // Meta Info setup
    private static List setupAttribMetaData_UserEmail(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("name", "UserEmail");
        metaInfo.put ("type", "String");
        metaInfo.put ("validators", "Email");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for InviteTeammateNPO.UserEmail:", metaInfo);
        ATTRIBUTES_METADATA_InviteTeammateNPO.put (FIELD_UserEmail, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("name", "FirstName");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for InviteTeammateNPO.FirstName:", metaInfo);
        ATTRIBUTES_METADATA_InviteTeammateNPO.put (FIELD_FirstName, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("name", "LastName");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for InviteTeammateNPO.LastName:", metaInfo);
        ATTRIBUTES_METADATA_InviteTeammateNPO.put (FIELD_LastName, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
        metaInfo.put ("mandatory", "true");
        metaInfo.put ("name", "RoleType");
        metaInfo.put ("type", "RoleType");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for InviteTeammateNPO.RoleType:", metaInfo);
        ATTRIBUTES_METADATA_InviteTeammateNPO.put (FIELD_RoleType, Collections.unmodifiableMap (metaInfo));

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

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


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


    


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

        
        _UserEmail = (String)(HELPER_UserEmail.initialise (_UserEmail));
        _FirstName = (String)(HELPER_FirstName.initialise (_FirstName));
        _LastName = (String)(HELPER_LastName.initialise (_LastName));
        _RoleType = (RoleType)(HELPER_RoleType.initialise (_RoleType));
    }


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

        _HiringTeams = new MultipleAssociation<InviteTeammateNPO, HiringTeamLinkNPO> (this, MULTIPLEREFERENCE_HiringTeams, HiringTeamLinkNPO.SINGLEREFERENCE_InviteTeammate, HiringTeamLinkNPO.REFERENCE_HiringTeamLinkNPO);
        
    }


    // Initialise the associations
    protected BaseBusinessClass initialiseReference ()
    {
        super.initialiseReference ();
        
        _HiringTeams = new MultipleAssociation<InviteTeammateNPO, HiringTeamLinkNPO> (this, MULTIPLEREFERENCE_HiringTeams, HiringTeamLinkNPO.SINGLEREFERENCE_InviteTeammate, HiringTeamLinkNPO.REFERENCE_HiringTeamLinkNPO);
        
        
        return this;
    }

    

    /**
     * Get the attribute UserEmail
     */
    public String getUserEmail ()
    {
        assertValid();
        String valToReturn = _UserEmail;

            for (InviteTeammateNPOBehaviourDecorator bhd : InviteTeammateNPO_BehaviourDecorators)
            {
                valToReturn = bhd.getUserEmail ((InviteTeammateNPO)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 preUserEmailChange (String newUserEmail) 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 postUserEmailChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute UserEmail.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setUserEmail (String newUserEmail) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_UserEmail.compare (_UserEmail, newUserEmail);
        
        try
        {
            for (InviteTeammateNPOBehaviourDecorator bhd : InviteTeammateNPO_BehaviourDecorators)
            {
                newUserEmail = bhd.setUserEmail ((InviteTeammateNPO)this, newUserEmail);
                oldAndNewIdentical = HELPER_UserEmail.compare (_UserEmail, newUserEmail);
            }

            

            if (FIELD_UserEmail_Validators.length > 0)
            {
                Object newUserEmailObj = HELPER_UserEmail.toObject (newUserEmail);

                if (newUserEmailObj != null)
                {
                    int     loopMax = FIELD_UserEmail_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_InviteTeammateNPO.get (FIELD_UserEmail);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_UserEmail () != FieldWriteability.FALSE, "Field  UserEmail is not writeable");
            preUserEmailChange (newUserEmail);
            markFieldChange (FIELD_UserEmail);
            _UserEmail = newUserEmail;            
            postFieldChange (FIELD_UserEmail);
            postUserEmailChange ();
        }
    }

    /**
     * Get the attribute FirstName
     */
    public String getFirstName ()
    {
        assertValid();
        String valToReturn = _FirstName;

            for (InviteTeammateNPOBehaviourDecorator bhd : InviteTeammateNPO_BehaviourDecorators)
            {
                valToReturn = bhd.getFirstName ((InviteTeammateNPO)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 preFirstNameChange (String newFirstName) 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 postFirstNameChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute FirstName.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setFirstName (String newFirstName) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_FirstName.compare (_FirstName, newFirstName);
        
        try
        {
            for (InviteTeammateNPOBehaviourDecorator bhd : InviteTeammateNPO_BehaviourDecorators)
            {
                newFirstName = bhd.setFirstName ((InviteTeammateNPO)this, newFirstName);
                oldAndNewIdentical = HELPER_FirstName.compare (_FirstName, newFirstName);
            }

            

            if (FIELD_FirstName_Validators.length > 0)
            {
                Object newFirstNameObj = HELPER_FirstName.toObject (newFirstName);

                if (newFirstNameObj != null)
                {
                    int     loopMax = FIELD_FirstName_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_InviteTeammateNPO.get (FIELD_FirstName);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_FirstName () != FieldWriteability.FALSE, "Field  FirstName is not writeable");
            preFirstNameChange (newFirstName);
            markFieldChange (FIELD_FirstName);
            _FirstName = newFirstName;            
            postFieldChange (FIELD_FirstName);
            postFirstNameChange ();
        }
    }

    /**
     * Get the attribute LastName
     */
    public String getLastName ()
    {
        assertValid();
        String valToReturn = _LastName;

            for (InviteTeammateNPOBehaviourDecorator bhd : InviteTeammateNPO_BehaviourDecorators)
            {
                valToReturn = bhd.getLastName ((InviteTeammateNPO)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 preLastNameChange (String newLastName) 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 postLastNameChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute LastName.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setLastName (String newLastName) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_LastName.compare (_LastName, newLastName);
        
        try
        {
            for (InviteTeammateNPOBehaviourDecorator bhd : InviteTeammateNPO_BehaviourDecorators)
            {
                newLastName = bhd.setLastName ((InviteTeammateNPO)this, newLastName);
                oldAndNewIdentical = HELPER_LastName.compare (_LastName, newLastName);
            }

            

            if (FIELD_LastName_Validators.length > 0)
            {
                Object newLastNameObj = HELPER_LastName.toObject (newLastName);

                if (newLastNameObj != null)
                {
                    int     loopMax = FIELD_LastName_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_InviteTeammateNPO.get (FIELD_LastName);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_LastName () != FieldWriteability.FALSE, "Field  LastName is not writeable");
            preLastNameChange (newLastName);
            markFieldChange (FIELD_LastName);
            _LastName = newLastName;            
            postFieldChange (FIELD_LastName);
            postLastNameChange ();
        }
    }

    /**
     * Get the attribute RoleType
     */
    public RoleType getRoleType ()
    {
        assertValid();
        RoleType valToReturn = _RoleType;

            for (InviteTeammateNPOBehaviourDecorator bhd : InviteTeammateNPO_BehaviourDecorators)
            {
                valToReturn = bhd.getRoleType ((InviteTeammateNPO)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 preRoleTypeChange (RoleType newRoleType) 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 postRoleTypeChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute RoleType.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setRoleType (RoleType newRoleType) throws FieldException
    {
        boolean oldAndNewIdentical = HELPER_RoleType.compare (_RoleType, newRoleType);
        
        try
        {
            for (InviteTeammateNPOBehaviourDecorator bhd : InviteTeammateNPO_BehaviourDecorators)
            {
                newRoleType = bhd.setRoleType ((InviteTeammateNPO)this, newRoleType);
                oldAndNewIdentical = HELPER_RoleType.compare (_RoleType, newRoleType);
            }

            BusinessObjectParser.assertFieldCondition (newRoleType != null, this, FIELD_RoleType, "mandatory");
            

            if (FIELD_RoleType_Validators.length > 0)
            {
                Object newRoleTypeObj = HELPER_RoleType.toObject (newRoleType);

                if (newRoleTypeObj != null)
                {
                    int     loopMax = FIELD_RoleType_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_InviteTeammateNPO.get (FIELD_RoleType);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (getWriteability_RoleType () != FieldWriteability.FALSE, "Field  RoleType is not writeable");
            preRoleTypeChange (newRoleType);
            markFieldChange (FIELD_RoleType);
            _RoleType = newRoleType;            
            postFieldChange (FIELD_RoleType);
            postRoleTypeChange ();
        }
    }



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

        

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


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


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


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


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



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

        
        result.add("HiringTeams");
        

        return result;
    }


    /**
     * Get the reference instance for the multi assoc name.
     */
    public BaseBusinessClass getMultiAssocReferenceInstance(String attribName)
    {
        
        if (MULTIPLEREFERENCE_HiringTeams.equals(attribName))
        {
            return HiringTeamLinkNPO.REFERENCE_HiringTeamLinkNPO ;
        }
        

        return super.getMultiAssocReferenceInstance(attribName);
    }


    public String getMultiAssocBackReference(String attribName)
    {
        
        if (MULTIPLEREFERENCE_HiringTeams.equals(attribName))
        {
            return HiringTeamLinkNPO.SINGLEREFERENCE_InviteTeammate ;
        }
        

        return super.getMultiAssocBackReference(attribName);
    }


    /**
     * Get the assoc count for the multi assoc name.
     */
    public int getMultiAssocCount(String attribName) throws StorageException
    {
        
        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_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_HiringTeams.equals(attribName))
        {
            addToHiringTeams((HiringTeamLinkNPO)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_HiringTeams.equals(attribName))
        {
            removeFromHiringTeams((HiringTeamLinkNPO)oldElement);

            return;
        }
        

        super.removeFromMultiAssoc(attribName, oldElement);
    }


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

        super.__loadMultiAssoc(attribName, elements);
    }


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

        return super.__isMultiAssocLoaded(attribName);
    }

    

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


    public void addToHiringTeams (HiringTeamLinkNPO newElement) throws StorageException
    {
        if (_HiringTeams.wouldAddChange (newElement))
        {
            assertValid();
            Debug.assertion (getWriteability_HiringTeams () != FieldWriteability.FALSE, "MultiAssoc HiringTeams is not writeable (add)");
            _HiringTeams.appendElement (newElement);

            try
            {
                if (newElement.getInviteTeammate () != this)
                {
                    newElement.setInviteTeammate ((InviteTeammateNPO)(this));
                }
            }
            catch (Exception e)
            {
                throw NestedException.wrap(e);
            }
        }
    }


    public void removeFromHiringTeams (HiringTeamLinkNPO elementToRemove) throws StorageException
    {
        if (_HiringTeams.wouldRemoveChange (elementToRemove))
        {
            assertValid();
            Debug.assertion (getWriteability_HiringTeams () != FieldWriteability.FALSE, "MultiAssoc HiringTeams is not writeable (remove)");
            _HiringTeams.removeElement (elementToRemove);
            try
            {
                if (elementToRemove.getInviteTeammate () != null)
                {
                    elementToRemove.setInviteTeammate (null);
                }
            }
            catch (Exception e)
            {
                throw NestedException.wrap(e);
            }
        }
    }


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


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



    public void onDelete ()
    {
        try 
        {
            for(HiringTeamLinkNPO referenced : CollectionUtils.reverse(getHiringTeamsSet()))
            { 
                LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Setting backreference to null InviteTeammate from ", getObjectID (), " to ", referenced.getObjectID ());
                referenced.setInviteTeammate(null);
            }

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

        super.onDelete ();
    }


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


    public InviteTeammateNPO referenceInstance ()
    {
        return REFERENCE_InviteTeammateNPO;
    }


    public InviteTeammateNPO getInTransaction (ObjectTransaction t) throws StorageException
    {
        return getInviteTeammateNPOByID (t, getObjectID());
    }
    
    
    public BaseBusinessClass dummyInstance ()
    {
        return DUMMY_InviteTeammateNPO;
    }


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





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

        it_does_not_matterPSet.setAttrib (FIELD_ObjectID, myID);
        it_does_not_matterPSet.setAttrib (FIELD_UserEmail, HELPER_UserEmail.toObject (_UserEmail)); //
        it_does_not_matterPSet.setAttrib (FIELD_FirstName, HELPER_FirstName.toObject (_FirstName)); //
        it_does_not_matterPSet.setAttrib (FIELD_LastName, HELPER_LastName.toObject (_LastName)); //
        it_does_not_matterPSet.setAttrib (FIELD_RoleType, HELPER_RoleType.toObject (_RoleType)); //
        
    }


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

        
        PersistentSet   it_does_not_matterPSet = allSets.getPersistentSet (objectID, "it_does_not_matter");

        _UserEmail = (String)(HELPER_UserEmail.fromObject (_UserEmail, it_does_not_matterPSet.getAttrib (FIELD_UserEmail))); //
        _FirstName = (String)(HELPER_FirstName.fromObject (_FirstName, it_does_not_matterPSet.getAttrib (FIELD_FirstName))); //
        _LastName = (String)(HELPER_LastName.fromObject (_LastName, it_does_not_matterPSet.getAttrib (FIELD_LastName))); //
        _RoleType = (RoleType)(HELPER_RoleType.fromObject (_RoleType, it_does_not_matterPSet.getAttrib (FIELD_RoleType))); //
        
    }





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

        if (other instanceof InviteTeammateNPO)
        {
            InviteTeammateNPO otherInviteTeammateNPO = (InviteTeammateNPO)other;
            
            try
            {
                setUserEmail (otherInviteTeammateNPO.getUserEmail ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setFirstName (otherInviteTeammateNPO.getFirstName ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setLastName (otherInviteTeammateNPO.getLastName ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }
            
            try
            {
                setRoleType (otherInviteTeammateNPO.getRoleType ());
            }
            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 BaseInviteTeammateNPO)
        {
            BaseInviteTeammateNPO sourceInviteTeammateNPO = (BaseInviteTeammateNPO)(source);

            _UserEmail = sourceInviteTeammateNPO._UserEmail;
            _FirstName = sourceInviteTeammateNPO._FirstName;
            _LastName = sourceInviteTeammateNPO._LastName;
            _RoleType = sourceInviteTeammateNPO._RoleType;
            
        }
    }


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

            
        }
    }


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

        if (source instanceof BaseInviteTeammateNPO)
        {
            BaseInviteTeammateNPO sourceInviteTeammateNPO = (BaseInviteTeammateNPO)(source);

            _HiringTeams.copyFrom (sourceInviteTeammateNPO._HiringTeams, linkToGhosts);
            
        }
    }


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

        
    }


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

        _UserEmail = (String)(HELPER_UserEmail.readExternal (_UserEmail, vals.get(FIELD_UserEmail))); //
        _FirstName = (String)(HELPER_FirstName.readExternal (_FirstName, vals.get(FIELD_FirstName))); //
        _LastName = (String)(HELPER_LastName.readExternal (_LastName, vals.get(FIELD_LastName))); //
        _RoleType = (RoleType)(HELPER_RoleType.readExternal (_RoleType, vals.get(FIELD_RoleType))); //
        _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_UserEmail, HELPER_UserEmail.writeExternal (_UserEmail));
        vals.put (FIELD_FirstName, HELPER_FirstName.writeExternal (_FirstName));
        vals.put (FIELD_LastName, HELPER_LastName.writeExternal (_LastName));
        vals.put (FIELD_RoleType, HELPER_RoleType.writeExternal (_RoleType));
        vals.put (MULTIPLEREFERENCE_HiringTeams, _HiringTeams.writeExternalData());
        
    }


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

        if (other instanceof BaseInviteTeammateNPO)
        {
            BaseInviteTeammateNPO otherInviteTeammateNPO = (BaseInviteTeammateNPO)(other);

            
            if (!HELPER_UserEmail.compare(this._UserEmail, otherInviteTeammateNPO._UserEmail))
            {
                listener.notifyFieldChange(this, other, FIELD_UserEmail, HELPER_UserEmail.toObject(this._UserEmail), HELPER_UserEmail.toObject(otherInviteTeammateNPO._UserEmail));
            }
            if (!HELPER_FirstName.compare(this._FirstName, otherInviteTeammateNPO._FirstName))
            {
                listener.notifyFieldChange(this, other, FIELD_FirstName, HELPER_FirstName.toObject(this._FirstName), HELPER_FirstName.toObject(otherInviteTeammateNPO._FirstName));
            }
            if (!HELPER_LastName.compare(this._LastName, otherInviteTeammateNPO._LastName))
            {
                listener.notifyFieldChange(this, other, FIELD_LastName, HELPER_LastName.toObject(this._LastName), HELPER_LastName.toObject(otherInviteTeammateNPO._LastName));
            }
            if (!HELPER_RoleType.compare(this._RoleType, otherInviteTeammateNPO._RoleType))
            {
                listener.notifyFieldChange(this, other, FIELD_RoleType, HELPER_RoleType.toObject(this._RoleType), HELPER_RoleType.toObject(otherInviteTeammateNPO._RoleType));
            }

            // Compare single assocs
            

            // Compare multiple assocs
            _HiringTeams.compare (otherInviteTeammateNPO._HiringTeams, listener);
            
        }
    }


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

        
    }


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

        visitor.visitField(this, FIELD_UserEmail, HELPER_UserEmail.toObject(getUserEmail()));
        visitor.visitField(this, FIELD_FirstName, HELPER_FirstName.toObject(getFirstName()));
        visitor.visitField(this, FIELD_LastName, HELPER_LastName.toObject(getLastName()));
        visitor.visitField(this, FIELD_RoleType, HELPER_RoleType.toObject(getRoleType()));
        visitor.visitAssociation (_HiringTeams);
        
    }


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

        if (scope.includes (_HiringTeams))
        {
            visitor.visit (_HiringTeams);
        }
        
    }


    public static InviteTeammateNPO createInviteTeammateNPO (ObjectTransaction transaction) throws StorageException
    {
        InviteTeammateNPO     result = new InviteTeammateNPO ();

        result.initialiseNewObject (transaction);

        return result;
    }


    public static InviteTeammateNPO getInviteTeammateNPOByID (ObjectTransaction transaction, Long objectID) throws StorageException
    {
        return (InviteTeammateNPO)(transaction.getObjectByID (REFERENCE_InviteTeammateNPO, objectID));
    }

    public boolean testFilter (String attribName, QueryFilter filter) throws StorageException
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (attribName.equals (FIELD_UserEmail))
        {
            return filter.matches (getUserEmail ());
        }
        else if (attribName.equals (FIELD_FirstName))
        {
            return filter.matches (getFirstName ());
        }
        else if (attribName.equals (FIELD_LastName))
        {
            return filter.matches (getLastName ());
        }
        else if (attribName.equals (FIELD_RoleType))
        {
            return filter.matches (getRoleType ());
        }
        else
        {
            return super.testFilter (attribName, filter);
        }
    }




    public Object getAttribute (String attribName)
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (attribName.equals (FIELD_UserEmail))
        {
            return HELPER_UserEmail.toObject (getUserEmail ());
        }
        else if (attribName.equals (FIELD_FirstName))
        {
            return HELPER_FirstName.toObject (getFirstName ());
        }
        else if (attribName.equals (FIELD_LastName))
        {
            return HELPER_LastName.toObject (getLastName ());
        }
        else if (attribName.equals (FIELD_RoleType))
        {
            return HELPER_RoleType.toObject (getRoleType ());
        }
        else
        {
            return super.getAttribute (attribName);
        }
    }


    public AttributeHelper getAttributeHelper (String attribName)
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (attribName.equals (FIELD_UserEmail))
        {
            return HELPER_UserEmail;
        }
        else if (attribName.equals (FIELD_FirstName))
        {
            return HELPER_FirstName;
        }
        else if (attribName.equals (FIELD_LastName))
        {
            return HELPER_LastName;
        }
        else if (attribName.equals (FIELD_RoleType))
        {
            return HELPER_RoleType;
        }
        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_UserEmail))
        {
            setUserEmail ((String)(HELPER_UserEmail.fromObject (_UserEmail, attribValue)));            
        }
        else if (attribName.equals (FIELD_FirstName))
        {
            setFirstName ((String)(HELPER_FirstName.fromObject (_FirstName, attribValue)));            
        }
        else if (attribName.equals (FIELD_LastName))
        {
            setLastName ((String)(HELPER_LastName.fromObject (_LastName, attribValue)));            
        }
        else if (attribName.equals (FIELD_RoleType))
        {
            setRoleType ((RoleType)(HELPER_RoleType.fromObject (_RoleType, attribValue)));            
        }
        else
        {
            super.setAttribute (attribName, attribValue);
        }
    }



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


    public FieldWriteability getWriteable (String fieldName)
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (fieldName.equals (FIELD_UserEmail))
        {
            return getWriteability_UserEmail ();
        }
        else if (fieldName.equals (FIELD_FirstName))
        {
            return getWriteability_FirstName ();
        }
        else if (fieldName.equals (FIELD_LastName))
        {
            return getWriteability_LastName ();
        }
        else if (fieldName.equals (FIELD_RoleType))
        {
            return getWriteability_RoleType ();
        }
        else if (fieldName.equals (MULTIPLEREFERENCE_HiringTeams))
        {
            return getWriteability_HiringTeams ();
        }
        else
        {
            return super.getWriteable (fieldName);
        }
    }


    public void putUnwriteable (Set<String> fields)
    {
        
            if (getWriteability_UserEmail () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_UserEmail);
            }
        
            if (getWriteability_FirstName () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_FirstName);
            }
        
            if (getWriteability_LastName () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_LastName);
            }
        
            if (getWriteability_RoleType () != FieldWriteability.TRUE)
            {
                fields.add (FIELD_RoleType);
            }
        

        super.putUnwriteable (fields);
    }

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

        
        result.add(HELPER_UserEmail.getAttribObject (getClass (), _UserEmail, false, FIELD_UserEmail));
        result.add(HELPER_FirstName.getAttribObject (getClass (), _FirstName, false, FIELD_FirstName));
        result.add(HELPER_LastName.getAttribObject (getClass (), _LastName, false, FIELD_LastName));
        result.add(HELPER_RoleType.getAttribObject (getClass (), _RoleType, true, FIELD_RoleType));

        return result;
    }


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


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

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

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

    public static class InviteTeammateNPOBehaviourDecorator extends BaseBusinessClass.BBCBehaviourDecorator<InviteTeammateNPO>
    {

    /**
     * Get the attribute UserEmail
     */
    public String getUserEmail (InviteTeammateNPO obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute UserEmail.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setUserEmail (InviteTeammateNPO obj, String newUserEmail) throws FieldException
    {
        return newUserEmail;
    }

    /**
     * Get the attribute FirstName
     */
    public String getFirstName (InviteTeammateNPO obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute FirstName.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setFirstName (InviteTeammateNPO obj, String newFirstName) throws FieldException
    {
        return newFirstName;
    }

    /**
     * Get the attribute LastName
     */
    public String getLastName (InviteTeammateNPO obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute LastName.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setLastName (InviteTeammateNPO obj, String newLastName) throws FieldException
    {
        return newLastName;
    }

    /**
     * Get the attribute RoleType
     */
    public RoleType getRoleType (InviteTeammateNPO obj, RoleType original)
    {
        return original;
    }

    /**
     * Change the value set for attribute RoleType.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public RoleType setRoleType (InviteTeammateNPO obj, RoleType newRoleType) throws FieldException
    {
        return newRoleType;
    }

    }

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

        public InviteTeammateNPOPipeLineFactory (Collection<From> seed)
        {
            super(seed);
        }
        
        
        public PipeLine<From, ? extends Object> to(String name)
        {
            if (name.equals ("HiringTeams"))
            {
                return toHiringTeams ();
            }                
            if (name.equals ("UserEmail"))
            {
                return toUserEmail ();
            }                
            if (name.equals ("FirstName"))
            {
                return toFirstName ();
            }                
            if (name.equals ("LastName"))
            {
                return toLastName ();
            }                
            if (name.equals ("RoleType"))
            {
                return toRoleType ();
            }                
            
            
            return super.to(name);
        }
        
        
        public PipeLine<From, String> toUserEmail () { return pipe(new ORMAttributePipe<Me, String>(FIELD_UserEmail));  }
        
        public PipeLine<From, String> toFirstName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_FirstName));  }
        
        public PipeLine<From, String> toLastName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_LastName));  }
        
        public PipeLine<From, RoleType> toRoleType () { return pipe(new ORMAttributePipe<Me, RoleType>(FIELD_RoleType));  }
        public HiringTeamLinkNPO.HiringTeamLinkNPOPipeLineFactory<From, HiringTeamLinkNPO> toHiringTeams () { return toHiringTeams(Filter.ALL); }        

        public HiringTeamLinkNPO.HiringTeamLinkNPOPipeLineFactory<From, HiringTeamLinkNPO> toHiringTeams (Filter<HiringTeamLinkNPO> filter)
        {
            return HiringTeamLinkNPO.REFERENCE_HiringTeamLinkNPO.new HiringTeamLinkNPOPipeLineFactory<From, HiringTeamLinkNPO> (this, new ORMMultiAssocPipe<Me, HiringTeamLinkNPO>(MULTIPLEREFERENCE_HiringTeams, filter)); 
        }
        
    }
    
    public boolean isTransientAttrib(String attribName)
    {
        

        return super.isTransientAttrib(attribName);
    }

    public boolean isTransientSingleReference(String assocName)
    {
        

        return super.isTransientSingleReference(assocName);
    }
}

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

    public void assertValid ()
    {
    }


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


    public HiringTeamLinkNPO 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();
    }

}

    
