class EmbeddedDatabaseBeanDefinitionParser extends AbstractBeanDefinitionParser
BeanDefinitionParser
that
parses an embedded-database
element and creates a BeanDefinition
for an EmbeddedDatabaseFactoryBean
.
Picks up nested script
elements and configures a
ResourceDatabasePopulator
for each of them.
DatabasePopulatorConfigUtils
Modifier and Type | Field and Description |
---|---|
(package private) static java.lang.String |
DB_NAME_ATTRIBUTE
Constant for the "database-name" attribute.
|
(package private) static java.lang.String |
GENERATE_NAME_ATTRIBUTE
Constant for the "generate-name" attribute.
|
ID_ATTRIBUTE, NAME_ATTRIBUTE
Constructor and Description |
---|
EmbeddedDatabaseBeanDefinitionParser() |
Modifier and Type | Method and Description |
---|---|
protected AbstractBeanDefinition |
parseInternal(org.w3c.dom.Element element,
ParserContext parserContext)
Central template method to actually parse the supplied
Element
into one or more BeanDefinitions . |
private void |
setDatabaseName(org.w3c.dom.Element element,
BeanDefinitionBuilder builder) |
private void |
setDatabaseType(org.w3c.dom.Element element,
BeanDefinitionBuilder builder) |
private void |
setGenerateUniqueDatabaseNameFlag(org.w3c.dom.Element element,
BeanDefinitionBuilder builder) |
protected boolean |
shouldGenerateIdAsFallback()
Should an ID be generated instead if the passed in
Element does not
specify an "id" attribute explicitly? |
parse, postProcessComponentDefinition, registerBeanDefinition, resolveId, shouldFireEvents, shouldGenerateId, shouldParseNameAsAliases
static final java.lang.String DB_NAME_ATTRIBUTE
static final java.lang.String GENERATE_NAME_ATTRIBUTE
protected AbstractBeanDefinition parseInternal(org.w3c.dom.Element element, ParserContext parserContext)
AbstractBeanDefinitionParser
Element
into one or more BeanDefinitions
.parseInternal
in class AbstractBeanDefinitionParser
element
- the element that is to be parsed into one or more BeanDefinitions
parserContext
- the object encapsulating the current state of the parsing process;
provides access to a BeanDefinitionRegistry
BeanDefinition
resulting from the parsing of the supplied Element
AbstractBeanDefinitionParser.parse(org.w3c.dom.Element, ParserContext)
,
AbstractBeanDefinitionParser.postProcessComponentDefinition(org.springframework.beans.factory.parsing.BeanComponentDefinition)
protected boolean shouldGenerateIdAsFallback()
AbstractBeanDefinitionParser
Element
does not
specify an "id" attribute explicitly?
Disabled by default; subclasses can override this to enable ID generation as fallback: The parser will first check for an "id" attribute in this case, only falling back to a generated ID if no value was specified.
shouldGenerateIdAsFallback
in class AbstractBeanDefinitionParser
private void setGenerateUniqueDatabaseNameFlag(org.w3c.dom.Element element, BeanDefinitionBuilder builder)
private void setDatabaseName(org.w3c.dom.Element element, BeanDefinitionBuilder builder)
private void setDatabaseType(org.w3c.dom.Element element, BeanDefinitionBuilder builder)