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

import java.util.function.Function;

import de.ivu.elect.business.internet.entity.InternetWidget;
import de.ivu.elect.business.internet.entity.InternetWidgetConstants;
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 AbstractInternetWidgetColumn<E extends InternetWidget> extends
            DefaultColumnEntry<E>
        {
    private static final long serialVersionUID = 1L;

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

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

            
            public static <E extends InternetWidget> AbstractInternetWidgetColumn<E> createInternetWidgetBeschreibungColumn(Messages messages){
            return new AbstractInternetWidgetColumn<>("InternetWidget-Beschreibung", messages, de.ivu.elect.business.internet.entity.InternetWidgetConstants.MESSAGE_KEY_BESCHREIBUNG_EINZAHL,
                            ColumnType.STRING
                        , InternetWidget::getBeschreibung);
            }




                    
            public static <E extends InternetWidget> AbstractInternetWidgetColumn<E> createInternetWidgetBreiteColumn(Messages messages){
            return new AbstractInternetWidgetColumn<>("InternetWidget-Breite", messages, de.ivu.elect.business.internet.entity.InternetWidgetConstants.MESSAGE_KEY_BREITE_EINZAHL,
                            ColumnType.ENUM
                        , InternetWidget::getBreite);
            }




                    
            public static <E extends InternetWidget> AbstractInternetWidgetColumn<E> createInternetWidgetIdentifierColumn(Messages messages){
            return new AbstractInternetWidgetColumn<>("InternetWidget-Identifier", messages, de.ivu.elect.business.internet.entity.InternetWidgetConstants.MESSAGE_KEY_IDENTIFIER_EINZAHL,
                            ColumnType.STRING
                        , InternetWidget::getIdentifier);
            }




                    
            public static <E extends InternetWidget> AbstractInternetWidgetColumn<E> createInternetWidgetPositionColumn(Messages messages){
            return new AbstractInternetWidgetColumn<>("InternetWidget-Position", messages, de.ivu.elect.business.internet.entity.InternetWidgetConstants.MESSAGE_KEY_POSITION_EINZAHL,
                            ColumnType.LONG
                        , InternetWidget::getPosition);
            }




                    
            public static <E extends InternetWidget> AbstractInternetWidgetColumn<E> createInternetWidgetSprungmarkeColumn(Messages messages){
            return new AbstractInternetWidgetColumn<>("InternetWidget-Sprungmarke", messages, de.ivu.elect.business.internet.entity.InternetWidgetConstants.MESSAGE_KEY_SPRUNGMARKE_EINZAHL,
                            ColumnType.STRING
                        , InternetWidget::getSprungmarke);
            }




                    
            public static <E extends InternetWidget> AbstractInternetWidgetColumn<E> createInternetWidgetStatusColumn(Messages messages){
            return new AbstractInternetWidgetColumn<>("InternetWidget-Status", messages, de.ivu.elect.business.internet.entity.InternetWidgetConstants.MESSAGE_KEY_STATUS_EINZAHL,
                            ColumnType.ENUM
                        , InternetWidget::getStatus);
            }




                    
            public static <E extends InternetWidget> AbstractInternetWidgetColumn<E> createInternetWidgetWidgetTypColumn(Messages messages){
            return new AbstractInternetWidgetColumn<>("InternetWidget-WidgetTyp", messages, de.ivu.elect.business.internet.entity.InternetWidgetConstants.MESSAGE_KEY_WIDGET_TYP_EINZAHL,
                            ColumnType.ENUM
                        , InternetWidget::getWidgetTyp);
            }




                    
            public static <E extends InternetWidget> AbstractInternetWidgetColumn<E> createInternetWidgetZeileColumn(Messages messages){
            return new AbstractInternetWidgetColumn<>("InternetWidget-Zeile", messages, de.ivu.elect.business.internet.entity.InternetWidgetConstants.MESSAGE_KEY_ZEILE_EINZAHL,
                            ColumnType.LONG
                        , InternetWidget::getZeile);
            }




            
    
        public static <E extends InternetWidget> AbstractInternetWidgetColumn<E> createCustomDataStorageColumn(Messages messages, ColumnType type, Function<E, Object> getter){
        return new AbstractInternetWidgetColumn<>("InternetWidget-CustomDataStorage", messages, de.ivu.elect.business.internet.entity.InternetWidgetConstants.MESSAGE_KEY_CUSTOM_DATA_STORAGE_ID_EINZAHL,
        type
        , getter);
        }

    
        public static <E extends InternetWidget> AbstractInternetWidgetColumn<E> createInternetSeiteColumn(Messages messages, ColumnType type, Function<E, Object> getter){
        return new AbstractInternetWidgetColumn<>("InternetWidget-InternetSeite", messages, de.ivu.elect.business.internet.entity.InternetWidgetConstants.MESSAGE_KEY_INTERNET_SEITE_ID_EINZAHL,
        type
        , getter);
        }

    



    }
