Class QueryTemplateReferenceImpl

All Implemented Interfaces:
Serializable, Element, PropertyElement, SchemaMixedElement, ModelElement, Property, QueryTemplateReference

public class QueryTemplateReferenceImpl extends PropertyImpl implements QueryTemplateReference
The default implementation of the QueryTemplateReference interface.
Author:
Luca Frosini (ISTI CNR)
See Also:
  • Field Details

    • name

      protected String name
      The name of the query template.
    • variables

      protected Map<String,Object> variables
      The variables of the query template.
  • Constructor Details

    • QueryTemplateReferenceImpl

      public QueryTemplateReferenceImpl()
  • Method Details

    • getName

      public String getName()
      Returns the name of the referenced query template.
      Specified by:
      getName in interface QueryTemplateReference
      Returns:
      The template name.
    • setName

      public void setName(String name)
      Sets the name of the referenced query template.
      Specified by:
      setName in interface QueryTemplateReference
      Parameters:
      name - The template name.
    • getVariables

      public Map<String,Object> getVariables()
      Returns the values for the template variables.
      Specified by:
      getVariables in interface QueryTemplateReference
      Returns:
      A map of variable names to their values.
    • setVariables

      public void setVariables(Map<String,Object> variables)
      Sets the values for the template variables.
      Specified by:
      setVariables in interface QueryTemplateReference
      Parameters:
      variables - A map of variable names to their values.
    • addVariable

      public void addVariable(String name, Object value)
      Adds or updates a single variable's value.
      Specified by:
      addVariable in interface QueryTemplateReference
      Parameters:
      name - The name of the variable.
      value - The value of the variable.