xdoclet.modules.hibernate

Class HibernateSubTask

public class HibernateSubTask extends XmlSubTask

This task generates Hibernate xml mapping file for a given class. Supports Hibernate 1.1, 2.0, 2.1 & 3.0.

Version: $Revision: 1.12 $

Author: Sibastien Guimont (sebastieng@sympatico.ca) David Channon

UNKNOWN: August 9th, 2002 name = "hibernate" display-name = "Hibernate Mapping File" parent = "xdoclet.modules.hibernate.HibernateDocletTask" file = "hibernate-properties.xml" relates-to = "{0}.hbm.xml" description = "An XML unparsed entity * containing additional property mappings for all classes." file = "hibernate-properties-{0}.xml" relates-to = "{0}.hbm.xml" description = "An XML unparsed * entity containing additional property mappings for a class."

Nested Class Summary
static classHibernateSubTask.HibernateVersion
Field Summary
static StringDEFAULT_HIBERNATE_CLASS_PATTERN
Constructor Summary
HibernateSubTask()
Constructor for the HibernateSubTask object.
Method Summary
protected voidengineStarted()
Called when the engine is started
voidexecute()
Generate Mapping file (*.hbm.xml).
StringgetGeneratedFileName(XClass clazz)
StringgetMappingURL(XClass clazz)
StringgetVersion()
Get the Hibernate version.
protected booleanprocessInnerClasses()
Since we want to support static inner classes, we set this to true.
voidsetVersion(HibernateSubTask.HibernateVersion version)
Sets the hibernate version to use.

Field Detail

DEFAULT_HIBERNATE_CLASS_PATTERN

public static final String DEFAULT_HIBERNATE_CLASS_PATTERN

Constructor Detail

HibernateSubTask

public HibernateSubTask()
Constructor for the HibernateSubTask object.

Method Detail

engineStarted

protected void engineStarted()
Called when the engine is started

Throws: XDocletException Thrown in case of problem

execute

public void execute()
Generate Mapping file (*.hbm.xml).

Throws: XDocletException

getGeneratedFileName

public String getGeneratedFileName(XClass clazz)

getMappingURL

public String getMappingURL(XClass clazz)

getVersion

public String getVersion()
Get the Hibernate version.

Returns:

processInnerClasses

protected boolean processInnerClasses()
Since we want to support static inner classes, we set this to true.

Returns: true

setVersion

public void setVersion(HibernateSubTask.HibernateVersion version)
Sets the hibernate version to use. Legal values are "1.1", "2.0", "2.1" and "3.0".

Parameters: version

UNKNOWN: "No. Default is '1.1'".