|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.tool.hbm2x.AbstractExporter
org.hibernate.tool.hbm2x.GenericExporter
org.hibernate.tool.hbm2x.DAONewExporter
public class DAONewExporter
Creates domain model abstract base classes from .hbm files
| Field Summary | |
|---|---|
protected String |
filePattern
|
| Fields inherited from class org.hibernate.tool.hbm2x.AbstractExporter |
|---|
log, templatePaths |
| Constructor Summary | |
|---|---|
DAONewExporter()
|
|
DAONewExporter(org.hibernate.cfg.Configuration cfg,
File outputdir)
|
|
| Method Summary | |
|---|---|
void |
doStart()
Override to control file overwriting via isOverrite() method |
protected void |
exportPOJO(Map additionalContext,
POJOClass element)
Override to avoid overwriting the existing files In the final version this should be moved to GenericExporter |
String |
getProperty(String key)
Helper method to lookup a property |
boolean |
isOverwrite()
Checks if the file overwriting is true (default) or false |
String |
replaceParameters(String pattern,
Map paramValues)
Helper method that replaces all parameters in a given pattern |
protected void |
setupContext()
Setup the context variables used by the exporter. |
| Methods inherited from class org.hibernate.tool.hbm2x.GenericExporter |
|---|
exportComponent, exportPersistentClass, getClassNameForFile, getFilePattern, getPackageNameForFile, getTemplateName, resolveFilename, setFilePattern, setForEach, setTemplateName |
| Methods inherited from class org.hibernate.tool.hbm2x.AbstractExporter |
|---|
cleanUpContext, getArtifactCollector, getCfg2HbmTool, getCfg2JavaTool, getConfiguration, getFileForClassName, getName, getOutputDirectory, getProperties, getTemplateHelper, getTemplatePath, getTemplatePaths, setArtifactCollector, setConfiguration, setOutputDirectory, setProperties, setTemplateHelper, setTemplatePath, setupTemplates, start |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String filePattern
| Constructor Detail |
|---|
public DAONewExporter(org.hibernate.cfg.Configuration cfg,
File outputdir)
public DAONewExporter()
| Method Detail |
|---|
protected void setupContext()
AbstractExporter
setupContext in class AbstractExporterpublic String getProperty(String key)
public void doStart()
doStart in class GenericExporter
protected void exportPOJO(Map additionalContext,
POJOClass element)
exportPOJO in class GenericExporterpublic boolean isOverwrite()
public String replaceParameters(String pattern,
Map paramValues)
pattern - String with parameters surrounded with braces, for instance "Today is {day} day of {month}"paramValues - map with key-value pairs for parameter values
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||