
    
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 QuestionType extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_QuestionType = new QuestionTypeFactory();
    
    public static final QuestionType SCALAR = new QuestionType ("SCALAR", "SCALAR", "Scalar", false);
    
    public static final QuestionType IPSATIVE = new QuestionType ("IPSATIVE", "IPSATIVE", "Ipsative", false);

    private static final QuestionType[] allQuestionTypes =
        new QuestionType[] { SCALAR,IPSATIVE};


    private static QuestionType[] getAllQuestionTypes ()
    {
        return allQuestionTypes;
    }

    private QuestionType (String name, String value, String description, boolean disabled)
    {
        super (name, value, description, disabled);
    }
    
    public static final Comparator COMPARE_BY_POSITION = new CompareEnumByPosition (allQuestionTypes);



    static
    {
        defineAdditionalData ();
    }

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

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


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


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_QuestionType;
    }

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

        QuestionType[] all = getAllQuestionTypes();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


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

        QuestionType[] all = getAllQuestionTypes();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllQuestionTypes (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllQuestionTypes());
    }
    
    
    public static QuestionType[] getQuestionTypeArray ()
    {
        return (QuestionType[])getAllQuestionTypes().clone ();
    }


    public static void defineAdditionalData ()
    {
        
    }


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

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

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


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

        
        return attribs;
    }
    
    public static class QuestionTypePipeLineFactory<From, Me extends QuestionType> extends AbstractEnumerated.EnumPipeLine<From, Me>
    {
        public <Prev> QuestionTypePipeLineFactory (PipeLine<From, Prev> pipeLine, Pipe<Prev, Me> nextPipe)
        {
            super (pipeLine, nextPipe);
        }
        
        public QuestionTypePipeLineFactory (From seed)
        {
            super(seed);
        }

        public QuestionTypePipeLineFactory (Collection<From> seed)
        {
            super(seed);
        }
        
        public PipeLine<From, ? extends Object> to(String name)
        {
            
            return super.to(name);
        }
        
    }
}

