ENTITY
- the source entityFK_ENTITY
- the target entitypublic interface FindFrom<ENTITY,FK_ENTITY> extends Function<ENTITY,FK_ENTITY>
Stream
. Formally, a FindFrom
has the following signature:
FK_ENTITY apply(ENTITY entity);
Each FindFrom
contains metadata of which fields it compares to
determine the mapping as well as a reference to the foreign manager.
Modifier and Type | Method and Description |
---|---|
Field<ENTITY> |
getSourceField()
Returns the field that the stream originates from.
|
TableIdentifier<FK_ENTITY> |
getTableIdentifier()
Returns the identifier for the referenced (foreign) table.
|
Field<FK_ENTITY> |
getTargetField()
Returns the field that the stream references.
|
Field<ENTITY> getSourceField()
In the following example, foo
is the source:
foos.stream()
.flatMap(foo.findBars()) // findBars returns Streamer<Foo, Bar>
.forEach(...);
Field<FK_ENTITY> getTargetField()
In the following example, bar
is the target:
foos.stream()
.flatMap(foo.findBars()) // findBars returns Streamer<Foo, Bar>
.forEach(...);
TableIdentifier<FK_ENTITY> getTableIdentifier()
Copyright © 2018 Speedment, Inc.. All rights reserved.