Class AbstractScript.Builder<T extends AbstractScript.Builder<T>>
- java.lang.Object
-
- com.exasol.dbbuilder.dialects.AbstractSchemaChild.Builder
-
- com.exasol.dbbuilder.dialects.exasol.AbstractScript.Builder<T>
-
- Type Parameters:
T- this type
- Direct Known Subclasses:
BucketFsContentAdapterScriptBuilder,Script.Builder
- Enclosing class:
- AbstractScript
public abstract static class AbstractScript.Builder<T extends AbstractScript.Builder<T>> extends AbstractSchemaChild.Builder
Abstract builder forAbstractScript.
-
-
Field Summary
-
Fields inherited from class com.exasol.dbbuilder.dialects.AbstractSchemaChild.Builder
owned
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder(ExasolImmediateDatabaseObjectWriter writer, Schema parentSchema, com.exasol.db.Identifier name)Create a builder.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Tcontent(String content)Set the content of the script (i.e.Tcontent(Path path)Load the script content from a file.protected abstract TgetSelf()Get this.protected ExasolImmediateDatabaseObjectWritergetWriter()Get the object writer.protected voidvalidate()Validate the fields.-
Methods inherited from class com.exasol.dbbuilder.dialects.AbstractSchemaChild.Builder
requireNotNull
-
-
-
-
Constructor Detail
-
Builder
protected Builder(ExasolImmediateDatabaseObjectWriter writer, Schema parentSchema, com.exasol.db.Identifier name)
Create a builder.- Parameters:
writer- object writerparentSchema- parent schemaname- script name
-
-
Method Detail
-
content
public T content(String content)
Set the content of the script (i.e. the implementation).- Parameters:
content- script content- Returns:
thisfor fluent programming
-
content
public T content(Path path) throws IOException
Load the script content from a file.- Parameters:
path- path to file containing the script content- Returns:
thisfor fluent programming- Throws:
IOException- in case the file could not be read
-
validate
protected void validate()
Description copied from class:AbstractSchemaChild.BuilderValidate the fields. Call this inbuild().- Overrides:
validatein classAbstractSchemaChild.Builder
-
getSelf
protected abstract T getSelf()
Get this.- Returns:
- self
-
getWriter
protected ExasolImmediateDatabaseObjectWriter getWriter()
Get the object writer.- Returns:
- object writer
-
-