net.sf.hibernate.tool.hbm2java
Class AbstractRenderer

java.lang.Object
  extended by net.sf.hibernate.tool.hbm2java.AbstractRenderer
All Implemented Interfaces:
Renderer
Direct Known Subclasses:
BasicRenderer, FinderRenderer, SLSBperEntityRenderer, VelocityRenderer

public abstract class AbstractRenderer
extends Object
implements Renderer

Author:
max

Constructor Summary
AbstractRenderer()
           
 
Method Summary
 void configure(Properties props)
          Called with the optional list of properties from config.xml
protected  void genPackageDelaration(String savedToPackage, ClassMapping classMapping, PrintWriter w)
           
 String getFieldScope(FieldProperty field, String localScopeName, String defaultScope)
           
 String getPackageDeclaration(String savedToPackage, ClassMapping classMapping)
           
 String getSaveToClassName(ClassMapping classMapping)
          Called by the generator to determine the class name of the rendered class.
 String getSaveToPackage(ClassMapping classMapping)
          Called by the generator to determine the package name of the rendered class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.hibernate.tool.hbm2java.Renderer
render
 

Constructor Detail

AbstractRenderer

public AbstractRenderer()
Method Detail

configure

public void configure(Properties props)
Description copied from interface: Renderer
Called with the optional list of properties from config.xml

Specified by:
configure in interface Renderer

getFieldScope

public String getFieldScope(FieldProperty field,
                            String localScopeName,
                            String defaultScope)

getPackageDeclaration

public String getPackageDeclaration(String savedToPackage,
                                    ClassMapping classMapping)

genPackageDelaration

protected void genPackageDelaration(String savedToPackage,
                                    ClassMapping classMapping,
                                    PrintWriter w)

getSaveToClassName

public String getSaveToClassName(ClassMapping classMapping)
Description copied from interface: Renderer
Called by the generator to determine the class name of the rendered class.

Specified by:
getSaveToClassName in interface Renderer
Parameters:
classMapping - The class mapping of the generated class
Returns:
the class name the class should be saved to

getSaveToPackage

public String getSaveToPackage(ClassMapping classMapping)
Description copied from interface: Renderer
Called by the generator to determine the package name of the rendered class.

Specified by:
getSaveToPackage in interface Renderer
Parameters:
classMapping - The class mapping of the generated class
Returns:
the package name the class should be saved to