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:
Christian Bauer 2004-08-10 03:16:42 +00:00
parent bc18e67174
commit ff367dd04a
11 changed files with 167 additions and 172 deletions

View File

@ -59,7 +59,7 @@
<variablelist spacing="compact"> <variablelist spacing="compact">
<varlistentry> <varlistentry>
<term>SessionFactory (<literal>net.sf.hibernate.SessionFactory</literal>)</term> <term>SessionFactory (<literal>org.hibernate.SessionFactory</literal>)</term>
<listitem> <listitem>
<para> <para>
A threadsafe (immutable) cache of compiled mappings for a single database. A threadsafe (immutable) cache of compiled mappings for a single database.
@ -71,7 +71,7 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>Session (<literal>net.sf.hibernate.Session</literal>)</term> <term>Session (<literal>org.hibernate.Session</literal>)</term>
<listitem> <listitem>
<para> <para>
A single-threaded, short-lived object representing a conversation between A single-threaded, short-lived object representing a conversation between
@ -107,7 +107,7 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>Transaction (<literal>net.sf.hibernate.Transaction</literal>)</term> <term>Transaction (<literal>org.hibernate.Transaction</literal>)</term>
<listitem> <listitem>
<para> <para>
(Optional) A single-threaded, short-lived object used by the application to (Optional) A single-threaded, short-lived object used by the application to
@ -118,7 +118,7 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>ConnectionProvider (<literal>net.sf.hibernate.connection.ConnectionProvider</literal>)</term> <term>ConnectionProvider (<literal>org.hibernate.connection.ConnectionProvider</literal>)</term>
<listitem> <listitem>
<para> <para>
(Optional) A factory for (and pool of) JDBC connections. Abstracts application from (Optional) A factory for (and pool of) JDBC connections. Abstracts application from
@ -128,7 +128,7 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>TransactionFactory (<literal>net.sf.hibernate.TransactionFactory</literal>)</term> <term>TransactionFactory (<literal>org.hibernate.TransactionFactory</literal>)</term>
<listitem> <listitem>
<para> <para>
(Optional) A factory for <literal>Transaction</literal> instances. Not exposed to the (Optional) A factory for <literal>Transaction</literal> instances. Not exposed to the

View File

