
package de.ivu.elect.presentation.wahlvorschlag.table;

import java.util.function.Function;

import de.ivu.elect.business.wahlvorschlag.entity.ReferendumOption;
import de.ivu.elect.business.wahlvorschlag.entity.ReferendumOptionConstants;
import de.ivu.elect.presentation.table.DefaultColumnEntry;
import de.ivu.elect.jee.presentation.dynamictable.ColumnType;

import de.ivu.elect.jee.faces.Messages;

@javax.enterprise.inject.Vetoed
public class AbstractReferendumOptionColumn<E extends ReferendumOption> extends
            de.ivu.elect.presentation.wahlvorschlag.table.AbstractWahlvorschlagColumn<E>
        {
    private static final long serialVersionUID = 1L;

    @Deprecated // Eindeutige Id vergeben, wichtig für Spaltenreihenfolge ELECT-4631
    protected AbstractReferendumOptionColumn(Messages messages, String headerKey, ColumnType type, Function<E, Object> getter) {
      super(messages, headerKey, type, getter);
    }

    protected  AbstractReferendumOptionColumn(String id, Messages messages, String headerKey, ColumnType type, Function<E, Object> getter) {
      super(id, messages, headerKey, type, getter);
    }

            
            public static <E extends ReferendumOption> AbstractReferendumOptionColumn<E> createReferendumOptionKurzbezeichnungColumn(Messages messages){
            return new AbstractReferendumOptionColumn<>("ReferendumOption-Kurzbezeichnung", messages, de.ivu.elect.business.wahlvorschlag.entity.ReferendumOptionConstants.MESSAGE_KEY_KURZBEZEICHNUNG_EINZAHL,
                            ColumnType.STRING
                        , ReferendumOption::getKurzbezeichnung);
            }




                    
            public static <E extends ReferendumOption> AbstractReferendumOptionColumn<E> createReferendumOptionLabelColumn(Messages messages){
            return new AbstractReferendumOptionColumn<>("ReferendumOption-Label", messages, de.ivu.elect.business.wahlvorschlag.entity.ReferendumOptionConstants.MESSAGE_KEY_LABEL_EINZAHL,
                            ColumnType.STRING
                        , ReferendumOption::getLabel);
            }




                    
            public static <E extends ReferendumOption> AbstractReferendumOptionColumn<E> createReferendumOptionPositionColumn(Messages messages){
            return new AbstractReferendumOptionColumn<>("ReferendumOption-Position", messages, de.ivu.elect.business.wahlvorschlag.entity.ReferendumOptionConstants.MESSAGE_KEY_POSITION_EINZAHL,
                            ColumnType.LONG
                        , ReferendumOption::getPosition);
            }




            
    



    }
