|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.util.beans.BinderModel<S,T>
S - the source typeT - the target typepublic class BinderModel<S,T>
Model of a Binder.
TODO-TC20100225 should have special cases for collections treatment.
| Field Summary | |
|---|---|
protected Map<String,String> |
propertiesMapping
properties mapping (key are source properties, value are destination properties) |
protected Map<String,PropertyDescriptor> |
sourceDescriptors
source type descriptors (key are property names) |
protected Class<S> |
sourceType
source type |
protected Map<String,PropertyDescriptor> |
targetDescriptors
destination descriptors (key are property names) |
protected Class<T> |
targetType
destination type |
| Constructor Summary | |
|---|---|
BinderModel(Class<S> sourceType,
Class<T> targetType)
|
|
| Method Summary | |
|---|---|
protected void |
addBinding(PropertyDescriptor sourceDescriptor,
PropertyDescriptor targetDescriptor)
|
protected boolean |
containsSourceProperty(String sourceProperty)
|
protected boolean |
containsTargetProperty(String targetProperty)
|
protected Map<String,String> |
getPropertiesMapping()
|
PropertyDescriptor |
getSourceDescriptor(String sourceProperty)
Gets the bean descriptor of the source type for the given destination property. |
String[] |
getSourceDescriptors()
Gets all registred property names of the binder's source type. |
Method |
getSourceReadMethod(String srcProperty)
|
Class<S> |
getSourceType()
Gets the type of the binder's source. |
Method |
getSourceWriteMethod(String sourceProperty)
|
PropertyDescriptor |
getTargetDescriptor(String targetProperty)
Gets the bean descriptor of the destination type for the given destination property. |
String[] |
getTargetDescriptors()
Gets all registred property names of the binder's destination type. |
String |
getTargetProperty(String sourceProperty)
Gets the destination property name given the |
Method |
getTargetReadMethod(String targetProperty)
|
Class<T> |
getTargetType()
Gets the type of the binder's destination |
Method |
getTargetWriteMethod(String targetProperty)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Class<S> sourceType
protected final Class<T> targetType
protected final Map<String,PropertyDescriptor> sourceDescriptors
protected final Map<String,PropertyDescriptor> targetDescriptors
protected final Map<String,String> propertiesMapping
| Constructor Detail |
|---|
public BinderModel(Class<S> sourceType,
Class<T> targetType)
| Method Detail |
|---|
public Class<S> getSourceType()
public Class<T> getTargetType()
public String[] getSourceDescriptors()
public String[] getTargetDescriptors()
public String getTargetProperty(String sourceProperty)
sourceProperty - the name of the source property to bind
null if propertySrc is unknown in the modelpublic PropertyDescriptor getSourceDescriptor(String sourceProperty)
sourceProperty - name of the source type property name
null if not found.public Method getSourceReadMethod(String srcProperty)
srcProperty - the name of a property of the source object.
public Method getSourceWriteMethod(String sourceProperty)
sourceProperty - the name of a property of the source object.
public PropertyDescriptor getTargetDescriptor(String targetProperty)
targetProperty - name of the destination type property name
null if not found.public Method getTargetReadMethod(String targetProperty)
targetProperty - the name of a property of the destination object.
public Method getTargetWriteMethod(String targetProperty)
targetProperty - the name of a property of the destination object.
protected boolean containsSourceProperty(String sourceProperty)
protected boolean containsTargetProperty(String targetProperty)
protected void addBinding(PropertyDescriptor sourceDescriptor,
PropertyDescriptor targetDescriptor)
protected Map<String,String> getPropertiesMapping()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||