Klasse VariableStore
java.lang.Object
org.apache.torque.generator.variable.VariableStore
Stores all variables which are currently accessible.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
clear()
Removes all variables from this store.void
endFile()
Signals this store that the processing of one file has ended.void
Signals this store that generation has ended.void
Signals this store that the processing of a outlet has ended.Returns a map with the variables contained in this store.Returns the most specific variable which is visible from the key's namespace and has the same name as the key's name.void
removes a variable from the store.void
Sets a variable.void
Signals this store that the processing of a outlet has started.
-
Konstruktordetails
-
VariableStore
public VariableStore()
-
-
Methodendetails
-
set
Sets a variable.- Parameter:
variable
- the variable to set.- Löst aus:
NullPointerException
- if variable is null.
-
remove
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 scopeVariable.Scope.OUTLET
, and all variables with the scopeVariable.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 scopeFILE
. -
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
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 thanstore.getContent().get(qualifiedName)
.- Gibt zurück:
- a map with the variables contained ins this store, never null.
-
getInHierarchy
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.
-