Module org.tentackle.fx.rdc
Package org.tentackle.fx.rdc.translate
Class PdoStringTranslator<T extends PersistentDomainObject<T>>
java.lang.Object
org.tentackle.fx.translate.AbstractValueTranslator<M,String>
org.tentackle.fx.translate.ValueStringTranslator<T>
org.tentackle.fx.rdc.translate.PdoStringTranslator<T>
- Type Parameters:
T- the PDO type
- All Implemented Interfaces:
ValueTranslator<T,String>
@ValueTranslatorService(modelClass=org.tentackle.pdo.PersistentDomainObject.class,
viewClass=java.lang.String.class)
public class PdoStringTranslator<T extends PersistentDomainObject<T>>
extends ValueStringTranslator<T>
PDO to String translator.
- Author:
- harald
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PdoComponentAddon<T>Creates the PDO style implementation.protected org.tentackle.bind.BindablegetBindableAnnotation(T proxy) Gets theBindableannotation of the unique domain key.protected TgetPdo()Gets the PDO via binding.
For non-editable comboboxes this translator isnt used, but registered, because it could be changed to editable.Gets the PDO addon.protected voidpresetSearchCriteria(T proxy, Class<?> udkClass, String v) Preset the given proxy with the string from the component.protected voidRuns the interactive search.protected voidSets the PDO via binding.
Mainly used by DnD.voidsetPdoAddon(PdoComponentAddon<T> pdoAddon) Sets the PDO addon.Methods inherited from class org.tentackle.fx.translate.ValueStringTranslator
getComponent, getValidChars, toModelMethods inherited from class org.tentackle.fx.translate.AbstractValueTranslator
isLenient, setLenientMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.tentackle.fx.ValueTranslator
bindingPropertiesUpdated, needsToModelTwice, toView
-
Constructor Details
-
PdoStringTranslator
Creates a translator.- Parameters:
component- the text component
-
-
Method Details
-
getPdoAddon
Gets the PDO addon.- Returns:
- the addon
-
setPdoAddon
Sets the PDO addon.- Parameters:
pdoAddon- the addon
-
toViewFunction
-
toModelFunction
-
runSearch
Runs the interactive search.- Parameters:
proxy- the proxy object
-
createPdoAddon
Creates the PDO style implementation.- Returns:
- the implementation
-
getPdo
Gets the PDO via binding.
For non-editable comboboxes this translator isnt used, but registered, because it could be changed to editable.- Returns:
- the model value
-
setPdo
Sets the PDO via binding.
Mainly used by DnD.- Parameters:
pdo- the PDO, null to clear
-
presetSearchCriteria
Preset the given proxy with the string from the component.- Parameters:
proxy- the proxy pdoudkClass- the class of the unique domain keyv- the view value
-
getBindableAnnotation
Gets theBindableannotation of the unique domain key.If the UDK consists of more than one member, the first Bindable annotation is returned.
- Parameters:
proxy- the PDO class to inspect- Returns:
- the annotation, null if not annotated with Bindable
-