mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-23 11:47:40 +00:00
Updated package names, etc.
git-svn-id: https://svn.jboss.org/repos/hibernate/trunk/Hibernate3/doc@4216 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
bc18e67174
commit
ff367dd04a
@ -59,7 +59,7 @@
|
||||
|
||||
<variablelist spacing="compact">
|
||||
<varlistentry>
|
||||
<term>SessionFactory (<literal>net.sf.hibernate.SessionFactory</literal>)</term>
|
||||
<term>SessionFactory (<literal>org.hibernate.SessionFactory</literal>)</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A threadsafe (immutable) cache of compiled mappings for a single database.
|
||||
@ -71,7 +71,7 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Session (<literal>net.sf.hibernate.Session</literal>)</term>
|
||||
<term>Session (<literal>org.hibernate.Session</literal>)</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A single-threaded, short-lived object representing a conversation between
|
||||
@ -107,7 +107,7 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Transaction (<literal>net.sf.hibernate.Transaction</literal>)</term>
|
||||
<term>Transaction (<literal>org.hibernate.Transaction</literal>)</term>
|
||||
<listitem>
|
||||
<para>
|
||||
(Optional) A single-threaded, short-lived object used by the application to
|
||||
@ -118,7 +118,7 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>ConnectionProvider (<literal>net.sf.hibernate.connection.ConnectionProvider</literal>)</term>
|
||||
<term>ConnectionProvider (<literal>org.hibernate.connection.ConnectionProvider</literal>)</term>
|
||||
<listitem>
|
||||
<para>
|
||||
(Optional) A factory for (and pool of) JDBC connections. Abstracts application from
|
||||
@ -128,7 +128,7 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>TransactionFactory (<literal>net.sf.hibernate.TransactionFactory</literal>)</term>
|
||||
<term>TransactionFactory (<literal>org.hibernate.TransactionFactory</literal>)</term>
|
||||
<listitem>
|
||||
<para>
|
||||
(Optional) A factory for <literal>Transaction</literal> instances. Not exposed to the
|
||||
|
@ -23,8 +23,7 @@
|
||||
|
||||
<programlisting><![CDATA[<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC
|
||||
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
|
||||
<hibernate-mapping package="eg">
|
||||
|
||||
@ -312,11 +311,11 @@
|
||||
<para>
|
||||
The <literal>persister</literal> attribute lets you customize the persistence strategy used for
|
||||
the class. You may, for example, specify your own subclass of
|
||||
<literal>net.sf.hibernate.persister.EntityPersister</literal> or you might even provide a
|
||||
<literal>org.hibernate.persister.EntityPersister</literal> or you might even provide a
|
||||
completely new implementation of the interface
|
||||
<literal>net.sf.hibernate.persister.ClassPersister</literal> that implements persistence via,
|
||||
<literal>org.hibernate.persister.ClassPersister</literal> that implements persistence via,
|
||||
for example, stored procedure calls, serialization to flat files or LDAP. See
|
||||
<literal>net.sf.hibernate.test.CustomPersister</literal> for a simple example (of "persistence"
|
||||
<literal>org.hibernate.test.CustomPersister</literal> for a simple example (of "persistence"
|
||||
to a <literal>Hashtable</literal>).
|
||||
</para>
|
||||
|
||||
@ -457,14 +456,14 @@
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[<id name="id" type="long" column="uid" unsaved-value="0">
|
||||
<generator class="net.sf.hibernate.id.TableHiLoGenerator">
|
||||
<generator class="org.hibernate.id.TableHiLoGenerator">
|
||||
<param name="table">uid_table</param>
|
||||
<param name="column">next_hi_value_column</param>
|
||||
</generator>
|
||||
</id>]]></programlisting>
|
||||
|
||||
<para>
|
||||
All generators implement the interface <literal>net.sf.hibernate.id.IdentifierGenerator</literal>.
|
||||
All generators implement the interface <literal>org.hibernate.id.IdentifierGenerator</literal>.
|
||||
This is a very simple interface; some applications may choose to provide their own specialized
|
||||
implementations. However, Hibernate provides a range of built-in implementations. There are shortcut
|
||||
names for the built-in generators:
|
||||
@ -1059,7 +1058,7 @@
|
||||
If you specify <literal>access="field"</literal>, Hibernate will bypass the get/set
|
||||
pair and access the field directly, using reflection. You may specify your own
|
||||
strategy for property access by naming a class that implements the interface
|
||||
<literal>net.sf.hibernate.property.PropertyAccessor</literal>.
|
||||
<literal>org.hibernate.property.PropertyAccessor</literal>.
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
@ -1571,7 +1570,7 @@
|
||||
<programlisting><![CDATA[<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC
|
||||
"-//Hibernate/Hibernate Mapping DTD//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
|
||||
<hibernate-mapping package="eg">
|
||||
|
||||
@ -1826,7 +1825,7 @@
|
||||
|
||||
<para>
|
||||
The basic value types have corresponding <literal>Type</literal> constants defined on
|
||||
<literal>net.sf.hibernate.Hibernate</literal>. For example, <literal>Hibernate.STRING</literal>
|
||||
<literal>org.hibernate.Hibernate</literal>. For example, <literal>Hibernate.STRING</literal>
|
||||
represents the <literal>string</literal> type.
|
||||
</para>
|
||||
|
||||
@ -1838,12 +1837,12 @@
|
||||
<para>
|
||||
An <emphasis>enumerated</emphasis> type is a common Java idiom where a class has
|
||||
a constant (small) number of immutable instances. You may create a persistent
|
||||
enumerated type by implementing <literal>net.sf.hibernate.PersistentEnum</literal>,
|
||||
enumerated type by implementing <literal>org.hibernate.PersistentEnum</literal>,
|
||||
defining the operations <literal>toInt()</literal> and <literal>fromInt()</literal>:
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[package eg;
|
||||
import net.sf.hibernate.PersistentEnum;
|
||||
import org.hibernate.PersistentEnum;
|
||||
|
||||
public class Color implements PersistentEnum {
|
||||
private final int code;
|
||||
@ -1888,14 +1887,14 @@ public class Color implements PersistentEnum {
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To implement a custom type, implement either <literal>net.sf.hibernate.UserType</literal>
|
||||
or <literal>net.sf.hibernate.CompositeUserType</literal> and declare properties using the
|
||||
To implement a custom type, implement either <literal>org.hibernate.UserType</literal>
|
||||
or <literal>org.hibernate.CompositeUserType</literal> and declare properties using the
|
||||
fully qualified classname of the type. Check out
|
||||
<literal>net.sf.hibernate.test.DoubleStringType</literal> to see the kind of things that
|
||||
<literal>org.hibernate.test.DoubleStringType</literal> to see the kind of things that
|
||||
are possible.
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[<property name="twoStrings" type="net.sf.hibernate.test.DoubleStringType">
|
||||
<programlisting><![CDATA[<property name="twoStrings" type="org.hibernate.test.DoubleStringType">
|
||||
<column name="first_string"/>
|
||||
<column name="second_string"/>
|
||||
</property>]]></programlisting>
|
||||
|
@ -66,7 +66,7 @@
|
||||
<para>
|
||||
Hibernate lets the application manage JDBC connections. This approach should be considered
|
||||
a last-resort. If you can't use the built-in connections providers, consider providing your
|
||||
own implementation of <literal>net.sf.hibernate.connection.ConnectionProvider</literal>.
|
||||
own implementation of <literal>org.hibernate.connection.ConnectionProvider</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@ -76,7 +76,7 @@
|
||||
<para>
|
||||
Suppose you have a Java type, say from some library, that needs to be persisted but doesn't
|
||||
provide the accessors needed to map it as a component. You should consider implementing
|
||||
<literal>net.sf.hibernate.UserType</literal>. This approach frees the application
|
||||
<literal>org.hibernate.UserType</literal>. This approach frees the application
|
||||
code from implementing transformations to / from a Hibernate type.
|
||||
</para>
|
||||
</listitem>
|
||||
|
@ -14,7 +14,7 @@
|
||||
<title>Programmatic Configuration</title>
|
||||
|
||||
<para>
|
||||
An instance of <literal>net.sf.hibernate.cfg.Configuration</literal>
|
||||
An instance of <literal>org.hibernate.cfg.Configuration</literal>
|
||||
represents an entire set of mappings of an application's Java types to a
|
||||
SQL database. The <literal>Configuration</literal> is used to build a
|
||||
(immutable)` <literal>SessionFactory</literal>. The mappings are compiled
|
||||
@ -151,7 +151,7 @@ Session session = sessions.openSession(conn);
|
||||
|
||||
<para>
|
||||
All Hibernate property names and semantics are defined on the class
|
||||
<literal>net.sf.hibernate.cfg.Environment</literal>. We will now describe the most
|
||||
<literal>org.hibernate.cfg.Environment</literal>. We will now describe the most
|
||||
important settings for JDBC connection configuration.
|
||||
</para>
|
||||
|
||||
@ -250,7 +250,7 @@ hibernate.c3p0.min_size=5
|
||||
hibernate.c3p0.max_size=20
|
||||
hibernate.c3p0.timeout=1800
|
||||
hibernate.c3p0.max_statements=50
|
||||
hibernate.dialect = net.sf.hibernate.dialect.PostgreSQLDialect]]></programlisting>
|
||||
hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect]]></programlisting>
|
||||
|
||||
<para>
|
||||
For use inside an application server, Hibernate may obtain connections from a
|
||||
@ -320,11 +320,11 @@ hibernate.dialect = net.sf.hibernate.dialect.PostgreSQLDialect]]></programlistin
|
||||
|
||||
<programlisting><![CDATA[hibernate.connection.datasource = java:/comp/env/jdbc/MyDB
|
||||
hibernate.transaction.factory_class = \
|
||||
net.sf.hibernate.transaction.JTATransactionFactory
|
||||
org.hibernate.transaction.JTATransactionFactory
|
||||
hibernate.transaction.manager_lookup_class = \
|
||||
net.sf.hibernate.transaction.JBossTransactionManagerLookup
|
||||
org.hibernate.transaction.JBossTransactionManagerLookup
|
||||
hibernate.dialect = \
|
||||
net.sf.hibernate.dialect.PostgreSQLDialect]]></programlisting>
|
||||
org.hibernate.dialect.PostgreSQLDialect]]></programlisting>
|
||||
|
||||
<para>
|
||||
JDBC connections obtained from a JNDI datasource will automatically participate
|
||||
@ -339,7 +339,7 @@ hibernate.dialect = \
|
||||
|
||||
<para>
|
||||
You may define your own plugin strategy for obtaining JDBC connections by implementing the
|
||||
interface <literal>net.sf.hibernate.connection.ConnectionProvider</literal>. You may select
|
||||
interface <literal>org.hibernate.connection.ConnectionProvider</literal>. You may select
|
||||
a custom implementation by setting <literal>hibernate.connection.provider_class</literal>.
|
||||
</para>
|
||||
|
||||
@ -728,7 +728,7 @@ hibernate.dialect = \
|
||||
|
||||
<para>
|
||||
You should always set the <literal>hibernate.dialect</literal> property to the correct
|
||||
<literal>net.sf.hibernate.dialect.Dialect</literal> subclass for your database. This is not
|
||||
<literal>org.hibernate.dialect.Dialect</literal> subclass for your database. This is not
|
||||
strictly essential unless you wish to use <literal>native</literal> or
|
||||
<literal>sequence</literal> primary key generation or pessimistic locking (with, eg.
|
||||
<literal>Session.lock()</literal> or <literal>Query.setLockMode()</literal>).
|
||||
@ -749,64 +749,64 @@ hibernate.dialect = \
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>DB2</entry> <entry><literal>net.sf.hibernate.dialect.DB2Dialect</literal></entry>
|
||||
<entry>DB2</entry> <entry><literal>org.hibernate.dialect.DB2Dialect</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>DB2 AS/400</entry> <entry><literal>net.sf.hibernate.dialect.DB2400Dialect</literal></entry>
|
||||
<entry>DB2 AS/400</entry> <entry><literal>org.hibernate.dialect.DB2400Dialect</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>DB2 OS390</entry> <entry><literal>net.sf.hibernate.dialect.DB2390Dialect</literal></entry>
|
||||
<entry>DB2 OS390</entry> <entry><literal>org.hibernate.dialect.DB2390Dialect</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>PostgreSQL</entry> <entry><literal>net.sf.hibernate.dialect.PostgreSQLDialect</literal></entry>
|
||||
<entry>PostgreSQL</entry> <entry><literal>org.hibernate.dialect.PostgreSQLDialect</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>MySQL</entry> <entry><literal>net.sf.hibernate.dialect.MySQLDialect</literal></entry>
|
||||
<entry>MySQL</entry> <entry><literal>org.hibernate.dialect.MySQLDialect</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Oracle (any version)</entry> <entry><literal>net.sf.hibernate.dialect.OracleDialect</literal></entry>
|
||||
<entry>Oracle (any version)</entry> <entry><literal>org.hibernate.dialect.OracleDialect</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Oracle 9/10g</entry> <entry><literal>net.sf.hibernate.dialect.Oracle9Dialect</literal></entry>
|
||||
<entry>Oracle 9/10g</entry> <entry><literal>org.hibernate.dialect.Oracle9Dialect</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Sybase</entry> <entry><literal>net.sf.hibernate.dialect.SybaseDialect</literal></entry>
|
||||
<entry>Sybase</entry> <entry><literal>org.hibernate.dialect.SybaseDialect</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Sybase Anywhere</entry> <entry><literal>net.sf.hibernate.dialect.SybaseAnywhereDialect</literal></entry>
|
||||
<entry>Sybase Anywhere</entry> <entry><literal>org.hibernate.dialect.SybaseAnywhereDialect</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Microsoft SQL Server</entry> <entry><literal>net.sf.hibernate.dialect.SQLServerDialect</literal></entry>
|
||||
<entry>Microsoft SQL Server</entry> <entry><literal>org.hibernate.dialect.SQLServerDialect</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SAP DB</entry> <entry><literal>net.sf.hibernate.dialect.SAPDBDialect</literal></entry>
|
||||
<entry>SAP DB</entry> <entry><literal>org.hibernate.dialect.SAPDBDialect</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Informix</entry> <entry><literal>net.sf.hibernate.dialect.InformixDialect</literal></entry>
|
||||
<entry>Informix</entry> <entry><literal>org.hibernate.dialect.InformixDialect</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>HypersonicSQL</entry> <entry><literal>net.sf.hibernate.dialect.HSQLDialect</literal></entry>
|
||||
<entry>HypersonicSQL</entry> <entry><literal>org.hibernate.dialect.HSQLDialect</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Ingres</entry> <entry><literal>net.sf.hibernate.dialect.IngresDialect</literal></entry>
|
||||
<entry>Ingres</entry> <entry><literal>org.hibernate.dialect.IngresDialect</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Progress</entry> <entry><literal>net.sf.hibernate.dialect.ProgressDialect</literal></entry>
|
||||
<entry>Progress</entry> <entry><literal>org.hibernate.dialect.ProgressDialect</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Mckoi SQL</entry> <entry><literal>net.sf.hibernate.dialect.MckoiDialect</literal></entry>
|
||||
<entry>Mckoi SQL</entry> <entry><literal>org.hibernate.dialect.MckoiDialect</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Interbase</entry> <entry><literal>net.sf.hibernate.dialect.InterbaseDialect</literal></entry>
|
||||
<entry>Interbase</entry> <entry><literal>org.hibernate.dialect.InterbaseDialect</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Pointbase</entry> <entry><literal>net.sf.hibernate.dialect.PointbaseDialect</literal></entry>
|
||||
<entry>Pointbase</entry> <entry><literal>org.hibernate.dialect.PointbaseDialect</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>FrontBase</entry> <entry><literal>net.sf.hibernate.dialect.FrontbaseDialect</literal></entry>
|
||||
<entry>FrontBase</entry> <entry><literal>org.hibernate.dialect.FrontbaseDialect</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Firebird</entry> <entry><literal>net.sf.hibernate.dialect.FirebirdDialect</literal></entry>
|
||||
<entry>Firebird</entry> <entry><literal>org.hibernate.dialect.FirebirdDialect</literal></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
@ -868,7 +868,7 @@ hibernate.dialect = \
|
||||
|
||||
<para>
|
||||
You may integrate a JVM-level (or clustered) second-level cache system by
|
||||
implementing the interface <literal>net.sf.hibernate.cache.CacheProvider</literal>.
|
||||
implementing the interface <literal>org.hibernate.cache.CacheProvider</literal>.
|
||||
You may select the custom implementation by setting
|
||||
<literal>hibernate.cache.provider_class</literal>.
|
||||
</para>
|
||||
@ -892,13 +892,13 @@ hibernate.dialect = \
|
||||
|
||||
<variablelist spacing="compact">
|
||||
<varlistentry>
|
||||
<term><literal>net.sf.hibernate.transaction.JDBCTransactionFactory</literal></term>
|
||||
<term><literal>org.hibernate.transaction.JDBCTransactionFactory</literal></term>
|
||||
<listitem>
|
||||
<para>delegates to database (JDBC) transactions (default)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>net.sf.hibernate.transaction.JTATransactionFactory</literal></term>
|
||||
<term><literal>org.hibernate.transaction.JTATransactionFactory</literal></term>
|
||||
<listitem>
|
||||
<para>delegates to JTA (if an existing transaction is underway, the <literal>Session</literal>
|
||||
performs its work in that context, otherwise a new transaction is started)</para>
|
||||
@ -930,39 +930,39 @@ hibernate.dialect = \
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><literal>net.sf.hibernate.transaction.JBossTransactionManagerLookup</literal></entry>
|
||||
<entry><literal>org.hibernate.transaction.JBossTransactionManagerLookup</literal></entry>
|
||||
<entry align="center">JBoss</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>net.sf.hibernate.transaction.WeblogicTransactionManagerLookup</literal></entry>
|
||||
<entry><literal>org.hibernate.transaction.WeblogicTransactionManagerLookup</literal></entry>
|
||||
<entry align="center">Weblogic</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>net.sf.hibernate.transaction.WebSphereTransactionManagerLookup</literal></entry>
|
||||
<entry><literal>org.hibernate.transaction.WebSphereTransactionManagerLookup</literal></entry>
|
||||
<entry align="center">WebSphere</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>net.sf.hibernate.transaction.OrionTransactionManagerLookup</literal></entry>
|
||||
<entry><literal>org.hibernate.transaction.OrionTransactionManagerLookup</literal></entry>
|
||||
<entry align="center">Orion</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>net.sf.hibernate.transaction.ResinTransactionManagerLookup</literal></entry>
|
||||
<entry><literal>org.hibernate.transaction.ResinTransactionManagerLookup</literal></entry>
|
||||
<entry align="center">Resin</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>net.sf.hibernate.transaction.JOTMTransactionManagerLookup</literal></entry>
|
||||
<entry><literal>org.hibernate.transaction.JOTMTransactionManagerLookup</literal></entry>
|
||||
<entry align="center">JOTM</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>net.sf.hibernate.transaction.JOnASTransactionManagerLookup</literal></entry>
|
||||
<entry><literal>org.hibernate.transaction.JOnASTransactionManagerLookup</literal></entry>
|
||||
<entry align="center">JOnAS</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>net.sf.hibernate.transaction.JRun4TransactionManagerLookup</literal></entry>
|
||||
<entry><literal>org.hibernate.transaction.JRun4TransactionManagerLookup</literal></entry>
|
||||
<entry align="center">JRun4</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>net.sf.hibernate.transaction.BESTransactionManagerLookup</literal></entry>
|
||||
<entry><literal>org.hibernate.transaction.BESTransactionManagerLookup</literal></entry>
|
||||
<entry align="center">Borland ES</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
@ -1058,7 +1058,7 @@ hibernate.dialect = \
|
||||
<title>Implementing a <literal>NamingStrategy</literal></title>
|
||||
|
||||
<para>
|
||||
The interface <literal>net.sf.hibernate.cfg.NamingStrategy</literal> allows you
|
||||
The interface <literal>org.hibernate.cfg.NamingStrategy</literal> allows you
|
||||
to specify a "naming standard" for database objects and schema elements.
|
||||
</para>
|
||||
|
||||
@ -1083,7 +1083,7 @@ hibernate.dialect = \
|
||||
.buildSessionFactory();]]></programlisting>
|
||||
|
||||
<para>
|
||||
<literal>net.sf.hibernate.cfg.ImprovedNamingStrategy</literal> is a built-in
|
||||
<literal>org.hibernate.cfg.ImprovedNamingStrategy</literal> is a built-in
|
||||
strategy that might be a useful starting point for some applications.
|
||||
</para>
|
||||
|
||||
@ -1106,9 +1106,8 @@ hibernate.dialect = \
|
||||
|
||||
<programlisting><![CDATA[<?xml version='1.0' encoding='utf-8'?>
|
||||
<!DOCTYPE hibernate-configuration PUBLIC
|
||||
"-//Hibernate/Hibernate Configuration DTD 2.0//EN"
|
||||
|
||||
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
|
||||
"-//Hibernate/Hibernate Configuration DTD//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
|
||||
|
||||
<hibernate-configuration>
|
||||
|
||||
@ -1118,11 +1117,11 @@ hibernate.dialect = \
|
||||
|
||||
<!-- properties -->
|
||||
<property name="connection.datasource">my/first/datasource</property>
|
||||
<property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>
|
||||
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
|
||||
<property name="show_sql">false</property>
|
||||
<property name="use_outer_join">true</property>
|
||||
<property name="transaction.factory_class">
|
||||
net.sf.hibernate.transaction.JTATransactionFactory
|
||||
org.hibernate.transaction.JTATransactionFactory
|
||||
</property>
|
||||
<property name="jta.UserTransaction">java:comp/UserTransaction</property>
|
||||
|
||||
|
@ -94,8 +94,7 @@ public class BlogItem {
|
||||
|
||||
<programlisting><![CDATA[<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC
|
||||
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
|
||||
<hibernate-mapping package="eg">
|
||||
|
||||
@ -136,8 +135,7 @@ public class BlogItem {
|
||||
|
||||
<programlisting><![CDATA[<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC
|
||||
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
|
||||
<hibernate-mapping package="eg">
|
||||
|
||||
@ -195,13 +193,13 @@ import java.util.Calendar;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import net.sf.hibernate.HibernateException;
|
||||
import net.sf.hibernate.Query;
|
||||
import net.sf.hibernate.Session;
|
||||
import net.sf.hibernate.SessionFactory;
|
||||
import net.sf.hibernate.Transaction;
|
||||
import net.sf.hibernate.cfg.Configuration;
|
||||
import net.sf.hibernate.tool.hbm2ddl.SchemaExport;
|
||||
import org.hibernate.HibernateException;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.Transaction;
|
||||
import org.hibernate.cfg.Configuration;
|
||||
import org.hibernate.tool.hbm2ddl.SchemaExport;
|
||||
|
||||
public class BlogMain {
|
||||
|
||||
|
@ -168,7 +168,7 @@ List problems = sess.find(
|
||||
<para>
|
||||
The <literal>Hibernate</literal> class defines a number of static methods
|
||||
and constants, providing access to most of the built-in types, as instances
|
||||
of <literal>net.sf.hibernate.type.Type</literal>.
|
||||
of <literal>org.hibernate.type.Type</literal>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@ -275,7 +275,7 @@ while ( results.hasNext() ) {
|
||||
<para>
|
||||
If you need to specify bounds upon your result set (the maximum number of rows
|
||||
you want to retrieve and / or the first row you want to retrieve) you should
|
||||
obtain an instance of <literal>net.sf.hibernate.Query</literal>:
|
||||
obtain an instance of <literal>org.hibernate.Query</literal>:
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[Query q = sess.createQuery("from DomesticCat cat");
|
||||
@ -727,7 +727,7 @@ sess.lock(pk, LockMode.UPGRADE);]]></programlisting>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
from <literal>net.sf.hibernate.Transaction.commit()</literal>
|
||||
from <literal>org.hibernate.Transaction.commit()</literal>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
@ -1120,14 +1120,14 @@ finally {
|
||||
updated.
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[package net.sf.hibernate.test;
|
||||
<programlisting><![CDATA[package org.hibernate.test;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
|
||||
import net.sf.hibernate.Interceptor;
|
||||
import net.sf.hibernate.type.Type;
|
||||
import org.hibernate.Interceptor;
|
||||
import org.hibernate.type.Type;
|
||||
|
||||
public class AuditInterceptor implements Interceptor, Serializable {
|
||||
|
||||
|
@ -368,7 +368,7 @@ ICat fritz = (ICat) iter.next();]]></programlisting>
|
||||
<para>
|
||||
By default, Hibernate uses EHCache for JVM-level caching. (JCS support is now deprecated and will
|
||||
be removed in a future version of Hibernate.) You may choose a different implementation by
|
||||
specifying the name of a class that implements <literal>net.sf.hibernate.cache.CacheProvider</literal>
|
||||
specifying the name of a class that implements <literal>org.hibernate.cache.CacheProvider</literal>
|
||||
using the property <literal>hibernate.cache.provider_class</literal>.
|
||||
</para>
|
||||
|
||||
@ -651,9 +651,9 @@ while ( cats.hasNext() ) {
|
||||
frequently with the same parameters. To use the query cache you must first enable it
|
||||
by setting the property <literal>hibernate.cache.use_query_cache=true</literal>. This
|
||||
causes the creation of two cache regions - one holding cached query result sets
|
||||
(<literal>net.sf.hibernate.cache.QueryCache</literal>), the other holding timestamps
|
||||
(<literal>org.hibernate.cache.QueryCache</literal>), the other holding timestamps
|
||||
of most recent updates to queried tables
|
||||
(<literal>net.sf.hibernate.cache.UpdateTimestampsCache</literal>). Note that the query
|
||||
(<literal>org.hibernate.cache.UpdateTimestampsCache</literal>). Note that the query
|
||||
cache does not cache the state of any entities in the result set; it caches only
|
||||
identifier values and results of value type. So the query cache is usually used in
|
||||
conjunction with the second-level cache.
|
||||
|
@ -11,7 +11,7 @@
|
||||
<title>Creating a <literal>Criteria</literal> instance</title>
|
||||
|
||||
<para>
|
||||
The interface <literal>net.sf.hibernate.Criteria</literal> represents a query against
|
||||
The interface <literal>org.hibernate.Criteria</literal> represents a query against
|
||||
a particular persistent class. The <literal>Session</literal> is a factory for
|
||||
<literal>Criteria</literal> instances.
|
||||
</para>
|
||||
@ -27,8 +27,8 @@ List cats = crit.list();]]></programlisting>
|
||||
|
||||
<para>
|
||||
An individual query criterion is an instance of the interface
|
||||
<literal>net.sf.hibernate.expression.Criterion</literal>. The class
|
||||
<literal>net.sf.hibernate.expression.Expression</literal> defines
|
||||
<literal>org.hibernate.expression.Criterion</literal>. The class
|
||||
<literal>org.hibernate.expression.Expression</literal> defines
|
||||
factory methods for obtaining certain built-in
|
||||
<literal>Criterion</literal> types.
|
||||
</para>
|
||||
@ -80,7 +80,7 @@ List cats = crit.list();]]></programlisting>
|
||||
<title>Ordering the results</title>
|
||||
|
||||
<para>
|
||||
You may order the results using <literal>net.sf.hibernate.expression.Order</literal>.
|
||||
You may order the results using <literal>org.hibernate.expression.Order</literal>.
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[List cats = sess.createCriteria(Cat.class)
|
||||
@ -173,7 +173,7 @@ while ( iter.hasNext() ) {
|
||||
<title>Example queries</title>
|
||||
|
||||
<para>
|
||||
The class <literal>net.sf.hibernate.expression.Example</literal> allows
|
||||
The class <literal>org.hibernate.expression.Example</literal> allows
|
||||
you to construct a query criterion from a given instance.
|
||||
</para>
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
||||
So <literal>SeLeCT</literal> is the same as
|
||||
<literal>sELEct</literal> is the same as
|
||||
<literal>SELECT</literal> but
|
||||
<literal>net.sf.hibernate.eg.FOO</literal> is not
|
||||
<literal>net.sf.hibernate.eg.Foo</literal> and
|
||||
<literal>org.hibernate.eg.FOO</literal> is not
|
||||
<literal>org.hibernate.eg.Foo</literal> and
|
||||
<literal>foo.barSet</literal> is not
|
||||
<literal>foo.BARSET</literal>.
|
||||
</para>
|
||||
|
@ -235,9 +235,9 @@
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[<?xml version='1.0' encoding='utf-8'?>
|
||||
<!DOCTYPE hibernate-configuration
|
||||
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
|
||||
<!DOCTYPE hibernate-configuration PUBLIC
|
||||
"-//Hibernate/Hibernate Configuration DTD//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
|
||||
|
||||
<hibernate-configuration>
|
||||
|
||||
@ -245,7 +245,7 @@
|
||||
|
||||
<property name="connection.datasource">java:comp/env/jdbc/quickstart</property>
|
||||
<property name="show_sql">false</property>
|
||||
<property name="dialect">net.sf.hibernate.dialect.PostgreSQLDialect</property>
|
||||
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
|
||||
|
||||
<!-- Mapping files -->
|
||||
<mapping resource="Cat.hbm.xml"/>
|
||||
@ -292,7 +292,7 @@
|
||||
visible interface:
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[package net.sf.hibernate.examples.quickstart;
|
||||
<programlisting><![CDATA[package org.hibernate.examples.quickstart;
|
||||
|
||||
public class Cat {
|
||||
|
||||
@ -371,13 +371,12 @@ public class Cat {
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping
|
||||
PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
|
||||
<!DOCTYPE hibernate-mapping PUBLIC
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
|
||||
<hibernate-mapping>
|
||||
|
||||
<class name="net.sf.hibernate.examples.quickstart.Cat" table="CAT">
|
||||
<class name="org.hibernate.examples.quickstart.Cat" table="CAT">
|
||||
|
||||
<!-- A 32 hex character is our surrogate key. It's automatically
|
||||
generated by Hibernate with the UUID pattern. -->
|
||||
@ -481,8 +480,8 @@ Indexes: cat_pkey primary key btree (cat_id)]]></programlisting>
|
||||
We implement a <literal>HibernateUtil</literal> helper class:
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[import net.sf.hibernate.*;
|
||||
import net.sf.hibernate.cfg.*;
|
||||
<programlisting><![CDATA[import org.hibernate.*;
|
||||
import org.hibernate.cfg.*;
|
||||
|
||||
public class HibernateUtil {
|
||||
|
||||
|
@ -226,7 +226,7 @@
|
||||
|
||||
<para>
|
||||
<literal>java -cp </literal><emphasis>hibernate_classpaths</emphasis>
|
||||
<literal>net.sf.hibernate.tool.hbm2ddl.SchemaExport</literal> <emphasis>options mapping_files</emphasis>
|
||||
<literal>org.hibernate.tool.hbm2ddl.SchemaExport</literal> <emphasis>options mapping_files</emphasis>
|
||||
</para>
|
||||
|
||||
<table frame="topbot">
|
||||
@ -356,7 +356,7 @@ new SchemaExport(cfg).create(false, true);]]></programlisting>
|
||||
|
||||
<programlisting><![CDATA[<target name="schemaexport">
|
||||
<taskdef name="schemaexport"
|
||||
classname="net.sf.hibernate.tool.hbm2ddl.SchemaExportTask"
|
||||
classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"
|
||||
classpathref="class.path"/>
|
||||
|
||||
<schemaexport
|
||||
@ -385,7 +385,7 @@ new SchemaExport(cfg).create(false, true);]]></programlisting>
|
||||
|
||||
<para>
|
||||
<literal>java -cp </literal><emphasis>hibernate_classpaths</emphasis>
|
||||
<literal>net.sf.hibernate.tool.hbm2ddl.SchemaUpdate</literal> <emphasis>options mapping_files</emphasis>
|
||||
<literal>org.hibernate.tool.hbm2ddl.SchemaUpdate</literal> <emphasis>options mapping_files</emphasis>
|
||||
</para>
|
||||
|
||||
<table frame="topbot">
|
||||
@ -430,7 +430,7 @@ new SchemaUpdate(cfg).execute(false);]]></programlisting>
|
||||
|
||||
<programlisting><![CDATA[<target name="schemaupdate">
|
||||
<taskdef name="schemaupdate"
|
||||
classname="net.sf.hibernate.tool.hbm2ddl.SchemaUpdateTask"
|
||||
classname="org.hibernate.tool.hbm2ddl.SchemaUpdateTask"
|
||||
classpathref="class.path"/>
|
||||
|
||||
<schemaupdate
|
||||
@ -463,7 +463,7 @@ new SchemaUpdate(cfg).execute(false);]]></programlisting>
|
||||
|
||||
<para>
|
||||
<literal>java -cp</literal> <emphasis>hibernate_classpaths</emphasis>
|
||||
<literal>net.sf.hibernate.tool.hbm2java.CodeGenerator</literal> <emphasis> options
|
||||
<literal>org.hibernate.tool.hbm2java.CodeGenerator</literal> <emphasis> options
|
||||
mapping_files</emphasis>
|
||||
</para>
|
||||
|
||||
@ -502,11 +502,11 @@ new SchemaUpdate(cfg).execute(false);]]></programlisting>
|
||||
|
||||
<programlisting><![CDATA[<codegen>
|
||||
<meta attribute="implements">codegen.test.IAuditable</meta>
|
||||
<generate renderer="net.sf.hibernate.tool.hbm2java.BasicRenderer"/>
|
||||
<generate renderer="org.hibernate.tool.hbm2java.BasicRenderer"/>
|
||||
<generate
|
||||
package="autofinders.only"
|
||||
suffix="Finder"
|
||||
renderer="net.sf.hibernate.tool.hbm2java.FinderRenderer"/>
|
||||
renderer="org.hibernate.tool.hbm2java.FinderRenderer"/>
|
||||
</codegen>]]></programlisting>
|
||||
|
||||
<para>
|
||||
@ -546,8 +546,8 @@ new SchemaUpdate(cfg).execute(false);]]></programlisting>
|
||||
|
||||
<programlisting><![CDATA[
|
||||
<codegen>
|
||||
<generate prefix="Base" renderer="net.sf.hibernate.tool.hbm2java.BasicRenderer"/>
|
||||
<generate renderer="net.sf.hibernate.tool.hbm2java.BasicRenderer">
|
||||
<generate prefix="Base" renderer="org.hibernate.tool.hbm2java.BasicRenderer"/>
|
||||
<generate renderer="org.hibernate.tool.hbm2java.BasicRenderer">
|
||||
<param name="generate-concrete-empty-classes">true</param>
|
||||
<param name="baseclass-prefix">Base</param>
|
||||
</generate>
|
||||
@ -809,8 +809,8 @@ public class Person implements Serializable, IAuditable {
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[<codegen>
|
||||
<generate renderer="net.sf.hibernate.tool.hbm2java.BasicRenderer"/>
|
||||
<generate suffix="Finder" renderer="net.sf.hibernate.tool.hbm2java.FinderRenderer"/>
|
||||
<generate renderer="org.hibernate.tool.hbm2java.BasicRenderer"/>
|
||||
<generate suffix="Finder" renderer="org.hibernate.tool.hbm2java.FinderRenderer"/>
|
||||
</codegen>]]></programlisting>
|
||||
|
||||
<para>
|
||||
@ -843,7 +843,7 @@ public class Person implements Serializable, IAuditable {
|
||||
|
||||
<programlisting><![CDATA[
|
||||
<codegen>
|
||||
<generate renderer="net.sf.hibernate.tool.hbm2java.VelocityRenderer">
|
||||
<generate renderer="org.hibernate.tool.hbm2java.VelocityRenderer">
|
||||
<param name="template">pojo.vm</param>
|
||||
</generate>
|
||||
</codegen>]]></programlisting>
|
||||
@ -992,7 +992,7 @@ public class Person implements Serializable, IAuditable {
|
||||
|
||||
<para>
|
||||
<literal>java -cp </literal><emphasis>hibernate_and_your_class_classpaths</emphasis>
|
||||
<literal>net.sf.hibernate.tool.class2hbm.MapGenerator</literal> <emphasis>options and
|
||||
<literal>org.hibernate.tool.class2hbm.MapGenerator</literal> <emphasis>options and
|
||||
classnames</emphasis>
|
||||
</para>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user