/*
 * Unique Schlüssel für JPA Entität
 */
package de.ivu.elect.business.fremdkandidatur.entity;
import java.util.function.Function;
import java.util.ArrayList;
import java.util.stream.Collectors;

@javax.enterprise.inject.Vetoed
public class FremdkandidaturUK
extends de.ivu.elect.business.person.entity.PersonendatenUK
  {

  private static final long serialVersionUID = 1L;



  public FremdkandidaturUK(
  ) {
super(
);


      }

  @Override
  public int hashCode() {
        int result = super.hashCode();
    
    
    return result;
  }

  @Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }

    if (obj == null) {
      return false;
    }

        if (!super.equals(obj)) {
      return false;
    }
    
    if (getClass() != obj.getClass()) {
      return false;
    }

    
    return true;
  }

  @Override
  public String getEntityMessageKey() {
    return FremdkandidaturConstants.MESSAGE_KEY_ENTITY_EINZAHL;
  }

  @Override
  public java.util.List<de.ivu.elect.jee.entity.tk.EntityFieldValue> getAllEntityFieldValues() {
    java.util.List<de.ivu.elect.jee.entity.tk.EntityFieldValue> result = new java.util.ArrayList<>();

    result.addAll(super.getAllEntityFieldValues());
    result.addAll(getEntityFieldValuesForEntity());
    return result;
  }

  @Override
  public java.util.List<de.ivu.elect.jee.entity.tk.EntityFieldValue> getEntityFieldValuesForEntity() {
            return java.util.Collections.emptyList();
      }
  
    @Override
  public String toString() {
    return "FremdkandidaturUK[" + toStringParameter() + "]";
  }

            protected String toStringParameter() {
              String result = ""

                                                ;
                            String resultParent = super.toStringParameter();
                if (resultParent.isEmpty()) {
                  return result;
                }
                if (result.isEmpty()) {
                  return resultParent;
                }
                return resultParent +", " + result;
            
            }




        
   @Override
   protected ArrayList<Object> getAllUKFieldValues() {
              ArrayList<Object> list = super.getAllUKFieldValues();
          return list;
   }

            public static <E extends Fremdkandidatur> java.util.Map<FremdkandidaturUK, E> mappeFremdkandidaturNachUK(java.util.Collection<E> entities) {

                return entities.stream().collect(java.util.stream.Collectors.toMap(Fremdkandidatur::getFremdkandidaturUK, Function.<E>identity(), (u,v)->v));
             }


                public static Function<Fremdkandidatur, FremdkandidaturUK> getFremdkandidaturToUKFunction() {
                return Fremdkandidatur::getFremdkandidaturUK;
                }

}
