Package org.projectnessie.model
Class ImmutableSqlView.Builder
- java.lang.Object
-
- org.projectnessie.model.ImmutableSqlView.Builder
-
- Enclosing class:
- ImmutableSqlView
@NotThreadSafe public static final class ImmutableSqlView.Builder extends Object
Builds instances of typeImmutableSqlView. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableSqlViewbuild()Builds a newImmutableSqlView.ImmutableSqlView.Builderdialect(SqlView.Dialect dialect)Initializes the value for thedialectattribute.ImmutableSqlView.Builderfrom(Contents instance)Fill a builder with attribute values from the providedorg.projectnessie.model.Contentsinstance.ImmutableSqlView.Builderfrom(SqlView instance)Fill a builder with attribute values from the providedorg.projectnessie.model.SqlViewinstance.ImmutableSqlView.Builderid(String id)Initializes the value for theidattribute.ImmutableSqlView.BuildersqlText(String sqlText)Initializes the value for thesqlTextattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableSqlView.Builder from(Contents instance)
Fill a builder with attribute values from the providedorg.projectnessie.model.Contentsinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableSqlView.Builder from(SqlView instance)
Fill a builder with attribute values from the providedorg.projectnessie.model.SqlViewinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
id
@CanIgnoreReturnValue public final ImmutableSqlView.Builder id(String id)
Initializes the value for theidattribute.If not set, this attribute will have a default value as returned by the initializer of
id.- Parameters:
id- The value for id- Returns:
thisbuilder for use in a chained invocation
-
sqlText
@CanIgnoreReturnValue public final ImmutableSqlView.Builder sqlText(String sqlText)
Initializes the value for thesqlTextattribute.- Parameters:
sqlText- The value for sqlText- Returns:
thisbuilder for use in a chained invocation
-
dialect
@CanIgnoreReturnValue public final ImmutableSqlView.Builder dialect(SqlView.Dialect dialect)
Initializes the value for thedialectattribute.- Parameters:
dialect- The value for dialect- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableSqlView build()
Builds a newImmutableSqlView.- Returns:
- An immutable instance of SqlView
- Throws:
IllegalStateException- if any required attributes are missing
-
-