
    
package performa.orm.types;

import java.util.*;
import oneit.utils.*;
import oneit.utils.transform.*;



/**
 * This class was generated using constGen.bat.
 * DO NOT MODIFY THIS CODE.
 * Edit the associated .xml file, and regenerate this file
 * constGen (directory) (file minus extension)
 * e.g. constGen C:\...\sql FieldType
 */

public class StageType extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_StageType = new StageTypeFactory();
    
    public static final StageType POST_INGEST = new StageType ("POST_INGEST", "POST_INGEST", "Post Ingest", false);
    
    public static final StageType INCOMPLETE = new StageType ("INCOMPLETE", "INCOMPLETE", "Incomplete", false);
    
    public static final StageType REFERENCE_CHECK = new StageType ("REFERENCE_CHECK", "REFERENCE_CHECK", "Reference Check", false);
    
    public static final StageType SCREENING_CHECK = new StageType ("SCREENING_CHECK", "SCREENING_CHECK", "Screening Check", false);
    
    public static final StageType VIDEO_INTERVIEW = new StageType ("VIDEO_INTERVIEW", "VIDEO_INTERVIEW", "Video Interview", false);
    
    public static final StageType INTERVIEW = new StageType ("INTERVIEW", "INTERVIEW", "Interview", false);
    
    public static final StageType REQUIREMENT_FIT = new StageType ("REQUIREMENT_FIT", "REQUIREMENT_FIT", "Requirement Fit", false);
    
    public static final StageType CULTURE_FIT = new StageType ("CULTURE_FIT", "CULTURE_FIT", "Culture Fit", false);
    
    public static final StageType ROLE_FIT = new StageType ("ROLE_FIT", "ROLE_FIT", "Role Fit", false);
    
    public static final StageType DIVERSITY = new StageType ("DIVERSITY", "DIVERSITY", "Diversity", false);
    
    public static final StageType SUCCESSFUL = new StageType ("SUCCESSFUL", "SUCCESSFUL", "Successful", false);
    
    public static final StageType UNSUITABLE = new StageType ("UNSUITABLE", "UNSUITABLE", "Unsuitable", false);
    
    public static final StageType WITHDREW = new StageType ("WITHDREW", "WITHDREW", "Withdrew", false);

    private static final StageType[] allStageTypes =
        new StageType[] { POST_INGEST,INCOMPLETE,REFERENCE_CHECK,SCREENING_CHECK,VIDEO_INTERVIEW,INTERVIEW,REQUIREMENT_FIT,CULTURE_FIT,ROLE_FIT,DIVERSITY,SUCCESSFUL,UNSUITABLE,WITHDREW};


    private static StageType[] getAllStageTypes ()
    {
        return allStageTypes;
    }

    private transient Boolean IsPreStage;

    private transient Boolean IsPostStage;

    private StageType (String name, String value, String description, boolean disabled)
    {
        super (name, value, description, disabled);
    }

    public Boolean getIsPreStage()
    {
    return IsPreStage;
    }

    public Boolean getIsPostStage()
    {
    return IsPostStage;
    }
    
    public static final Comparator COMPARE_BY_POSITION = new CompareEnumByPosition (allStageTypes);



    static
    {
        defineAdditionalData ();
    }

    public boolean isEqual (StageType other)
    {
    return this.name.equals (other.name);
    }

    public Enumeration getAllInstances ()
    {
        return StageType.getAll ();
    }


    private Object readResolve() throws java.io.ObjectStreamException
    {
        return StageType.forName (this.name);
    }


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_StageType;
    }

    public static StageType forName (String name)
    {
        if (name == null) { return null; }

        StageType[] all = getAllStageTypes();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


    public static StageType forValue (String value)
    {
        if (value == null) { return null; }

        StageType[] all = getAllStageTypes();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllStageTypes (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllStageTypes());
    }
    
    
    public static StageType[] getStageTypeArray ()
    {
        return (StageType[])getAllStageTypes().clone ();
    }


    public static void defineAdditionalData ()
    {
        POST_INGEST.IsPreStage = Boolean.TRUE;
        POST_INGEST.IsPostStage = Boolean.FALSE;
        INCOMPLETE.IsPreStage = Boolean.TRUE;
        INCOMPLETE.IsPostStage = Boolean.FALSE;
        REFERENCE_CHECK.IsPreStage = Boolean.FALSE;
        REFERENCE_CHECK.IsPostStage = Boolean.FALSE;
        SCREENING_CHECK.IsPreStage = Boolean.FALSE;
        SCREENING_CHECK.IsPostStage = Boolean.FALSE;
        VIDEO_INTERVIEW.IsPreStage = Boolean.FALSE;
        VIDEO_INTERVIEW.IsPostStage = Boolean.FALSE;
        INTERVIEW.IsPreStage = Boolean.FALSE;
        INTERVIEW.IsPostStage = Boolean.FALSE;
        REQUIREMENT_FIT.IsPreStage = Boolean.FALSE;
        REQUIREMENT_FIT.IsPostStage = Boolean.FALSE;
        CULTURE_FIT.IsPreStage = Boolean.FALSE;
        CULTURE_FIT.IsPostStage = Boolean.FALSE;
        ROLE_FIT.IsPreStage = Boolean.FALSE;
        ROLE_FIT.IsPostStage = Boolean.FALSE;
        DIVERSITY.IsPreStage = Boolean.FALSE;
        DIVERSITY.IsPostStage = Boolean.FALSE;
        SUCCESSFUL.IsPreStage = Boolean.FALSE;
        SUCCESSFUL.IsPostStage = Boolean.TRUE;
        UNSUITABLE.IsPreStage = Boolean.FALSE;
        UNSUITABLE.IsPostStage = Boolean.TRUE;
        WITHDREW.IsPreStage = Boolean.FALSE;
        WITHDREW.IsPostStage = Boolean.TRUE;
        
    }


    static class StageTypeFactory implements EnumeratedFactory
    {
        public AbstractEnumerated getForName (String name)
        {
            return StageType.forName (name);
        }

        public AbstractEnumerated getForValue (String name)
        {
            return StageType.forValue (name);
        }

        public Enumeration getAll ()
        {
            return StageType.getAll ();
        }
    }


    public Map getAdditionalAttributes ()
    {
        Map attribs = new HashMap ();

        attribs.put ("IsPreStage", ArrayFormatter.toObject(getIsPreStage()));
        attribs.put ("IsPostStage", ArrayFormatter.toObject(getIsPostStage()));
        
        return attribs;
    }
    
    public static class StageTypePipeLineFactory<From, Me extends StageType> extends AbstractEnumerated.EnumPipeLine<From, Me>
    {
        public <Prev> StageTypePipeLineFactory (PipeLine<From, Prev> pipeLine, Pipe<Prev, Me> nextPipe)
        {
            super (pipeLine, nextPipe);
        }
        
        public StageTypePipeLineFactory (From seed)
        {
            super(seed);
        }

        public StageTypePipeLineFactory (Collection<From> seed)
        {
            super(seed);
        }
        
        public PipeLine<From, ? extends Object> to(String name)
        {
            if (name.equals ("IsPreStage"))
            {
                return toIsPreStage ();
            }
            if (name.equals ("IsPostStage"))
            {
                return toIsPostStage ();
            }
            
            return super.to(name);
        }
        
        
        public PipeLine<From, Boolean> toIsPreStage () { return pipe(new EnumAttributePipe<Me, Boolean>("IsPreStage")); }
        
        public PipeLine<From, Boolean> toIsPostStage () { return pipe(new EnumAttributePipe<Me, Boolean>("IsPostStage")); }
    }
}

