<html>
<head>
<title>Hibernate3 Tools</title>
<style type="text/css" media="screen">
<!--
body {
font-family: Sans-serif, Arial, Helvetica;
}
pre, tt {
font-size: 90%;
font-family: monospace;
color: #000000;
}
.code {
font-size: 95%;
font-family: monospace;
padding: 5px;
border-style: solid;
border-width: 1px;
border-color: #CCCCCC;
background-color: #eeeeee;
}
#toc {
float: right;
font-size: 80%;
border: 1px solid #CCCCCC;
margin: 0px 0px 20px 20px;
padding: 5px;
background: #eeeeee;
}
#toc .level2 { margin-left: 1em; }
#toc .level3 { margin-left: 2em; }
#toc .level4 { margin-left: 3em; }
#toc .level5 { margin-left: 4em; }
#toc .level6 { margin-left: 5em; }
-->
</style>
<script><!--
function H_getText(el) {
return el.firstChild.data;
}
function TOC_EL(el, text, level) {
this.element = el;
this.text = text;
this.level = level;
}
function getHeadlines(el) {
var l = new Array;
var rx = /[hH]([1-6])/;
// internal recursive function that scans the DOM tree
var rec = function (el) {
for (var i = el.firstChild; i != null; i = i.nextSibling) {
if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
if (rx.exec(i.tagName))
l[l.length] = new TOC_EL(i, H_getText(i), parseInt(RegExp.$1));
rec(i);
}
}
}
rec(el);
return l;
}
function generate_TOC(parentElementId) {
var parent = document.getElementById(parentElementId);
var hs = getHeadlines(document.getElementsByTagName("body")[0]);
for (var i = 0; i < hs.length; ++i) {
var hi = hs[i];
var d = document.createElement("div");
if (hi.element.id == "")
hi.element.id = "gen" + i;
var a = document.createElement("a");
a.href = "#" + hi.element.id;
a.appendChild(document.createTextNode(hi.text));
d.appendChild(a);
d.className = "level" + hi.level;
parent.appendChild(d);
}
}
// --></script>
</head>
<body onload="generate_TOC('toc')">
<h1>Hibernate Tools</h1>
<b><big>Reverse engineering and code generation with Eclipse plugins and a hbm.xml editor</big></b>
<br/>
<br/>
<b>Version:</b> 3.1 beta 1, 14. October 2005
<hr>
<div id="toc"></div>
<p><i>Please note that this release is a preview release and considered alpha
quality. The presented functionality (reverse engineering, code generation, etc.)
is also be available outside of Eclipse, ie. as Ant tasks.
See the <a href="http://tools.hibernate.org">Hibernate Tools website</a> for more
information about the road map.</i></p>
<h2>1. Introduction</h2>
<p>We have made significant improvements to the Hibernate toolset for Hibernate3. This is however work in progress and we'll continue to implement new ideas and features as the third generation of the Hibernate3 object persistence stack evolves.
</p>
<p>The first set of tools we offer are plugins for the Eclipse IDE. The following features are available:</p>
<p><b>Mapping Editor:</b> An editor for Hibernate XML mapping files, supporting auto-completion and syntax highlighting. It also supports semantic auto-completion for class names and property/field names, making it much more versatile than a normal XML editor.</p>
<p><b>Console:</b> The console is a new view in Eclipse. In addition to a tree overview of your console configurations, you also get an interactive view of your persistent classes and their relationships. The console allows you to execute HQL queries against your database and browse the result directly in Eclipse.</p>
<p><b>Development Wizards:</b> Several wizards are provided with the Hibernate Eclipse tools; you can use a wizard to quickly generate Hibernate configuration (cfg.xml) files, or you may even completely reverse engineer an existing database schema into POJO source files and Hibernate mapping files. The reverse engineering wizard supports customizable templates.</p>
<h2>2. Requirements</h2>
<p>
<ol>
<li>Install Eclipse 3.1 (<a href="http://www.eclipse.org/">http://www.eclipse.org</a>)</li>
</ol>
</p>
<p>After you have downloaded the Hibernate Tools for Eclipse, unpack and copy the plugins to your Eclipse plugins directory.
Sometimes Eclipse does not automatically detect new plugins and thus the tools will not be activated. To ensure eclipse sees
these changes run eclipse with the -clean option. E.g. <code>eclipse -clean</code>
</p>
<p>You will also need JDBC drivers for your database available to use the reverse engineering and querying support.</p>
<p>
Please note that these tools do not try to hide any functionality of Hibernate. The tools make working with
Hibernate easier, but you are still encouraged/required to read the documentation for Hibernate to fully
utilize Hibernate.
</p>
<h2>3. Creating a Hibernate configuration file</h2>
<p>
To be able to reverse engineer, prototype queries, and of course to
simply use Hibernate a hibernate.properties or hibernate.cfg.xml
file is needed. The Hibernate Tools provide a wizard for generating
the hibernate.cfg.xml file.
</p>
<p>
Start the wizard by clicking "New Wizard" (Ctrl+N), select the Hibernate/Hibernate Configuration file (cfg.xml)
wizard and press "Next". After selecting the location for the hibernate.cfg.xml file, you will see the following page:
</p>
<img src="hibernatecfgwizard.jpg" border="1"/>
<br><b>Creating hibernate.cfg.xml</b></br><br>
<p>
Enter your configuration information in this dialog. Details about the configuration options can be found
in Hibernate reference documentation. Press "Finish" to create the configuration file, it will be
automatically opened in an editor.
</p>
<p>
Tip: The contents in the combo boxes for the JDBC driver class and JDBC URL change automatically, depending
on the Dialect and actual driver you have chosen.
</p>
<h2>4. XML Mapping Editor</h2>
<p>The XML mapping editor provides basic XML editing functionality as well as package, class, and field
completion for relevant XML attributes. The auto-completion detects it's context and limits the completion for e.g.
<property> and only shows the properties/fields available in the
enclosing <class>, <subclass> etc.</p>
<img src="hbmxmlcompletion.jpg" border="1"/>
<br><b>Context dependent code completion in the XML mapping editor</b></br><br>
<h2>5. Hibernate Console perspective</h2>
<p>The Hibernate Console perspective combines a set of views which allow
you to see the structure of your mapped entities/classes, edit HQL queries, execute
the queries, and see the results. To use this perspective you need to create a console configuration.
</p>
<h3>5.1 Creating a console configuration</h3>
<p>
You create a console configuration by running the Console Configuration wizard, shown in the following screenshot:
</p>
<img src="consolecfgwizard.jpg" border="1"/>
<br><b>Creating a Hibernate Console configuration</b></br><br>
<p>
The following table describes the available settings. The wizard can automatically detect default values.
</p>
<table width="100%" border="1">
<th>Parameter</th><th>Description</th><th>Autodetect</th>
<tr>
<td>Name</td><td>The unique name of the configuration</td><td>Name of the Java project</td>
</tr>
<tr>
<td>Property file</td><td>Path to a hibernate.properties file/td><td>First hibernate.properties file found in the project</td>
</tr>
<tr>
<td nowrap="true">Configuration file</td><td>Path to a hibernate.cfg.xml</td><td>First hibernate.cfg.xml found in the project</td>
</tr>
<tr>
<td>Mapping files</td><td>List of additional mapping files that should be loaded. Note: A hibernate.cfg.xml can also contain mappings, avoid duplication.</td><td>All hbm.xml files found in the project</td>
</tr>
<tr>
没有合适的资源?快使用搜索试试~ 我知道了~
HibernateToolsForEclipse
共339个文件
gif:171个
png:56个
jar:47个
需积分: 11 21 下载量 173 浏览量
2009-05-18
16:53:06
上传
评论
收藏 14.27MB ZIP 举报
温馨提示
Eclipse插件,支持由数据表向XML的反向工程
资源推荐
资源详情
资源评论
收起资源包目录
HibernateToolsForEclipse (339个子文件)
default_.css 1KB
codegenexporters.gif 57KB
prettyentitymodel.gif 37KB
wiz_icon.gif 3KB
newhibernate_wiz.gif 2KB
hibernate.gif 2KB
hibernate_icon.gif 1KB
jboss.gif 1KB
hicon.gif 970B
error.gif 917B
close.gif 916B
close.gif 916B
close_disabled.gif 910B
close_disabled.gif 910B
execute.gif 891B
execute.gif 891B
anyproperty.gif 871B
anyproperty.gif 871B
unknowntypeproperty.gif 866B
layout_disabled.gif 866B
layout.gif 866B
unknowntypeproperty.gif 866B
treeminus.gif 866B
treeplus.gif 864B
exdWizardAction1.gif 618B
exdDataPerspective1.gif 590B
catalog.gif 589B
jar_obj.gif 587B
exdPersistentClass1.gif 585B
exdDataPerspective.gif 578B
exdOrmModel1.gif 577B
exdDatabaseTable1.gif 572B
table.gif 572B
hibernate_small_icon.gif 564B
hibernate_small_icon.gif 564B
hibernate_small_icon.gif 564B
hibernate_small_icon.gif 564B
component_id.gif 384B
hibernate_mapping.gif 376B
hibernate_mapping.gif 376B
refresh_orm_gef.gif 368B
refresh_run.gif 368B
exdDatabaseSchema1.gif 367B
schema.gif 367B
exdDialogAction1.gif 364B
hibernate_config.gif 361B
hibernate_config.gif 361B
mapping.gif 358B
mapping.gif 358B
exdDatabaseTable.gif 355B
exdPersistentValueMapping1.gif 355B
file_obj.gif 354B
delete_edit.gif 351B
complete_tsk.gif 343B
error_st_obj.gif 339B
database.gif 325B
parameter.gif 310B
new_param.gif 310B
columns.gif 294B
uninstall_32.gif 291B
hibernate_overlay.gif 287B
hibernate_overlay.gif 287B
exdMapping_new.gif 260B
component.gif 259B
exdMapping1.gif 253B
exdMapping.gif 252B
unique_key.gif 250B
criteria_editor_connect.gif 249B
orm32x32.gif 245B
install_32.gif 245B
exdDatabaseView.gif 245B
object_none.gif 244B
object.gif 243B
hql_editor_connect.gif 241B
java.gif 235B
java.gif 235B
exdDatabaseSchema.gif 229B
criteria_editor.gif 228B
hql_editor.gif 225B
ignoreparameter.gif 221B
fldr_obj.gif 216B
exdPersistentJoinedSubclassMapping.gif 214B
exdDatabaseColumn.gif 210B
removeall.gif 204B
exdPersistentClassMapping1.gif 200B
exdDatabaseColumn1.gif 193B
connected.gif 192B
removeall_disabled.gif 187B
format.gif 185B
exdPackage.gif 183B
exdDatabasePrimaryForeignKeysColumn.gif 180B
exdPersistentUnionSubclassMapping.gif 171B
exdPersistentSubclassMapping.gif 171B
exdMappingStorage.gif 169B
unmapped_class.gif 166B
exdProperties.gif 166B
unmapped_class.gif 166B
clear.gif 162B
clear.gif 162B
mapped_class.gif 161B
共 339 条
- 1
- 2
- 3
- 4
资源评论
langxuan_lunhui
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功