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

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

// __#BUILD_NO_TABLE_NAME#: No table name == No persistence manager and scripts required.

public abstract class BaseSearchHiringTeam extends SearchExecutor
{
    // Reference instance for the object
    public static final SearchHiringTeam REFERENCE_SearchHiringTeam = new SearchHiringTeam ();

    // Reference instance for the object
    public static final SearchHiringTeam DUMMY_SearchHiringTeam = new DummySearchHiringTeam ();

    // Static constants corresponding to field names
    
    public static final String FIELD_Details = "Details";
    public static final String FIELD_CompanyStatus = "CompanyStatus";

    // Static constants corresponding to searches
    

    // Static constants corresponding to attribute helpers
    private static final DefaultAttributeHelper<SearchHiringTeam> HELPER_Details = DefaultAttributeHelper.INSTANCE;
    private static final EnumeratedAttributeHelper<SearchHiringTeam, CompanyStatus> HELPER_CompanyStatus =  new EnumeratedAttributeHelper<SearchHiringTeam, CompanyStatus> (CompanyStatus.FACTORY_CompanyStatus);
    

    // Private attributes corresponding to business object data
    private String _Details;
    private CompanyStatus _CompanyStatus;
    

    // Private attributes corresponding to single references
    

    // Private attributes corresponding to multiple references
    

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

    // Arrays of validators for each attribute
    private static final AttributeValidator[] FIELD_Details_Validators;
    private static final AttributeValidator[] FIELD_CompanyStatus_Validators;
    

    // Arrays of AttributeDecorators for each attribute
    private static final AttributeDecorator<SearchHiringTeam, String>[] FIELD_Details_Decorators;
    private static final AttributeDecorator<SearchHiringTeam, CompanyStatus>[] FIELD_CompanyStatus_Decorators;
    
    
    // Arrays of SingleAssocDecorators for each attribute
    
    
    // Arrays of MultiAssocDecorators for each attribute
    

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

