|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||
See:
Description
| Class Summary | |
|---|---|
| BeanMonitor | A monitor of beans. |
| BeanUtil | Usefull methods around the PropertyChangeListener. |
| Binder<I,O> | A binder permits to copy some properties from an object to another
one. |
| Binder.BinderModel<S,T> | Model of a Binder. |
| BinderFactory | Factory of Binder. |
| BinderFactory.BindelModelEntryMap | |
| BinderFactory.BinderModelEntry | Definition of an binder model entry (source and target types + context name). |
| BinderModelBuilder<S,T> | Class to create a new Binder.BinderModel. |
| Enum Summary | |
|---|---|
| Binder.CollectionStrategy | Types of loading of collections. |
Packages for all stuff of bean transformations (binder, and others...). This package contains two api :
This api permits to some object properties from an object to another one.
Binder contains a safe model named
Binder.BinderModel which knows
all properties that can be copied.
Binder
object from the BinderFactory like this :
Binder binder = BinderFactory.newBinder(A.class);It is also possible to build a more sofisticated binder which will only copy some properties, using the
BinderModelBuilder.
Binder api :
To copy all properties from an object to another one :
binder.copy(source, target);To copy just some properties from an object to another one :
binder.copy(source, target, "propertyOne", "propertyTwo");To copy all properties except some :
binder.copyExcluding(source, target, "propertyToExeclude");To obtain some properties from an object, use the following code :
Mapproperties = binder.obtainProperties(source, "propertyOne", "propertyTwo");
In two words, you have to use the
BinderModelBuilder object to do this.
then register your binder model into the
BinderFactory using one of the method
org.nuiton.util.beans.BinderFactory#registerBinderModel(XXX).
org.nuiton.util.beans.BinderModelBuilderTest
BeanMonitor classorg.nuiton.util.beans.BeanMonitorTest
|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||