Interface CqlScript
-
- All Known Subinterfaces:
CqlDataSet
- All Known Implementing Classes:
AbstractCqlScript,DefaultCqlDataSet,ResourceCqlScript,StatementsCqlScript,StringCqlScript
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface CqlScript
CqlScriptinterface that loads CQL statements from various sources.- Since:
- 4.0.0
- Author:
- Dmytro Nosan
- See Also:
CqlDataSet,AbstractCqlScript,ResourceCqlScript,StringCqlScript,ofClassPath(String)
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidforEachStatement(Consumer<? super String> callback)Performs the providedcallbackfor each statement of theCqlScript.List<String>getStatements()GetsCQLstatements.static CqlScriptofClassPath(String name)CreatesCqlScriptwith the specified resource name and default charset.static CqlScriptofClassPath(String name, Charset charset)CreatesCqlScriptwith the specified resource name and charset.static CqlScriptofResource(Resource resource)CreatesCqlScriptwith the specified resource and default charset.static CqlScriptofResource(Resource resource, Charset charset)CreatesCqlScriptwith the specified resources and charset.static CqlScriptofStatements(String... statements)CreatesCqlScriptwith the specified statements.static CqlScriptofStatements(List<? extends String> statements)CreatesCqlScriptwith the specified statements.
-
-
-
Method Detail
-
ofClassPath
static CqlScript ofClassPath(String name)
CreatesCqlScriptwith the specified resource name and default charset.- Parameters:
name- the resource name- Returns:
- a new
CqlScript
-
ofClassPath
static CqlScript ofClassPath(String name, Charset charset)
CreatesCqlScriptwith the specified resource name and charset.- Parameters:
name- the resource namecharset- the encoding to use- Returns:
- a new
CqlScript
-
ofResource
static CqlScript ofResource(Resource resource)
CreatesCqlScriptwith the specified resource and default charset.- Parameters:
resource- the resource to use- Returns:
- a new
CqlScript - Since:
- 4.0.1
-
ofResource
static CqlScript ofResource(Resource resource, Charset charset)
CreatesCqlScriptwith the specified resources and charset.- Parameters:
resource- the resource to usecharset- the encoding to use- Returns:
- a new
CqlScript - Since:
- 4.0.1
-
ofStatements
static CqlScript ofStatements(String... statements)
CreatesCqlScriptwith the specified statements.- Parameters:
statements- the statements to use- Returns:
- a new
CqlScript - Since:
- 5.0.0
-
ofStatements
static CqlScript ofStatements(List<? extends String> statements)
CreatesCqlScriptwith the specified statements.- Parameters:
statements- the statements to use- Returns:
- a new
CqlScript - Since:
- 5.0.0
-
forEachStatement
default void forEachStatement(Consumer<? super String> callback)
Performs the providedcallbackfor each statement of theCqlScript.- Parameters:
callback- The action to be performed for each statement
-
-