|
|||||||||||
| 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
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 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). |
String |
getCacheProviderClass()
|
String |
getCglibUseReflectionOptimizer()
|
String |
getDataSource()
|
String |
getDefaultSchema()
|
String |
getDialect()
|
String |
getDriver()
|
String |
getHbm2ddl()
|
String |
getJdbcUrl()
|
String |
getJndiName()
|
Collection |
getJndiProperties()
|
Collection |
getOtherMappings()
|
Collection |
getOtherProperties()
|
String |
getPassword()
|
String |
getPoolSize()
|
boolean |
getShowSql()
|
String |
getTransactionManagerFactory()
|
String |
getTransactionManagerLookup()
|
String |
getTransactionManagerStrategy()
|
boolean |
getUseOuterJoin()
|
String |
getUserName()
|
String |
getUserTransactionName()
|
String |
getVersion()
Get the Hibernate configuration DTD version. |
void |
setCacheProviderClass(String string)
The classname of a custom CacheProvider. |
void |
setCglibUseReflectionOptimizer(String string)
Enables use of CGLIB instead of runtime reflection (System-level property, default is to use CGLIB where possible). |
void |
setDataSource(String dataSource)
JNDI name of data source to use in the session factory. |
void |
setDefaultSchema(String string)
Qualify unqualified tablenames with the given schema/tablespace in generated SQL. |
void |
setDialect(String dialect)
SQL dialect of the database. |
void |
setDriver(String driver)
JDBC Driver to make database connection. |
void |
setHbm2ddl(String hbm2ddl)
Automatically export schema DDL to the database when the SessionFactory is created. |
void |
setJdbcUrl(String jdbcUrl)
URL for the JDBC Driver to make the connection to the database. |
void |
setJndiName(String jndiName)
JNDI name to bind to the SessionFactory |
void |
setPassword(String password)
Use this password to login to the database |
void |
setPoolSize(String poolSize)
Hibernate connection pool size. |
void |
setShowSql(boolean showSql)
Log sql statements. |
void |
setTransactionManagerFactory(String string)
The classname of a TransactionFactory to use with Hibernate Transaction API (defaults to JDBCTransactionFactory). |
void |
setTransactionManagerLookup(String transactionManagerLookup)
The fully qualified class name of the Hibernate TransactionFactory implementation. |
void |
setTransactionManagerStrategy(String transactionManagerStrategy)
Strategy for obtaining the JTA TransactionManager |
void |
setUseOuterJoin(boolean useOuterJoin)
Whether to use outer join |
void |
setUserName(String userName)
Use this user name to login to the database |
void |
setUserTransactionName(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 String getVersion()
public String getHbm2ddl()
public String getTransactionManagerLookup()
public Collection getJndiProperties()
getJndiProperties in interface xdoclet.modules.hibernate.HibernatePropertiespublic Collection getOtherProperties()
getOtherProperties in interface xdoclet.modules.hibernate.HibernatePropertiespublic Collection getOtherMappings()
getOtherMappings in interface xdoclet.modules.hibernate.HibernatePropertiespublic String getTransactionManagerStrategy()
getTransactionManagerStrategy in interface xdoclet.modules.hibernate.HibernatePropertiespublic String getUserTransactionName()
getUserTransactionName in interface xdoclet.modules.hibernate.HibernatePropertiespublic String getUserName()
getUserName in interface xdoclet.modules.hibernate.HibernatePropertiespublic 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 String getJndiName()
getJndiName in interface xdoclet.modules.hibernate.HibernatePropertiespublic String getDataSource()
getDataSource in interface xdoclet.modules.hibernate.HibernatePropertiespublic String getDialect()
getDialect in interface xdoclet.modules.hibernate.HibernatePropertiespublic String getDriver()
getDriver in interface xdoclet.modules.hibernate.HibernatePropertiespublic String getJdbcUrl()
getJdbcUrl in interface xdoclet.modules.hibernate.HibernatePropertiespublic String getPoolSize()
getPoolSize in interface xdoclet.modules.hibernate.HibernatePropertiespublic String getCacheProviderClass()
public String getCglibUseReflectionOptimizer()
public String getDefaultSchema()
public String getTransactionManagerFactory()
public void setVersion(HibernateCfgSubTask.HibernateCFGVersion version)
version - public void setHbm2ddl(String hbm2ddl)
hbm2ddl - public void setPoolSize(String poolSize)
poolSize - public void setJdbcUrl(String jdbcUrl)
jdbcUrl - public void setTransactionManagerStrategy(String transactionManagerStrategy)
transactionManagerStrategy - public void setUserTransactionName(String userTransactionName)
userTransactionName - public void setTransactionManagerLookup(String transactionManagerLookup)
transactionManagerLookup - public void setUseOuterJoin(boolean useOuterJoin)
useOuterJoin - public void setShowSql(boolean showSql)
showSql - public void setJndiName(String jndiName)
jndiName - public void setDataSource(String dataSource)
dataSource - public void setDialect(String dialect)
dialect - public void setDriver(String driver)
driver - public void setUserName(String userName)
userName - public void setPassword(String password)
password - public void setCacheProviderClass(String string)
string - public void setCglibUseReflectionOptimizer(String string)
string - public void setDefaultSchema(String string)
string - public void setTransactionManagerFactory(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 | ||||||||||