Class BindingHelperDefault
- java.lang.Object
-
- org.fugerit.java.core.cfg.helpers.AbstractConfigurableObject
-
- org.fugerit.java.core.cfg.helpers.XMLConfigurableObject
-
- org.fugerit.java.core.lang.binding.BindingHelperDefault
-
- All Implemented Interfaces:
Serializable
,ConfigurableObject
,IdConfigType
,BindingHelper
,LogObject
,KeyObject<String>
,KeyString
- Direct Known Subclasses:
BindingHelperCollectionToObject
,BindingHelperDateToXML
,BindingHelperDateToXMLOnly
,BindingHelperInitTo
,BindingHelperStringValue
,BindingHelperXMLToDate
public class BindingHelperDefault extends XMLConfigurableObject implements Serializable, BindingHelper, IdConfigType, KeyString
Default binding helper implementation New helper could just extends this class and override convertValue() or bindingWorker() method- Author:
- Matteo a.k.a. Fugerit
- See Also:
as an example
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static BindingHelper
DEFAULT
-
Fields inherited from class org.fugerit.java.core.cfg.helpers.XMLConfigurableObject
DO_NOTHING
-
-
Constructor Summary
Constructors Constructor Description BindingHelperDefault()
BindingHelperDefault(String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(BindingContext context, BindingConfig binding, BindingFieldConfig field, Object from, Object to)
void
bindingWorker(BindingContext context, BindingConfig binding, BindingFieldConfig field, Object from, Object to)
void
configure(Element tag)
Configure the object.Object
convertValue(BindingContext context, BindingConfig binding, BindingFieldConfig field, Object value)
String
getId()
String
getKey()
Returns the key of the objectString
getParam01()
String
getParam02()
String
getParam03()
Class<?>
getParamType()
String
getType()
protected Class<?>
resolveType(BindingFieldConfig field)
void
setId(String id)
void
setParam01(String param01)
void
setParam02(String param02)
void
setParam03(String param03)
void
setType(String type)
-
Methods inherited from class org.fugerit.java.core.cfg.helpers.XMLConfigurableObject
configure, newXMLConfigurableObject
-
Methods inherited from class org.fugerit.java.core.cfg.helpers.AbstractConfigurableObject
configureProperties, configureXML, getLogger, setConfigProvider
-
-
-
-
Field Detail
-
DEFAULT
public static final BindingHelper DEFAULT
-
-
Constructor Detail
-
BindingHelperDefault
public BindingHelperDefault()
-
BindingHelperDefault
public BindingHelperDefault(String id)
-
-
Method Detail
-
convertValue
public Object convertValue(BindingContext context, BindingConfig binding, BindingFieldConfig field, Object value) throws Exception
- Throws:
Exception
-
resolveType
protected Class<?> resolveType(BindingFieldConfig field) throws Exception
- Throws:
Exception
-
bindingWorker
public void bindingWorker(BindingContext context, BindingConfig binding, BindingFieldConfig field, Object from, Object to) throws Exception
- Throws:
Exception
-
bind
public void bind(BindingContext context, BindingConfig binding, BindingFieldConfig field, Object from, Object to) throws BindingException
- Specified by:
bind
in interfaceBindingHelper
- Throws:
BindingException
-
getParamType
public Class<?> getParamType()
-
configure
public void configure(Element tag) throws ConfigException
Description copied from interface:ConfigurableObject
Configure the object.
- Specified by:
configure
in interfaceConfigurableObject
- Specified by:
configure
in classAbstractConfigurableObject
- Parameters:
tag
- The tag object to use for configuration.- Throws:
ConfigException
- If troubles arise during object configuration.
-
getId
public String getId()
- Specified by:
getId
in interfaceIdConfigType
-
setId
public void setId(String id)
- Specified by:
setId
in interfaceIdConfigType
-
getKey
public String getKey()
Description copied from interface:KeyObject
Returns the key of the object
-
getType
public String getType()
-
setType
public void setType(String type)
-
getParam01
public String getParam01()
-
setParam01
public void setParam01(String param01)
-
getParam02
public String getParam02()
-
setParam02
public void setParam02(String param02)
-
getParam03
public String getParam03()
-
setParam03
public void setParam03(String param03)
-
-