xdoclet.modules.hibernate

Class HibernateTagsHandler

public class HibernateTagsHandler extends XDocletTagSupport

Specific tags handler to make the template easy.

Version: $Revision: 1.38 $

Author: Sibastien Guimont (sebastieng@sympatico.ca)

UNKNOWN: August 9th, 2002 namespace = "Hibernate"

Method Summary
StringcomputeColumnName(Properties attributes)
The column name for a component is prefix + basename
StringdataSource()
Data source JNDI Name extractor.
Stringdialect()
SQL dialect extractor.
Stringdriver()
Driver Name extractor.
StringfactoryClass()
classname extractor.
voidforAllJndiProperties(String template, Properties attributes)
Iterates over all jndiProperties specified.
voidforAllOtherMappings(String template, Properties attributes)
Iterates over all otherMappings specified.
voidforAllOtherProperties(String template, Properties attributes)
Iterates over all otherProperties specified.
voidforAllPersistentClasses(String template, Properties attributes)
Iterates over all classes marked as persistent.
voidforAllSubclasses(String template, Properties attributes)
Iterates over all classes loaded by javadoc that are direct subclasses of the current class and evaluates the body of the tag for each class.
StringgetCurrentMappingElement(Properties attributes)
StringgetCurrentTag(Properties attributes)
FactoryClassSubTaskgetFactoryClassSubTask()
StringgetFileName()
Returns full path of hibernate file for the current class.
HibernatePropertiesgetHibernateProperties()
XMethodgetIdMethod()
find id property of current class.
JBossServiceSubTaskgetJBossServiceSubTask()
voidifCurrentMappingElementIsnt(String template, Properties attributes)
Render template if the current mapping element is not the one specified.
voidifGeneratePropertyCache(String template, Properties attributes)
Render template if all of the properties needed are valid.
voidifHasCompositeId(String template, Properties attributes)
Render template if ID is composite.
voidifHasJndiName(String template, Properties attributes)
Render template if jndiName of JBossServiceSubtask is valid.
voidifHasPrimitiveId(String template, Properties attributes)
Render template if id is primitive.
voidifNotHasJndiName(String template, Properties attributes)
Render template if jndiName of JBossServiceSubtask is not valid.
voidifNotUseJndiFactory(String template, Properties attributes)
Render template if jndiName of JBossServiceSubtask is valid.
voidifUseJndiFactory(String template, Properties attributes)
Render template if jndiName of JBossServiceSubtask is valid.
StringjdbcUrl()
JDBC URL extractor.
StringjndiName()
Configured JNDI name.
StringjndiParameterName()
StringjndiParameterValue()
voidlogMapping(Properties attributes)
Print the name of the current class to the console.
StringmappingList()
Comma separated list of hibernate mappings.
StringotherMappingName()
StringotherMappingValue()
StringotherParameterName()
StringotherParameterValue()
Stringpassword()
password extractor.
StringpoolSize()
poolSize extractor.
StringroleAttribute(Properties attributes)
Get the attribute used for collection property names in this version of Hibernate (ie.
StringserviceClassName(Properties attributes)
Get the name of the class the implements the SessionFactory as a MBean is this version of Hibernate.
StringserviceName()
Return configured service name.
voidsetColumnPrefix(String template, Properties attributes)
Set the prefix for the \@hibernate.component, as there may be more than one component in a class that refer to the same target class.
voidsetCurrentTag(String template, Properties attributes)
StringuserName()
username extractor.

Method Detail

computeColumnName

public String computeColumnName(Properties attributes)
The column name for a component is prefix + basename

Parameters: attributes

Returns:

dataSource

public String dataSource()
Data source JNDI Name extractor.

Returns:

Throws: XDocletException

UNKNOWN: type = "content"

dialect

public String dialect()
SQL dialect extractor.

Returns:

Throws: XDocletException

UNKNOWN: type = "content"

driver

public String driver()
Driver Name extractor.

Returns:

Throws: XDocletException

UNKNOWN: type = "content"

factoryClass

public String factoryClass()
classname extractor.

Returns:

Throws: XDocletException

UNKNOWN: type = "content"

forAllJndiProperties

public void forAllJndiProperties(String template, Properties attributes)
Iterates over all jndiProperties specified.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException Description of Exception

UNKNOWN: type = "block"

forAllOtherMappings

public void forAllOtherMappings(String template, Properties attributes)
Iterates over all otherMappings specified.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException Description of Exception

UNKNOWN: type = "block"

forAllOtherProperties

public void forAllOtherProperties(String template, Properties attributes)
Iterates over all otherProperties specified.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException Description of Exception

UNKNOWN: type = "block"

forAllPersistentClasses

public void forAllPersistentClasses(String template, Properties attributes)
Iterates over all classes marked as persistent.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException Description of Exception

UNKNOWN: type = "block"

forAllSubclasses

public void forAllSubclasses(String template, Properties attributes)
Iterates over all classes loaded by javadoc that are direct subclasses of the current class and evaluates the body of the tag for each class. It discards classes that have an xdoclet-generated class tag defined.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException Description of Exception

UNKNOWN: type = "block"

getCurrentMappingElement

public String getCurrentMappingElement(Properties attributes)

getCurrentTag

public String getCurrentTag(Properties attributes)

getFactoryClassSubTask

public FactoryClassSubTask getFactoryClassSubTask()

getFileName

public String getFileName()
Returns full path of hibernate file for the current class.

Returns: The full file path of the current class.

Throws: XDocletException

UNKNOWN: type = "content"

getHibernateProperties

public HibernateProperties getHibernateProperties()

getIdMethod

public XMethod getIdMethod()
find id property of current class.

Returns:

Throws: XDocletException

getJBossServiceSubTask

public JBossServiceSubTask getJBossServiceSubTask()

ifCurrentMappingElementIsnt

public void ifCurrentMappingElementIsnt(String template, Properties attributes)
Render template if the current mapping element is not the one specified.

Parameters: template the template attributes the tag attributes

Throws: XDocletException

UNKNOWN: type = "block"

ifGeneratePropertyCache

public void ifGeneratePropertyCache(String template, Properties attributes)
Render template if all of the properties needed are valid.

Parameters: template attributes

Throws: XDocletException

UNKNOWN: type = "block"

ifHasCompositeId

public void ifHasCompositeId(String template, Properties attributes)
Render template if ID is composite.

Parameters: template attributes

Throws: XDocletException

UNKNOWN: type = "block"

ifHasJndiName

public void ifHasJndiName(String template, Properties attributes)
Render template if jndiName of JBossServiceSubtask is valid. This is a required parameter, but the user might not be using that subtask.

Parameters: template attributes

Throws: XDocletException

UNKNOWN: type = "block"

ifHasPrimitiveId

public void ifHasPrimitiveId(String template, Properties attributes)
Render template if id is primitive.

Parameters: template attributes

Throws: XDocletException

UNKNOWN: type = "block"

ifNotHasJndiName

public void ifNotHasJndiName(String template, Properties attributes)
Render template if jndiName of JBossServiceSubtask is not valid.

Parameters: template attributes

Throws: XDocletException

UNKNOWN: type = "block"

ifNotUseJndiFactory

public void ifNotUseJndiFactory(String template, Properties attributes)
Render template if jndiName of JBossServiceSubtask is valid. This is a required parameter, but the user might not be using that subtask.

Parameters: template attributes

Throws: XDocletException

UNKNOWN: type = "block"

ifUseJndiFactory

public void ifUseJndiFactory(String template, Properties attributes)
Render template if jndiName of JBossServiceSubtask is valid. This is a required parameter, but the user might not be using that subtask.

Parameters: template attributes

Throws: XDocletException

UNKNOWN: type = "block"

jdbcUrl

public String jdbcUrl()
JDBC URL extractor.

Returns:

Throws: XDocletException

UNKNOWN: type = "content"

jndiName

public String jndiName()
Configured JNDI name.

Returns:

Throws: XDocletException

UNKNOWN: type = "content"

jndiParameterName

public String jndiParameterName()

jndiParameterValue

public String jndiParameterValue()

logMapping

public void logMapping(Properties attributes)
Print the name of the current class to the console.

Parameters: attributes

Throws: XDocletException

UNKNOWN: type = "content"

mappingList

public String mappingList()
Comma separated list of hibernate mappings.

Returns:

Throws: XDocletException

UNKNOWN: type = "content"

otherMappingName

public String otherMappingName()

otherMappingValue

public String otherMappingValue()

otherParameterName

public String otherParameterName()

otherParameterValue

public String otherParameterValue()

password

public String password()
password extractor.

Returns:

Throws: XDocletException

UNKNOWN: type = "content"

poolSize

public String poolSize()
poolSize extractor.

Returns:

Throws: XDocletException

UNKNOWN: type = "content"

roleAttribute

public String roleAttribute(Properties attributes)
Get the attribute used for collection property names in this version of Hibernate (ie. "role" or "name").

Parameters: attributes

Returns:

serviceClassName

public String serviceClassName(Properties attributes)
Get the name of the class the implements the SessionFactory as a MBean is this version of Hibernate.

Parameters: attributes

Returns:

serviceName

public String serviceName()
Return configured service name.

Returns:

Throws: XDocletException

UNKNOWN: type = "content"

setColumnPrefix

public void setColumnPrefix(String template, Properties attributes)
Set the prefix for the \@hibernate.component, as there may be more than one component in a class that refer to the same target class.

Parameters: template attributes

Throws: XDocletException

setCurrentTag

public void setCurrentTag(String template, Properties attributes)

userName

public String userName()
username extractor.

Returns:

Throws: XDocletException

UNKNOWN: type = "content"