Package org.apache.ibatis.builder.xml
Class XMLIncludeTransformer
java.lang.Object
org.apache.ibatis.builder.xml.XMLIncludeTransformer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MapperBuilderAssistantprivate final Configuration -
Constructor Summary
ConstructorsConstructorDescriptionXMLIncludeTransformer(Configuration configuration, MapperBuilderAssistant builderAssistant) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyIncludes(Node source) private voidapplyIncludes(Node source, Properties variablesContext, boolean included) Recursively apply includes through all SQL fragments.private NodefindSqlFragment(String refid, Properties variables) private StringgetStringAttribute(Node node, String name) private PropertiesgetVariablesContext(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)
-