|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectxdoclet.DocletSupport
xdoclet.SubTask
xdoclet.TemplateSubTask
xdoclet.XmlSubTask
xdoclet.modules.hibernate.HibernateCfgSubTask
public class HibernateCfgSubTask
Generate the hibernate.cfg.xml file. It lists all of the properties as well as a property for each hbm.xml file. This file can be used for creating and installing a SessionFactory in JNDI as well as launching Hibern8IDE.
| Nested Class Summary | |
|---|---|
static class |
HibernateCfgSubTask.HibernateCFGVersion
Based on Matt Raible's code for the Hibernate sub-task. |
| Nested classes/interfaces inherited from class xdoclet.TemplateSubTask |
|---|
TemplateSubTask.ExtentTypes, TemplateSubTask.OfType |
| Field Summary |
|---|
| Fields inherited from class xdoclet.DocletSupport |
|---|
currentClassTag, currentFieldTag, currentMethodTag |
| Constructor Summary | |
|---|---|
HibernateCfgSubTask()
Constructor for the HibernateSubTask object |
|
| Method Summary | |
|---|---|
void |
addConfiguredJndiProperty(org.apache.tools.ant.types.Parameter jndiProperty)
These elements allow you to add properties to the JNDI context. |
void |
addOtherMapping(org.apache.tools.ant.types.Parameter otherMapping)
These elements allow you to add arbitrary mappings to cfg.xml file. |
void |
addOtherProperty(org.apache.tools.ant.types.Parameter otherProperty)
These elements allow you to add arbitrary properties to cfg.xml file. |
protected void |
engineStarted()
Called when the engine is started |
void |
execute()
Generate Hibernate Configuration file (hibernate.cfg.xml). |
java.lang.String |
getCacheProviderClass()
|
java.lang.String |
getCglibUseReflectionOptimizer()
|
java.lang.String |
getDataSource()
|
java.lang.String |
getDefaultSchema()
|
java.lang.String |
getDialect()
|
java.lang.String |
getDriver()
|
java.lang.String |
getHbm2ddl()
|
java.lang.String |
getJdbcUrl()
|
java.lang.String |
getJndiName()
|
java.util.Collection |
getJndiProperties()
|
java.util.Collection |
getOtherMappings()
|
java.util.Collection |
getOtherProperties()
|
java.lang.String |
getPassword()
|
java.lang.String |
getPoolSize()
|
boolean |
getShowSql()
|
java.lang.String |
getTransactionManagerFactory()
|
java.lang.String |
getTransactionManagerLookup()
|
java.lang.String |
getTransactionManagerStrategy()
|
boolean |
getUseOuterJoin()
|
java.lang.String |
getUserName()
|
java.lang.String |
getUserTransactionName()
|
java.lang.String |
getVersion()
Get the Hibernate configuration DTD version. |
void |
setCacheProviderClass(java.lang.String string)
The classname of a custom CacheProvider. |
void |
setCglibUseReflectionOptimizer(java.lang.String string)
Enables use of CGLIB instead of runtime reflection (System-level property, default is to use CGLIB where possible). |
void |
setDataSource(java.lang.String dataSource)
JNDI name of data source to use in the session factory. |
void |
setDefaultSchema(java.lang.String string)
Qualify unqualified tablenames with the given schema/tablespace in generated SQL. |
void |
setDialect(java.lang.String dialect)
SQL dialect of the database. |
void |
setDriver(java.lang.String driver)
JDBC Driver to make database connection. |
void |
setHbm2ddl(java.lang.String hbm2ddl)
Automatically export schema DDL to the database when the SessionFactory is created. |
void |
setJdbcUrl(java.lang.String jdbcUrl)
URL for the JDBC Driver to make the connection to the database. |
void |
setJndiName(java.lang.String jndiName)
JNDI name to bind to the SessionFactory |
void |
setPassword(java.lang.String password)
Use this password to login to the database |
void |
setPoolSize(java.lang.String poolSize)
Hibernate connection pool size. |
void |
setShowSql(boolean showSql)
Log sql statements. |
void |
setTransactionManagerFactory(java.lang.String string)
The classname of a TransactionFactory to use with Hibernate Transaction API (defaults to JDBCTransactionFactory). |
void |
setTransactionManagerLookup(java.lang.String transactionManagerLookup)
The fully qualified class name of the Hibernate TransactionFactory implementation. |
void |
setTransactionManagerStrategy(java.lang.String transactionManagerStrategy)
Strategy for obtaining the JTA TransactionManager |
void |
setUseOuterJoin(boolean useOuterJoin)
Whether to use outer join |
void |
setUserName(java.lang.String userName)
Use this user name to login to the database |
void |
setUserTransactionName(java.lang.String userTransactionName)
The JNDI name of the JTA UserTransaction object |
void |
setVersion(HibernateCfgSubTask.HibernateCFGVersion version)
Sets the hibernate configuration DTD version to use. |
void |
validateOptions()
Called to validate configuration parameters. |
| Methods inherited from class xdoclet.XmlSubTask |
|---|
copyAttributesFrom, engineFinished, getDtdURL, getPublicId, getSchema, getSchemaURL, getSystemId, getUseIds, getXmlencoding, isValidateXML, setDtdURL, setPublicId, setSchema, setSchemaURL, setSystemId, setUseIds, setValidateXML, setXmlencoding, startProcess |
| Methods inherited from class xdoclet.SubTask |
|---|
addConfigParam, getConfigParams, getConfigParamsAsMap, getContext, getDestDir, getMergeDir, getSubTaskName, getXJavaDoc, setDestDir, setMergeDir, setSubTaskName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HibernateCfgSubTask()
| Method Detail |
|---|
public java.lang.String getVersion()
public java.lang.String getHbm2ddl()
public java.lang.String getTransactionManagerLookup()
public java.util.Collection getJndiProperties()
getJndiProperties in interface xdoclet.modules.hibernate.HibernatePropertiespublic java.util.Collection getOtherProperties()
getOtherProperties in interface xdoclet.modules.hibernate.HibernatePropertiespublic java.util.Collection getOtherMappings()
getOtherMappings in interface xdoclet.modules.hibernate.HibernatePropertiespublic java.lang.String getTransactionManagerStrategy()
getTransactionManagerStrategy in interface xdoclet.modules.hibernate.HibernatePropertiespublic java.lang.String getUserTransactionName()
getUserTransactionName in interface xdoclet.modules.hibernate.HibernatePropertiespublic java.lang.String getUserName()
getUserName in interface xdoclet.modules.hibernate.HibernatePropertiespublic java.lang.String getPassword()
getPassword in interface xdoclet.modules.hibernate.HibernatePropertiespublic boolean getUseOuterJoin()
getUseOuterJoin in interface xdoclet.modules.hibernate.HibernatePropertiespublic boolean getShowSql()
getShowSql in interface xdoclet.modules.hibernate.HibernatePropertiespublic java.lang.String getJndiName()
getJndiName in interface xdoclet.modules.hibernate.HibernatePropertiespublic java.lang.String getDataSource()
getDataSource in interface xdoclet.modules.hibernate.HibernatePropertiespublic java.lang.String getDialect()
getDialect in interface xdoclet.modules.hibernate.HibernatePropertiespublic java.lang.String getDriver()
getDriver in interface xdoclet.modules.hibernate.HibernatePropertiespublic java.lang.String getJdbcUrl()
getJdbcUrl in interface xdoclet.modules.hibernate.HibernatePropertiespublic java.lang.String getPoolSize()
getPoolSize in interface xdoclet.modules.hibernate.HibernatePropertiespublic java.lang.String getCacheProviderClass()
public java.lang.String getCglibUseReflectionOptimizer()
public java.lang.String getDefaultSchema()
public java.lang.String getTransactionManagerFactory()
public void setVersion(HibernateCfgSubTask.HibernateCFGVersion version)
version - public void setHbm2ddl(java.lang.String hbm2ddl)
hbm2ddl - public void setPoolSize(java.lang.String poolSize)
poolSize - public void setJdbcUrl(java.lang.String jdbcUrl)
jdbcUrl - public void setTransactionManagerStrategy(java.lang.String transactionManagerStrategy)
transactionManagerStrategy - public void setUserTransactionName(java.lang.String userTransactionName)
userTransactionName - public void setTransactionManagerLookup(java.lang.String transactionManagerLookup)
transactionManagerLookup - public void setUseOuterJoin(boolean useOuterJoin)
useOuterJoin - public void setShowSql(boolean showSql)
showSql - public void setJndiName(java.lang.String jndiName)
jndiName - public void setDataSource(java.lang.String dataSource)
dataSource - public void setDialect(java.lang.String dialect)
dialect - public void setDriver(java.lang.String driver)
driver - public void setUserName(java.lang.String userName)
userName - public void setPassword(java.lang.String password)
password - public void setCacheProviderClass(java.lang.String string)
string - public void setCglibUseReflectionOptimizer(java.lang.String string)
string - public void setDefaultSchema(java.lang.String string)
string - public void setTransactionManagerFactory(java.lang.String string)
string -
public void execute()
throws XDocletException
execute in class TemplateSubTaskXDocletException
public void validateOptions()
throws XDocletException
TemplateSubTask
validateOptions in class TemplateSubTaskXDocletException - Description of Exceptionpublic void addConfiguredJndiProperty(org.apache.tools.ant.types.Parameter jndiProperty)
jndiProperty - public void addOtherProperty(org.apache.tools.ant.types.Parameter otherProperty)
otherProperty - The feature to be added to the OtherProperty attributepublic void addOtherMapping(org.apache.tools.ant.types.Parameter otherMapping)
otherMapping - The feature to be added to the OtherMapping attribute
protected void engineStarted()
throws XDocletException
engineStarted in class TemplateSubTaskXDocletException - Thrown in case of problem
|
http://xdoclet.sourceforge.net/ | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||