F
- FromT
- Topublic class BeanCopy<F,T> extends AbstractDestination<F> implements BusFilter<F,T>, ArooaSessionAware
<oddjob> <job> <bean class="org.oddjob.beanbus.drivers.IterableBusDriver" id="bus"> <beans> <value value="${iterable}"/> </beans> <to> <bean class="org.oddjob.beanbus.destinations.BeanCopy"> <arooaClass> <class name="org.oddjob.beanbus.destinations.BeanCopyTest$BeanTo"/> </arooaClass> <to> <list/> </to> <mappings> <value key="fruit" value="snack"/> <value key="quantity" value="number"/> <value key="price" value="COST"/> </mappings> </bean> </to> </bean> </job> </oddjob>
<oddjob> <job> <bean class="org.oddjob.beanbus.drivers.IterableBusDriver" id="bus"> <beans> <value value="${iterable}"/> </beans> <to> <bean class="org.oddjob.beanbus.destinations.BeanCopy"> <arooaClass> <magic-class name="BeanCopyTestMagiClass"> <properties> <value key="snack" value="java.lang.String"/> <value key="number" value="java.lang.Integer"/> <value key="COST" value="java.lang.Double"/> </properties> </magic-class> </arooaClass> <to> <list/> </to> <mappings> <value key="fruit" value="snack"/> <value key="quantity" value="number"/> <value key="price" value="COST"/> </mappings> </bean> </to> </bean> </job> </oddjob>
<oddjob> <job> <bean class="org.oddjob.beanbus.drivers.IterableBusDriver" id="bus"> <beans> <value value="${iterable}"/> </beans> <to> <bean class="org.oddjob.beanbus.destinations.BeanCopy"> <to> <list/> </to> <mappings> <value key="fruit" value="snack"/> <value key="quantity" value="number"/> <value key="price" value="COST"/> </mappings> </bean> </to> </bean> </job> </oddjob>
Constructor and Description |
---|
BeanCopy() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(F bean) |
protected ArooaClass |
createClassFromBean(F bean) |
java.lang.String |
getName() |
java.util.Collection<? super T> |
getTo() |
void |
setArooaClass(ArooaClass arooaClass) |
void |
setArooaSession(ArooaSession session)
Accept the current Arooa Session.
|
void |
setMappings(java.lang.String from,
java.lang.String to) |
void |
setName(java.lang.String name) |
void |
setTo(java.util.Collection<? super T> to)
Set the out bound destination.
|
java.lang.String |
toString() |
addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public void setArooaSession(ArooaSession session)
ArooaSessionAware
setArooaSession
in interface ArooaSessionAware
session
- The Arooa Session. Never null.protected ArooaClass createClassFromBean(F bean)
public void setArooaClass(ArooaClass arooaClass)
public void setTo(java.util.Collection<? super T> to)
Outbound
public java.util.Collection<? super T> getTo()
public void setMappings(java.lang.String from, java.lang.String to)
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String toString()
toString
in class java.lang.Object