
    
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 TypeFlag extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_TypeFlag = new TypeFlagFactory();
    
    public static final TypeFlag PRIMARY = new TypeFlag ("PRIMARY", "PRIMARY", "Primary", false);
    
    public static final TypeFlag SECONDARY = new TypeFlag ("SECONDARY", "SECONDARY", "Secondary", false);

    private static final TypeFlag[] allTypeFlags =
        new TypeFlag[] { PRIMARY,SECONDARY};


    private static TypeFlag[] getAllTypeFlags ()
    {
        return allTypeFlags;
    }

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



    static
    {
        defineAdditionalData ();
    }

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

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


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


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_TypeFlag;
    }

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

        TypeFlag[] all = getAllTypeFlags();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


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

        TypeFlag[] all = getAllTypeFlags();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllTypeFlags (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllTypeFlags());
    }
    
    
    public static TypeFlag[] getTypeFlagArray ()
    {
        return (TypeFlag[])getAllTypeFlags().clone ();
    }


    public static void defineAdditionalData ()
    {
        
    }


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

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

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


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

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

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

