@ValueTranslatorService(modelClass=org.tentackle.pdo.PersistentDomainObject.class, viewClass=java.lang.String.class) public class PdoStringTranslator<T extends PersistentDomainObject<T>> extends ValueStringTranslator<T>
| Constructor and Description |
|---|
PdoStringTranslator(FxTextComponent component)
Creates a translator.
|
| Modifier and Type | Method and Description |
|---|---|
protected T |
createPdo()
Creates a new PDO.
|
protected org.tentackle.bind.Bindable |
getBindableAnnotation(T proxy)
Gets the
Bindable annotation of the unique domain key. |
protected void |
presetSearchCriteria(T proxy,
Class<?> udkClass,
String v)
Preset the given proxy with the string from the component.
|
protected T |
searchPdo(T proxy)
Modal search of the pdo.
|
Function<String,T> |
toModelFunction() |
Function<T,String> |
toViewFunction() |
getComponent, getValidChars, toModelisLenient, needsToModelTwice, setLenient, toViewpublic PdoStringTranslator(FxTextComponent component)
component - the text componentpublic Function<T,String> toViewFunction()
toViewFunction in class ValueTranslator<T extends PersistentDomainObject<T>,String>public Function<String,T> toModelFunction()
toModelFunction in class ValueTranslator<T extends PersistentDomainObject<T>,String>protected T createPdo()
protected T searchPdo(T proxy)
proxy - the proxy pdo (possibly presetted with partial search criteria)protected void presetSearchCriteria(T proxy, Class<?> udkClass, String v)
proxy - the proxy pdoudkClass - the class of the unique domain keyv - the view valueprotected org.tentackle.bind.Bindable getBindableAnnotation(T proxy)
Bindable annotation of the unique domain key.
If the UDK consists of more than one member, the first Bindable annotation is returned.
proxy - the PDO class to inspectTentackle - a domain driven enterprise framework