Class Projection.BuilderBase<BUILDER extends Projection.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Projection>

java.lang.Object
io.helidon.data.codegen.query.Projection.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
Projection.Builder
Enclosing interface:
Projection

public abstract static class Projection.BuilderBase<BUILDER extends Projection.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Projection> extends Object implements Prototype.Builder<BUILDER,PROTOTYPE>
Fluent API builder base for Projection.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(Projection prototype)
      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(Projection.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • action

      public BUILDER action(ProjectionAction action)
      Projection action, e.g. SELECT, DELETE, UPDATE.
      Parameters:
      action - the projection action
      Returns:
      updated builder instance
      See Also:
    • clearResult

      public BUILDER clearResult()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • result

      public BUILDER result(ProjectionResult result)
      Projection return type limitation.
      Parameters:
      result - the return type limitation
      Returns:
      updated builder instance
      See Also:
    • clearExpression

      public BUILDER clearExpression()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • expression

      public BUILDER expression(ProjectionExpression expression)
      Projection expression.
      Parameters:
      expression - the projection expression.
      Returns:
      updated builder instance
      See Also:
    • clearProperty

      public BUILDER clearProperty()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • property

      public BUILDER property(Property property)
      Projection property.
      Parameters:
      property - the projection property.
      Returns:
      updated builder instance
      See Also:
    • property

      public BUILDER property(Consumer<Property.Builder> consumer)
      Projection property.
      Parameters:
      consumer - the projection property.
      Returns:
      updated builder instance
      See Also:
    • distinct

      public BUILDER distinct(boolean distinct)
      Whether projection is distinct.
      Parameters:
      distinct - value of true when projection is distinct or false otherwise
      Returns:
      updated builder instance
      See Also:
    • action

      public Optional<ProjectionAction> action()
      Projection action, e.g. SELECT, DELETE, UPDATE.
      Returns:
      the action
    • result

      public Optional<ProjectionResult> result()
      Projection return type limitation.
      Returns:
      the result
    • expression

      public Optional<ProjectionExpression> expression()
      Projection expression.
      Returns:
      the expression
    • property

      public Optional<Property> property()
      Projection property.
      Returns:
      the property
    • distinct

      public boolean distinct()
      Whether projection is distinct.
      Returns:
      the distinct
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.