
    
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 PlaceholderOptions extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_PlaceholderOptions = new PlaceholderOptionsFactory();
    
    public static final PlaceholderOptions FIRST_NAME = new PlaceholderOptions ("FIRST_NAME", "FIRST_NAME", "First Name", false);
    
    public static final PlaceholderOptions SURNAME = new PlaceholderOptions ("SURNAME", "SURNAME", "Surname", false);
    
    public static final PlaceholderOptions EMAIL_ADDRESS = new PlaceholderOptions ("EMAIL_ADDRESS", "EMAIL_ADDRESS", "Email Address", false);
    
    public static final PlaceholderOptions LOCATION = new PlaceholderOptions ("LOCATION", "LOCATION", "Location", false);
    
    public static final PlaceholderOptions HIRING_TEAM = new PlaceholderOptions ("HIRING_TEAM", "HIRING_TEAM", "Hiring Team", false);
    
    public static final PlaceholderOptions JOB_TITLE = new PlaceholderOptions ("JOB_TITLE", "JOB_TITLE", "Job Title", false);
    
    public static final PlaceholderOptions JOB_REFERENCE = new PlaceholderOptions ("JOB_REFERENCE", "JOB_REFERENCE", "Job Reference", false);
    
    public static final PlaceholderOptions JOB_LINK = new PlaceholderOptions ("JOB_LINK", "JOB_LINK", "Job Link", false);
    
    public static final PlaceholderOptions WITHDRAW_LINK = new PlaceholderOptions ("WITHDRAW_LINK", "WITHDRAW_LINK", "Withdraw Link", false);
    
    public static final PlaceholderOptions JOB_OWNER_FIRST_NAME = new PlaceholderOptions ("JOB_OWNER_FIRST_NAME", "JOB_OWNER_FIRST_NAME", "Job Owner - First Name", false);
    
    public static final PlaceholderOptions JOB_OWNER_LAST_NAME = new PlaceholderOptions ("JOB_OWNER_LAST_NAME", "JOB_OWNER_LAST_NAME", "Job Owner - Last Name", false);

    private static final PlaceholderOptions[] allPlaceholderOptionss =
        new PlaceholderOptions[] { FIRST_NAME,SURNAME,EMAIL_ADDRESS,LOCATION,HIRING_TEAM,JOB_TITLE,JOB_REFERENCE,JOB_LINK,WITHDRAW_LINK,JOB_OWNER_FIRST_NAME,JOB_OWNER_LAST_NAME};


    private static PlaceholderOptions[] getAllPlaceholderOptionss ()
    {
        return allPlaceholderOptionss;
    }

    private transient String Placeholder;

    private transient Boolean ShowForSubject;

    private transient Boolean ShowForContent;

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

    public String getPlaceholder()
    {
    return Placeholder;
    }

    public Boolean getShowForSubject()
    {
    return ShowForSubject;
    }

    public Boolean getShowForContent()
    {
    return ShowForContent;
    }
    
    public static final Comparator COMPARE_BY_POSITION = new CompareEnumByPosition (allPlaceholderOptionss);



    static
    {
        defineAdditionalData ();
    }

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

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


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


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_PlaceholderOptions;
    }

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

        PlaceholderOptions[] all = getAllPlaceholderOptionss();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


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

        PlaceholderOptions[] all = getAllPlaceholderOptionss();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllPlaceholderOptionss (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllPlaceholderOptionss());
    }
    
    
    public static PlaceholderOptions[] getPlaceholderOptionsArray ()
    {
        return (PlaceholderOptions[])getAllPlaceholderOptionss().clone ();
    }


    public static void defineAdditionalData ()
    {
        FIRST_NAME.Placeholder = "$firstName";
        FIRST_NAME.ShowForSubject = Boolean.TRUE;
        FIRST_NAME.ShowForContent = Boolean.TRUE;
        SURNAME.Placeholder = "$surname";
        SURNAME.ShowForSubject = Boolean.TRUE;
        SURNAME.ShowForContent = Boolean.TRUE;
        EMAIL_ADDRESS.Placeholder = "$emailAddress";
        EMAIL_ADDRESS.ShowForSubject = Boolean.TRUE;
        EMAIL_ADDRESS.ShowForContent = Boolean.TRUE;
        LOCATION.Placeholder = "$location";
        LOCATION.ShowForSubject = Boolean.TRUE;
        LOCATION.ShowForContent = Boolean.TRUE;
        HIRING_TEAM.Placeholder = "$hiringTeam";
        HIRING_TEAM.ShowForSubject = Boolean.TRUE;
        HIRING_TEAM.ShowForContent = Boolean.TRUE;
        JOB_TITLE.Placeholder = "$jobTitle";
        JOB_TITLE.ShowForSubject = Boolean.TRUE;
        JOB_TITLE.ShowForContent = Boolean.TRUE;
        JOB_REFERENCE.Placeholder = "$jobReference";
        JOB_REFERENCE.ShowForSubject = Boolean.TRUE;
        JOB_REFERENCE.ShowForContent = Boolean.TRUE;
        JOB_LINK.Placeholder = "$jobLink";
        JOB_LINK.ShowForSubject = Boolean.FALSE;
        JOB_LINK.ShowForContent = Boolean.TRUE;
        WITHDRAW_LINK.Placeholder = "$withdrawLink";
        WITHDRAW_LINK.ShowForSubject = Boolean.FALSE;
        WITHDRAW_LINK.ShowForContent = Boolean.TRUE;
        JOB_OWNER_FIRST_NAME.Placeholder = "$jobOwnerFirstName";
        JOB_OWNER_FIRST_NAME.ShowForSubject = Boolean.TRUE;
        JOB_OWNER_FIRST_NAME.ShowForContent = Boolean.TRUE;
        JOB_OWNER_LAST_NAME.Placeholder = "$jobOwnerLastName";
        JOB_OWNER_LAST_NAME.ShowForSubject = Boolean.TRUE;
        JOB_OWNER_LAST_NAME.ShowForContent = Boolean.TRUE;
        
    }


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

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

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


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

        attribs.put ("Placeholder", ArrayFormatter.toObject(getPlaceholder()));
        attribs.put ("ShowForSubject", ArrayFormatter.toObject(getShowForSubject()));
        attribs.put ("ShowForContent", ArrayFormatter.toObject(getShowForContent()));
        
        return attribs;
    }
    
    public static class PlaceholderOptionsPipeLineFactory<From, Me extends PlaceholderOptions> extends AbstractEnumerated.EnumPipeLine<From, Me>
    {
        public <Prev> PlaceholderOptionsPipeLineFactory (PipeLine<From, Prev> pipeLine, Pipe<Prev, Me> nextPipe)
        {
            super (pipeLine, nextPipe);
        }
        
        public PlaceholderOptionsPipeLineFactory (From seed)
        {
            super(seed);
        }

        public PlaceholderOptionsPipeLineFactory (Collection<From> seed)
        {
            super(seed);
        }
        
        public PipeLine<From, ? extends Object> to(String name)
        {
            if (name.equals ("Placeholder"))
            {
                return toPlaceholder ();
            }
            if (name.equals ("ShowForSubject"))
            {
                return toShowForSubject ();
            }
            if (name.equals ("ShowForContent"))
            {
                return toShowForContent ();
            }
            
            return super.to(name);
        }
        
        
        public PipeLine<From, String> toPlaceholder () { return pipe(new EnumAttributePipe<Me, String>("Placeholder")); }
        
        public PipeLine<From, Boolean> toShowForSubject () { return pipe(new EnumAttributePipe<Me, Boolean>("ShowForSubject")); }
        
        public PipeLine<From, Boolean> toShowForContent () { return pipe(new EnumAttributePipe<Me, Boolean>("ShowForContent")); }
    }
}

