
    
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 SentVia extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_SentVia = new SentViaFactory();
    
    public static final SentVia EMAIL = new SentVia ("EMAIL", "EMAIL", "Email", false);
    
    public static final SentVia SMS = new SentVia ("SMS", "SMS", "SMS", false);
    
    public static final SentVia ON_APP = new SentVia ("ON_APP", "ON_APP", "On App", false);

    private static final SentVia[] allSentVias =
        new SentVia[] { EMAIL,SMS,ON_APP};


    private static SentVia[] getAllSentVias ()
    {
        return allSentVias;
    }

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



    static
    {
        defineAdditionalData ();
    }

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

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


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


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_SentVia;
    }

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

        SentVia[] all = getAllSentVias();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


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

        SentVia[] all = getAllSentVias();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllSentVias (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllSentVias());
    }
    
    
    public static SentVia[] getSentViaArray ()
    {
        return (SentVia[])getAllSentVias().clone ();
    }


    public static void defineAdditionalData ()
    {
        
    }


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

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

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


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

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

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

