
    
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 TemplateType extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_TemplateType = new TemplateTypeFactory();
    
    public static final TemplateType EMAIL = new TemplateType ("EMAIL", "EMAIL", "Email", false);
    
    public static final TemplateType SMS = new TemplateType ("SMS", "SMS", "SMS", false);

    private static final TemplateType[] allTemplateTypes =
        new TemplateType[] { EMAIL,SMS};


    private static TemplateType[] getAllTemplateTypes ()
    {
        return allTemplateTypes;
    }

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



    static
    {
        defineAdditionalData ();
    }

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

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


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


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_TemplateType;
    }

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

        TemplateType[] all = getAllTemplateTypes();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


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

        TemplateType[] all = getAllTemplateTypes();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllTemplateTypes (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllTemplateTypes());
    }
    
    
    public static TemplateType[] getTemplateTypeArray ()
    {
        return (TemplateType[])getAllTemplateTypes().clone ();
    }


    public static void defineAdditionalData ()
    {
        
    }


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

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

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


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

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

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

