Package com.sap.cds.ql
Interface RefBuilder<T extends CqnReference>
public interface RefBuilder<T extends CqnReference>
Builder for CQN
references
.
The segments
of the ref can be modified in-place. Call
build()
to create an immutable ref.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
A modifiable ref segment. -
Method Summary
Modifier and TypeMethodDescriptionSets the alias of this ref builder.build()
Creates an immutable refReturns the first segment of this ref builder.segments()
Returns the segments of this ref builder asList
.stream()
Returns the segments of this ref builder asStream
.Returns the last segment of this ref builder.Sets the type of this ref builder.
-
Method Details
-
segments
List<RefBuilder.RefSegment> segments()Returns the segments of this ref builder asList
.- Returns:
- the list of
RefSegments
-
stream
Stream<RefBuilder.RefSegment> stream()Returns the segments of this ref builder asStream
.- Returns:
- the stream of
RefSegments
-
rootSegment
RefBuilder.RefSegment rootSegment()Returns the first segment of this ref builder.- Returns:
- the first
RefBuilder.RefSegment
-
targetSegment
RefBuilder.RefSegment targetSegment()Returns the last segment of this ref builder.- Returns:
- the last
RefBuilder.RefSegment
-
as
Sets the alias of this ref builder.- Parameters:
alias
- the alias- Returns:
- this ref builder
-
type
Sets the type of this ref builder.- Parameters:
typeName
- the type name- Returns:
- this ref builder
-
build
T build()Creates an immutable ref- Returns:
- an immutable ref of type T
-