Package org.apache.torque.generator.variable

# Klasse VariableStore

java.lang.Object
org.apache.torque.generator.variable.VariableStore

public class VariableStore extends Object
Stores all variables which are currently accessible.

- ## Konstruktorübersicht

  Konstruktoren
  Konstruktor
  Beschreibung
  `VariableStore()`

- ## Methodenübersicht

  Modifizierer und Typ
  Methode
  Beschreibung
  `void`
  `clear()`
  Removes all variables from this store.
  `void`
  `endFile()`
  Signals this store that the processing of one file has ended.
  `void`
  `endGeneration()`
  Signals this store that generation has ended.
  `void`
  `endOutlet()`
  Signals this store that the processing of a outlet has ended.
  `QualifiedNameMap<Variable>`
  `getContent()`
  Returns a map with the variables contained in this store.
  `Variable`
  `getInHierarchy(QualifiedName key)`
  Returns the most specific variable which is visible from the key's namespace and has the same name as the key's name.
  `void`
  `remove(Variable variable)`
  removes a variable from the store.
  `void`
  `set(Variable variable)`
  Sets a variable.
  `void`
  `startOutlet()`
  Signals this store that the processing of a outlet has started.

  ### Von Klasse geerbte Methoden java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Konstruktordetails

  - ### VariableStore

    public VariableStore()

- ## Methodendetails

  - ### set

    public void set(Variable variable)
    Sets a variable.
    Parameter:
      `variable` - the variable to set.
    Löst aus:
      `NullPointerException` - if variable is null.

  - ### remove

    public void remove(Variable variable)
    removes a variable from the store.
    Parameter:
      `variable` - the variable to remove, not null.
    Löst aus:
      `NullPointerException` - if variable is null.

  - ### startOutlet

    public void startOutlet()
    Signals this store that the processing of a outlet has started.

  - ### endOutlet

    public void endOutlet()
    Signals this store that the processing of a outlet has ended. Removes all variables with the scope `Variable.Scope.OUTLET`, and all variables with the scope `Variable.Scope.CHILDREN` which were set by the outlet which processing ended.

  - ### endFile

    public void endFile()
    Signals this store that the processing of one file has ended. Removes all variables with the scope `FILE`.

  - ### endGeneration

    public void endGeneration()
    Signals this store that generation has ended. Removes the variables from all scopes.

  - ### clear

    public void clear()
    Removes all variables from this store.

  - ### getContent

    public QualifiedNameMap<Variable> getContent()
    Returns a map with the variables contained in this store. Note that if one variable is hidden by another with a more specific scope, only the variable with the more specific scope is returned.

    The Map is not backed by this stores, i.e. adding and removing variables to the returned nmap has no effect on this store. However, the variables in the returned map are the variables in this store, i.e. setting the value of the variable will change the variable in this store.

    Note: The current store content is rebuilt each time this method is called. For this reason, `store.getInHierarchy(qualifiedName)` is much faster than `store.getContent().get(qualifiedName)`.

    Gibt zurück:
      a map with the variables contained ins this store, never null.

  - ### getInHierarchy

    public Variable getInHierarchy(QualifiedName key)
    Returns the most specific variable which is visible from the key's namespace and has the same name as the key's name. if several most specific variables are found in the different scopes, the one with the most specific scope is returned.
    Parameter:
      `key` - The key for the variable.
    Gibt zurück:
      the most specific matching variable, or null if no variable matches.