Enum ParsedTemplate.Type
java.lang.Object
java.lang.Enum<ParsedTemplate.Type>
io.nosqlbench.virtdata.core.templates.ParsedTemplate.Type
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ParsedTemplate.Type>,java.lang.constant.Constable
- Enclosing class:
- ParsedTemplate
public static enum ParsedTemplate.Type extends java.lang.Enum<ParsedTemplate.Type>
The type of a parsed template depends on the structure of the bindings provided.
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description bindrefA bindref template is one which has only a single bind point and no leading or trailing text.concatA string template is one which is neither a literal template nor a bindref template.literalA literal template is one which has no bindings that need to be provided to render a specific statement. -
Method Summary
Modifier and Type Method Description static ParsedTemplate.TypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ParsedTemplate.Type[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
literal
A literal template is one which has no bindings that need to be provided to render a specific statement. These templates are basically static statements. Example:truncate testks.testtable; -
bindref
A bindref template is one which has only a single bind point and no leading or trailing text. It represents a single value which is to be injected, with no clear indication as to whether the value should be in string form or not. These are used when referencing objects by bind point name. Callers which use rawbind templates where Strings are needed should convert them withObject.toString()} Example:{myvalue} -
concat
A string template is one which is neither a literal template nor a bindref template. This includes any template which has any amount of literal text and any template with more than one bind point.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-