Class DatabaseMapInitTransformer
java.lang.Object
org.apache.torque.generator.source.transform.AttributeTransformer
org.apache.torque.templates.transformer.om.mapInit.DatabaseMapInitTransformer
- All Implemented Interfaces:
SourceTransformer
A transformer providing extra attributes for the generation of the
mapInit classes. It collects all tables for a database with the same name
and also sets attributes needed for java generation.
- Version:
- $Id: DatabaseMapInitTransformer.java 1896195 2021-12-20 17:41:20Z gk $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidsetDatabaseMapInitClassNameAttributes(SourceElement sourceElement, String databaseName, ControllerState controllerState) Sets the databaseMapInitClassName and baseDatabaseMapInitClassName attributes on a source element.transform(Object modelRoot, ControllerState controllerState)
-
Constructor Details
-
DatabaseMapInitTransformer
Constructor.- Throws:
SourceTransformerException- if the attribute map is malformed.
-
-
Method Details
-
transform
public SourceElement transform(Object modelRoot, ControllerState controllerState) throws SourceTransformerException - Specified by:
transformin interfaceSourceTransformer- Overrides:
transformin classAttributeTransformer- Throws:
SourceTransformerException
-
setDatabaseMapInitClassNameAttributes
public static void setDatabaseMapInitClassNameAttributes(SourceElement sourceElement, String databaseName, ControllerState controllerState) Sets the databaseMapInitClassName and baseDatabaseMapInitClassName attributes on a source element.- Parameters:
sourceElement- the element where the attribute should be set, not null.databaseName- the name of the database element, not null.controllerState- the controller state, not null.
-