Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
419ae32
commit 034abc9
Showing
435 changed files
with
44,635 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. | ||
*/ | ||
|
||
// build a map of the database settings to use. | ||
ext { | ||
db = 'h2' | ||
dbBundle = [ | ||
h2 : [ | ||
'db.dialect' : 'org.hibernate.dialect.H2Dialect', | ||
'jdbc.driver': 'org.h2.Driver', | ||
'jdbc.user' : 'sa', | ||
'jdbc.pass' : '', | ||
'jdbc.url' : 'jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;LOCK_TIMEOUT=10000', | ||
], | ||
hsqldb : [ | ||
'db.dialect' : 'org.hibernate.dialect.HSQLDialect', | ||
'jdbc.driver': 'org.hsqldb.jdbc.JDBCDriver', | ||
'jdbc.user' : 'sa', | ||
'jdbc.pass' : '', | ||
'jdbc.url' : 'jdbc:hsqldb:mem:test' | ||
], | ||
pgsql : [ | ||
'db.dialect' : 'org.hibernate.dialect.PostgreSQL94Dialect', | ||
'jdbc.driver': 'org.postgresql.Driver', | ||
'jdbc.user' : 'hibernate_orm_test', | ||
'jdbc.pass' : 'hibernate_orm_test', | ||
'jdbc.url' : 'jdbc:postgresql:hibernate_orm_test' | ||
], | ||
mysql : [ | ||
'db.dialect' : 'org.hibernate.dialect.MySQL57InnoDBDialect', | ||
'jdbc.driver': 'com.mysql.jdbc.Driver', | ||
'jdbc.user' : 'hibernateormtest', | ||
'jdbc.pass' : 'hibernateormtest', | ||
'jdbc.url' : 'jdbc:mysql://localhost/hibernate_orm_test' | ||
], | ||
mariadb : [ | ||
'db.dialect' : 'org.hibernate.dialect.MySQL57InnoDBDialect', | ||
'jdbc.driver': 'org.mariadb.jdbc.Driver', | ||
'jdbc.user' : 'hibernate_orm_test', | ||
'jdbc.pass' : 'hibernate_orm_test', | ||
'jdbc.url' : 'jdbc:mariadb://localhost/hibernate_orm_test' | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
== References | ||
|
||
[bibliography] | ||
- [[[PoEAA]]] Martin Fowler. Patterns of Enterprise Application Architecture. | ||
Addison-Wesley Publishing Company. 2003. | ||
- [[[JPwH]]] Christian Bauer & Gavin King. http://www.manning.com/bauer2[Java Persistence with Hibernate]. Manning Publications Co. 2007. |
39 changes: 39 additions & 0 deletions
39
documentation/src/main/asciidoc/userguide/Hibernate_User_Guide.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
= Hibernate ORM {majorMinorVersion} User Guide | ||
Steve Ebersole, Vlad Mihalcea, Andrea Boriero, Brett Meyer, Radim Vansa | ||
:toc: | ||
:toclevels: 3 | ||
|
||
include::Preface.adoc[] | ||
|
||
:numbered: | ||
|
||
include::chapters/architecture/Architecture.adoc[] | ||
include::chapters/domain/DomainModel.adoc[] | ||
include::chapters/bootstrap/Bootstrap.adoc[] | ||
include::chapters/pc/PersistenceContext.adoc[] | ||
include::chapters/flushing/Flushing.adoc[] | ||
include::chapters/jdbc/Database_Access.adoc[] | ||
include::chapters/transactions/Transactions.adoc[] | ||
include::chapters/jndi/JNDI.adoc[] | ||
include::chapters/locking/Locking.adoc[] | ||
include::chapters/fetching/Fetching.adoc[] | ||
include::chapters/batch/Batching.adoc[] | ||
include::chapters/caching/Caching.adoc[] | ||
include::chapters/events/Events.adoc[] | ||
include::chapters/query/hql/HQL.adoc[] | ||
include::chapters/query/criteria/Criteria.adoc[] | ||
include::chapters/query/native/Native.adoc[] | ||
include::chapters/query/spatial/Spatial.adoc[] | ||
include::chapters/multitenancy/MultiTenancy.adoc[] | ||
include::chapters/osgi/OSGi.adoc[] | ||
include::chapters/envers/Envers.adoc[] | ||
include::chapters/portability/Portability.adoc[] | ||
|
||
include::appendices/Configurations.adoc[] | ||
include::appendices/Legacy_Bootstrap.adoc[] | ||
include::appendices/Legacy_DomainModel.adoc[] | ||
include::appendices/Legacy_Criteria.adoc[] | ||
include::appendices/Legacy_Native_Queries.adoc[] | ||
|
||
include::Bibliography.adoc[] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
[[preface]] | ||
== Preface | ||
|
||
Developing Object-Oriented software that deals with data from Relational | ||
Databases can be cumbersome and resource consuming. Development costs | ||
are significantly higher due to a paradigm mismatch between how data is | ||
represented in objects versus relational databases. Hibernate is an | ||
Object/Relational Mapping (ORM) solution for Java environments. ORM | ||
refers to the technique of mapping data between an object model | ||
representation to a relational data model representation. See | ||
http://en.wikipedia.org/wiki/Object-relational_mapping[Wikipedia] for a | ||
good high-level discussion. Also, Martin Fowler's | ||
http://martinfowler.com/bliki/OrmHate.html[OrmHate] article takes a look | ||
at many of the mentioned mismatch problems. | ||
|
||
Although having a strong background in SQL is not required to use | ||
Hibernate, having a basic understanding of the concepts can help you | ||
understand Hibernate more quickly and fully. An understanding of data | ||
modeling principles is especially important. Both | ||
http://www.agiledata.org/essays/dataModeling101.html and | ||
http://en.wikipedia.org/wiki/Data_modeling are good starting points for | ||
understanding these data modeling principles. | ||
|
||
Understanding the basics of transactions and design patterns such as | ||
"Unit of Work" <<Bibliography.adoc#PoEAA,PoEAA>> or "ApplicationTransaction" are important as well. | ||
These topics will be discussed in the documentation, but a prior | ||
understanding will certainly help. | ||
|
||
Hibernate not only takes care of the mapping from Java classes to | ||
database tables (and from Java data types to SQL data types), but also | ||
provides data query and retrieval facilities. It can significantly | ||
reduce development time otherwise spent with manual data handling in SQL | ||
and JDBC. Hibernate’s design goal is to relieve the developer from 95% | ||
of common data persistence-related programming tasks by eliminating the | ||
need for manual, hand-crafted data processing using SQL and JDBC. | ||
However, unlike many other persistence solutions, Hibernate does not | ||
hide the power of SQL from you and guarantees that your investment in | ||
relational technology and knowledge is as valid as always. | ||
|
||
Hibernate may not be the best solution for data-centric applications | ||
that only use stored procedures to implement the business logic in the | ||
database, it is most useful with object-oriented domain models and | ||
business logic in the Java-based middle-tier. However, Hibernate can | ||
certainly help you to remove or encapsulate vendor-specific SQL code and | ||
will help with the common task of result set translation from a tabular | ||
representation to a graph of objects. | ||
|
||
See http://hibernate.org/orm/contribute/ for information on getting | ||
involved. | ||
|
||
|
||
[TIP] | ||
==== | ||
If you are just getting started with using Hibernate you may want to | ||
start with the Hibernate Getting Started Guide available from the | ||
http://hibernate.org/orm/documentation[documentation page]. It contains | ||
quick-start style tutorials as well as lots of introductory information. | ||
There is also a series of topical guides providing deep dives into | ||
various topics. | ||
==== |
Oops, something went wrong.