T - the type of the entityID - the type of the ID field of the entitypublic class EntityToIdConverter<ID,T extends KEntity<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 and Description |
|---|
EntityToIdConverter(com.gitlab.mvysny.jdbiorm.Dao<T,ID> dao)
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.
|
EntityToIdConverter(java.lang.Class<T> clazz) |
| Modifier and Type | Method and Description |
|---|---|
com.vaadin.flow.data.binder.Result<ID> |
convertToModel(T value,
com.vaadin.flow.data.binder.ValueContext context) |
T |
convertToPresentation(ID value,
com.vaadin.flow.data.binder.ValueContext context) |
com.gitlab.mvysny.jdbiorm.Dao<T,ID> |
getDao() |
public EntityToIdConverter(com.gitlab.mvysny.jdbiorm.Dao<T,ID> dao)
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.
public EntityToIdConverter(java.lang.Class<T> clazz)
public com.vaadin.flow.data.binder.Result<ID> convertToModel(T value,
com.vaadin.flow.data.binder.ValueContext context)
public T convertToPresentation(ID value,
com.vaadin.flow.data.binder.ValueContext context)
public com.gitlab.mvysny.jdbiorm.Dao<T,ID> getDao()