Class OMTableAndViewTransformer
java.lang.Object
org.apache.torque.generator.source.transform.AttributeTransformer
org.apache.torque.templates.transformer.om.OMTableAndViewTransformer
- All Implemented Interfaces:
SourceTransformer
Transforms the tables and views in the OM model.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateInheritanceColumnChildIfNecessary(SourceElement tableElement) protected voidsetCreateDefaultDateMethodsAttributes(SourceElement tableElement) protected voidsetFieldNameAttribute(SourceElement tableElement) Sets the fieldName attribute of the table element if it is not already set.protected voidsetIdMethodAttribute(SourceElement tableElement) static voidsetJavaNameAttribute(SourceElement tableElement, ControllerState controllerState) Sets the javaName attribute of the table element, if not already set.protected voidsetManagerClassNameAttributes(SourceElement tableElement, ControllerState controllerState) protected voidsetPeerImplFieldNameAttribute(SourceElement tableElement) Sets the peerImplFieldName attribute of the table element if it is not already set.static voidsetPeerImplGetterAttribute(SourceElement tableElement) Sets the peerImplGetter attribute of the table element if it is not already set.protected voidsetPeerImplSetterAttribute(SourceElement tableElement) Sets the peerImplSetter attribute of the table element if it is not already set.protected voidsetSaveAttributes(SourceElement tableElement, ControllerState controllerState) protected voidsetSequenceAttributeIfNecessary(SourceElement tableElement) protected voidsetUnqualifiedNameAttribute(SourceElement tableElement) transform(Object tableModel, ControllerState controllerState)
-
Constructor Details
-
OMTableAndViewTransformer
- Throws:
SourceTransformerException
-
-
Method Details
-
transform
public SourceElement transform(Object tableModel, ControllerState controllerState) throws SourceTransformerException - Specified by:
transformin interfaceSourceTransformer- Overrides:
transformin classAttributeTransformer- Throws:
SourceTransformerException
-
setJavaNameAttribute
public static void setJavaNameAttribute(SourceElement tableElement, ControllerState controllerState) throws SourceTransformerException Sets the javaName attribute of the table element, if not already set.- Parameters:
tableElement- the table element, not null.controllerState- the controller state, not null.- Throws:
SourceTransformerException- if both attributes javaName and name are not set on the tableElement.
-
setUnqualifiedNameAttribute
-
setIdMethodAttribute
- Throws:
SourceTransformerException
-
setSequenceAttributeIfNecessary
-
setManagerClassNameAttributes
protected void setManagerClassNameAttributes(SourceElement tableElement, ControllerState controllerState) throws SourceTransformerException - Throws:
SourceTransformerException
-
createInheritanceColumnChildIfNecessary
public void createInheritanceColumnChildIfNecessary(SourceElement tableElement) throws SourceTransformerException - Throws:
SourceTransformerException
-
setFieldNameAttribute
Sets the fieldName attribute of the table element if it is not already set. The field name can be used to contain a database object corresponding to the table. The javaName attribute of the column must be set.- Parameters:
tableElement- the table element, not null.
-
setPeerImplFieldNameAttribute
Sets the peerImplFieldName attribute of the table element if it is not already set. The field name can be used to contain a peer object corresponding to the table. The peerImplClassName attribute of the column must be already set when this method is called.- Parameters:
tableElement- the table element, not null.
-
setPeerImplGetterAttribute
Sets the peerImplGetter attribute of the table element if it is not already set. The peerImplClassName attribute of the column must be already set when this method is called.- Parameters:
tableElement- the table element, not null.
-
setPeerImplSetterAttribute
Sets the peerImplSetter attribute of the table element if it is not already set. The peerImplClassName attribute of the column must be already set when this method is called.- Parameters:
tableElement- the table element, not null.
-
setSaveAttributes
-
setCreateDefaultDateMethodsAttributes
-