Package 

Class EntityToIdConverter

  • All Implemented Interfaces:
    com.vaadin.data.Converter , java.io.Serializable

    
    public final class EntityToIdConverter<ID extends Object, T extends KEntity<ID>>
     implements Converter<T, ID>
                        

    Converts an entity to its ID and back. Useful for combo boxes which shows a list of entities as their options while being bound to a field containing ID of that entity.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final Dao<T, ID> dao
    • Method Summary

      Modifier and Type Method Description
      Result<ID> convertToModel(T value, ValueContext context)
      T convertToPresentation(ID value, ValueContext context)
      final Dao<T, ID> getDao()
      • Methods inherited from class java.io.Serializable

        equals, hashCode, toString
      • Methods inherited from class eu.vaadinonkotlin.vaadin8.vokdb.EntityToIdConverter

        chain
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EntityToIdConverter

        EntityToIdConverter(Class<T> clazz)
      • EntityToIdConverter

        EntityToIdConverter(Dao<T, ID> dao)