@ -23,8 +23,7 @@
<programlisting><![CDATA[<?xml version="1.0"?> <programlisting><![CDATA[<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC <!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping package="eg"> <hibernate-mapping package="eg">
@ -312,11 +311,11 @@
<para> <para>
The <literal>persister</literal> attribute lets you customize the persistence strategy used for The <literal>persister</literal> attribute lets you customize the persistence strategy used for
the class. You may, for example, specify your own subclass of 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 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 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>). to a <literal>Hashtable</literal>).
</para> </para>
@ -457,14 +456,14 @@
</para> </para>
<programlisting><![CDATA[<id name="id" type="long" column="uid" unsaved-value="0"> <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="table">uid_table</param>
<param name="column">next_hi_value_column</param> <param name="column">next_hi_value_column</param>
</generator> </generator>
</id>]]></programlisting> </id>]]></programlisting>
<para> <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 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 implementations. However, Hibernate provides a range of built-in implementations. There are shortcut
names for the built-in generators: names for the built-in generators:
@ -1059,7 +1058,7 @@
If you specify <literal>access="field"</literal>, Hibernate will bypass the get/set 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 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 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> </para>
</sect2> </sect2>
@ -1571,7 +1570,7 @@
<programlisting><![CDATA[<?xml version="1.0"?> <programlisting><![CDATA[<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC <!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN" "-//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"> <hibernate-mapping package="eg">
@ -1826,7 +1825,7 @@
<para> <para>
The basic value types have corresponding <literal>Type</literal> constants defined on 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. represents the <literal>string</literal> type.
</para> </para>
@ -1838,12 +1837,12 @@
<para> <para>
An <emphasis>enumerated</emphasis> type is a common Java idiom where a class has 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 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>: defining the operations <literal>toInt()</literal> and <literal>fromInt()</literal>:
</para> </para>
<programlisting><![CDATA[package eg; <programlisting><![CDATA[package eg;
import net.sf.hibernate.PersistentEnum; import org.hibernate.PersistentEnum;
public class Color implements PersistentEnum { public class Color implements PersistentEnum {
private final int code; private final int code;
@ -1888,14 +1887,14 @@ public class Color implements PersistentEnum {
</para> </para>
<para> <para>
To implement a custom type, implement either <literal>net.sf.hibernate.UserType</literal> To implement a custom type, implement either <literal>org.hibernate.UserType</literal>
or <literal>net.sf.hibernate.CompositeUserType</literal> and declare properties using the or <literal>org.hibernate.CompositeUserType</literal> and declare properties using the
fully qualified classname of the type. Check out 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. are possible.
</para> </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="first_string"/>
<column name="second_string"/> <column name="second_string"/>
</property>]]></programlisting> </property>]]></programlisting>

View File

@ -66,7 +66,7 @@
<para> <para>
Hibernate lets the application manage JDBC connections. This approach should be considered 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 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> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -76,7 +76,7 @@
<para> <para>
Suppose you have a Java type, say from some library, that needs to be persisted but doesn't 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 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. code from implementing transformations to / from a Hibernate type.
</para> </para>
</listitem> </listitem>

View File

@ -14,7 +14,7 @@
<title>Programmatic Configuration</title> <title>Programmatic Configuration</title>
<para> <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 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 SQL database. The <literal>Configuration</literal> is used to build a
(immutable)` <literal>SessionFactory</literal>. The mappings are compiled (immutable)` <literal>SessionFactory</literal>. The mappings are compiled
@ -151,7 +151,7 @@ Session session = sessions.openSession(conn);
<para> <para>
All Hibernate property names and semantics are defined on the class 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. important settings for JDBC connection configuration.
</para> </para>
@ -250,7 +250,7 @@ hibernate.c3p0.min_size=5
hibernate.c3p0.max_size=20 hibernate.c3p0.max_size=20
hibernate.c3p0.timeout=1800 hibernate.c3p0.timeout=1800
hibernate.c3p0.max_statements=50 hibernate.c3p0.max_statements=50
hibernate.dialect = net.sf.hibernate.dialect.PostgreSQLDialect]]></programlisting> hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect]]></programlisting>
<para> <para>
For use inside an application server, Hibernate may obtain connections from a 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 <programlisting><![CDATA[hibernate.connection.datasource = java:/comp/env/jdbc/MyDB
hibernate.transaction.factory_class = \ hibernate.transaction.factory_class = \
net.sf.hibernate.transaction.JTATransactionFactory org.hibernate.transaction.JTATransactionFactory
hibernate.transaction.manager_lookup_class = \ hibernate.transaction.manager_lookup_class = \
net.sf.hibernate.transaction.JBossTransactionManagerLookup org.hibernate.transaction.JBossTransactionManagerLookup
hibernate.dialect = \ hibernate.dialect = \
net.sf.hibernate.dialect.PostgreSQLDialect]]></programlisting> org.hibernate.dialect.PostgreSQLDialect]]></programlisting>
<para> <para>
JDBC connections obtained from a JNDI datasource will automatically participate JDBC connections obtained from a JNDI datasource will automatically participate
@ -339,7 +339,7 @@ hibernate.dialect = \
<para> <para>
You may define your own plugin strategy for obtaining JDBC connections by implementing the 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>. a custom implementation by setting <literal>hibernate.connection.provider_class</literal>.
</para> </para>
@ -728,7 +728,7 @@ hibernate.dialect = \
<para> <para>
You should always set the <literal>hibernate.dialect</literal> property to the correct 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 strictly essential unless you wish to use <literal>native</literal> or
<literal>sequence</literal> primary key generation or pessimistic locking (with, eg. <literal>sequence</literal> primary key generation or pessimistic locking (with, eg.
<literal>Session.lock()</literal> or <literal>Query.setLockMode()</literal>). <literal>Session.lock()</literal> or <literal>Query.setLockMode()</literal>).
@ -749,64 +749,64 @@ hibernate.dialect = \
</thead> </thead>
<tbody> <tbody>
<row> <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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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> </row>
</tbody> </tbody>
</tgroup> </tgroup>
@ -868,7 +868,7 @@ hibernate.dialect = \
<para> <para>
You may integrate a JVM-level (or clustered) second-level cache system by 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 You may select the custom implementation by setting
<literal>hibernate.cache.provider_class</literal>. <literal>hibernate.cache.provider_class</literal>.
</para> </para>
@ -892,13 +892,13 @@ hibernate.dialect = \
<variablelist spacing="compact"> <variablelist spacing="compact">
<varlistentry> <varlistentry>
<term><literal>net.sf.hibernate.transaction.JDBCTransactionFactory</literal></term> <term><literal>org.hibernate.transaction.JDBCTransactionFactory</literal></term>
<listitem> <listitem>
<para>delegates to database (JDBC) transactions (default)</para> <para>delegates to database (JDBC) transactions (default)</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><literal>net.sf.hibernate.transaction.JTATransactionFactory</literal></term> <term><literal>org.hibernate.transaction.JTATransactionFactory</literal></term>
<listitem> <listitem>
<para>delegates to JTA (if an existing transaction is underway, the <literal>Session</literal> <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> performs its work in that context, otherwise a new transaction is started)</para>
@ -930,39 +930,39 @@ hibernate.dialect = \
</thead> </thead>
<tbody> <tbody>
<row> <row>
<entry><literal>net.sf.hibernate.transaction.JBossTransactionManagerLookup</literal></entry> <entry><literal>org.hibernate.transaction.JBossTransactionManagerLookup</literal></entry>
<entry align="center">JBoss</entry> <entry align="center">JBoss</entry>
</row> </row>
<row> <row>
<entry><literal>net.sf.hibernate.transaction.WeblogicTransactionManagerLookup</literal></entry> <entry><literal>org.hibernate.transaction.WeblogicTransactionManagerLookup</literal></entry>
<entry align="center">Weblogic</entry> <entry align="center">Weblogic</entry>
</row> </row>
<row> <row>
<entry><literal>net.sf.hibernate.transaction.WebSphereTransactionManagerLookup</literal></entry> <entry><literal>org.hibernate.transaction.WebSphereTransactionManagerLookup</literal></entry>
<entry align="center">WebSphere</entry> <entry align="center">WebSphere</entry>
</row> </row>
<row> <row>
<entry><literal>net.sf.hibernate.transaction.OrionTransactionManagerLookup</literal></entry> <entry><literal>org.hibernate.transaction.OrionTransactionManagerLookup</literal></entry>
<entry align="center">Orion</entry> <entry align="center">Orion</entry>
</row> </row>
<row> <row>
<entry><literal>net.sf.hibernate.transaction.ResinTransactionManagerLookup</literal></entry> <entry><literal>org.hibernate.transaction.ResinTransactionManagerLookup</literal></entry>
<entry align="center">Resin</entry> <entry align="center">Resin</entry>
</row> </row>
<row> <row>
<entry><literal>net.sf.hibernate.transaction.JOTMTransactionManagerLookup</literal></entry> <entry><literal>org.hibernate.transaction.JOTMTransactionManagerLookup</literal></entry>
<entry align="center">JOTM</entry> <entry align="center">JOTM</entry>
</row> </row>
<row> <row>
<entry><literal>net.sf.hibernate.transaction.JOnASTransactionManagerLookup</literal></entry> <entry><literal>org.hibernate.transaction.JOnASTransactionManagerLookup</literal></entry>
<entry align="center">JOnAS</entry> <entry align="center">JOnAS</entry>
</row> </row>
<row> <row>
<entry><literal>net.sf.hibernate.transaction.JRun4TransactionManagerLookup</literal></entry> <entry><literal>org.hibernate.transaction.JRun4TransactionManagerLookup</literal></entry>
<entry align="center">JRun4</entry> <entry align="center">JRun4</entry>
</row> </row>
<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> <entry align="center">Borland ES</entry>
</row> </row>
</tbody> </tbody>
@ -1058,7 +1058,7 @@ hibernate.dialect = \
<title>Implementing a <literal>NamingStrategy</literal></title> <title>Implementing a <literal>NamingStrategy</literal></title>
<para> <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. to specify a "naming standard" for database objects and schema elements.
</para> </para>
@ -1083,7 +1083,7 @@ hibernate.dialect = \
.buildSessionFactory();]]></programlisting> .buildSessionFactory();]]></programlisting>
<para> <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. strategy that might be a useful starting point for some applications.
</para> </para>
@ -1106,9 +1106,8 @@ hibernate.dialect = \
<programlisting><![CDATA[<?xml version='1.0' encoding='utf-8'?> <programlisting><![CDATA[<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC <!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 2.0//EN" "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration> <hibernate-configuration>
@ -1118,11 +1117,11 @@ hibernate.dialect = \
<!-- properties --> <!-- properties -->
<property name="connection.datasource">my/first/datasource</property> <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="show_sql">false</property>
<property name="use_outer_join">true</property> <property name="use_outer_join">true</property>
<property name="transaction.factory_class"> <property name="transaction.factory_class">
net.sf.hibernate.transaction.JTATransactionFactory org.hibernate.transaction.JTATransactionFactory
</property> </property>
<property name="jta.UserTransaction">java:comp/UserTransaction</property> <property name="jta.UserTransaction">java:comp/UserTransaction</property>

View File

@ -93,89 +93,87 @@ public class BlogItem {
</para> </para>
<programlisting><![CDATA[<?xml version="1.0"?> <programlisting><![CDATA[<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC <!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping package="eg"> <hibernate-mapping package="eg">
<class <class
name="Blog" name="Blog"
table="BLOGS" table="BLOGS"
lazy="true"> lazy="true">
<id <id
name="id" name="id"
column="BLOG_ID"> column="BLOG_ID">
<generator class="native"/> <generator class="native"/>
</id> </id>
<property <property
name="name" name="name"
column="NAME" column="NAME"
not-null="true" not-null="true"
unique="true"/> unique="true"/>
<bag <bag
name="items" name="items"
inverse="true" inverse="true"
lazy="true" lazy="true"
order-by="DATE_TIME" order-by="DATE_TIME"
cascade="all"> cascade="all">
<key column="BLOG_ID"/> <key column="BLOG_ID"/>
<one-to-many class="BlogItem"/> <one-to-many class="BlogItem"/>
</bag> </bag>
</class> </class>
</hibernate-mapping>]]></programlisting> </hibernate-mapping>]]></programlisting>
<programlisting><![CDATA[<?xml version="1.0"?> <programlisting><![CDATA[<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC <!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping package="eg"> <hibernate-mapping package="eg">
<class <class
name="BlogItem" name="BlogItem"
table="BLOG_ITEMS" table="BLOG_ITEMS"
dynamic-update="true"> dynamic-update="true">
<id <id
name="id" name="id"
column="BLOG_ITEM_ID"> column="BLOG_ITEM_ID">
<generator class="native"/> <generator class="native"/>
</id> </id>
<property <property
name="title" name="title"
column="TITLE" column="TITLE"
not-null="true"/> not-null="true"/>
<property <property
name="text" name="text"
column="TEXT" column="TEXT"
not-null="true"/> not-null="true"/>
<property <property
name="datetime" name="datetime"
column="DATE_TIME" column="DATE_TIME"
not-null="true"/> not-null="true"/>
<many-to-one <many-to-one
name="blog" name="blog"
column="BLOG_ID" column="BLOG_ID"
not-null="true"/> not-null="true"/>
</class> </class>
</hibernate-mapping>]]></programlisting> </hibernate-mapping>]]></programlisting>
</sect1> </sect1>
@ -195,13 +193,13 @@ import java.util.Calendar;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import net.sf.hibernate.HibernateException; import org.hibernate.HibernateException;
import net.sf.hibernate.Query; import org.hibernate.Query;
import net.sf.hibernate.Session; import org.hibernate.Session;
import net.sf.hibernate.SessionFactory; import org.hibernate.SessionFactory;
import net.sf.hibernate.Transaction; import org.hibernate.Transaction;
import net.sf.hibernate.cfg.Configuration; import org.hibernate.cfg.Configuration;
import net.sf.hibernate.tool.hbm2ddl.SchemaExport; import org.hibernate.tool.hbm2ddl.SchemaExport;
public class BlogMain { public class BlogMain {

View File

@ -168,7 +168,7 @@ List problems = sess.find(
<para> <para>
The <literal>Hibernate</literal> class defines a number of static methods The <literal>Hibernate</literal> class defines a number of static methods
and constants, providing access to most of the built-in types, as instances 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>
<para> <para>
@ -275,7 +275,7 @@ while ( results.hasNext() ) {
<para> <para>
If you need to specify bounds upon your result set (the maximum number of rows 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 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> </para>
<programlisting><![CDATA[Query q = sess.createQuery("from DomesticCat cat"); <programlisting><![CDATA[Query q = sess.createQuery("from DomesticCat cat");
@ -727,7 +727,7 @@ sess.lock(pk, LockMode.UPGRADE);]]></programlisting>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
from <literal>net.sf.hibernate.Transaction.commit()</literal> from <literal>org.hibernate.Transaction.commit()</literal>
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
@ -1120,14 +1120,14 @@ finally {
updated. updated.
</para> </para>
<programlisting><![CDATA[package net.sf.hibernate.test; <programlisting><![CDATA[package org.hibernate.test;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.Iterator; import java.util.Iterator;
import net.sf.hibernate.Interceptor; import org.hibernate.Interceptor;
import net.sf.hibernate.type.Type; import org.hibernate.type.Type;
public class AuditInterceptor implements Interceptor, Serializable { public class AuditInterceptor implements Interceptor, Serializable {

View File

@ -368,7 +368,7 @@ ICat fritz = (ICat) iter.next();]]></programlisting>
<para> <para>
By default, Hibernate uses EHCache for JVM-level caching. (JCS support is now deprecated and will 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 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>. using the property <literal>hibernate.cache.provider_class</literal>.
</para> </para>
@ -651,9 +651,9 @@ while ( cats.hasNext() ) {
frequently with the same parameters. To use the query cache you must first enable it 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 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 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 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 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 identifier values and results of value type. So the query cache is usually used in
conjunction with the second-level cache. conjunction with the second-level cache.

View File

@ -11,7 +11,7 @@
<title>Creating a <literal>Criteria</literal> instance</title> <title>Creating a <literal>Criteria</literal> instance</title>
<para> <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 a particular persistent class. The <literal>Session</literal> is a factory for
<literal>Criteria</literal> instances. <literal>Criteria</literal> instances.
</para> </para>
@ -27,8 +27,8 @@ List cats = crit.list();]]></programlisting>
<para> <para>
An individual query criterion is an instance of the interface An individual query criterion is an instance of the interface
<literal>net.sf.hibernate.expression.Criterion</literal>. The class <literal>org.hibernate.expression.Criterion</literal>. The class
<literal>net.sf.hibernate.expression.Expression</literal> defines <literal>org.hibernate.expression.Expression</literal> defines
factory methods for obtaining certain built-in factory methods for obtaining certain built-in
<literal>Criterion</literal> types. <literal>Criterion</literal> types.
</para> </para>
@ -80,7 +80,7 @@ List cats = crit.list();]]></programlisting>
<title>Ordering the results</title> <title>Ordering the results</title>
<para> <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> </para>
<programlisting><![CDATA[List cats = sess.createCriteria(Cat.class) <programlisting><![CDATA[List cats = sess.createCriteria(Cat.class)
@ -173,7 +173,7 @@ while ( iter.hasNext() ) {
<title>Example queries</title> <title>Example queries</title>
<para> <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. you to construct a query criterion from a given instance.
</para> </para>

View File

@ -15,8 +15,8 @@
So <literal>SeLeCT</literal> is the same as So <literal>SeLeCT</literal> is the same as
<literal>sELEct</literal> is the same as <literal>sELEct</literal> is the same as
<literal>SELECT</literal> but <literal>SELECT</literal> but
<literal>net.sf.hibernate.eg.FOO</literal> is not <literal>org.hibernate.eg.FOO</literal> is not
<literal>net.sf.hibernate.eg.Foo</literal> and <literal>org.hibernate.eg.Foo</literal> and
<literal>foo.barSet</literal> is not <literal>foo.barSet</literal> is not
<literal>foo.BARSET</literal>. <literal>foo.BARSET</literal>.
</para> </para>

View File

@ -235,9 +235,9 @@
</para> </para>
<programlisting><![CDATA[<?xml version='1.0' encoding='utf-8'?> <programlisting><![CDATA[<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration <!DOCTYPE hibernate-configuration PUBLIC
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd"> "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration> <hibernate-configuration>
@ -245,7 +245,7 @@
<property name="connection.datasource">java:comp/env/jdbc/quickstart</property> <property name="connection.datasource">java:comp/env/jdbc/quickstart</property>
<property name="show_sql">false</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 files -->
<mapping resource="Cat.hbm.xml"/> <mapping resource="Cat.hbm.xml"/>
@ -292,7 +292,7 @@
visible interface: visible interface:
</para> </para>
<programlisting><![CDATA[package net.sf.hibernate.examples.quickstart; <programlisting><![CDATA[package org.hibernate.examples.quickstart;
public class Cat { public class Cat {
@ -371,13 +371,12 @@ public class Cat {
</para> </para>
<programlisting><![CDATA[<?xml version="1.0"?> <programlisting><![CDATA[<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping <!DOCTYPE hibernate-mapping PUBLIC
PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping> <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 <!-- A 32 hex character is our surrogate key. It's automatically
generated by Hibernate with the UUID pattern. --> 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: We implement a <literal>HibernateUtil</literal> helper class:
</para> </para>
<programlisting><![CDATA[import net.sf.hibernate.*; <programlisting><![CDATA[import org.hibernate.*;
import net.sf.hibernate.cfg.*; import org.hibernate.cfg.*;
public class HibernateUtil { public class HibernateUtil {

View File

@ -226,7 +226,7 @@
<para> <para>
<literal>java -cp </literal><emphasis>hibernate_classpaths</emphasis> <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> </para>
<table frame="topbot"> <table frame="topbot">
@ -356,7 +356,7 @@ new SchemaExport(cfg).create(false, true);]]></programlisting>
<programlisting><![CDATA[<target name="schemaexport"> <programlisting><![CDATA[<target name="schemaexport">
<taskdef name="schemaexport" <taskdef name="schemaexport"
classname="net.sf.hibernate.tool.hbm2ddl.SchemaExportTask" classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"
classpathref="class.path"/> classpathref="class.path"/>
<schemaexport <schemaexport
@ -385,7 +385,7 @@ new SchemaExport(cfg).create(false, true);]]></programlisting>
<para> <para>
<literal>java -cp </literal><emphasis>hibernate_classpaths</emphasis> <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> </para>
<table frame="topbot"> <table frame="topbot">
@ -430,7 +430,7 @@ new SchemaUpdate(cfg).execute(false);]]></programlisting>
<programlisting><![CDATA[<target name="schemaupdate"> <programlisting><![CDATA[<target name="schemaupdate">
<taskdef name="schemaupdate" <taskdef name="schemaupdate"
classname="net.sf.hibernate.tool.hbm2ddl.SchemaUpdateTask" classname="org.hibernate.tool.hbm2ddl.SchemaUpdateTask"
classpathref="class.path"/> classpathref="class.path"/>
<schemaupdate <schemaupdate
@ -463,7 +463,7 @@ new SchemaUpdate(cfg).execute(false);]]></programlisting>
<para> <para>
<literal>java -cp</literal> <emphasis>hibernate_classpaths</emphasis> <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> mapping_files</emphasis>
</para> </para>
@ -502,11 +502,11 @@ new SchemaUpdate(cfg).execute(false);]]></programlisting>
<programlisting><![CDATA[<codegen> <programlisting><![CDATA[<codegen>
<meta attribute="implements">codegen.test.IAuditable</meta> <meta attribute="implements">codegen.test.IAuditable</meta>
<generate renderer="net.sf.hibernate.tool.hbm2java.BasicRenderer"/> <generate renderer="org.hibernate.tool.hbm2java.BasicRenderer"/>
<generate <generate
package="autofinders.only" package="autofinders.only"
suffix="Finder" suffix="Finder"
renderer="net.sf.hibernate.tool.hbm2java.FinderRenderer"/> renderer="org.hibernate.tool.hbm2java.FinderRenderer"/>
</codegen>]]></programlisting> </codegen>]]></programlisting>
<para> <para>
@ -546,8 +546,8 @@ new SchemaUpdate(cfg).execute(false);]]></programlisting>
<programlisting><![CDATA[ <programlisting><![CDATA[
<codegen> <codegen>
<generate prefix="Base" renderer="net.sf.hibernate.tool.hbm2java.BasicRenderer"/> <generate prefix="Base" renderer="org.hibernate.tool.hbm2java.BasicRenderer"/>
<generate renderer="net.sf.hibernate.tool.hbm2java.BasicRenderer"> <generate renderer="org.hibernate.tool.hbm2java.BasicRenderer">
<param name="generate-concrete-empty-classes">true</param> <param name="generate-concrete-empty-classes">true</param>
<param name="baseclass-prefix">Base</param> <param name="baseclass-prefix">Base</param>
</generate> </generate>
@ -809,8 +809,8 @@ public class Person implements Serializable, IAuditable {
</para> </para>
<programlisting><![CDATA[<codegen> <programlisting><![CDATA[<codegen>
<generate renderer="net.sf.hibernate.tool.hbm2java.BasicRenderer"/> <generate renderer="org.hibernate.tool.hbm2java.BasicRenderer"/>
<generate suffix="Finder" renderer="net.sf.hibernate.tool.hbm2java.FinderRenderer"/> <generate suffix="Finder" renderer="org.hibernate.tool.hbm2java.FinderRenderer"/>
</codegen>]]></programlisting> </codegen>]]></programlisting>
<para> <para>
@ -843,7 +843,7 @@ public class Person implements Serializable, IAuditable {
<programlisting><![CDATA[ <programlisting><![CDATA[
<codegen> <codegen>
<generate renderer="net.sf.hibernate.tool.hbm2java.VelocityRenderer"> <generate renderer="org.hibernate.tool.hbm2java.VelocityRenderer">
<param name="template">pojo.vm</param> <param name="template">pojo.vm</param>
</generate> </generate>
</codegen>]]></programlisting> </codegen>]]></programlisting>
@ -992,7 +992,7 @@ public class Person implements Serializable, IAuditable {
<para> <para>
<literal>java -cp </literal><emphasis>hibernate_and_your_class_classpaths</emphasis> <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> classnames</emphasis>
</para> </para>