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

import java.util.function.Function;

import de.ivu.elect.business.ergebnis.entity.DHondtQuotient;
import de.ivu.elect.business.ergebnis.entity.DHondtQuotientConstants;
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 AbstractDHondtQuotientColumn<E extends DHondtQuotient> extends
            DefaultColumnEntry<E>
        {
    private static final long serialVersionUID = 1L;

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

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

            
            public static <E extends DHondtQuotient> AbstractDHondtQuotientColumn<E> createDHondtQuotientDiscriminatorColumn(Messages messages){
            return new AbstractDHondtQuotientColumn<>("DHondtQuotient-Discriminator", messages, de.ivu.elect.business.ergebnis.entity.DHondtQuotientConstants.MESSAGE_KEY_DISCRIMINATOR_EINZAHL,
                            ColumnType.STRING
                        , DHondtQuotient::getDiscriminator);
            }




                    
            public static <E extends DHondtQuotient> AbstractDHondtQuotientColumn<E> createDHondtQuotientNennerColumn(Messages messages){
            return new AbstractDHondtQuotientColumn<>("DHondtQuotient-Nenner", messages, de.ivu.elect.business.ergebnis.entity.DHondtQuotientConstants.MESSAGE_KEY_NENNER_EINZAHL,
                            ColumnType.LONG
                        , DHondtQuotient::getNenner);
            }




                    
            public static <E extends DHondtQuotient> AbstractDHondtQuotientColumn<E> createDHondtQuotientRangColumn(Messages messages){
            return new AbstractDHondtQuotientColumn<>("DHondtQuotient-Rang", messages, de.ivu.elect.business.ergebnis.entity.DHondtQuotientConstants.MESSAGE_KEY_RANG_EINZAHL,
                            ColumnType.LONG
                        , DHondtQuotient::getRang);
            }




                    
            public static <E extends DHondtQuotient> AbstractDHondtQuotientColumn<E> createDHondtQuotientSitzgewinnColumn(Messages messages){
            return new AbstractDHondtQuotientColumn<>("DHondtQuotient-Sitzgewinn", messages, de.ivu.elect.business.ergebnis.entity.DHondtQuotientConstants.MESSAGE_KEY_SITZGEWINN_EINZAHL,
                            ColumnType.BOOLEAN
                        , DHondtQuotient::getSitzgewinn);
            }




                    
            public static <E extends DHondtQuotient> AbstractDHondtQuotientColumn<E> createDHondtQuotientTeilnehmerAmLosverfahrenColumn(Messages messages){
            return new AbstractDHondtQuotientColumn<>("DHondtQuotient-TeilnehmerAmLosverfahren", messages, de.ivu.elect.business.ergebnis.entity.DHondtQuotientConstants.MESSAGE_KEY_TEILNEHMER_AM_LOSVERFAHREN_EINZAHL,
                            ColumnType.BOOLEAN
                        , DHondtQuotient::getTeilnehmerAmLosverfahren);
            }




                    
            public static <E extends DHondtQuotient> AbstractDHondtQuotientColumn<E> createDHondtQuotientZaehlerColumn(Messages messages){
            return new AbstractDHondtQuotientColumn<>("DHondtQuotient-Zaehler", messages, de.ivu.elect.business.ergebnis.entity.DHondtQuotientConstants.MESSAGE_KEY_ZAEHLER_EINZAHL,
                            ColumnType.LONG
                        , DHondtQuotient::getZaehler);
            }




            
    
        public static <E extends DHondtQuotient> AbstractDHondtQuotientColumn<E> createErgebnisColumn(Messages messages, ColumnType type, Function<E, Object> getter){
        return new AbstractDHondtQuotientColumn<>("DHondtQuotient-Ergebnis", messages, de.ivu.elect.business.ergebnis.entity.DHondtQuotientConstants.MESSAGE_KEY_ERGEBNIS_ID_EINZAHL,
        type
        , getter);
        }

    



    }
