public class Binding extends Object
Constructor and Description |
---|
Binding(BindingSide[] sourcePath,
BindingSide destinationMember)
Creates binding from series of bindings from source (path) to destination member.
|
Binding(BindingSide sourceMember,
BindingSide destinationMember)
Creates Binding from source member to destination member.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(Mapper mapper,
Object source,
Object destination)
Copies value from source to destination.
|
BindingSide |
getDestinationMember()
Returns destination member.
|
BindingSide[] |
getSourcePath()
Returns binding source path (series of bindings from source where n+1 binding returns member
of object returned by n-th binding).
|
protected void |
setValueAtDestination(Mapper mapper,
Object destination,
Object value)
Sets value at destination.
|
public Binding(BindingSide[] sourcePath, BindingSide destinationMember)
sourcePath
- series of bindings from source where n+1 binding returns member of object
returned by n-th binding.destinationMember
- destination member.public Binding(BindingSide sourceMember, BindingSide destinationMember)
sourceMember
- source member.destinationMember
- destination member.public BindingSide[] getSourcePath()
public BindingSide getDestinationMember()
public void execute(Mapper mapper, Object source, Object destination) throws MappingException
mapper
- caller.source
- source objectdestination
- destination object.MappingException
- when copy action fails.Copyright © 2014. All rights reserved.