Package org.apache.ibatis.builder.xml
Class XMLIncludeTransformer
java.lang.Object
org.apache.ibatis.builder.xml.XMLIncludeTransformer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MapperBuilderAssistant
private final Configuration
-
Constructor Summary
ConstructorsConstructorDescriptionXMLIncludeTransformer
(Configuration configuration, MapperBuilderAssistant builderAssistant) -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyIncludes
(Node source) private void
applyIncludes
(Node source, Properties variablesContext, boolean included) Recursively apply includes through all SQL fragments.private Node
findSqlFragment
(String refid, Properties variables) private String
getStringAttribute
(Node node, String name) private Properties
getVariablesContext
(Node node, Properties inheritedVariablesContext) Read placeholders and their values from include node definition.
-
Field Details
-
configuration
-
builderAssistant
-
-
Constructor Details
-
XMLIncludeTransformer
-
-
Method Details
-
applyIncludes
-
applyIncludes
Recursively apply includes through all SQL fragments.- Parameters:
source
- Include node in DOM treevariablesContext
- Current context for static variables with values
-
findSqlFragment
-
getStringAttribute
-
getVariablesContext
Read placeholders and their values from include node definition.- Parameters:
node
- Include node instanceinheritedVariablesContext
- Current context used for replace variables in new variables values- Returns:
- variables context from include instance (no inherited values)
-