Package com.fauna.query.template
Class FaunaTemplate.TemplatePart
- java.lang.Object
-
- com.fauna.query.template.FaunaTemplate.TemplatePart
-
- Enclosing class:
- FaunaTemplate
public static class FaunaTemplate.TemplatePart extends java.lang.Object
Represents a part of the template, which can either be a literal string or a variable placeholder.
-
-
Constructor Summary
Constructors Constructor Description TemplatePart(java.lang.String part, TemplatePartType type)
Constructs a new TemplatePart with the given text and type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getPart()
Retrieves the text of this part of the template.TemplatePartType
getType()
Retrieves the type of this part of the template.QueryFragment
toFragment(java.util.Map<java.lang.String,java.lang.Object> args)
-
-
-
Constructor Detail
-
TemplatePart
public TemplatePart(java.lang.String part, TemplatePartType type)
Constructs a new TemplatePart with the given text and type.- Parameters:
part
- the text of this part of the template.type
- the type of this part of the template.
-
-
Method Detail
-
getPart
public java.lang.String getPart()
Retrieves the text of this part of the template.- Returns:
- the text of this template part.
-
getType
public TemplatePartType getType()
Retrieves the type of this part of the template.- Returns:
- the type of this template part.
-
toFragment
public QueryFragment toFragment(java.util.Map<java.lang.String,java.lang.Object> args)
-
-