            FIELD_Details_Validators = (AttributeValidator[])setupAttribMetaData_Details(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_CompanyStatus_Validators = (AttributeValidator[])setupAttribMetaData_CompanyStatus(validatorMapping).toArray (new AttributeValidator[0]);
            FIELD_Details_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_SearchHiringTeam, FIELD_Details).toArray (new AttributeDecorator[0]);
            FIELD_CompanyStatus_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_SearchHiringTeam, FIELD_CompanyStatus).toArray (new AttributeDecorator[0]);
            

            REFERENCE_SearchHiringTeam.initialiseReference ();
            DUMMY_SearchHiringTeam.initialiseReference ();
            SearchHiringTeam_BehaviourDecorators = BaseBusinessClass.getBBCBehaviours(SearchHiringTeam.class).toArray(new SearchHiringTeamBehaviourDecorator[0]);
        }
        catch (RuntimeException e)
        {
            LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR1, e, "Error initialising");
            throw e;
        }
    }

    
    private static List setupAttribMetaData_Details(Map validatorMapping)
    {
        Map  metaInfo   = new HashMap ();

        metaInfo.put ("dbcol", "xxxx");
        metaInfo.put ("name", "Details");
        metaInfo.put ("type", "String");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for SearchHiringTeam.Details:", metaInfo);
        ATTRIBUTES_METADATA_SearchHiringTeam.put (FIELD_Details, Collections.unmodifiableMap (metaInfo));

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

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

        metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
        metaInfo.put ("name", "CompanyStatus");
        metaInfo.put ("type", "CompanyStatus");
        
        LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for SearchHiringTeam.CompanyStatus:", metaInfo);
        ATTRIBUTES_METADATA_SearchHiringTeam.put (FIELD_CompanyStatus, Collections.unmodifiableMap (metaInfo));

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

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


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

    


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

        
        _Details = (String)(HELPER_Details.initialise (_Details));
        _CompanyStatus = (CompanyStatus)(HELPER_CompanyStatus.initialise (_CompanyStatus));
    }


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

        
    }


    protected BaseBusinessClass initialiseReference ()
    {
        super.initialiseReference ();
        
        
        
        return this;
    }


    /**
     * Attribute Details
     */
    public String getDetails ()
    {
        assertValid();
        String valToReturn = AttributeDecoratorUtils.getValue (FIELD_Details_Decorators, (SearchHiringTeam)this, FIELD_Details, _Details);

        
        for (SearchHiringTeamBehaviourDecorator bhd : SearchHiringTeam_BehaviourDecorators)
        {
            valToReturn = bhd.getDetails ((SearchHiringTeam)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 preDetailsChange (String newDetails) 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 postDetailsChange () throws FieldException
    {
    }

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

    /**
     * Set the attribute Details.  Checks to ensure a new value
     * has been supplied.  If so, marks the field as altered and sets the attribute.
     */
    public void setDetails (String newDetails) throws FieldException
    {
        newDetails = AttributeDecoratorUtils.setValue (FIELD_Details_Decorators, (SearchHiringTeam)this, FIELD_Details, newDetails);

        boolean oldAndNewIdentical = HELPER_Details.compare (_Details, newDetails);
        
        try
        {
            for (SearchHiringTeamBehaviourDecorator bhd : SearchHiringTeam_BehaviourDecorators)
            {
                newDetails = bhd.setDetails ((SearchHiringTeam)this, newDetails);
                oldAndNewIdentical = HELPER_Details.compare (_Details, newDetails);
            }

            

            if (FIELD_Details_Validators.length > 0)
            {
                Object newDetailsObj = HELPER_Details.toObject (newDetails);

                if (newDetailsObj != null)
                {
                    int     loopMax = FIELD_Details_Validators.length;
                    Map     metadata = (Map)ATTRIBUTES_METADATA_SearchHiringTeam.get (FIELD_Details);

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

        if (!oldAndNewIdentical)
        {
            assertValid();
            Debug.assertion (AttributeDecoratorUtils.getWriteability (FIELD_Details_Decorators, (SearchHiringTeam)this, FIELD_Details ,getWriteability_Details ()) != FieldWriteability.FALSE, "Field  Details is not writeable");
            preDetailsChange (newDetails);
            markFieldChange (FIELD_Details);
            _Details = newDetails;            
            postFieldChange (FIELD_Details);
            postDetailsChange ();
        }
    }

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

        
        for (SearchHiringTeamBehaviourDecorator bhd : SearchHiringTeam_BehaviourDecorators)
        {
            valToReturn = bhd.getCompanyStatus ((SearchHiringTeam)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, (SearchHiringTeam)this, FIELD_CompanyStatus, newCompanyStatus);

        boolean oldAndNewIdentical = HELPER_CompanyStatus.compare (_CompanyStatus, newCompanyStatus);
        
        try
        {
            for (SearchHiringTeamBehaviourDecorator bhd : SearchHiringTeam_BehaviourDecorators)
            {
                newCompanyStatus = bhd.setCompanyStatus ((SearchHiringTeam)this, newCompanyStatus);
                oldAndNewIdentical = HELPER_CompanyStatus.compare (_CompanyStatus, newCompanyStatus);
            }

            

            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_SearchHiringTeam.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, (SearchHiringTeam)this, FIELD_CompanyStatus ,getWriteability_CompanyStatus ()) != FieldWriteability.FALSE, "Field  CompanyStatus is not writeable");
            preCompanyStatusChange (newCompanyStatus);
            markFieldChange (FIELD_CompanyStatus);
            _CompanyStatus = newCompanyStatus;            
            postFieldChange (FIELD_CompanyStatus);
            postCompanyStatusChange ();
        }
    }



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

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


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


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


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


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



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

        return result;
    }


    /**
     * Get the reference instance for the multi assoc name.
     */
    public BaseBusinessClass getMultiAssocReferenceInstance(String attribName)
    {

        return super.getMultiAssocReferenceInstance(attribName);
    }


    public String getMultiAssocBackReference(String attribName)
    {

        return super.getMultiAssocBackReference(attribName);
    }


    /**
     * Get the assoc count for the multi assoc name.
     */
    public int getMultiAssocCount(String attribName) throws StorageException
    {

        return super.getMultiAssocCount(attribName);
    }


    /**
     * Get the assoc at a particular index
     */
    public BaseBusinessClass getMultiAssocAt(String attribName, int index) throws StorageException
    {

        return super.getMultiAssocAt(attribName, index);
    }


    /**
     * Add to a multi assoc by attribute name
     */
    public void addToMultiAssoc(String attribName, BaseBusinessClass newElement) throws StorageException
    {

        super.addToMultiAssoc(attribName, newElement);
    }

    /**
     * Remove from a multi assoc by attribute name
     */
    public void removeFromMultiAssoc(String attribName, BaseBusinessClass oldElement) throws StorageException
    {

        super.removeFromMultiAssoc(attribName, oldElement);
    }


    protected void __loadMultiAssoc (String attribName, BaseBusinessClass[] elements)
    {

        super.__loadMultiAssoc(attribName, elements);
    }


    protected boolean __isMultiAssocLoaded (String attribName)
    {

        return super.__isMultiAssocLoaded(attribName);
    }




    public void onDelete ()
    {
        try 
        {
        }
        catch (Exception e)
        {
            throw NestedException.wrap(e);
        }

        super.onDelete ();
    }


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


    public SearchHiringTeam referenceInstance ()
    {
        return REFERENCE_SearchHiringTeam;
    }


    public SearchHiringTeam getInTransaction (ObjectTransaction t) throws StorageException
    {
        return getSearchHiringTeamByID (t, getObjectID());
    }
    
    
    public BaseBusinessClass dummyInstance ()
    {
        return DUMMY_SearchHiringTeam;
    }


    public String getBaseSetName ()
    {
        return "";
    }



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

        PSet.setAttrib (FIELD_ObjectID, myID);
        PSet.setAttrib (FIELD_Details, HELPER_Details.toObject (_Details)); //
        PSet.setAttrib (FIELD_CompanyStatus, HELPER_CompanyStatus.toObject (_CompanyStatus)); //
        
    }


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

        _Details = (String)(HELPER_Details.fromObject (_Details, PSet.getAttrib (FIELD_Details))); //
        _CompanyStatus = (CompanyStatus)(HELPER_CompanyStatus.fromObject (_CompanyStatus, PSet.getAttrib (FIELD_CompanyStatus))); //
        
    }


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

        if (other instanceof SearchHiringTeam)
        {
            SearchHiringTeam otherSearchHiringTeam = (SearchHiringTeam)other;
            

            try
            {
                setDetails (otherSearchHiringTeam.getDetails ());
            }
            catch (FieldException ex)
            {
                e.addException (ex);
            }

            try
            {
                setCompanyStatus (otherSearchHiringTeam.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 BaseSearchHiringTeam)
        {
            BaseSearchHiringTeam sourceSearchHiringTeam = (BaseSearchHiringTeam)(source);

            _Details = sourceSearchHiringTeam._Details;
            _CompanyStatus = sourceSearchHiringTeam._CompanyStatus;
            
        }
    }


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

            
        }
    }


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

        
    }


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

        _Details = (String)(HELPER_Details.readExternal (_Details, vals.get(FIELD_Details))); //
        _CompanyStatus = (CompanyStatus)(HELPER_CompanyStatus.readExternal (_CompanyStatus, vals.get(FIELD_CompanyStatus))); //
        
    }


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

        vals.put (FIELD_Details, HELPER_Details.writeExternal (_Details));
        vals.put (FIELD_CompanyStatus, HELPER_CompanyStatus.writeExternal (_CompanyStatus));
        
    }


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

        if (other instanceof BaseSearchHiringTeam)
        {
            BaseSearchHiringTeam otherSearchHiringTeam = (BaseSearchHiringTeam)(other);

            
            if (!HELPER_Details.compare(this._Details, otherSearchHiringTeam._Details))
            {
                listener.notifyFieldChange(this, other, FIELD_Details, HELPER_Details.toObject(this._Details), HELPER_Details.toObject(otherSearchHiringTeam._Details));
            }
            if (!HELPER_CompanyStatus.compare(this._CompanyStatus, otherSearchHiringTeam._CompanyStatus))
            {
                listener.notifyFieldChange(this, other, FIELD_CompanyStatus, HELPER_CompanyStatus.toObject(this._CompanyStatus), HELPER_CompanyStatus.toObject(otherSearchHiringTeam._CompanyStatus));
            }

            // Compare single assocs
            

            // Compare multiple assocs
            
        }
    }


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

        
    }


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

        visitor.visitField(this, FIELD_Details, HELPER_Details.toObject(getDetails()));
        visitor.visitField(this, FIELD_CompanyStatus, HELPER_CompanyStatus.toObject(getCompanyStatus()));
        
    }


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

        
    }


    public static SearchHiringTeam createSearchHiringTeam (ObjectTransaction transaction) throws StorageException
    {
        SearchHiringTeam     result = new SearchHiringTeam ();

        result.initialiseNewObject (transaction);

        return result;
    }


    public static SearchHiringTeam getSearchHiringTeamByID (ObjectTransaction transaction, Long objectID) throws StorageException
    {
        return (SearchHiringTeam)(transaction.getObjectByID (REFERENCE_SearchHiringTeam, objectID));
    }

    public boolean testFilter (String attribName, QueryFilter filter) throws StorageException
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (attribName.equals (FIELD_Details))
        {
            return filter.matches (getDetails ());
        }
        else if (attribName.equals (FIELD_CompanyStatus))
        {
            return filter.matches (getCompanyStatus ());
        }
        else
        {
            return super.testFilter (attribName, filter);
        }
    }




    public Object getAttribute (String attribName)
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (attribName.equals (FIELD_Details))
        {
            return HELPER_Details.toObject (getDetails ());
        }
        else if (attribName.equals (FIELD_CompanyStatus))
        {
            return HELPER_CompanyStatus.toObject (getCompanyStatus ());
        }
        else
        {
            return super.getAttribute (attribName);
        }
    }


    public AttributeHelper getAttributeHelper (String attribName)
    {
        if (false)
        {
            throw new RuntimeException ("Game over man!!");
        }
        else if (attribName.equals (FIELD_Details))
        {
            return HELPER_Details;
        }
        else if (attribName.equals (FIELD_CompanyStatus))
        {
            return HELPER_CompanyStatus;
        }
        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_Details))
        {
            setDetails ((String)(HELPER_Details.fromObject (_Details, attribValue)));            
        }
        else if (attribName.equals (FIELD_CompanyStatus))
        {
            setCompanyStatus ((CompanyStatus)(HELPER_CompanyStatus.fromObject (_CompanyStatus, 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_Details))
        {
            return getWriteability_Details ();
        }
        else if (fieldName.equals (FIELD_CompanyStatus))
        {
            return getWriteability_CompanyStatus ();
        }
        else
        {
            return super.getWriteable (fieldName);
        }
    }


    public void putUnwriteable (Set<String> fields)
    {
        if (getWriteability_Details () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_Details);
        }
        
        if (getWriteability_CompanyStatus () != FieldWriteability.TRUE)
        {
            fields.add (FIELD_CompanyStatus);
        }
        

        super.putUnwriteable (fields);
    }

    // This generally means there's no specific persistence manager and we don't read or write from a table
    public boolean hasNoTable()
    {
        return true;
    }


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

        
        result.add(HELPER_Details.getAttribObject (getClass (), _Details, false, FIELD_Details));
        result.add(HELPER_CompanyStatus.getAttribObject (getClass (), _CompanyStatus, false, FIELD_CompanyStatus));

        return result;
    }


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


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

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

        copyInto.putAll(ATTRIBUTES_METADATA_SearchHiringTeam);
    }
            

    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 SearchHiringTeamBehaviourDecorator extends BaseBusinessClass.BBCBehaviourDecorator<SearchHiringTeam>
    {

    /**
     * Get the attribute Details
     */
    public String getDetails (SearchHiringTeam obj, String original)
    {
        return original;
    }

    /**
     * Change the value set for attribute Details.
     * May modify the field beforehand
     * Occurs before validation.
     */
    public String setDetails (SearchHiringTeam obj, String newDetails) throws FieldException
    {
        return newDetails;
    }

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

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

    }

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

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

        public SearchHiringTeamPipeLineFactory (Collection<From> seed)
        {
            super(seed);
        }
        
        
        public PipeLine<From, ? extends Object> to(String name)
        {
            if (name.equals ("Details"))
            {
                return toDetails ();
            }                
            if (name.equals ("CompanyStatus"))
            {
                return toCompanyStatus ();
            }                
            
            
            return super.to(name);
        }
        
        
        public PipeLine<From, String> toDetails () { return pipe(new ORMAttributePipe<Me, String>(FIELD_Details));  }
        
        public CompanyStatus.CompanyStatusPipeLineFactory<From, CompanyStatus> toCompanyStatus () 
        { 
            return new CompanyStatus.CompanyStatusPipeLineFactory<> (this, new ORMAttributePipe<>(FIELD_CompanyStatus));
        }
    }
    
    public boolean isTransientAttrib(String attribName)
    {
        

        return super.isTransientAttrib(attribName);
    }

    public boolean isTransientSingleReference(String assocName)
    {
        

        return super.isTransientSingleReference(assocName);
    }
}

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

    public void assertValid ()
    {
    }


}

    
