-
- 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.
-
-
Constructor Summary
Constructors Constructor Description EntityToIdConverter(Class<T> clazz)EntityToIdConverter(Dao<T, ID> dao)
-
Method Summary
Modifier and Type Method Description Result<ID>convertToModel(T value, ValueContext context)TconvertToPresentation(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
-
-
Method Detail
-
convertToModel
Result<ID> convertToModel(T value, ValueContext context)
-
convertToPresentation
T convertToPresentation(ID value, ValueContext context)
-
-
-
-