From hibernate-commits at lists.jboss.org Thu May 1 08:55:52 2008 Content-Type: multipart/mixed; boundary="===============7159431321944437359==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14616 - core/trunk/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/util. Date: Thu, 01 May 2008 08:55:52 -0400 Message-ID: --===============7159431321944437359== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bstansberry(a)jboss.com Date: 2008-05-01 08:55:52 -0400 (Thu, 01 May 2008) New Revision: 14616 Removed: core/trunk/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2= /functional/util/CustomClassLoaderCacheFactory.java Log: Remove unused class that uses JBC internals Deleted: core/trunk/cache-jbosscache2/src/test/java/org/hibernate/test/cach= e/jbc2/functional/util/CustomClassLoaderCacheFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc= 2/functional/util/CustomClassLoaderCacheFactory.java 2008-04-30 00:54:37 UT= C (rev 14615) +++ core/trunk/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc= 2/functional/util/CustomClassLoaderCacheFactory.java 2008-05-01 12:55:52 UT= C (rev 14616) @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved. - * - * This copyrighted material is made available to anyone wishing to use, m= odify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, v. 2.1. This program is distributed in t= he - * hope that it will be useful, but WITHOUT A WARRANTY; without even the i= mplied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See th= e GNU - * Lesser General Public License for more details. You should have receive= d a - * copy of the GNU Lesser General Public License, v.2.1 along with this - * distribution; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Red Hat Author(s): Brian Stansberry - */ - -package org.hibernate.test.cache.jbc2.functional.util; - -import org.jboss.cache.CacheImpl; -import org.jboss.cache.CacheSPI; -import org.jboss.cache.DefaultCacheFactory; -import org.jboss.cache.config.Configuration; - -/** - * CacheFactory impl that allows us to register a desired default classloa= der - * for deserializing RPCs. - * = - * @author Brian Stansberry - */ -public class CustomClassLoaderCacheFactory extends DefaultCacheFacto= ry -{ - private ClassLoader customClassLoader; - = - /** - * Create a new CustomClassLoaderCacheFactory. - */ - public CustomClassLoaderCacheFactory(ClassLoader customClassLoader) - { - super(); - this.customClassLoader =3D customClassLoader; - } - = - @Override - protected void bootstrap(CacheImpl cache, CacheSPI spi, Configuration c= onfiguration) - { - super.bootstrap(cache, spi, configuration); - = - // Replace the deployerClassLoader - componentRegistry.registerComponent("deployerClassLoader", customCla= ssLoader, ClassLoader.class); - } = - = -} --===============7159431321944437359==-- From hibernate-commits at lists.jboss.org Thu May 1 12:18:03 2008 Content-Type: multipart/mixed; boundary="===============8922720939569177055==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14617 - core/trunk/core/src/main/java/org/hibernate/cache. Date: Thu, 01 May 2008 12:18:03 -0400 Message-ID: --===============8922720939569177055== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: manik.surtani(a)jboss.com Date: 2008-05-01 12:18:03 -0400 (Thu, 01 May 2008) New Revision: 14617 Modified: core/trunk/core/src/main/java/org/hibernate/cache/QueryKey.java Log: Implement equals to deal with parameters of type other than QueryKey Modified: core/trunk/core/src/main/java/org/hibernate/cache/QueryKey.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/core/src/main/java/org/hibernate/cache/QueryKey.java 2008-05= -01 12:55:52 UTC (rev 14616) +++ core/trunk/core/src/main/java/org/hibernate/cache/QueryKey.java 2008-05= -01 16:18:03 UTC (rev 14617) @@ -51,7 +51,8 @@ } = public boolean equals(Object other) { - QueryKey that =3D (QueryKey) other; + if (!(other instanceof QueryKey)) return false; + QueryKey that =3D (QueryKey) other; if ( !sqlQueryString.equals(that.sqlQueryString) ) return false; if ( !EqualsHelper.equals(firstRow, that.firstRow) || !EqualsHelper.equa= ls(maxRows, that.maxRows) ) return false; if ( !EqualsHelper.equals(customTransformer, that.customTransformer) ) r= eturn false; --===============8922720939569177055==-- From hibernate-commits at lists.jboss.org Thu May 1 16:24:02 2008 Content-Type: multipart/mixed; boundary="===============0036412510435177569==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14618 - core/trunk/core/src/main/java/org/hibernate/event. Date: Thu, 01 May 2008 16:24:01 -0400 Message-ID: --===============0036412510435177569== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-01 16:24:01 -0400 (Thu, 01 May 2008) New Revision: 14618 Modified: core/trunk/core/src/main/java/org/hibernate/event/EventListeners.java Log: Propagate the nested exception when an EventListener init fails Modified: core/trunk/core/src/main/java/org/hibernate/event/EventListeners.= java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/core/src/main/java/org/hibernate/event/EventListeners.java 2= 008-05-01 16:18:03 UTC (rev 14617) +++ core/trunk/core/src/main/java/org/hibernate/event/EventListeners.java 2= 008-05-01 20:24:01 UTC (rev 14618) @@ -172,7 +172,7 @@ } } catch ( Exception e ) { - throw new AssertionFailure( "could not process listeners" ); + throw new AssertionFailure( "could not process listeners", e ); } } } --===============0036412510435177569==-- From hibernate-commits at lists.jboss.org Thu May 1 16:34:19 2008 Content-Type: multipart/mixed; boundary="===============3191285021841484961==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14619 - core/trunk/core/src/main/java/org/hibernate/event. Date: Thu, 01 May 2008 16:34:19 -0400 Message-ID: --===============3191285021841484961== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-01 16:34:18 -0400 (Thu, 01 May 2008) New Revision: 14619 Modified: core/trunk/core/src/main/java/org/hibernate/event/EventListeners.java Log: HHH-3260 Wrapping listener exceptions into an AssertionFailure is not good.= Replacing with HibernateException Modified: core/trunk/core/src/main/java/org/hibernate/event/EventListeners.= java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/core/src/main/java/org/hibernate/event/EventListeners.java 2= 008-05-01 20:24:01 UTC (rev 14618) +++ core/trunk/core/src/main/java/org/hibernate/event/EventListeners.java 2= 008-05-01 20:34:18 UTC (rev 14619) @@ -31,6 +31,7 @@ = import org.hibernate.AssertionFailure; import org.hibernate.MappingException; +import org.hibernate.HibernateException; import org.hibernate.cfg.Configuration; import org.hibernate.event.def.DefaultAutoFlushEventListener; import org.hibernate.event.def.DefaultDeleteEventListener; @@ -172,7 +173,7 @@ } } catch ( Exception e ) { - throw new AssertionFailure( "could not process listeners", e ); + throw new HibernateException( "could not process listeners", e ); } } } @@ -196,7 +197,7 @@ ); } catch ( Exception e ) { - throw new AssertionFailure("could not init listeners"); + throw new HibernateException("could not init listeners", e); } } = @@ -213,7 +214,7 @@ ); } catch ( Exception e ) { - throw new AssertionFailure("could not init listeners"); + throw new HibernateException("could not destruct listeners", e); } } = --===============3191285021841484961==-- From hibernate-commits at lists.jboss.org Thu May 1 18:05:14 2008 Content-Type: multipart/mixed; boundary="===============5730851536193818234==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14620 - commons-annotations/tags. Date: Thu, 01 May 2008 18:05:13 -0400 Message-ID: --===============5730851536193818234== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-01 18:05:13 -0400 (Thu, 01 May 2008) New Revision: 14620 Added: commons-annotations/tags/core_3_3_support/ Log: tag before support for core 3.3 in trunk Copied: commons-annotations/tags/core_3_3_support (from rev 14619, commons-= annotations/trunk) --===============5730851536193818234==-- From hibernate-commits at lists.jboss.org Thu May 1 18:05:28 2008 Content-Type: multipart/mixed; boundary="===============5823285734226176011==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14621 - annotations/tags. Date: Thu, 01 May 2008 18:05:28 -0400 Message-ID: --===============5823285734226176011== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-01 18:05:28 -0400 (Thu, 01 May 2008) New Revision: 14621 Added: annotations/tags/core_3_3_support/ Log: tag before support for core 3.3 in trunk Copied: annotations/tags/core_3_3_support (from rev 14620, commons-annotati= ons/trunk) --===============5823285734226176011==-- From hibernate-commits at lists.jboss.org Thu May 1 18:05:54 2008 Content-Type: multipart/mixed; boundary="===============9108729255424430018==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14622 - annotations/tags. Date: Thu, 01 May 2008 18:05:53 -0400 Message-ID: --===============9108729255424430018== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-01 18:05:53 -0400 (Thu, 01 May 2008) New Revision: 14622 Removed: annotations/tags/core_3_3_support/ Log: messed up projects --===============9108729255424430018==-- From hibernate-commits at lists.jboss.org Thu May 1 18:06:14 2008 Content-Type: multipart/mixed; boundary="===============0930524928549050852==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14623 - annotations/tags. Date: Thu, 01 May 2008 18:06:14 -0400 Message-ID: --===============0930524928549050852== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-01 18:06:14 -0400 (Thu, 01 May 2008) New Revision: 14623 Added: annotations/tags/core_3_3_support/ Log: tag before support for core 3.3 in trunk Copied: annotations/tags/core_3_3_support (from rev 14622, annotations/trun= k) --===============0930524928549050852==-- From hibernate-commits at lists.jboss.org Thu May 1 18:07:01 2008 Content-Type: multipart/mixed; boundary="===============1908557416565001577==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14624 - annotations/tags. Date: Thu, 01 May 2008 18:07:01 -0400 Message-ID: --===============1908557416565001577== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-01 18:07:01 -0400 (Thu, 01 May 2008) New Revision: 14624 Added: annotations/tags/before_core_3_3_support/ Removed: annotations/tags/core_3_3_support/ Log: tag before support for core 3.3 in trunk Copied: annotations/tags/before_core_3_3_support (from rev 14623, annotatio= ns/tags/core_3_3_support) --===============1908557416565001577==-- From hibernate-commits at lists.jboss.org Thu May 1 18:07:22 2008 Content-Type: multipart/mixed; boundary="===============2822148976658723373==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14625 - commons-annotations/tags. Date: Thu, 01 May 2008 18:07:22 -0400 Message-ID: --===============2822148976658723373== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-01 18:07:22 -0400 (Thu, 01 May 2008) New Revision: 14625 Added: commons-annotations/tags/before_core_3_3_support/ Removed: commons-annotations/tags/core_3_3_support/ Log: tag before support for core 3.3 in trunk Copied: commons-annotations/tags/before_core_3_3_support (from rev 14624, c= ommons-annotations/tags/core_3_3_support) --===============2822148976658723373==-- From hibernate-commits at lists.jboss.org Thu May 1 18:08:27 2008 Content-Type: multipart/mixed; boundary="===============1848450924368777335==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14626 - entitymanager/tags. Date: Thu, 01 May 2008 18:08:27 -0400 Message-ID: --===============1848450924368777335== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-01 18:08:27 -0400 (Thu, 01 May 2008) New Revision: 14626 Added: entitymanager/tags/before_core_3_3_support/ Log: tag before support for core 3.3 in trunk Copied: entitymanager/tags/before_core_3_3_support (from rev 14625, entitym= anager/trunk) --===============1848450924368777335==-- From hibernate-commits at lists.jboss.org Thu May 1 18:08:53 2008 Content-Type: multipart/mixed; boundary="===============4183287350846159797==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14627 - search/tags. Date: Thu, 01 May 2008 18:08:53 -0400 Message-ID: --===============4183287350846159797== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-01 18:08:52 -0400 (Thu, 01 May 2008) New Revision: 14627 Added: search/tags/before_core_3_3_support/ Log: tag before support for core 3.3 in trunk Copied: search/tags/before_core_3_3_support (from rev 14626, search/trunk) --===============4183287350846159797==-- From hibernate-commits at lists.jboss.org Thu May 1 18:09:18 2008 Content-Type: multipart/mixed; boundary="===============5971438758081318710==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14628 - validator/tags. Date: Thu, 01 May 2008 18:09:18 -0400 Message-ID: --===============5971438758081318710== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-01 18:09:18 -0400 (Thu, 01 May 2008) New Revision: 14628 Added: validator/tags/before_core_3_3_support/ Log: tag before support for core 3.3 in trunk Copied: validator/tags/before_core_3_3_support (from rev 14627, validator/t= runk) --===============5971438758081318710==-- From hibernate-commits at lists.jboss.org Thu May 1 18:46:46 2008 Content-Type: multipart/mixed; boundary="===============8364594556587085190==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14629 - in commons-annotations/trunk: doc and 4 other directories. Date: Thu, 01 May 2008 18:46:46 -0400 Message-ID: --===============8364594556587085190== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-01 18:46:46 -0400 (Thu, 01 May 2008) New Revision: 14629 Added: commons-annotations/trunk/doc/ commons-annotations/trunk/doc/api/ commons-annotations/trunk/doc/api/jdstyle.css commons-annotations/trunk/doc/api/package.html commons-annotations/trunk/ivy/maven-ant-tasks.jar commons-annotations/trunk/lib/build/ commons-annotations/trunk/lib/build/ant-junit-1.6.5.jar commons-annotations/trunk/lib/build/junit-3.8.1.jar commons-annotations/trunk/pom.xml Modified: commons-annotations/trunk/build.xml commons-annotations/trunk/common-build.xml commons-annotations/trunk/ivy.xml commons-annotations/trunk/ivy/ivyconf.xml Log: HCANN-3 HCANN-2 change build system to get deps from JBoss repo, make doc b= uild independent of hibernate core structure ; add pom Modified: commons-annotations/trunk/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- commons-annotations/trunk/build.xml 2008-05-01 22:09:18 UTC (rev 14628) +++ commons-annotations/trunk/build.xml 2008-05-01 22:46:46 UTC (rev 14629) @@ -9,7 +9,7 @@ - + @@ -21,7 +21,7 @@ = = - + + + + + = - + - - - = @@ -98,8 +100,8 @@ = - - + + = @@ -145,7 +147,7 @@ = - + + + + + + = Modified: commons-annotations/trunk/common-build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- commons-annotations/trunk/common-build.xml 2008-05-01 22:09:18 UTC (rev= 14628) +++ commons-annotations/trunk/common-build.xml 2008-05-01 22:46:46 UTC (rev= 14629) @@ -1,5 +1,6 @@ - + Common properties and targets for the HibernateExt project = @@ -39,39 +40,15 @@ = + + = - - - - - - - + + = - - - = - + @@ -80,18 +57,31 @@ = - + = = + + + + + + + + = + + + + + + - - - - @@ -196,9 +186,6 @@ - - - = @@ -337,7 +324,7 @@ windowtitle=3D"${Name} API Documentation" Overview=3D"${doc.api.dir}/package.html" doctitle=3D"${Name} API Documentation" - stylesheetfile=3D"${hibernate-core.doc.api}/jdstyle.css" + stylesheetfile=3D"${doc.api.dir}/jdstyle.css" link=3D"${javadoc}"> @@ -469,4 +456,28 @@ = + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Added: commons-annotations/trunk/doc/api/jdstyle.css =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- commons-annotations/trunk/doc/api/jdstyle.css (= rev 0) +++ commons-annotations/trunk/doc/api/jdstyle.css 2008-05-01 22:46:46 UTC (= rev 14629) @@ -0,0 +1,117 @@ +/* Javadoc style sheet */ + +/* Define colors, fonts and other style attributes here to override the de= faults */ + +/* Page background color */ +body { font-family: Arial; + background-color: white; + font-size: 10pt; + } +td { font-family: Arial; + font-size: 10pt; + } +/* Table colors */ +.TableHeadingColor { background: #F4F4F4 } +.TableSubHeadingColor { background: #F4F4F4 } +.TableRowColor { background: #FFFFFF } + +/* Font used in left-hand frame lists */ +.FrameTitleFont { font-size: normal; font-family: Arial } +.FrameHeadingFont { font-size: normal; font-family: Arial } +.FrameItemFont { font-size: normal; font-family: Arial } + +/* Example of smaller, sans-serif font in frames */ +/* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-= serif } */ + +/* Navigation bar fonts and colors */ +.NavBarCell1 { background-color:#F4F4F4;} +.NavBarCell1Rev { background-color:silver;} + +.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000= ;} +.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF= ;} + +.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-co= lor:#FFFFFF;} +.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-co= lor:#FFFFFF;} + +A { + color: #003399; +} + +A:active { + color: #003399; +} + +A:visited { + color: #888888; +} + +P, OL, UL, LI, DL, DT, DD, BLOCKQUOTE { + color: #000000; +} + +TD, TH, SPAN { + color: #000000; +} + +BLOCKQUOTE { + margin-right: 0px; +} + + +/*H1, H2, H3, H4, H5, H6 { + color: #000000; + font-weight:500; + margin-top:10px; + padding-top:15px; +} + +H1 { font-size: 150%; } +H2 { font-size: 140%; } +H3 { font-size: 110%; font-weight: bold; } +H4 { font-size: 110%; font-weight: bold;} +H5 { font-size: 100%; font-style: italic; } +H6 { font-size: 100%; font-style: italic; }*/ + +TT { +font-size: 90%; + font-family: "Courier New", Courier, monospace; + color: #000000; +} + +PRE { +font-size: 90%; + padding: 5px; + border-style: solid; + border-width: 1px; + border-color: #CCCCCC; + background-color: #F4F4F4; +} + +UL, OL, LI { + list-style: disc; +} + +HR { + width: 100%; + height: 1px; + background-color: #CCCCCC; + border-width: 0px; + padding: 0px; + color: #CCCCCC; +} + +.variablelist { = + padding-top: 10; = + padding-bottom:10; = + margin:0; +} + +.itemizedlist, UL { = + padding-top: 0; = + padding-bottom:0; = + margin:0; = +} + +.term { = + font-weight:bold; +} Added: commons-annotations/trunk/doc/api/package.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- commons-annotations/trunk/doc/api/package.html = (rev 0) +++ commons-annotations/trunk/doc/api/package.html 2008-05-01 22:46:46 UTC = (rev 14629) @@ -0,0 +1 @@ + Modified: commons-annotations/trunk/ivy/ivyconf.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- commons-annotations/trunk/ivy/ivyconf.xml 2008-05-01 22:09:18 UTC (rev = 14628) +++ commons-annotations/trunk/ivy/ivyconf.xml 2008-05-01 22:46:46 UTC (rev = 14629) @@ -1,9 +1,10 @@ + - - + + @@ -11,18 +12,12 @@ - - - - - - - - - - + + + + Added: commons-annotations/trunk/ivy/maven-ant-tasks.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: commons-annotations/trunk/ivy/maven-ant-tasks.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: commons-annotations/trunk/ivy.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- commons-annotations/trunk/ivy.xml 2008-05-01 22:09:18 UTC (rev 14628) +++ commons-annotations/trunk/ivy.xml 2008-05-01 22:46:46 UTC (rev 14629) @@ -3,15 +3,25 @@ xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=3D "http://www.jayasoft.org/misc/ivy/ivy.xsd"> - + - + - + - def= ault"/> + + default"/> + + + default"/> + + + default"/> + default"/> + default"/> + default"/> \ No newline at end of file Added: commons-annotations/trunk/lib/build/ant-junit-1.6.5.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: commons-annotations/trunk/lib/build/ant-junit-1.6.5.jar ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream Added: commons-annotations/trunk/lib/build/junit-3.8.1.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: commons-annotations/trunk/lib/build/junit-3.8.1.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: commons-annotations/trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- commons-annotations/trunk/pom.xml (rev 0) +++ commons-annotations/trunk/pom.xml 2008-05-01 22:46:46 UTC (rev 14629) @@ -0,0 +1,28 @@ + + + 4.0.0 + org.hibernate + hibernate-commons-annotations + jar + Hibernate Commons Annotations + 3.1.0.CR1 + + + GNU LESSER GENERAL PUBLIC LICENSE + http://www.gnu.org/licenses/lgpl.txt + + + Hibernate Commons Annotations is a utility project used by a= nnotations based Hibernate sub-projects. + + scm:svn:http://anonsvn.jboss.org/repos/hibernate/commons-annotation= s + + + + commons-logging + commons-logging + 1.0.4 + + + \ No newline at end of file --===============8364594556587085190==-- From hibernate-commits at lists.jboss.org Thu May 1 18:53:45 2008 Content-Type: multipart/mixed; boundary="===============2450518371036831444==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14630 - core/trunk/core/src/main/java/org/hibernate/cache. Date: Thu, 01 May 2008 18:53:44 -0400 Message-ID: --===============2450518371036831444== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: gbadner Date: 2008-05-01 18:53:44 -0400 (Thu, 01 May 2008) New Revision: 14630 Modified: core/trunk/core/src/main/java/org/hibernate/cache/QueryKey.java Log: HHH-2021 : reformat fix for fragile QueryKey.equals() = Modified: core/trunk/core/src/main/java/org/hibernate/cache/QueryKey.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/core/src/main/java/org/hibernate/cache/QueryKey.java 2008-05= -01 22:46:46 UTC (rev 14629) +++ core/trunk/core/src/main/java/org/hibernate/cache/QueryKey.java 2008-05= -01 22:53:44 UTC (rev 14630) @@ -51,8 +51,8 @@ } = public boolean equals(Object other) { - if (!(other instanceof QueryKey)) return false; - QueryKey that =3D (QueryKey) other; + if (!(other instanceof QueryKey)) return false; + QueryKey that =3D (QueryKey) other; if ( !sqlQueryString.equals(that.sqlQueryString) ) return false; if ( !EqualsHelper.equals(firstRow, that.firstRow) || !EqualsHelper.equa= ls(maxRows, that.maxRows) ) return false; if ( !EqualsHelper.equals(customTransformer, that.customTransformer) ) r= eturn false; --===============2450518371036831444==-- From hibernate-commits at lists.jboss.org Thu May 1 19:22:18 2008 Content-Type: multipart/mixed; boundary="===============5765743786499467716==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14635 - core/branches/Branch_3_2/src/org/hibernate/cache. Date: Thu, 01 May 2008 19:22:17 -0400 Message-ID: --===============5765743786499467716== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: gbadner Date: 2008-05-01 19:22:17 -0400 (Thu, 01 May 2008) New Revision: 14635 Modified: core/branches/Branch_3_2/src/org/hibernate/cache/QueryKey.java Log: HHH-2021 : fix fragile QueryKey.equals() Modified: core/branches/Branch_3_2/src/org/hibernate/cache/QueryKey.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_2/src/org/hibernate/cache/QueryKey.java 2008-05-= 01 23:20:39 UTC (rev 14634) +++ core/branches/Branch_3_2/src/org/hibernate/cache/QueryKey.java 2008-05-= 01 23:22:17 UTC (rev 14635) @@ -51,6 +51,7 @@ } = public boolean equals(Object other) { + if ( !( other instanceof QueryKey ) ) return false; QueryKey that =3D (QueryKey) other; if ( !sqlQueryString.equals(that.sqlQueryString) ) return false; if ( !EqualsHelper.equals(firstRow, that.firstRow) || !EqualsHelper.equa= ls(maxRows, that.maxRows) ) return false; --===============5765743786499467716==-- From hibernate-commits at lists.jboss.org Fri May 2 16:00:33 2008 Content-Type: multipart/mixed; boundary="===============3356529967708238740==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14636 - core/branches/Branch_3_2_4_SP1_CP/etc. Date: Fri, 02 May 2008 16:00:33 -0400 Message-ID: --===============3356529967708238740== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: gbadner Date: 2008-05-02 16:00:33 -0400 (Fri, 02 May 2008) New Revision: 14636 Modified: core/branches/Branch_3_2_4_SP1_CP/etc/log4j.properties Log: HIBERNATE-89 : Change Hibernate logging to info Modified: core/branches/Branch_3_2_4_SP1_CP/etc/log4j.properties =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_2_4_SP1_CP/etc/log4j.properties 2008-05-01 23:22= :17 UTC (rev 14635) +++ core/branches/Branch_3_2_4_SP1_CP/etc/log4j.properties 2008-05-02 20:00= :33 UTC (rev 14636) @@ -14,8 +14,8 @@ = log4j.rootLogger=3Dwarn, stdout = -#log4j.logger.org.hibernate=3Dinfo -log4j.logger.org.hibernate=3Ddebug +log4j.logger.org.hibernate=3Dinfo +#log4j.logger.org.hibernate=3Ddebug = ### log HQL query parser activity #log4j.logger.org.hibernate.hql.ast.AST=3Ddebug --===============3356529967708238740==-- From hibernate-commits at lists.jboss.org Fri May 2 17:29:17 2008 Content-Type: multipart/mixed; boundary="===============3015887678245641842==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14637 - core/branches/Branch_3_2_4_SP1_CP/lib. Date: Fri, 02 May 2008 17:29:16 -0400 Message-ID: --===============3015887678245641842== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: gbadner Date: 2008-05-02 17:29:16 -0400 (Fri, 02 May 2008) New Revision: 14637 Modified: core/branches/Branch_3_2_4_SP1_CP/lib/antlr.jar core/branches/Branch_3_2_4_SP1_CP/lib/asm-attrs.jar core/branches/Branch_3_2_4_SP1_CP/lib/asm.jar core/branches/Branch_3_2_4_SP1_CP/lib/cglib.jar core/branches/Branch_3_2_4_SP1_CP/lib/commons-collections.jar core/branches/Branch_3_2_4_SP1_CP/lib/commons-logging.jar core/branches/Branch_3_2_4_SP1_CP/lib/concurrent.jar core/branches/Branch_3_2_4_SP1_CP/lib/dom4j.jar core/branches/Branch_3_2_4_SP1_CP/lib/javassist.jar core/branches/Branch_3_2_4_SP1_CP/lib/jaxen.jar core/branches/Branch_3_2_4_SP1_CP/lib/jboss-cache-jdk50.jar core/branches/Branch_3_2_4_SP1_CP/lib/jboss-common.jar core/branches/Branch_3_2_4_SP1_CP/lib/jboss-j2ee.jar core/branches/Branch_3_2_4_SP1_CP/lib/jboss-jmx.jar core/branches/Branch_3_2_4_SP1_CP/lib/jboss-minimal.jar core/branches/Branch_3_2_4_SP1_CP/lib/jboss-system.jar core/branches/Branch_3_2_4_SP1_CP/lib/jgroups.jar Log: HIBERNATE-92 : Update dependencies to be consistent with EAP 4.2 CP03 Modified: core/branches/Branch_3_2_4_SP1_CP/lib/antlr.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: core/branches/Branch_3_2_4_SP1_CP/lib/asm-attrs.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: core/branches/Branch_3_2_4_SP1_CP/lib/asm.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: core/branches/Branch_3_2_4_SP1_CP/lib/cglib.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: core/branches/Branch_3_2_4_SP1_CP/lib/commons-collections.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: core/branches/Branch_3_2_4_SP1_CP/lib/commons-logging.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: core/branches/Branch_3_2_4_SP1_CP/lib/concurrent.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: core/branches/Branch_3_2_4_SP1_CP/lib/dom4j.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: core/branches/Branch_3_2_4_SP1_CP/lib/javassist.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: core/branches/Branch_3_2_4_SP1_CP/lib/jaxen.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: core/branches/Branch_3_2_4_SP1_CP/lib/jboss-cache-jdk50.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: core/branches/Branch_3_2_4_SP1_CP/lib/jboss-common.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: core/branches/Branch_3_2_4_SP1_CP/lib/jboss-j2ee.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: core/branches/Branch_3_2_4_SP1_CP/lib/jboss-jmx.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: core/branches/Branch_3_2_4_SP1_CP/lib/jboss-minimal.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: core/branches/Branch_3_2_4_SP1_CP/lib/jboss-system.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: core/branches/Branch_3_2_4_SP1_CP/lib/jgroups.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) --===============3015887678245641842==-- From hibernate-commits at lists.jboss.org Fri May 2 18:07:59 2008 Content-Type: multipart/mixed; boundary="===============7384996896791567060==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14638 - core/branches/Branch_3_2_4_SP1_CP. Date: Fri, 02 May 2008 18:07:59 -0400 Message-ID: --===============7384996896791567060== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: gbadner Date: 2008-05-02 18:07:59 -0400 (Fri, 02 May 2008) New Revision: 14638 Modified: core/branches/Branch_3_2_4_SP1_CP/changelog.txt core/branches/Branch_3_2_4_SP1_CP/readme.txt Log: HIBERNATE-87 : Correct version numbers and date in readme.txt and changelog= .txt Modified: core/branches/Branch_3_2_4_SP1_CP/changelog.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_2_4_SP1_CP/changelog.txt 2008-05-02 21:29:16 UTC= (rev 14637) +++ core/branches/Branch_3_2_4_SP1_CP/changelog.txt 2008-05-02 22:07:59 UTC= (rev 14638) @@ -6,27 +6,33 @@ more about each case. = = -Changes in version 3.2.4.sp1.cp03 (2008.05.01) +Changes in version 3.2.4.sp1.cp03 (2008.05.02) ------------------------------------------- +** Task + * [HIBERNATE-92] - Update dependencies to be consistent with EAP 4.2 C= P03 = + +Changes in version 3.2.4.sp1.cp02 (2008-01-29) +------------------------------------------- + ** Bug - * [HHH-2542] - NullPointerException in TypeFactory.replaceAssociations= for ComponentType = + * [JBPAPP-357 / HHH-2542] - NullPointerException in TypeFactory.replac= eAssociations for ComponentType = = = -Changes in version 3.2.4.sp1.cp01 (2008.02.01) +Changes in version 3.2.4.sp1.cp01 (2007-09-13) ------------------------------------------- = ** Bug - * [HHH-1569] - Immutable Natural Id check fails with ArrayIndexOutOfBo= unds in some cases - * [HHH-2631] - Leaking PreparedStatement and ResultSet via CollectionL= oadContext instances maintained in Map collectionLoadContexts in LoadContex= ts + * [JBPAPP-740 / HHH-1569] - Immutable Natural Id check fails with Arra= yIndexOutOfBounds in some cases + * [JBPAPP-742 / HHH-2631] - Leaking PreparedStatement and ResultSet vi= a CollectionLoadContext instances maintained in Map collectionLoadContexts = in LoadContexts = ** Improvement - * [HHH-2662] - Workaround PostgreSQL issues in testsuite - * [HHH-2663] - Map java.sql.Types.REAL to Hibernate FloatType for auto= -discovery stuff - * [HHH-2665] - Split Oracle9Dialect into Oracle9iDialect and Oracle10g= Dialect + * [JBPAPP-741 / HHH-2662] - Workaround PostgreSQL issues in testsuite + * [JBPAPP-743 / HHH-2663] - Map java.sql.Types.REAL to Hibernate Float= Type for auto-discovery stuff + * [JBPAPP-744 / HHH-2665] - Split Oracle9Dialect into Oracle9iDialect = and Oracle10gDialect = ** Patch - * [HHH-2630] - Hibernate Dialect is not auto-detected for Sybase ASE a= nd DB2 (Shelley McGowan) + * [JBPAPP-188 / HHH-2630] - Hibernate Dialect is not auto-detected for= Sybase ASE and DB2 (Shelley McGowan) = = Changes in version 3.2.4 (2007.05.18) Modified: core/branches/Branch_3_2_4_SP1_CP/readme.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_2_4_SP1_CP/readme.txt 2008-05-02 21:29:16 UTC (r= ev 14637) +++ core/branches/Branch_3_2_4_SP1_CP/readme.txt 2008-05-02 22:07:59 UTC (r= ev 14638) @@ -1,6 +1,6 @@ Hibernate - Relational Persistence for Idiomatic Java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D -version 3.2.4.sp1.cp03, May 1, 2008 +version 3.2.4.sp1.cp03, May 2, 2008 Copyright =C2=A9 2008 Red Hat, Inc. = = --===============7384996896791567060==-- From hibernate-commits at lists.jboss.org Fri May 2 19:25:35 2008 Content-Type: multipart/mixed; boundary="===============1073756561290338422==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14639 - core/branches/Branch_3_2_4_SP1_CP. Date: Fri, 02 May 2008 19:25:34 -0400 Message-ID: --===============1073756561290338422== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: gbadner Date: 2008-05-02 19:25:33 -0400 (Fri, 02 May 2008) New Revision: 14639 Modified: core/branches/Branch_3_2_4_SP1_CP/readme.txt Log: HIBERNATE-88 : Updated readme.txt with installation instructions and expect= ed test failures Modified: core/branches/Branch_3_2_4_SP1_CP/readme.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_2_4_SP1_CP/readme.txt 2008-05-02 22:07:59 UTC (r= ev 14638) +++ core/branches/Branch_3_2_4_SP1_CP/readme.txt 2008-05-02 23:25:33 UTC (r= ev 14639) @@ -12,24 +12,52 @@ = Required jars are distributed in the lib subdirectory. = +Install Apache Ant 1.7.0 (http://ant.apache.org/) and set ANT_HOME +environment variable. = +Install JUnit 3.8.1 (http://www.junit.org/) and copy junit.jar to = +$ANT_HOME/lib. = + + Get Up And Running Quick ------------------------ Demo: = (1) copy your JDBC driver to the lib directory (2) edit etc/hibernate.properties - (3) run "ant eg" or "build eg" + (3) run "ant eg" or "build eg" using JDK 1.5 (4) browse the sourcecode in eg/org/hibernate/auction = Tests: = (1) copy your JDBC driver to the lib directory (2) edit etc/hibernate.properties - (3) run "ant junitreport-dist" or "build junitreport-dist" + (3) run "ant junitreport-dist" or "build junitreport-dist" using JDK 1.= 5; + to ignore "FailureExpected" failures (see note below), run + "ant junitreport-dist -Dhibernate.test.validatefailureexpected=3Dtr= ue" (4) see build/test-reports/index.html = +Note: The unit tests are expected to have 6 failures and 8 errors in: = +Ehcache tests (Ehcache is not provided in this distribution): +org.hibernate.test.cache.ehcache.EhCacheTest.testQueryCacheInvalidation +org.hibernate.test.cache.ehcache.EhCacheTest.testEmptySecondLevelCacheEntry +org.hibernate.test.cache.ehcache.EhCacheTest.testStaleWritesLeaveCacheCons= istent + +"FailureExpected" tests (known issues to be addressed in the future): = +org.hibernate.test.hql.ASTParserLoadingTest.testParameterTypeMismatchFailu= reExpected +org.hibernate.test.hql.CriteriaHQLAlignmentTest.testCriteriaAggregationRet= urnTypeFailureExpected +org.hibernate.test.hql.HQLTest.testEmptyInListFailureExpected = +org.hibernate.test.hql.HQLTest.testMaxindexHqlFuncttestMultipleElementAcce= ssorOperatorsFailureExpectedionInElementAccessorFailureExpected +org.hibernate.test.hql.HQLTest.testMultipleElementAccessorOperatorsFailure= Expected +org.hibernate.test.hql.HQLTest.testKeyManyToOneJoinFailureExpected +org.hibernate.test.hql.HQLTest.testDuplicateExplicitJoinFailureExpected +org.hibernate.test.keymanytoone.bidir.component.EagerKeyManyToOneTest.test= LoadEntityWithEagerFetchingToKeyManyToOneReferenceBackToSelfFailureExpected +org.hibernate.test.legacy.SQLLoaderTest.testReturnPropertyComponentRenameF= ailureExpected +org.hibernate.test.readonly.ReadOnlyTest.testReadOnlyOnProxiesFailureExpec= ted +org.hibernate.test.sql.hand.query.NativeSQLQueriesTest.testCompositeIdJoin= sFailureExpected = + + Product Support and License Website Links ----------------------------------------- Support Processes --===============1073756561290338422==-- From hibernate-commits at lists.jboss.org Fri May 2 23:30:17 2008 Content-Type: multipart/mixed; boundary="===============8183655352109726861==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14640 - in search/trunk/src/java/org/hibernate/search: impl and 1 other directory. Date: Fri, 02 May 2008 23:30:17 -0400 Message-ID: --===============8183655352109726861== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-02 23:30:16 -0400 (Fri, 02 May 2008) New Revision: 14640 Modified: search/trunk/src/java/org/hibernate/search/FullTextSession.java search/trunk/src/java/org/hibernate/search/impl/FullTextSessionImpl.java Log: Minor Javadoc Modified: search/trunk/src/java/org/hibernate/search/FullTextSession.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/FullTextSession.java 2008-05= -02 23:25:33 UTC (rev 14639) +++ search/trunk/src/java/org/hibernate/search/FullTextSession.java 2008-05= -03 03:30:16 UTC (rev 14640) @@ -21,6 +21,9 @@ /** * Force the (re)indexing of a given managed object. * Indexation is batched per transaction + * Non indexable entities are ignored + * + * @param entity The entity to index - must not be null. */ void index(Object entity); = Modified: search/trunk/src/java/org/hibernate/search/impl/FullTextSessionIm= pl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/impl/FullTextSessionImpl.jav= a 2008-05-02 23:25:33 UTC (rev 14639) +++ search/trunk/src/java/org/hibernate/search/impl/FullTextSessionImpl.jav= a 2008-05-03 03:30:16 UTC (rev 14640) @@ -128,7 +128,7 @@ * Non indexable entities are ignored * The entity must be associated with the session * - * @param entity The neity to index - must not be null. + * @param entity The entity to index - must not be null. */ public void index(Object entity) { if (entity =3D=3D null) return; --===============8183655352109726861==-- From hibernate-commits at lists.jboss.org Sat May 3 16:11:14 2008 Content-Type: multipart/mixed; boundary="===============4649588401974970898==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14641 - core/trunk/core/src/main/java/org/hibernate/dialect. Date: Sat, 03 May 2008 16:11:13 -0400 Message-ID: --===============4649588401974970898== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: d.plentz Date: 2008-05-03 16:11:12 -0400 (Sat, 03 May 2008) New Revision: 14641 Modified: core/trunk/core/src/main/java/org/hibernate/dialect/H2Dialect.java Log: [HHH-2683] "datediff" is declared as NoArgSQLFunction in H2Dialect, but act= ually accepts 3 arguments Modified: core/trunk/core/src/main/java/org/hibernate/dialect/H2Dialect.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/core/src/main/java/org/hibernate/dialect/H2Dialect.java 2008= -05-03 03:30:16 UTC (rev 14640) +++ core/trunk/core/src/main/java/org/hibernate/dialect/H2Dialect.java 2008= -05-03 20:11:12 UTC (rev 14641) @@ -132,7 +132,7 @@ registerFunction("current_date", new NoArgSQLFunction("current_dat= e", Hibernate.DATE)); registerFunction("current_time", new NoArgSQLFunction("current_tim= e", Hibernate.TIME)); registerFunction("current_timestamp", new NoArgSQLFunction("curren= t_timestamp", Hibernate.TIMESTAMP)); - registerFunction("datediff", new NoArgSQLFunction("datediff", Hibe= rnate.INTEGER)); + registerFunction("datediff", new StandardSQLFunction("datediff", H= ibernate.INTEGER)); registerFunction("dayname", new StandardSQLFunction("dayname", Hib= ernate.STRING)); registerFunction("dayofmonth", new StandardSQLFunction("dayofmonth= ", Hibernate.INTEGER)); registerFunction("dayofweek", new StandardSQLFunction("dayofweek",= Hibernate.INTEGER)); --===============4649588401974970898==-- From hibernate-commits at lists.jboss.org Mon May 5 11:20:23 2008 Content-Type: multipart/mixed; boundary="===============7842789545414361089==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14642 - in search/trunk/src: java/org/hibernate/search/impl and 1 other directories. Date: Mon, 05 May 2008 11:20:23 -0400 Message-ID: --===============7842789545414361089== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-05 11:20:22 -0400 (Mon, 05 May 2008) New Revision: 14642 Modified: search/trunk/src/java/org/hibernate/search/SearchFactory.java search/trunk/src/java/org/hibernate/search/impl/InitContext.java search/trunk/src/java/org/hibernate/search/impl/SearchFactoryImpl.java search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/Co= ntact.java Log: HSEARCH-195 return analyzer instances by name Modified: search/trunk/src/java/org/hibernate/search/SearchFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/SearchFactory.java 2008-05-0= 3 20:11:12 UTC (rev 14641) +++ search/trunk/src/java/org/hibernate/search/SearchFactory.java 2008-05-0= 5 15:20:22 UTC (rev 14642) @@ -1,8 +1,11 @@ -//$Id: $ +//$Id$ package org.hibernate.search; = +import java.util.Map; + import org.hibernate.search.reader.ReaderProvider; import org.hibernate.search.store.DirectoryProvider; +import org.apache.lucene.analysis.Analyzer; = /** * Provide application wide operations as well as access to the underlying= Lucene resources. @@ -33,4 +36,12 @@ * Optimize the index holding entityType */ void optimize(Class entityType); + + /** + * Experimental API + * retrieve an analyzer instance by its definition name + * = + * @throws SearchException if the definition name is unknown + */ + Analyzer getAnalyzer(String name); } Modified: search/trunk/src/java/org/hibernate/search/impl/InitContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/impl/InitContext.java 2008-0= 5-03 20:11:12 UTC (rev 14641) +++ search/trunk/src/java/org/hibernate/search/impl/InitContext.java 2008-0= 5-05 15:20:22 UTC (rev 14642) @@ -134,26 +134,34 @@ return defaultSimilarity; } = - public void initLazyAnalyzers() { - Map initializedAnalizers =3D new HashMap( analyzerDefs.size() ); + public Map initLazyAnalyzers() { + Map initializedAnalyzers =3D new HashMap( analyzerDefs.size() ); = for (DelegateNamedAnalyzer namedAnalyzer : lazyAnalyzers) { String name =3D namedAnalyzer.getName(); - if ( initializedAnalizers.containsKey( name ) ) { - namedAnalyzer.setDelegate( initializedAnalizers.get( name ) ); + if ( initializedAnalyzers.containsKey( name ) ) { + namedAnalyzer.setDelegate( initializedAnalyzers.get( name ) ); } else { if ( analyzerDefs.containsKey( name ) ) { final Analyzer analyzer =3D buildAnalyzer( analyzerDefs.get( name ) ); namedAnalyzer.setDelegate( analyzer ); - initializedAnalizers.put( name, analyzer ); + initializedAnalyzers.put( name, analyzer ); } else { - //exception throw new SearchException("Analyzer found with an unknown definition:= " + name); } } } + + //initialize the remaining definitions + for ( Map.Entry entry : analyzerDefs.entrySet() ) { + if ( ! initializedAnalyzers.containsKey( entry.getKey() ) ) { + final Analyzer analyzer =3D buildAnalyzer( entry.getValue() ); + initializedAnalyzers.put( entry.getKey(), analyzer ); + } + } + return Collections.unmodifiableMap( initializedAnalyzers ); } = private Analyzer buildAnalyzer(AnalyzerDef analyzerDef) { Modified: search/trunk/src/java/org/hibernate/search/impl/SearchFactoryImpl= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/impl/SearchFactoryImpl.java = 2008-05-03 20:11:12 UTC (rev 14641) +++ search/trunk/src/java/org/hibernate/search/impl/SearchFactoryImpl.java = 2008-05-05 15:20:22 UTC (rev 14642) @@ -43,6 +43,7 @@ import org.hibernate.search.store.DirectoryProvider; import org.hibernate.search.store.DirectoryProviderFactory; import org.hibernate.search.store.optimization.OptimizerStrategy; +import org.apache.lucene.analysis.Analyzer; = /** * @author Emmanuel Bernard @@ -66,13 +67,14 @@ private BackendQueueProcessorFactory backendQueueProcessorFactory; private Map filterDefinitions =3D new HashMap(); private FilterCachingStrategy filterCachingStrategy; - private String indexingStrategy; + private Map analyzers; = /** * Each directory provider (index) can have its own performance settings. */ private Map dirProviderIndex= ingParams =3D new HashMap(); + private String indexingStrategy; = = public BackendQueueProcessorFactory getBackendQueueProcessorFactory() { @@ -256,6 +258,12 @@ getBackendQueueProcessorFactory().getProcessor( queue ).run(); } = + public Analyzer getAnalyzer(String name) { + final Analyzer analyzer =3D analyzers.get( name ); + if ( analyzer =3D=3D null) throw new SearchException( "Unknown Analyzer = definition: " + name); + return analyzer; + } + private void initDocumentBuilders(Configuration cfg, ReflectionManager re= flectionManager, InitContext context) { Iterator iter =3D cfg.getClassMappings(); DirectoryProviderFactory factory =3D new DirectoryProviderFactory(); @@ -281,7 +289,7 @@ } } } - context.initLazyAnalyzers(); + analyzers =3D context.initLazyAnalyzers(); factory.startDirectoryProviders(); } = Modified: search/trunk/src/test/org/hibernate/search/test/embedded/doublein= sert/Contact.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/C= ontact.java 2008-05-03 20:11:12 UTC (rev 14641) +++ search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/C= ontact.java 2008-05-05 15:20:22 UTC (rev 14642) @@ -22,7 +22,8 @@ = import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.Predicate; -import org.apache.log4j.Logger; +import org.apache.commons.logging.LogFactory; +import org.apache.commons.logging.Log; import org.hibernate.annotations.Type; import org.hibernate.search.annotations.ContainedIn; import org.hibernate.search.annotations.DocumentId; @@ -39,7 +40,7 @@ @Indexed public class Contact implements Serializable { = - private static Logger logger =3D Logger.getLogger(Contact.class); + private static Log logger =3D LogFactory.getLog(Contact.class); = private static final long serialVersionUID =3D 1L; = --===============7842789545414361089==-- From hibernate-commits at lists.jboss.org Tue May 6 11:47:23 2008 Content-Type: multipart/mixed; boundary="===============3472896594936399733==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14643 - core/trunk/cache-jbosscache2. Date: Tue, 06 May 2008 11:47:23 -0400 Message-ID: --===============3472896594936399733== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bstansberry(a)jboss.com Date: 2008-05-06 11:47:22 -0400 (Tue, 06 May 2008) New Revision: 14643 Modified: core/trunk/cache-jbosscache2/pom.xml Log: [HHH-3141] Move to JBoss Cache 2.1.1.GA Modified: core/trunk/cache-jbosscache2/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/cache-jbosscache2/pom.xml 2008-05-05 15:20:22 UTC (rev 14642) +++ core/trunk/cache-jbosscache2/pom.xml 2008-05-06 15:47:22 UTC (rev 14643) @@ -25,7 +25,7 @@ org.jboss.cache jbosscache-core - 2.1.1.CR2 = + 2.1.1.GA = = @@ -196,4 +196,4 @@ - \ No newline at end of file + --===============3472896594936399733==-- From hibernate-commits at lists.jboss.org Tue May 6 13:25:29 2008 Content-Type: multipart/mixed; boundary="===============0758905966614380033==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14644 - core/trunk/parent. Date: Tue, 06 May 2008 13:25:29 -0400 Message-ID: --===============0758905966614380033== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: steve.ebersole(a)jboss.com Date: 2008-05-06 13:25:29 -0400 (Tue, 06 May 2008) New Revision: 14644 Modified: core/trunk/parent/pom.xml Log: HHH-3265 : lgpl license version 2.1 Modified: core/trunk/parent/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/parent/pom.xml 2008-05-06 15:47:22 UTC (rev 14643) +++ core/trunk/parent/pom.xml 2008-05-06 17:25:29 UTC (rev 14644) @@ -46,14 +46,13 @@ GNU Lesser General Public License - http://www.gnu.org/copyleft/lesser.html + http://www.gnu.org/licenses/lgpl-2.1.html See discussion at http://hibernate.org/356.html for = more details. repo = - scm:svn:https://svn.jboss.org/repos/hibernate/core/tru= nk scm:svn:https://svn.jboss.org/repos/hibernate= /core/trunk https://svn.jboss.org/repos/hibernate/core/trunk --===============0758905966614380033==-- From hibernate-commits at lists.jboss.org Tue May 6 21:30:42 2008 Content-Type: multipart/mixed; boundary="===============5601223253919158344==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14645 - core/branches/Branch_3_2_4_SP1_CP. Date: Tue, 06 May 2008 21:30:40 -0400 Message-ID: --===============5601223253919158344== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: gbadner Date: 2008-05-06 21:30:40 -0400 (Tue, 06 May 2008) New Revision: 14645 Modified: core/branches/Branch_3_2_4_SP1_CP/changelog.txt Log: corrected release date to coincide with EAP 4.2 GA Modified: core/branches/Branch_3_2_4_SP1_CP/changelog.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_2_4_SP1_CP/changelog.txt 2008-05-06 17:25:29 UTC= (rev 14644) +++ core/branches/Branch_3_2_4_SP1_CP/changelog.txt 2008-05-07 01:30:40 UTC= (rev 14645) @@ -19,7 +19,7 @@ * [JBPAPP-357 / HHH-2542] - NullPointerException in TypeFactory.replac= eAssociations for ComponentType = = = -Changes in version 3.2.4.sp1.cp01 (2007-09-13) +Changes in version 3.2.4.sp1.cp01 (2007-06-28) ------------------------------------------- = ** Bug --===============5601223253919158344==-- From hibernate-commits at lists.jboss.org Wed May 7 03:22:26 2008 Content-Type: multipart/mixed; boundary="===============0934844825935443136==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14646 - in validator/trunk/src: java/org/hibernate/validator/interpolator and 1 other directories. Date: Wed, 07 May 2008 03:22:26 -0400 Message-ID: --===============0934844825935443136== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-07 03:22:26 -0400 (Wed, 07 May 2008) New Revision: 14646 Added: validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMes= sageInterpolatorAggregator.java Modified: validator/trunk/src/java/org/hibernate/validator/ClassValidator.java validator/trunk/src/test/org/hibernate/validator/test/ValidatorTest.java Log: test serialiazibility. Make one DefaultMessageInterporatorAggregator transi= ent, fix class typo Modified: validator/trunk/src/java/org/hibernate/validator/ClassValidator.j= ava =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- validator/trunk/src/java/org/hibernate/validator/ClassValidator.java 20= 08-05-07 01:30:40 UTC (rev 14645) +++ validator/trunk/src/java/org/hibernate/validator/ClassValidator.java 20= 08-05-07 07:22:26 UTC (rev 14646) @@ -39,7 +39,7 @@ import org.hibernate.annotations.common.reflection.XProperty; import org.hibernate.annotations.common.reflection.java.JavaReflectionMana= ger; import org.hibernate.util.IdentitySet; -import org.hibernate.validator.interpolator.DefaultMessageInterpolatorAgge= rator; +import org.hibernate.validator.interpolator.DefaultMessageInterpolatorAggr= egator; = = /** @@ -77,7 +77,7 @@ private transient List memberValidators; private transient List memberGetters; private transient List childGetters; - private transient DefaultMessageInterpolatorAggerator defaultInterpolator; + private transient DefaultMessageInterpolatorAggregator defaultInterpolato= r; private transient MessageInterpolator userInterpolator; private static final Filter GET_ALL_FILTER =3D new Filter() { public boolean returnStatic() { @@ -192,7 +192,7 @@ memberValidators =3D new ArrayList(); memberGetters =3D new ArrayList(); childGetters =3D new ArrayList(); - defaultInterpolator =3D new DefaultMessageInterpolatorAggerator(); + defaultInterpolator =3D new DefaultMessageInterpolatorAggregator(); defaultInterpolator.initialize( messageBundle, defaultMessageBundle ); = //build the class hierarchy to look for members in Copied: validator/trunk/src/java/org/hibernate/validator/interpolator/Defau= ltMessageInterpolatorAggregator.java (from rev 14609, validator/trunk/src/j= ava/org/hibernate/validator/interpolator/DefaultMessageInterpolatorAggerato= r.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMe= ssageInterpolatorAggregator.java (rev 0) +++ validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMe= ssageInterpolatorAggregator.java 2008-05-07 07:22:26 UTC (rev 14646) @@ -0,0 +1,57 @@ +//$Id: $ +package org.hibernate.validator.interpolator; + +import java.lang.annotation.Annotation; +import java.util.Map; +import java.util.HashMap; +import java.util.ResourceBundle; +import java.io.Serializable; + +import org.hibernate.validator.MessageInterpolator; +import org.hibernate.validator.Validator; +import org.hibernate.AssertionFailure; + +/** + * @author Emmanuel Bernard + */ +public class DefaultMessageInterpolatorAggregator implements MessageInterp= olator, Serializable { + private transient Map interpolator= s =3D new HashMap(); + //transient but repopulated by the object owing a reference to the interp= olator + private transient ResourceBundle messageBundle; + //transient but repopulated by the object owing a reference to the interp= olator + private transient ResourceBundle defaultMessageBundle; + + //not an interface method + public void initialize(ResourceBundle messageBundle, ResourceBundle defau= ltMessageBundle) { + this.messageBundle =3D messageBundle; + this.defaultMessageBundle =3D defaultMessageBundle; + //useful when we deserialize + for ( DefaultMessageInterpolator interpolator : interpolators.values() )= { + interpolator.initialize( messageBundle, defaultMessageBundle ); + } + } + + public void addInterpolator(Annotation annotation, Validator validator) { + DefaultMessageInterpolator interpolator =3D new DefaultMessageInterpolat= or(); + interpolator.initialize(messageBundle, defaultMessageBundle ); + interpolator.initialize( annotation, null ); + interpolators.put( validator, interpolator ); + } + + public String interpolate(String message, Validator validator, MessageInt= erpolator defaultInterpolator) { + DefaultMessageInterpolator defaultMessageInterpolator =3D interpolators.= get( validator ); + if (defaultMessageInterpolator =3D=3D null) { + return message; + } + else { + return defaultMessageInterpolator.interpolate( message, validator, defa= ultInterpolator ); + } + } + + public String getAnnotationMessage(Validator validator) { + DefaultMessageInterpolator defaultMessageInterpolator =3D interpolators.= get( validator ); + String message =3D defaultMessageInterpolator !=3D null ? defaultMessage= Interpolator.getAnnotationMessage() : null; + if (message =3D=3D null) throw new AssertionFailure("Validator not regis= tred to the messageInterceptorAggregator"); + return message; + } +} Modified: validator/trunk/src/test/org/hibernate/validator/test/ValidatorTe= st.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- validator/trunk/src/test/org/hibernate/validator/test/ValidatorTest.jav= a 2008-05-07 01:30:40 UTC (rev 14645) +++ validator/trunk/src/test/org/hibernate/validator/test/ValidatorTest.jav= a 2008-05-07 07:22:26 UTC (rev 14646) @@ -2,6 +2,11 @@ package org.hibernate.validator.test; = import java.io.Serializable; +import java.io.ByteArrayOutputStream; +import java.io.ObjectOutput; +import java.io.ObjectOutputStream; +import java.io.ByteArrayInputStream; +import java.io.ObjectInputStream; import java.math.BigInteger; import java.util.Date; import java.util.Locale; @@ -140,6 +145,47 @@ } } = + public void testSerialization() throws Exception { + + Tv tv =3D new Tv(); + tv.serial =3D "FS"; + tv.name =3D "TooLong"; + tv.expDate =3D new Date( new Date().getTime() + 1000 * 60 * 60 * 24 * 10= ); + ClassValidator classValidator =3D new ClassValidator( Tv.class ); + + ByteArrayOutputStream stream =3D new ByteArrayOutputStream(); + ObjectOutput out =3D new ObjectOutputStream( stream ); + out.writeObject( classValidator ); + out.close(); + byte[] serialized =3D stream.toByteArray(); + stream.close(); + ByteArrayInputStream byteIn =3D new ByteArrayInputStream( serialized ); + ObjectInputStream in =3D new ObjectInputStream( byteIn ); + classValidator =3D (ClassValidator) in.readObject(); + in.close(); + byteIn.close(); + + + InvalidValue[] invalidValues =3D classValidator.getInvalidValues( tv ); + assertEquals( 1, invalidValues.length ); + Locale loc =3D Locale.getDefault(); + if ( loc.toString().startsWith( "en" ) ) { + assertEquals( "length must be between 0 and 2", invalidValues[0].getMes= sage() ); + } + else if ( loc.toString().startsWith( "fr" ) ) { + String message =3D invalidValues[0].getMessage(); + String message2 =3D"la longueur doit =EF=BF=BDtre entre 0 et 2"; + assertEquals( message2, message ); + } + else if ( loc.toString().startsWith( "da" ) ) { + assertEquals( "l=EF=BF=BDngden skal v=EF=BF=BDre mellem 0 og 2", invali= dValues[0].getMessage() ); + } + else { + // if default not found then it must be english + assertEquals( "length must be between 0 and 2", invalidValues[0].getMes= sage() ); + } + } + public class PrefixMessageInterpolator implements MessageInterpolator, Se= rializable { private String prefix; = --===============0934844825935443136==-- From hibernate-commits at lists.jboss.org Wed May 7 10:31:17 2008 Content-Type: multipart/mixed; boundary="===============8568565611410075486==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14647 - validator/trunk/src/java/org/hibernate/validator/interpolator. Date: Wed, 07 May 2008 10:31:16 -0400 Message-ID: --===============8568565611410075486== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-07 10:31:16 -0400 (Wed, 07 May 2008) New Revision: 14647 Removed: validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMes= sageInterpolatorAggerator.java Log: remove class with typo in name Deleted: validator/trunk/src/java/org/hibernate/validator/interpolator/Defa= ultMessageInterpolatorAggerator.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMe= ssageInterpolatorAggerator.java 2008-05-07 07:22:26 UTC (rev 14646) +++ validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMe= ssageInterpolatorAggerator.java 2008-05-07 14:31:16 UTC (rev 14647) @@ -1,57 +0,0 @@ -//$Id: $ -package org.hibernate.validator.interpolator; - -import java.lang.annotation.Annotation; -import java.util.Map; -import java.util.HashMap; -import java.util.ResourceBundle; -import java.io.Serializable; - -import org.hibernate.validator.MessageInterpolator; -import org.hibernate.validator.Validator; -import org.hibernate.AssertionFailure; - -/** - * @author Emmanuel Bernard - */ -public class DefaultMessageInterpolatorAggerator implements MessageInterpo= lator, Serializable { - private Map interpolators =3D new = HashMap(); - //transient but repopulated by the object owing a reference to the interp= olator - private transient ResourceBundle messageBundle; - //transient but repopulated by the object owing a reference to the interp= olator - private transient ResourceBundle defaultMessageBundle; - - //not an interface method - public void initialize(ResourceBundle messageBundle, ResourceBundle defau= ltMessageBundle) { - this.messageBundle =3D messageBundle; - this.defaultMessageBundle =3D defaultMessageBundle; - //useful when we deserialize - for ( DefaultMessageInterpolator interpolator : interpolators.values() )= { - interpolator.initialize( messageBundle, defaultMessageBundle ); - } - } - - public void addInterpolator(Annotation annotation, Validator validator) { - DefaultMessageInterpolator interpolator =3D new DefaultMessageInterpolat= or(); - interpolator.initialize(messageBundle, defaultMessageBundle ); - interpolator.initialize( annotation, null ); - interpolators.put( validator, interpolator ); - } - - public String interpolate(String message, Validator validator, MessageInt= erpolator defaultInterpolator) { - DefaultMessageInterpolator defaultMessageInterpolator =3D interpolators.= get( validator ); - if (defaultMessageInterpolator =3D=3D null) { - return message; - } - else { - return defaultMessageInterpolator.interpolate( message, validator, defa= ultInterpolator ); - } - } - - public String getAnnotationMessage(Validator validator) { - DefaultMessageInterpolator defaultMessageInterpolator =3D interpolators.= get( validator ); - String message =3D defaultMessageInterpolator !=3D null ? defaultMessage= Interpolator.getAnnotationMessage() : null; - if (message =3D=3D null) throw new AssertionFailure("Validator not regis= tred to the messageInterceptorAggregator"); - return message; - } -} --===============8568565611410075486==-- From hibernate-commits at lists.jboss.org Wed May 7 14:11:38 2008 Content-Type: multipart/mixed; boundary="===============8719469603190815581==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14648 - core/trunk/core/src/main/java/org/hibernate/event. Date: Wed, 07 May 2008 14:11:38 -0400 Message-ID: --===============8719469603190815581== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: steve.ebersole(a)jboss.com Date: 2008-05-07 14:11:38 -0400 (Wed, 07 May 2008) New Revision: 14648 Modified: core/trunk/core/src/main/java/org/hibernate/event/EventListeners.java Log: HHH-3261 : fixed wrapping of exception from initialize/destory listeners Modified: core/trunk/core/src/main/java/org/hibernate/event/EventListeners.= java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/core/src/main/java/org/hibernate/event/EventListeners.java 2= 008-05-07 14:31:16 UTC (rev 14647) +++ core/trunk/core/src/main/java/org/hibernate/event/EventListeners.java 2= 008-05-07 18:11:38 UTC (rev 14648) @@ -29,7 +29,6 @@ import java.util.HashMap; import java.util.Map; = -import org.hibernate.AssertionFailure; import org.hibernate.MappingException; import org.hibernate.HibernateException; import org.hibernate.cfg.Configuration; @@ -162,19 +161,24 @@ private void processListeners(ListenerProcesser processer) { Field[] fields =3D getClass().getDeclaredFields(); for ( int i =3D 0; i < fields.length; i++ ) { + final Object[] listeners; try { - final Object field =3D fields[i].get( this ); - if ( field instanceof Object[] ) { - final Object[] listeners =3D ( Object[] ) field; - int length =3D listeners.length; - for ( int index =3D 0 ; index < length ; index++ ) { - processer.processListener( listeners[index ] ); - } + Object fieldValue =3D fields[i].get(this); + if ( fieldValue instanceof Object[] ) { + listeners =3D ( Object[] ) fieldValue; } + else { + continue; + } } - catch ( Exception e ) { - throw new HibernateException( "could not process listeners", e ); + catch ( Throwable t ) { + throw new HibernateException( "could not init listeners", t ); } + + int length =3D listeners.length; + for ( int index =3D 0 ; index < length ; index++ ) { + processer.processListener( listeners[index ] ); + } } } = @@ -201,6 +205,10 @@ } } = + /** + * Call {@link Destructible#cleanup} on any listeners that implement the + * {@link Destructible} interface. + */ public void destroyListeners() { try { processListeners( --===============8719469603190815581==-- From hibernate-commits at lists.jboss.org Wed May 7 14:26:18 2008 Content-Type: multipart/mixed; boundary="===============6206394678290378336==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14649 - in core/trunk/distribution: src/assembly and 1 other directory. Date: Wed, 07 May 2008 14:26:17 -0400 Message-ID: --===============6206394678290378336== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: steve.ebersole(a)jboss.com Date: 2008-05-07 14:26:17 -0400 (Wed, 07 May 2008) New Revision: 14649 Modified: core/trunk/distribution/pom.xml core/trunk/distribution/src/assembly/dist.xml Log: HHH-3266, HHH-3267, HHH-3268 : missing deps in dist bundle Modified: core/trunk/distribution/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/distribution/pom.xml 2008-05-07 18:11:38 UTC (rev 14648) +++ core/trunk/distribution/pom.xml 2008-05-07 18:26:17 UTC (rev 14649) @@ -112,6 +112,26 @@ hibernate-proxool ${project.version} + + + + javassist + javassist + 3.4.GA + true + + + cglib + cglib + 2.1_3 + true + + + asm + asm-attrs + 1.5.3 + true + = Modified: core/trunk/distribution/src/assembly/dist.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/distribution/src/assembly/dist.xml 2008-05-07 18:11:38 UTC (= rev 14648) +++ core/trunk/distribution/src/assembly/dist.xml 2008-05-07 18:26:17 UTC (= rev 14649) @@ -70,10 +70,6 @@ antlr:antlr = - cglib:cglib - asm:asm - asm:asm-attrs - commons-collections:commons-collections = dom4j:dom4j @@ -81,6 +77,8 @@ javassist:javassist = org.slf4j:slf4j-api + + javax.transaction:jta = @@ -137,6 +135,22 @@ swarmcache:swarmcache + + + lib/bytecode/cglib + + cglib:cglib + asm:asm + asm:asm-attrs + + + + + lib/bytecode/javassist + + javassist:javassist + + = --===============6206394678290378336==-- From hibernate-commits at lists.jboss.org Wed May 7 14:27:05 2008 Content-Type: multipart/mixed; boundary="===============0302594346610349234==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14650 - core/trunk/documentation/manual. Date: Wed, 07 May 2008 14:27:05 -0400 Message-ID: --===============0302594346610349234== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: steve.ebersole(a)jboss.com Date: 2008-05-07 14:27:05 -0400 (Wed, 07 May 2008) New Revision: 14650 Modified: core/trunk/documentation/manual/pom.xml Log: HHH-3257 : useRelativeImageUris Modified: core/trunk/documentation/manual/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/pom.xml 2008-05-07 18:26:17 UTC (rev 14= 649) +++ core/trunk/documentation/manual/pom.xml 2008-05-07 18:27:05 UTC (rev 14= 650) @@ -92,7 +92,7 @@ true - - true + false --===============0302594346610349234==-- From hibernate-commits at lists.jboss.org Wed May 7 15:53:30 2008 Content-Type: multipart/mixed; boundary="===============6757586719924647465==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14651 - core/trunk/documentation/manual. Date: Wed, 07 May 2008 15:53:30 -0400 Message-ID: --===============6757586719924647465== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: steve.ebersole(a)jboss.com Date: 2008-05-07 15:53:30 -0400 (Wed, 07 May 2008) New Revision: 14651 Modified: core/trunk/documentation/manual/pom.xml Log: HHH-3269 : jDocBook 2.1.1 upgrade Modified: core/trunk/documentation/manual/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/pom.xml 2008-05-07 18:27:05 UTC (rev 14= 650) +++ core/trunk/documentation/manual/pom.xml 2008-05-07 19:53:30 UTC (rev 14= 651) @@ -22,7 +22,7 @@ org.jboss.maven.plugins maven-jdocbook-plugin - 2.1.0 + 2.1.1 true @@ -53,12 +53,10 @@ es-ES --> fr-FR - ${basedir}/src/main/docbook/en-US --===============6757586719924647465==-- From hibernate-commits at lists.jboss.org Wed May 7 16:59:35 2008 Content-Type: multipart/mixed; boundary="===============4270442594916004501==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14652 - in core/trunk/documentation/manual/src/main/docbook: en-US/content and 7 other directories. Date: Wed, 07 May 2008 16:59:35 -0400 Message-ID: --===============4270442594916004501== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: steve.ebersole(a)jboss.com Date: 2008-05-07 16:59:35 -0400 (Wed, 07 May 2008) New Revision: 14652 Modified: core/trunk/documentation/manual/src/main/docbook/en-US/Hibernate_Referen= ce.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/architect= ure.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/associati= on_mapping.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/basic_map= ping.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/batch.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/best_prac= tices.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/collectio= n_mapping.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/component= _mapping.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/configura= tion.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/events.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/example_m= appings.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/example_p= arentchild.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/example_w= eblog.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/filters.x= ml core/trunk/documentation/manual/src/main/docbook/en-US/content/inheritan= ce_mapping.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/performan= ce.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/persisten= t_classes.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/preface.x= ml core/trunk/documentation/manual/src/main/docbook/en-US/content/query_cri= teria.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/query_hql= .xml core/trunk/documentation/manual/src/main/docbook/en-US/content/query_sql= .xml core/trunk/documentation/manual/src/main/docbook/en-US/content/session_a= pi.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/toolset_g= uide.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/transacti= ons.xml core/trunk/documentation/manual/src/main/docbook/en-US/content/tutorial.= xml core/trunk/documentation/manual/src/main/docbook/en-US/content/xml.xml core/trunk/documentation/manual/src/main/docbook/en-US/legal_notice.xml core/trunk/documentation/manual/src/main/docbook/en-US/translators.xml core/trunk/documentation/manual/src/main/docbook/es-ES/legal_notice.po core/trunk/documentation/manual/src/main/docbook/fr-FR/legal_notice.po core/trunk/documentation/manual/src/main/docbook/ja-JP/legal_notice.po core/trunk/documentation/manual/src/main/docbook/ko-KR/legal_notice.po core/trunk/documentation/manual/src/main/docbook/pot/Hibernate_Reference= .pot core/trunk/documentation/manual/src/main/docbook/pt-BR/legal_notice.po core/trunk/documentation/manual/src/main/docbook/zh-CN/legal_notice.po Log: HHH-3270 : documentation license Modified: core/trunk/documentation/manual/src/main/docbook/en-US/Hibernate_= Reference.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/Hibernate_Refere= nce.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/Hibernate_Refere= nce.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/ar= chitecture.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/architec= ture.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/architec= ture.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/as= sociation_mapping.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/associat= ion_mapping.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/associat= ion_mapping.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/ba= sic_mapping.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/basic_ma= pping.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/basic_ma= pping.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/ba= tch.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/batch.xm= l 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/batch.xm= l 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/be= st_practices.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/best_pra= ctices.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/best_pra= ctices.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/co= llection_mapping.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/collecti= on_mapping.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/collecti= on_mapping.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/co= mponent_mapping.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/componen= t_mapping.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/componen= t_mapping.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/co= nfiguration.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/configur= ation.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/configur= ation.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/ev= ents.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/events.x= ml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/events.x= ml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/ex= ample_mappings.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/example_= mappings.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/example_= mappings.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/ex= ample_parentchild.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/example_= parentchild.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/example_= parentchild.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/ex= ample_weblog.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/example_= weblog.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/example_= weblog.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/fi= lters.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/filters.= xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/filters.= xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/in= heritance_mapping.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/inherita= nce_mapping.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/inherita= nce_mapping.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/pe= rformance.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/performa= nce.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/performa= nce.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/pe= rsistent_classes.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/persiste= nt_classes.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/persiste= nt_classes.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/pr= eface.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/preface.= xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/preface.= xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/qu= ery_criteria.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/query_cr= iteria.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/query_cr= iteria.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/qu= ery_hql.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/query_hq= l.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/query_hq= l.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/qu= ery_sql.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/query_sq= l.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/query_sq= l.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/se= ssion_api.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/session_= api.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/session_= api.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/to= olset_guide.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/toolset_= guide.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/toolset_= guide.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/tr= ansactions.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/transact= ions.xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/transact= ions.xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/tu= torial.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/content/tutorial= .xml 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/content/tutorial= .xml 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = = Modified: core/trunk/documentation/manual/src/main/docbook/en-US/legal_noti= ce.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/legal_notice.xml= 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/legal_notice.xml= 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = @@ -38,19 +37,16 @@ - Copyright 2007 by Red Hat, Inc. T= his material may be distributed only subject to the terms and conditions se= t forth in the Open Publication License, V1.0 or later (the latest version = is presently available at http://www.opencontent.org/openpub/). + Copyright 2007 by Red Hat, Inc. = This copyrighted material is made available to + anyone wishing to use, modify, copy, or redistribute it subject to= the terms and conditions of the + GNU Lesse= r General Public License, as published + by the Free Software Foundation. - Distribution of substantively modified versions of this document i= s prohibited without the explicit permission of the copyright holder. - - - Distribution of the work or derivative of the work in any standard= (paper) book form for commercial purposes is prohibited unless prior permi= ssion is obtained from the copyright holder. - - Red Hat and the Red Hat "Shadow Man" logo are registered trademark= s of Red Hat, Inc. in the United States and other countries. - All other trademarks referenced herein are the property of their respe= ctive owners. + All other trademarks referenced herein are the property of their r= espective owners. The GPG fingerprint of the security(a)redhat.com key is: Modified: core/trunk/documentation/manual/src/main/docbook/en-US/translator= s.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/en-US/translators.xml = 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/en-US/translators.xml = 2008-05-07 20:59:35 UTC (rev 14652) @@ -21,7 +21,6 @@ ~ Free Software Foundation, Inc. ~ 51 Franklin Street, Fifth Floor ~ Boston, MA 02110-1301 USA - ~ --> = Modified: core/trunk/documentation/manual/src/main/docbook/es-ES/legal_noti= ce.po =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/es-ES/legal_notice.po = 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/es-ES/legal_notice.po = 2008-05-07 20:59:35 UTC (rev 14652) @@ -13,17 +13,9 @@ msgstr "1801 Varsity Drive Raleigh, N= C27606-2072USA Phone= : +1 919 754 3700 Phone: 888 733 4281 Fax: +1 9= 19 754 3701 PO Box 13588Research Triangle Park, NC27709USA" = #: index.docbook:31 -msgid "Copyright 2007 by Red= Hat, Inc. This material may be distributed only subject to the terms and c= onditions set forth in the Open Publication License, V1.0 or later (the lat= est version is presently available at http://www.opencontent.org/openpub/)." -msgstr "Copyright 2007 by Re= d Hat, Inc. This material may be distributed only subject to the terms and = conditions set forth in the Open Publication License, V1.0 or later (the la= test version is presently available at http://www.opencontent.org/openpub/)." +msgid "Copyright 2007 by Red= Hat, Inc. This copyrighted material is made available to anyone wishing t= o use, modify, copy, or redistribute it subject to the terms and conditions= of the GNU Less= er General Public License, as published by the Free Software Founda= tion." +msgstr "Copyright 2007 by Re= d Hat, Inc. This copyrighted material is made available to anyone wishing = to use, modify, copy, or redistribute it subject to the terms and condition= s of the GNU Les= ser General Public License, as published by the Free Software Found= ation." = -#: index.docbook:34 -msgid "Distribution of substantively modified versions of this document is= prohibited without the explicit permission of the copyright holder." -msgstr "Distribution of substantively modified versions of this document i= s prohibited without the explicit permission of the copyright holder." - -#: index.docbook:37 -msgid "Distribution of the work or derivative of the work in any standard = (paper) book form for commercial purposes is prohibited unless prior permis= sion is obtained from the copyright holder." -msgstr "Distribution of the work or derivative of the work in any standard= (paper) book form for commercial purposes is prohibited unless prior permi= ssion is obtained from the copyright holder." - #: index.docbook:40 msgid "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademar= ks of Red Hat, Inc. in the United States and other countries." msgstr "Red Hat and the Red Hat \"Shadow Man\" logo are registered tradema= rks of Red Hat, Inc. in the United States and other countries." Modified: core/trunk/documentation/manual/src/main/docbook/fr-FR/legal_noti= ce.po =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/fr-FR/legal_notice.po = 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/fr-FR/legal_notice.po = 2008-05-07 20:59:35 UTC (rev 14652) @@ -13,17 +13,9 @@ msgstr "1801 Varsity Drive Raleigh, N= C27606-2072USA Phone= : +1 919 754 3700 Phone: 888 733 4281 Fax: +1 9= 19 754 3701 PO Box 13588Research Triangle Park, NC27709USA" = #: index.docbook:31 -msgid "Copyright 2007 by Red= Hat, Inc. This material may be distributed only subject to the terms and c= onditions set forth in the Open Publication License, V1.0 or later (the lat= est version is presently available at http://www.opencontent.org/openpub/)." -msgstr "Copyright 2007 by Re= d Hat, Inc. This material may be distributed only subject to the terms and = conditions set forth in the Open Publication License, V1.0 or later (the la= test version is presently available at http://www.opencontent.org/openpub/)." +msgid "Copyright 2007 by Red= Hat, Inc. This copyrighted material is made available to anyone wishing t= o use, modify, copy, or redistribute it subject to the terms and conditions= of the GNU Less= er General Public License, as published by the Free Software Founda= tion." +msgstr "Copyright 2007 by Re= d Hat, Inc. This copyrighted material is made available to anyone wishing = to use, modify, copy, or redistribute it subject to the terms and condition= s of the GNU Les= ser General Public License, as published by the Free Software Found= ation." = -#: index.docbook:34 -msgid "Distribution of substantively modified versions of this document is= prohibited without the explicit permission of the copyright holder." -msgstr "Distribution of substantively modified versions of this document i= s prohibited without the explicit permission of the copyright holder." - -#: index.docbook:37 -msgid "Distribution of the work or derivative of the work in any standard = (paper) book form for commercial purposes is prohibited unless prior permis= sion is obtained from the copyright holder." -msgstr "Distribution of the work or derivative of the work in any standard= (paper) book form for commercial purposes is prohibited unless prior permi= ssion is obtained from the copyright holder." - #: index.docbook:40 msgid "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademar= ks of Red Hat, Inc. in the United States and other countries." msgstr "Red Hat and the Red Hat \"Shadow Man\" logo are registered tradema= rks of Red Hat, Inc. in the United States and other countries." Modified: core/trunk/documentation/manual/src/main/docbook/ja-JP/legal_noti= ce.po =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/ja-JP/legal_notice.po = 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/ja-JP/legal_notice.po = 2008-05-07 20:59:35 UTC (rev 14652) @@ -13,17 +13,9 @@ msgstr "1801 Varsity Drive Raleigh, N= C27606-2072USA Phone= : +1 919 754 3700 Phone: 888 733 4281 Fax: +1 9= 19 754 3701 PO Box 13588Research Triangle Park, NC27709USA" = #: index.docbook:31 -msgid "Copyright 2007 by Red= Hat, Inc. This material may be distributed only subject to the terms and c= onditions set forth in the Open Publication License, V1.0 or later (the lat= est version is presently available at http://www.opencontent.org/openpub/)." -msgstr "Copyright 2007 by Re= d Hat, Inc. This material may be distributed only subject to the terms and = conditions set forth in the Open Publication License, V1.0 or later (the la= test version is presently available at http://www.opencontent.org/openpub/)." +msgid "Copyright 2007 by Red= Hat, Inc. This copyrighted material is made available to anyone wishing t= o use, modify, copy, or redistribute it subject to the terms and conditions= of the GNU Less= er General Public License, as published by the Free Software Founda= tion." +msgstr "Copyright 2007 by Re= d Hat, Inc. This copyrighted material is made available to anyone wishing = to use, modify, copy, or redistribute it subject to the terms and condition= s of the GNU Les= ser General Public License, as published by the Free Software Found= ation." = -#: index.docbook:34 -msgid "Distribution of substantively modified versions of this document is= prohibited without the explicit permission of the copyright holder." -msgstr "Distribution of substantively modified versions of this document i= s prohibited without the explicit permission of the copyright holder." - -#: index.docbook:37 -msgid "Distribution of the work or derivative of the work in any standard = (paper) book form for commercial purposes is prohibited unless prior permis= sion is obtained from the copyright holder." -msgstr "Distribution of the work or derivative of the work in any standard= (paper) book form for commercial purposes is prohibited unless prior permi= ssion is obtained from the copyright holder." - #: index.docbook:40 msgid "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademar= ks of Red Hat, Inc. in the United States and other countries." msgstr "Red Hat and the Red Hat \"Shadow Man\" logo are registered tradema= rks of Red Hat, Inc. in the United States and other countries." Modified: core/trunk/documentation/manual/src/main/docbook/ko-KR/legal_noti= ce.po =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/ko-KR/legal_notice.po = 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/ko-KR/legal_notice.po = 2008-05-07 20:59:35 UTC (rev 14652) @@ -13,17 +13,9 @@ msgstr "1801 Varsity Drive Raleigh, N= C27606-2072USA Phone= : +1 919 754 3700 Phone: 888 733 4281 Fax: +1 9= 19 754 3701 PO Box 13588Research Triangle Park, NC27709USA" = #: index.docbook:31 -msgid "Copyright 2007 by Red= Hat, Inc. This material may be distributed only subject to the terms and c= onditions set forth in the Open Publication License, V1.0 or later (the lat= est version is presently available at http://www.opencontent.org/openpub/)." -msgstr "Copyright 2007 by Re= d Hat, Inc. This material may be distributed only subject to the terms and = conditions set forth in the Open Publication License, V1.0 or later (the la= test version is presently available at http://www.opencontent.org/openpub/)." +msgid "Copyright 2007 by Red= Hat, Inc. This copyrighted material is made available to anyone wishing t= o use, modify, copy, or redistribute it subject to the terms and conditions= of the GNU Less= er General Public License, as published by the Free Software Founda= tion." +msgstr "Copyright 2007 by Re= d Hat, Inc. This copyrighted material is made available to anyone wishing = to use, modify, copy, or redistribute it subject to the terms and condition= s of the GNU Les= ser General Public License, as published by the Free Software Found= ation." = -#: index.docbook:34 -msgid "Distribution of substantively modified versions of this document is= prohibited without the explicit permission of the copyright holder." -msgstr "Distribution of substantively modified versions of this document i= s prohibited without the explicit permission of the copyright holder." - -#: index.docbook:37 -msgid "Distribution of the work or derivative of the work in any standard = (paper) book form for commercial purposes is prohibited unless prior permis= sion is obtained from the copyright holder." -msgstr "Distribution of the work or derivative of the work in any standard= (paper) book form for commercial purposes is prohibited unless prior permi= ssion is obtained from the copyright holder." - #: index.docbook:40 msgid "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademar= ks of Red Hat, Inc. in the United States and other countries." msgstr "Red Hat and the Red Hat \"Shadow Man\" logo are registered tradema= rks of Red Hat, Inc. in the United States and other countries." Modified: core/trunk/documentation/manual/src/main/docbook/pot/Hibernate_Re= ference.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/Hibernate_Referenc= e.pot 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/pot/Hibernate_Referenc= e.pot 2008-05-07 20:59:35 UTC (rev 14652) @@ -1,34 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:23-0500\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#. When image changes, this message will be marked fuzzy or untranslated f= or you. -#. It doesn't matter what you translate it to: it's not used at all. -#: ./Hibernate_Reference.xml:33(None) ./Hibernate_Reference.xml:36(None) = -msgid "@@image: 'images/hibernate_logo_a.png'; md5=3D38bd6cfd79e676660440f= 316f4ab452c" -msgstr "" - -#: ./Hibernate_Reference.xml:26(title) = -msgid "HIBERNATE - Relational Persistence for Idiomatic Java" -msgstr "" - -#: ./Hibernate_Reference.xml:27(subtitle) = -msgid "Hibernate Reference Documentation" -msgstr "" - -#: ./Hibernate_Reference.xml:30(issuenum) = -msgid "1" -msgstr "" - -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: ./Hibernate_Reference.xml:0(None) = -msgid "translator-credits" -msgstr "" - Modified: core/trunk/documentation/manual/src/main/docbook/pt-BR/legal_noti= ce.po =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pt-BR/legal_notice.po = 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/pt-BR/legal_notice.po = 2008-05-07 20:59:35 UTC (rev 14652) @@ -13,17 +13,9 @@ msgstr "1801 Varsity Drive Raleigh, N= C27606-2072USA Phone= : +1 919 754 3700 Phone: 888 733 4281 Fax: +1 9= 19 754 3701 PO Box 13588Research Triangle Park, NC27709USA" = #: index.docbook:31 -msgid "Copyright 2007 by Red= Hat, Inc. This material may be distributed only subject to the terms and c= onditions set forth in the Open Publication License, V1.0 or later (the lat= est version is presently available at http://www.opencontent.org/openpub/)." -msgstr "Copyright 2007 by Re= d Hat, Inc. This material may be distributed only subject to the terms and = conditions set forth in the Open Publication License, V1.0 or later (the la= test version is presently available at http://www.opencontent.org/openpub/)." +msgid "Copyright 2007 by Red= Hat, Inc. This copyrighted material is made available to anyone wishing t= o use, modify, copy, or redistribute it subject to the terms and conditions= of the GNU Less= er General Public License, as published by the Free Software Founda= tion." +msgstr "Copyright 2007 by Re= d Hat, Inc. This copyrighted material is made available to anyone wishing = to use, modify, copy, or redistribute it subject to the terms and condition= s of the GNU Les= ser General Public License, as published by the Free Software Found= ation." = -#: index.docbook:34 -msgid "Distribution of substantively modified versions of this document is= prohibited without the explicit permission of the copyright holder." -msgstr "Distribution of substantively modified versions of this document i= s prohibited without the explicit permission of the copyright holder." - -#: index.docbook:37 -msgid "Distribution of the work or derivative of the work in any standard = (paper) book form for commercial purposes is prohibited unless prior permis= sion is obtained from the copyright holder." -msgstr "Distribution of the work or derivative of the work in any standard= (paper) book form for commercial purposes is prohibited unless prior permi= ssion is obtained from the copyright holder." - #: index.docbook:40 msgid "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademar= ks of Red Hat, Inc. in the United States and other countries." msgstr "Red Hat and the Red Hat \"Shadow Man\" logo are registered tradema= rks of Red Hat, Inc. in the United States and other countries." Modified: core/trunk/documentation/manual/src/main/docbook/zh-CN/legal_noti= ce.po =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/zh-CN/legal_notice.po = 2008-05-07 19:53:30 UTC (rev 14651) +++ core/trunk/documentation/manual/src/main/docbook/zh-CN/legal_notice.po = 2008-05-07 20:59:35 UTC (rev 14652) @@ -13,17 +13,9 @@ msgstr "1801 Varsity Drive Raleigh, N= C27606-2072USA Phone= : +1 919 754 3700 Phone: 888 733 4281 Fax: +1 9= 19 754 3701 PO Box 13588Research Triangle Park, NC27709USA" = #: index.docbook:31 -msgid "Copyright 2007 by Red= Hat, Inc. This material may be distributed only subject to the terms and c= onditions set forth in the Open Publication License, V1.0 or later (the lat= est version is presently available at http://www.opencontent.org/openpub/)." -msgstr "Copyright 2007 by Re= d Hat, Inc. This material may be distributed only subject to the terms and = conditions set forth in the Open Publication License, V1.0 or later (the la= test version is presently available at http://www.opencontent.org/openpub/)." +msgid "Copyright 2007 by Red= Hat, Inc. This copyrighted material is made available to anyone wishing t= o use, modify, copy, or redistribute it subject to the terms and conditions= of the GNU Less= er General Public License, as published by the Free Software Founda= tion." +msgstr "Copyright 2007 by Re= d Hat, Inc. This copyrighted material is made available to anyone wishing = to use, modify, copy, or redistribute it subject to the terms and condition= s of the GNU Les= ser General Public License, as published by the Free Software Found= ation." = -#: index.docbook:34 -msgid "Distribution of substantively modified versions of this document is= prohibited without the explicit permission of the copyright holder." -msgstr "Distribution of substantively modified versions of this document i= s prohibited without the explicit permission of the copyright holder." - -#: index.docbook:37 -msgid "Distribution of the work or derivative of the work in any standard = (paper) book form for commercial purposes is prohibited unless prior permis= sion is obtained from the copyright holder." -msgstr "Distribution of the work or derivative of the work in any standard= (paper) book form for commercial purposes is prohibited unless prior permi= ssion is obtained from the copyright holder." - #: index.docbook:40 msgid "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademar= ks of Red Hat, Inc. in the United States and other countries." msgstr "Red Hat and the Red Hat \"Shadow Man\" logo are registered tradema= rks of Red Hat, Inc. in the United States and other countries." --===============4270442594916004501==-- From hibernate-commits at lists.jboss.org Wed May 7 17:02:37 2008 Content-Type: multipart/mixed; boundary="===============2751703871400288007==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14653 - in core/trunk/documentation/manual/src/main/docbook/pot: content and 1 other directory. Date: Wed, 07 May 2008 17:02:36 -0400 Message-ID: --===============2751703871400288007== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: steve.ebersole(a)jboss.com Date: 2008-05-07 17:02:35 -0400 (Wed, 07 May 2008) New Revision: 14653 Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/architectur= e.pot core/trunk/documentation/manual/src/main/docbook/pot/content/association= _mapping.pot core/trunk/documentation/manual/src/main/docbook/pot/content/basic_mappi= ng.pot core/trunk/documentation/manual/src/main/docbook/pot/content/batch.pot core/trunk/documentation/manual/src/main/docbook/pot/content/best_practi= ces.pot core/trunk/documentation/manual/src/main/docbook/pot/content/collection_= mapping.pot core/trunk/documentation/manual/src/main/docbook/pot/content/component_m= apping.pot core/trunk/documentation/manual/src/main/docbook/pot/content/configurati= on.pot core/trunk/documentation/manual/src/main/docbook/pot/content/events.pot core/trunk/documentation/manual/src/main/docbook/pot/content/example_map= pings.pot core/trunk/documentation/manual/src/main/docbook/pot/content/example_par= entchild.pot core/trunk/documentation/manual/src/main/docbook/pot/content/example_web= log.pot core/trunk/documentation/manual/src/main/docbook/pot/content/filters.pot core/trunk/documentation/manual/src/main/docbook/pot/content/inheritance= _mapping.pot core/trunk/documentation/manual/src/main/docbook/pot/content/performance= .pot core/trunk/documentation/manual/src/main/docbook/pot/content/persistent_= classes.pot core/trunk/documentation/manual/src/main/docbook/pot/content/preface.pot core/trunk/documentation/manual/src/main/docbook/pot/content/query_crite= ria.pot core/trunk/documentation/manual/src/main/docbook/pot/content/query_hql.p= ot core/trunk/documentation/manual/src/main/docbook/pot/content/query_sql.p= ot core/trunk/documentation/manual/src/main/docbook/pot/content/session_api= .pot core/trunk/documentation/manual/src/main/docbook/pot/content/toolset_gui= de.pot core/trunk/documentation/manual/src/main/docbook/pot/content/transaction= s.pot core/trunk/documentation/manual/src/main/docbook/pot/content/tutorial.pot core/trunk/documentation/manual/src/main/docbook/pot/content/xml.pot core/trunk/documentation/manual/src/main/docbook/pot/legal_notice.pot Log: HHH-3270 : documentation license Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/arch= itecture.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/architectu= re.pot 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/architectu= re.pot 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,256 +1,322 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:28-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#. When image changes, this message will be marked fuzzy or untranslated f= or you. -#. It doesn't matter what you translate it to: it's not used at all. -#: architecture.xml:32(None) = -msgid "@@image: '../images/overview.svg'; md5=3D2d9211eace02ecef615f7dd42b= eec14c" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated f= or you. -#. It doesn't matter what you translate it to: it's not used at all. -#: architecture.xml:35(None) = -msgid "@@image: '../images/overview.png'; md5=3Da2b5f0f7dc75d9773305d4d824= 880e8c" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated f= or you. -#. It doesn't matter what you translate it to: it's not used at all. -#: architecture.xml:54(None) = -msgid "@@image: '../images/lite.svg'; md5=3D2178e70b3b165736d33b085dcad936= 99" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated f= or you. -#. It doesn't matter what you translate it to: it's not used at all. -#: architecture.xml:57(None) = -msgid "@@image: '../images/lite.png'; md5=3D7dd864188937e2dfef42a706235f74= c3" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated f= or you. -#. It doesn't matter what you translate it to: it's not used at all. -#: architecture.xml:68(None) = -msgid "@@image: '../images/full_cream.svg'; md5=3D4ef192f03e90e451e5dcb287= d2709687" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated f= or you. -#. It doesn't matter what you translate it to: it's not used at all. -#: architecture.xml:71(None) = -msgid "@@image: '../images/full_cream.png'; md5=3Dc3ee197b49364a876bc5867d= 5c2c6db7" -msgstr "" - -#: architecture.xml:21(title) = +#. Tag: title +#: architecture.xml:30 +#, no-c-format msgid "Architecture" msgstr "" = -#: architecture.xml:24(title) = +#. Tag: title +#: architecture.xml:33 +#, no-c-format msgid "Overview" msgstr "" = -#: architecture.xml:26(para) = +#. Tag: para +#: architecture.xml:35 +#, no-c-format msgid "A (very) high-level view of the Hibernate architecture:" msgstr "" = -#: architecture.xml:39(para) = +#. Tag: para +#: architecture.xml:48 +#, no-c-format msgid "This diagram shows Hibernate using the database and configuration d= ata to provide persistence services (and persistent objects) to the applica= tion." msgstr "" = -#: architecture.xml:44(para) = +#. Tag: para +#: architecture.xml:53 +#, no-c-format msgid "We would like to show a more detailed view of the runtime architect= ure. Unfortunately, Hibernate is flexible and supports several approaches. = We will show the two extremes. The \"lite\" architecture has the applicatio= n provide its own JDBC connections and manage its own transactions. This ap= proach uses a minimal subset of Hibernate's APIs:" msgstr "" = -#: architecture.xml:61(para) = +#. Tag: para +#: architecture.xml:70 +#, no-c-format msgid "The \"full cream\" architecture abstracts the application away from= the underlying JDBC/JTA APIs and lets Hibernate take care of the details." msgstr "" = -#: architecture.xml:80(term) = +#. Tag: para +#: architecture.xml:84 +#, no-c-format +msgid "Heres some definitions of the objects in the diagrams:" +msgstr "" + +#. Tag: term +#: architecture.xml:89 +#, no-c-format msgid "SessionFactory (org.hibernate.SessionFactory)" msgstr "" = -#: architecture.xml:82(para) = +#. Tag: para +#: architecture.xml:91 +#, no-c-format msgid "A threadsafe (immutable) cache of compiled mappings for a single da= tabase. A factory for Session and a client of C= onnectionProvider. Might hold an optional (second-level) cache of= data that is reusable between transactions, at a process- or cluster-level= ." msgstr "" = -#: architecture.xml:92(term) = +#. Tag: term +#: architecture.xml:101 +#, no-c-format msgid "Session (org.hibernate.Session)" msgstr "" = -#: architecture.xml:94(para) = +#. Tag: para +#: architecture.xml:103 +#, no-c-format msgid "A single-threaded, short-lived object representing a conversation b= etween the application and the persistent store. Wraps a JDBC connection. F= actory for Transaction. Holds a mandatory (first-level) = cache of persistent objects, used when navigating the object graph or looki= ng up objects by identifier." msgstr "" = -#: architecture.xml:104(term) = +#. Tag: term +#: architecture.xml:113 +#, no-c-format msgid "Persistent objects and collections" msgstr "" = -#: architecture.xml:106(para) = +#. Tag: para +#: architecture.xml:115 +#, no-c-format msgid "Short-lived, single threaded objects containing persistent state an= d business function. These might be ordinary JavaBeans/POJOs, the only spec= ial thing about them is that they are currently associated with (exactly on= e) Session. As soon as the Session is= closed, they will be detached and free to use in any application layer (e.= g. directly as data transfer objects to and from presentation)." msgstr "" = -#: architecture.xml:117(term) = +#. Tag: term +#: architecture.xml:126 +#, no-c-format msgid "Transient and detached objects and collections" msgstr "" = -#: architecture.xml:119(para) = +#. Tag: para +#: architecture.xml:128 +#, no-c-format msgid "Instances of persistent classes that are not currently associated w= ith a Session. They may have been instantiated by the ap= plication and not (yet) persisted or they may have been instantiated by a c= losed Session." msgstr "" = -#: architecture.xml:128(term) = +#. Tag: term +#: architecture.xml:137 +#, no-c-format msgid "Transaction (org.hibernate.Transaction)" msgstr "" = -#: architecture.xml:130(para) = +#. Tag: para +#: architecture.xml:139 +#, no-c-format msgid "(Optional) A single-threaded, short-lived object used by the applic= ation to specify atomic units of work. Abstracts application from underlyin= g JDBC, JTA or CORBA transaction. A Session might span s= everal Transactions in some cases. However, transaction = demarcation, either using the underlying API or Transaction, is never optional!" msgstr "" = -#: architecture.xml:141(term) = +#. Tag: term +#: architecture.xml:150 +#, no-c-format msgid "ConnectionProvider (org.hibernate.connection.ConnectionPro= vider)" msgstr "" = -#: architecture.xml:143(para) = +#. Tag: para +#: architecture.xml:152 +#, no-c-format msgid "(Optional) A factory for (and pool of) JDBC connections. Abstracts = application from underlying Datasource or Drive= rManager. Not exposed to application, but can be extended/impleme= nted by the developer." msgstr "" = -#: architecture.xml:151(term) = +#. Tag: term +#: architecture.xml:160 +#, no-c-format msgid "TransactionFactory (org.hibernate.TransactionFactory)" msgstr "" = -#: architecture.xml:153(para) = +#. Tag: para +#: architecture.xml:162 +#, no-c-format msgid "(Optional) A factory for Transaction instances. = Not exposed to the application, but can be extended/implemented by the deve= loper." msgstr "" = -#: architecture.xml:160(emphasis) = +#. Tag: emphasis +#: architecture.xml:169 +#, no-c-format msgid "Extension Interfaces" msgstr "" = -#: architecture.xml:162(para) = +#. Tag: para +#: architecture.xml:171 +#, no-c-format msgid "Hibernate offers many optional extension interfaces you can impleme= nt to customize the behavior of your persistence layer. See the API documen= tation for details." msgstr "" = -#: architecture.xml:75(para) = -msgid "Heres some definitions of the objects in the diagrams: " -msgstr "" - -#: architecture.xml:171(para) = +#. Tag: para +#: architecture.xml:180 +#, no-c-format msgid "Given a \"lite\" architecture, the application bypasses the Transaction/TransactionFactory and/or ConnectionProvider APIs to talk to JTA or JDBC directly." msgstr "" = -#: architecture.xml:179(title) = +#. Tag: title +#: architecture.xml:188 +#, no-c-format msgid "Instance states" msgstr "" = -#: architecture.xml:180(para) = +#. Tag: para +#: architecture.xml:189 +#, no-c-format msgid "An instance of a persistent classes may be in one of three differen= t states, which are defined with respect to a persistence context= . The Hibernate Session object is the persist= ence context:" msgstr "" = -#: architecture.xml:188(term) = +#. Tag: term +#: architecture.xml:197 +#, no-c-format msgid "transient" msgstr "" = -#: architecture.xml:190(para) = +#. Tag: para +#: architecture.xml:199 +#, no-c-format msgid "The instance is not, and has never been associated with any persist= ence context. It has no persistent identity (primary key value)." msgstr "" = -#: architecture.xml:198(term) = +#. Tag: term +#: architecture.xml:207 +#, no-c-format msgid "persistent" msgstr "" = -#: architecture.xml:200(para) = +#. Tag: para +#: architecture.xml:209 +#, no-c-format msgid "The instance is currently associated with a persistence context. It= has a persistent identity (primary key value) and, perhaps, a correspondin= g row in the database. For a particular persistence context, Hibernate guarantees that persistent identity is equivalent to Java = identity (in-memory location of the object)." msgstr "" = -#: architecture.xml:212(term) = +#. Tag: term +#: architecture.xml:221 +#, no-c-format msgid "detached" msgstr "" = -#: architecture.xml:214(para) = -msgid "The instance was once associated with a persistence context, but th= at context was closed, or the instance was serialized to another process. I= t has a persistent identity and, perhaps, a corrsponding row in the databas= e. For detached instances, Hibernate makes no guarantees about the relation= ship between persistent identity and Java identity." +#. Tag: para +#: architecture.xml:223 +#, no-c-format +msgid "The instance was once associated with a persistence context, but th= at context was closed, or the instance was serialized to another process. I= t has a persistent identity and, perhaps, a corresponding row in the databa= se. For detached instances, Hibernate makes no guarantees about the relatio= nship between persistent identity and Java identity." msgstr "" = -#: architecture.xml:229(title) = +#. Tag: title +#: architecture.xml:238 +#, no-c-format msgid "JMX Integration" msgstr "" = -#: architecture.xml:231(para) = +#. Tag: para +#: architecture.xml:240 +#, no-c-format msgid "JMX is the J2EE standard for management of Java components. Hiberna= te may be managed via a JMX standard service. We provide an MBean implement= ation in the distribution, org.hibernate.jmx.HibernateService." msgstr "" = -#: architecture.xml:237(para) = +#. Tag: para +#: architecture.xml:246 +#, no-c-format msgid "For an example how to deploy Hibernate as a JMX service on the JBos= s Application Server, please see the JBoss User Guide. On JBoss AS, you als= o get these benefits if you deploy using JMX:" msgstr "" = -#: architecture.xml:245(para) = +#. Tag: para +#: architecture.xml:254 +#, no-c-format msgid "Session Management: The Hibernate Ses= sion's life cycle can be automatically bound to the scope of a JT= A transaction. This means you no longer have to manually open and close the= Session, this becomes the job of a JBoss EJB intercepto= r. You also don't have to worry about transaction demarcation in your code = anymore (unless you'd like to write a portable persistence layer of course,= use the optional Hibernate Transaction API for this). Y= ou call the HibernateContext to access a Sessio= n." msgstr "" = -#: architecture.xml:257(para) = +#. Tag: para +#: architecture.xml:266 +#, no-c-format msgid "HAR deployment: Usually you deploy the Hiberna= te JMX service using a JBoss service deployment descriptor (in an EAR and/o= r SAR file), it supports all the usual configuration options of a Hibernate= SessionFactory. However, you still have to name all you= r mapping files in the deployment descriptor. If you decide to use the opti= onal HAR deployment, JBoss will automatically detect all mapping files in y= our HAR file." msgstr "" = -#: architecture.xml:268(para) = +#. Tag: para +#: architecture.xml:277 +#, no-c-format msgid "Consult the JBoss AS user guide for more information about these op= tions." msgstr "" = -#: architecture.xml:272(para) = +#. Tag: para +#: architecture.xml:281 +#, no-c-format msgid "Another feature available as a JMX service are runtime Hibernate st= atistics. See ." msgstr "" = -#: architecture.xml:279(title) = +#. Tag: title +#: architecture.xml:288 +#, no-c-format msgid "JCA Support" msgstr "" = -#: architecture.xml:280(para) = +#. Tag: para +#: architecture.xml:289 +#, no-c-format msgid "Hibernate may also be configured as a JCA connector. Please see the= website for more details. Please note that Hibernate JCA support is still = considered experimental." msgstr "" = -#: architecture.xml:287(title) = +#. Tag: title +#: architecture.xml:296 +#, no-c-format msgid "Contextual Sessions" msgstr "" = -#: architecture.xml:288(para) = +#. Tag: para +#: architecture.xml:297 +#, no-c-format msgid "Most applications using Hibernate need some form of \"contextual\" = sessions, where a given session is in effect throughout the scope of a give= n context. However, across applications the definition of what constitutes = a context is typically different; and different contexts define different s= copes to the notion of current. Applications using Hibernate prior to versi= on 3.0 tended to utilize either home-grown ThreadLocal-b= ased contextual sessions, helper classes such as HibernateUtil, or utilized third-party frameworks (such as Spring or Pico) which p= rovided proxy/interception-based contextual sessions." msgstr "" = -#: architecture.xml:297(para) = +#. Tag: para +#: architecture.xml:306 +#, no-c-format msgid "Starting with version 3.0.1, Hibernate added the SessionFa= ctory.getCurrentSession() method. Initially, this assumed usage o= f JTA transactions, where the JTA tra= nsaction defined both the scope and context of a current session. The Hiber= nate team maintains that, given the maturity of the numerous stand-alone JTA TransactionManager implementations out there, most (if= not all) applications should be using JTA transaction m= anagement whether or not they are deployed into a J2EE c= ontainer. Based on that, the JTA-based contextual sessio= ns is all you should ever need to use." msgstr "" = -#: architecture.xml:307(para) = +#. Tag: para +#: architecture.xml:316 +#, no-c-format msgid "However, as of version 3.1, the processing behind SessionF= actory.getCurrentSession() is now pluggable. To that end, a new e= xtension interface (org.hibernate.context.CurrentSessionContext) and a new configuration parameter (hibernate.current_sess= ion_context_class) have been added to allow pluggability of the s= cope and context of defining current sessions." msgstr "" = -#: architecture.xml:314(para) = +#. Tag: para +#: architecture.xml:323 +#, no-c-format msgid "See the Javadocs for the org.hibernate.context.CurrentSess= ionContext interface for a detailed discussion of its contract. I= t defines a single method, currentSession(), by which th= e implementation is responsible for tracking the current contextual session= . Out-of-the-box, Hibernate comes with three implementations of this interf= ace." msgstr "" = -#: architecture.xml:324(para) = +#. Tag: para +#: architecture.xml:333 +#, no-c-format msgid "org.hibernate.context.JTASessionContext - curren= t sessions are tracked and scoped by a JTA transaction. = The processing here is exactly the same as in the older JTA-only approach. = See the Javadocs for details." msgstr "" = -#: architecture.xml:332(para) = +#. Tag: para +#: architecture.xml:341 +#, no-c-format msgid "org.hibernate.context.ThreadLocalSessionContext = - current sessions are tracked by thread of execution. Again, see the Javad= ocs for details." msgstr "" = -#: architecture.xml:338(para) = +#. Tag: para +#: architecture.xml:347 +#, no-c-format msgid "org.hibernate.context.ManagedSessionContext - cu= rrent sessions are tracked by thread of execution. However, you are respons= ible to bind and unbind a Session instance with static m= ethods on this class, it does never open, flush, or close a Sessio= n." msgstr "" = -#: architecture.xml:347(para) = -msgid "The first two implementations provide a \"one session - one databas= e transaction\" programming model, also known and used as session= -per-request. The beginning and end of a Hibernate session is de= fined by the duration of a database transaction. If you use programatic tra= nsaction demarcation in plain JSE without JTA, you are adviced to use the H= ibernate Transaction API to hide the underlying transact= ion system from your code. If you use JTA, use the JTA interfaces to demarc= ate transactions. If you execute in an EJB container that supports CMT, tra= nsaction boundaries are defined declaratively and you don't need any transa= ction or session demarcation operations in your code. Refer to for more information and code examples." +#. Tag: para +#: architecture.xml:356 +#, no-c-format +msgid "The first two implementations provide a \"one session - one databas= e transaction\" programming model, also known and used as session= -per-request. The beginning and end of a Hibernate session is de= fined by the duration of a database transaction. If you use programmatic tr= ansaction demarcation in plain JSE without JTA, you are advised to use the = Hibernate Transaction API to hide the underlying transac= tion system from your code. If you use JTA, use the JTA interfaces to demar= cate transactions. If you execute in an EJB container that supports CMT, tr= ansaction boundaries are defined declaratively and you don't need any trans= action or session demarcation operations in your code. Refer to for more information and code examples." msgstr "" = -#: architecture.xml:359(para) = +#. Tag: para +#: architecture.xml:368 +#, no-c-format msgid "The hibernate.current_session_context_class conf= iguration parameter defines which org.hibernate.context.CurrentSes= sionContext implementation should be used. Note that for backward= s compatibility, if this config param is not set but a org.hiberna= te.transaction.TransactionManagerLookup is configured, Hibernate = will use the org.hibernate.context.JTASessionContext. Ty= pically, the value of this parameter would just name the implementation cla= ss to use; for the three out-of-the-box implementations, however, there are= three corresponding short names, \"jta\", \"thread\", and \"managed\"." msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: architecture.xml:0(None) = -msgid "translator-credits" -msgstr "" - Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/asso= ciation_mapping.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/associatio= n_mapping.pot 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/associatio= n_mapping.pot 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,160 +1,738 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:28-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: association_mapping.xml:6(title) = +#. Tag: title +#: association_mapping.xml:30 +#, no-c-format msgid "Association Mappings" msgstr "" = -#: association_mapping.xml:9(title) = +#. Tag: title +#: association_mapping.xml:33 +#, no-c-format msgid "Introduction" msgstr "" = -#: association_mapping.xml:11(para) = +#. Tag: para +#: association_mapping.xml:35 +#, no-c-format msgid "Association mappings are the often most difficult thing to get righ= t. In this section we'll go through the canonical cases one by one, startin= g with unidirectional mappings, and then considering the bidirectional case= s. We'll use Person and Address in al= l the examples." msgstr "" = -#: association_mapping.xml:19(para) = +#. Tag: para +#: association_mapping.xml:43 +#, no-c-format msgid "We'll classify associations by whether or not they map to an interv= ening join table, and by multiplicity." msgstr "" = -#: association_mapping.xml:24(para) = +#. Tag: para +#: association_mapping.xml:48 +#, no-c-format msgid "Nullable foreign keys are not considered good practice in tradition= al data modelling, so all our examples use not null foreign keys. This is n= ot a requirement of Hibernate, and the mappings will all work if you drop t= he nullability constraints." msgstr "" = -#: association_mapping.xml:34(title) = +#. Tag: title +#: association_mapping.xml:58 +#, no-c-format msgid "Unidirectional associations" msgstr "" = -#: association_mapping.xml:37(title) association_mapping.xml:195(title) = +#. Tag: title +#: association_mapping.xml:61 association_mapping.xml:132 +#, no-c-format msgid "many to one" msgstr "" = -#: association_mapping.xml:39(para) = +#. Tag: para +#: association_mapping.xml:63 +#, no-c-format msgid "A unidirectional many-to-one association is th= e most common kind of unidirectional association." msgstr "" = -#: association_mapping.xml:66(title) association_mapping.xml:229(title) as= sociation_mapping.xml:373(title) association_mapping.xml:479(title) = +#. Tag: programlisting +#: association_mapping.xml:68 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:69 association_mapping.xml:185 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: association_mapping.xml:74 association_mapping.xml:145 association_mapp= ing.xml:209 association_mapping.xml:249 +#, no-c-format msgid "one to one" msgstr "" = -#: association_mapping.xml:68(para) = +#. Tag: para +#: association_mapping.xml:76 +#, no-c-format msgid "A unidirectional one-to-one association on a foreign key<= /emphasis> is almost identical. The only difference is the column unique co= nstraint." msgstr "" = -#: association_mapping.xml:93(para) = +#. Tag: programlisting +#: association_mapping.xml:81 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:82 association_mapping.xml:217 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: association_mapping.xml:84 +#, no-c-format msgid "A unidirectional one-to-one association on a primary key<= /emphasis> usually uses a special id generator. (Notice that we've reversed= the direction of the association in this example.)" msgstr "" = -#: association_mapping.xml:121(title) association_mapping.xml:161(title) = +#. Tag: programlisting +#: association_mapping.xml:90 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " person\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:91 association_mapping.xml:225 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: association_mapping.xml:96 association_mapping.xml:118 +#, no-c-format msgid "one to many" msgstr "" = -#: association_mapping.xml:123(para) = +#. Tag: para +#: association_mapping.xml:98 +#, no-c-format msgid "A unidirectional one-to-many association on a foreign key= is a very unusual case, and is not really recommended." msgstr "" = -#: association_mapping.xml:149(para) = +#. Tag: programlisting +#: association_mapping.xml:103 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:104 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: association_mapping.xml:106 +#, no-c-format msgid "We think it's better to use a join table for this kind of associati= on." msgstr "" = -#: association_mapping.xml:158(title) = +#. Tag: title +#: association_mapping.xml:115 +#, no-c-format msgid "Unidirectional associations with join tables" msgstr "" = -#: association_mapping.xml:163(para) = +#. Tag: para +#: association_mapping.xml:120 +#, no-c-format msgid "A unidirectional one-to-many association on a join table<= /emphasis> is much preferred. Notice that by specifying unique=3D\= "true\", we have changed the multiplicity from many-to-many to on= e-to-many." msgstr "" = -#: association_mapping.xml:197(para) = +#. Tag: programlisting +#: association_mapping.xml:126 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:127 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: association_mapping.xml:134 +#, no-c-format msgid "A unidirectional many-to-one association on a join table<= /emphasis> is quite common when the association is optional." msgstr "" = -#: association_mapping.xml:231(para) = +#. Tag: programlisting +#: association_mapping.xml:139 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:140 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: association_mapping.xml:147 +#, no-c-format msgid "A unidirectional one-to-one association on a join table is extremely unusual, but possible." msgstr "" = -#: association_mapping.xml:265(title) association_mapping.xml:525(title) = +#. Tag: programlisting +#: association_mapping.xml:152 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:153 association_mapping.xml:257 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: association_mapping.xml:158 association_mapping.xml:262 +#, no-c-format msgid "many to many" msgstr "" = -#: association_mapping.xml:267(para) = +#. Tag: para +#: association_mapping.xml:160 +#, no-c-format msgid "Finally, we have a unidirectional many-to-many associatio= n." msgstr "" = -#: association_mapping.xml:298(title) = +#. Tag: programlisting +#: association_mapping.xml:164 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:165 association_mapping.xml:270 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: association_mapping.xml:172 +#, no-c-format msgid "Bidirectional associations" msgstr "" = -#: association_mapping.xml:301(title) association_mapping.xml:436(title) = +#. Tag: title +#: association_mapping.xml:175 association_mapping.xml:235 +#, no-c-format msgid "one to many / many to one" msgstr "" = -#: association_mapping.xml:303(para) = +#. Tag: para +#: association_mapping.xml:177 +#, no-c-format msgid "A bidirectional many-to-one association is the= most common kind of association. (This is the standard parent/child relati= onship.)" msgstr "" = -#: association_mapping.xml:333(para) = +#. Tag: programlisting +#: association_mapping.xml:183 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:187 +#, no-c-format msgid "If you use a List (or other indexed collection) = you need to set the key column of the foreign key to not null, and let Hibernate manage the association from the= collections side to maintain the index of each element (making the other s= ide virtually inverse by setting update=3D\"false\" and = insert=3D\"false\"):" msgstr "" = -#: association_mapping.xml:361(para) = +#. Tag: programlisting +#: association_mapping.xml:195 +#, no-c-format +msgid "" + "\n" + " \n" + " ...\n" + " \n" + "\n" + "\n" + "\n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:197 +#, no-c-format msgid "It is important that you define not-null=3D\"true\" on the <key> element of the collection mapping= if the underlying foreign key column is NOT NULL. Don't= only declare not-null=3D\"true\" on a possible nested <= literal><column> element, but on the <key> element." msgstr "" = -#: association_mapping.xml:375(para) = +#. Tag: para +#: association_mapping.xml:211 +#, no-c-format msgid "A bidirectional one-to-one association on a foreign key is quite common." msgstr "" = -#: association_mapping.xml:402(para) = +#. Tag: programlisting +#: association_mapping.xml:216 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:219 +#, no-c-format msgid "A bidirectional one-to-one association on a primary key uses the special id generator." msgstr "" = -#: association_mapping.xml:433(title) = +#. Tag: programlisting +#: association_mapping.xml:224 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " person\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: association_mapping.xml:232 +#, no-c-format msgid "Bidirectional associations with join tables" msgstr "" = -#: association_mapping.xml:438(para) = +#. Tag: para +#: association_mapping.xml:237 +#, no-c-format msgid "A bidirectional one-to-many association on a join table. Note that the inverse=3D\"true\" can go on ei= ther end of the association, on the collection, or on the join." msgstr "" = -#: association_mapping.xml:481(para) = +#. Tag: programlisting +#: association_mapping.xml:243 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:244 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: association_mapping.xml:251 +#, no-c-format msgid "A bidirectional one-to-one association on a join table is extremely unusual, but possible." msgstr "" = -#: association_mapping.xml:527(para) = +#. Tag: programlisting +#: association_mapping.xml:256 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:264 +#, no-c-format msgid "Finally, we have a bidirectional many-to-many association= ." msgstr "" = -#: association_mapping.xml:564(title) = +#. Tag: programlisting +#: association_mapping.xml:268 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: association_mapping.xml:277 +#, no-c-format msgid "More complex association mappings" msgstr "" = -#: association_mapping.xml:566(para) = +#. Tag: para +#: association_mapping.xml:279 +#, no-c-format msgid "More complex association joins are extremely r= are. Hibernate makes it possible to handle more complex situations using SQ= L fragments embedded in the mapping document. For example, if a table with = historical account information data defines accountNumber, effectiveEndDate and effectiveStartDatecolumns, mapped as follows:" msgstr "" = -#: association_mapping.xml:584(para) = +#. Tag: programlisting +#: association_mapping.xml:288 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " case when effectiveEndDate is null then 1 else 0 e= nd\n" + " \n" + "\n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:290 +#, no-c-format msgid "Then we can map an association to the current = instance (the one with null effectiveEndDate) using:" msgstr "" = -#: association_mapping.xml:596(para) = +#. Tag: programlisting +#: association_mapping.xml:295 +#, no-c-format +msgid "" + "\n" + " \n" + " '1'\n" + "]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:297 +#, no-c-format msgid "In a more complex example, imagine that the association between Employee and Organization is maintained = in an Employment table full of historical employment dat= a. Then an association to the employee's most recent e= mployer (the one with the most recent startDate) might b= e mapped this way:" msgstr "" = -#: association_mapping.xml:617(para) = -msgid "You can get quite creative with this functionality, but it is usual= ly more practical to handle these kinds of cases using HQL or a criteria qu= ery." +#. Tag: programlisting +#: association_mapping.xml:305 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " select employeeId, orgId \n" + " from Employments \n" + " group by orgId \n" + " having startDate =3D max(startDate)\n" + " \n" + " \n" + "]]>" msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: association_mapping.xml:0(None) = -msgid "translator-credits" +#. Tag: para +#: association_mapping.xml:307 +#, no-c-format +msgid "You can get quite creative with this functionality, but it is usual= ly more practical to handle these kinds of cases using HQL or a criteria qu= ery." msgstr "" = Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/basi= c_mapping.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/basic_mapp= ing.pot 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/basic_mapp= ing.pot 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,1532 +1,3347 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:29-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: basic_mapping.xml:5(title) = +#. Tag: title +#: basic_mapping.xml:29 +#, no-c-format msgid "Basic O/R Mapping" msgstr "" = -#: basic_mapping.xml:8(title) = +#. Tag: title +#: basic_mapping.xml:32 +#, no-c-format msgid "Mapping declaration" msgstr "" = -#: basic_mapping.xml:10(para) = +#. Tag: para +#: basic_mapping.xml:34 +#, no-c-format msgid "Object/relational mappings are usually defined in an XML document. = The mapping document is designed to be readable and hand-editable. The mapp= ing language is Java-centric, meaning that mappings are constructed around = persistent class declarations, not table declarations." msgstr "" = -#: basic_mapping.xml:17(para) = +#. Tag: para +#: basic_mapping.xml:41 +#, no-c-format msgid "Note that, even though many Hibernate users choose to write the XML= by hand, a number of tools exist to generate the mapping document, includi= ng XDoclet, Middlegen and AndroMDA." msgstr "" = -#: basic_mapping.xml:23(para) = +#. Tag: para +#: basic_mapping.xml:47 +#, no-c-format msgid "Lets kick off with an example mapping:" msgstr "" = -#: basic_mapping.xml:92(para) = +#. Tag: programlisting +#: basic_mapping.xml:51 +#, no-c-format +msgid "" + "\n" + "\n" + "\n" + "\n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:53 +#, no-c-format msgid "We will now discuss the content of the mapping document. We will on= ly describe the document elements and attributes that are used by Hibernate= at runtime. The mapping document also contains some extra optional attribu= tes and elements that affect the database schemas exported by the schema ex= port tool. (For example the not-null attribute.)" msgstr "" = -#: basic_mapping.xml:103(title) = +#. Tag: title +#: basic_mapping.xml:64 +#, no-c-format msgid "Doctype" msgstr "" = -#: basic_mapping.xml:105(para) = +#. Tag: para +#: basic_mapping.xml:66 +#, no-c-format msgid "All XML mappings should declare the doctype shown. The actual DTD m= ay be found at the URL above, in the directory hibernate-x.x.x/src= /org/hibernate or in hibernate3.jar. Hibernat= e will always look for the DTD in its classpath first. If you experience lo= okups of the DTD using an Internet connection, check your DTD declaration a= gainst the contents of your claspath." msgstr "" = -#: basic_mapping.xml:115(title) = +#. Tag: title +#: basic_mapping.xml:76 +#, no-c-format msgid "EntityResolver" msgstr "" = -#: basic_mapping.xml:116(para) = +#. Tag: para +#: basic_mapping.xml:77 +#, no-c-format msgid "As mentioned previously, Hibernate will first attempt to resolve DT= Ds in its classpath. The manner in which it does this is by registering a c= ustom org.xml.sax.EntityResolver implementation with the= SAXReader it uses to read in the xml files. This custom EntityRes= olver recognizes two different systemId namespaces." msgstr "" = -#: basic_mapping.xml:124(para) = +#. Tag: para +#: basic_mapping.xml:85 +#, no-c-format msgid "a hibernate namespace is recognized whenever the= resolver encounteres a systemId starting with http://hibernate.so= urceforge.net/; the resolver attempts to resolve these entities v= ia the classlaoder which loaded the Hibernate classes." msgstr "" = -#: basic_mapping.xml:133(para) = +#. Tag: para +#: basic_mapping.xml:94 +#, no-c-format msgid "a user namespace is recognized whenever the reso= lver encounteres a systemId using a classpath:// URL pro= tocol; the resolver will attempt to resolve these entities via (1) the curr= ent thread context classloader and (2) the classloader which loaded the Hib= ernate classes." msgstr "" = -#: basic_mapping.xml:142(para) = +#. Tag: para +#: basic_mapping.xml:103 +#, no-c-format msgid "An example of utilizing user namespacing:" msgstr "" = -#: basic_mapping.xml:160(para) = -msgid "Where types.xml is a resource in the yo= ur.domain package and contains a custom typedef." +#. Tag: programlisting +#: basic_mapping.xml:106 +#, no-c-format +msgid "" + "\n" + "\n" + "]>\n" + "\n" + "\n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " &types;\n" + "]]>" msgstr "" = -#: basic_mapping.xml:168(title) = +#. Tag: para +#: basic_mapping.xml:107 +#, no-c-format +msgid "Where types.xml is a resource in the yo= ur.domain package and contains a custom typedef." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:115 +#, no-c-format msgid "hibernate-mapping" msgstr "" = -#: basic_mapping.xml:170(para) = +#. Tag: para +#: basic_mapping.xml:117 +#, no-c-format msgid "This element has several optional attributes. The schema and catalog attributes specify that tables refe= rred to in this mapping belong to the named schema and/or catalog. If speci= fied, tablenames will be qualified by the given schema and catalog names. I= f missing, tablenames will be unqualified. The default-cascade attribute specifies what cascade style should be assumed for propert= ies and collections which do not specify a cascade attri= bute. The auto-import attribute lets us use unqualified = class names in the query language, by default." msgstr "" = -#: basic_mapping.xml:202(para) = +#. Tag: programlisting +#: basic_mapping.xml:138 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:141 +#, no-c-format msgid "schema (optional): The name of a database schema= ." msgstr "" = -#: basic_mapping.xml:207(para) = +#. Tag: para +#: basic_mapping.xml:146 +#, no-c-format msgid "catalog (optional): The name of a database catal= og." msgstr "" = -#: basic_mapping.xml:212(para) = +#. Tag: para +#: basic_mapping.xml:151 +#, no-c-format msgid "default-cascade (optional - defaults to none): A default cascade style." msgstr "" = -#: basic_mapping.xml:218(para) = +#. Tag: para +#: basic_mapping.xml:157 +#, no-c-format msgid "default-access (optional - defaults to = property): The strategy Hibernate should use for accessing all pr= operties. Can be a custom implementation of PropertyAccessor." msgstr "" = -#: basic_mapping.xml:225(para) = +#. Tag: para +#: basic_mapping.xml:164 +#, no-c-format msgid "default-lazy (optional - defaults to tr= ue): The default value for unspecifed lazy att= ributes of class and collection mappings." msgstr "" = -#: basic_mapping.xml:232(para) = +#. Tag: para +#: basic_mapping.xml:171 +#, no-c-format msgid "auto-import (optional - defaults to tru= e): Specifies whether we can use unqualified class names (of clas= ses in this mapping) in the query language." msgstr "" = -#: basic_mapping.xml:239(para) = +#. Tag: para +#: basic_mapping.xml:178 +#, no-c-format msgid "package (optional): Specifies a package prefix t= o assume for unqualified class names in the mapping document." msgstr "" = -#: basic_mapping.xml:247(para) = +#. Tag: para +#: basic_mapping.xml:186 +#, no-c-format msgid "If you have two persistent classes with the same (unqualified) name= , you should set auto-import=3D\"false\". Hibernate will= throw an exception if you attempt to assign two classes to the same \"impo= rted\" name." msgstr "" = -#: basic_mapping.xml:253(para) = +#. Tag: para +#: basic_mapping.xml:192 +#, no-c-format msgid "Note that the hibernate-mapping element allows y= ou to nest several persistent <class> mappings, as= shown above. It is however good practice (and expected by some tools) to m= ap only a single persistent class (or a single class hierarchy) in one mapp= ing file and name it after the persistent superclass, e.g. Cat.hbm= .xml, Dog.hbm.xml, or if using inheritance, Animal.hbm.xml." msgstr "" = -#: basic_mapping.xml:266(title) basic_mapping.xml:3077(literal) = -msgid "class" +#. Tag: title +#: basic_mapping.xml:205 +#, no-c-format +msgid "class" msgstr "" = -#: basic_mapping.xml:268(para) = +#. Tag: para +#: basic_mapping.xml:207 +#, no-c-format msgid "You may declare a persistent class using the class element:" msgstr "" = -#: basic_mapping.xml:322(para) = +#. Tag: programlisting +#: basic_mapping.xml:235 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:238 +#, no-c-format msgid "name (optional): The fully qualified Java class = name of the persistent class (or interface). If this attribute is missing, = it is assumed that the mapping is for a non-POJO entity." msgstr "" = -#: basic_mapping.xml:329(para) = +#. Tag: para +#: basic_mapping.xml:245 +#, no-c-format msgid "table (optional - defaults to the unqualified cl= ass name): The name of its database table." msgstr "" = -#: basic_mapping.xml:335(para) = +#. Tag: para +#: basic_mapping.xml:251 +#, no-c-format msgid "discriminator-value (optional - defaults to the = class name): A value that distiguishes individual subclasses, used for poly= morphic behaviour. Acceptable values include null and not null." msgstr "" = -#: basic_mapping.xml:342(para) = +#. Tag: para +#: basic_mapping.xml:258 +#, no-c-format msgid "mutable (optional, defaults to true): Specifies that instances of the class are (not) mutable." msgstr "" = -#: basic_mapping.xml:348(para) basic_mapping.xml:2605(para) = +#. Tag: para +#: basic_mapping.xml:264 basic_mapping.xml:2228 +#, no-c-format msgid "schema (optional): Override the schema name spec= ified by the root <hibernate-mapping> element." msgstr "" = -#: basic_mapping.xml:354(para) basic_mapping.xml:2611(para) = +#. Tag: para +#: basic_mapping.xml:270 basic_mapping.xml:2234 +#, no-c-format msgid "catalog (optional): Override the catalog name sp= ecified by the root <hibernate-mapping> element." msgstr "" = -#: basic_mapping.xml:360(para) = +#. Tag: para +#: basic_mapping.xml:276 +#, no-c-format msgid "proxy (optional): Specifies an interface to use = for lazy initializing proxies. You may specify the name of the class itself= ." msgstr "" = -#: basic_mapping.xml:366(para) = +#. Tag: para +#: basic_mapping.xml:282 +#, no-c-format msgid "dynamic-update (optional, defaults to f= alse): Specifies that UPDATE SQL should be gen= erated at runtime and contain only those columns whose values have changed." msgstr "" = -#: basic_mapping.xml:373(para) = +#. Tag: para +#: basic_mapping.xml:289 +#, no-c-format msgid "dynamic-insert (optional, defaults to f= alse): Specifies that INSERT SQL should be gen= erated at runtime and contain only the columns whose values are not null." msgstr "" = -#: basic_mapping.xml:380(para) = +#. Tag: para +#: basic_mapping.xml:296 +#, no-c-format msgid "select-before-update (optional, defaults to false): Specifies that Hibernate should never perform an SQL UPDATE unless it is certain that a= n object is actually modified. In certain cases (actually, only when a tran= sient object has been associated with a new session using update()= ), this means that Hibernate will perform an extra SQL S= ELECT to determine if an UPDATE is actually re= quired." msgstr "" = -#: basic_mapping.xml:390(para) = +#. Tag: para +#: basic_mapping.xml:306 +#, no-c-format msgid "polymorphism (optional, defaults to imp= licit): Determines whether implicit or explicit query polymorphis= m is used." msgstr "" = -#: basic_mapping.xml:396(para) = +#. Tag: para +#: basic_mapping.xml:312 +#, no-c-format msgid "where (optional) specify an arbitrary SQL WHERE condition to be used when retrieving objects of this cla= ss" msgstr "" = -#: basic_mapping.xml:402(para) = +#. Tag: para +#: basic_mapping.xml:318 +#, no-c-format msgid "persister (optional): Specifies a custom ClassPersister." msgstr "" = -#: basic_mapping.xml:407(para) = +#. Tag: para +#: basic_mapping.xml:323 +#, no-c-format msgid "batch-size (optional, defaults to 1) specify a \"batch size\" for fetching instances of this class by id= entifier." msgstr "" = -#: basic_mapping.xml:413(para) = +#. Tag: para +#: basic_mapping.xml:329 +#, no-c-format msgid "optimistic-lock (optional, defaults to = version): Determines the optimistic locking strategy." msgstr "" = -#: basic_mapping.xml:419(para) = +#. Tag: para +#: basic_mapping.xml:335 +#, no-c-format msgid "lazy (optional): Lazy fetching may be completely= disabled by setting lazy=3D\"false\"." msgstr "" = -#: basic_mapping.xml:425(para) = +#. Tag: para +#: basic_mapping.xml:341 +#, no-c-format msgid "entity-name (optional, defaults to the class nam= e): Hibernate3 allows a class to be mapped multiple times (to different tab= les, potentially), and allows entity mappings that are represented by Maps = or XML at the Java level. In these cases, you should provide an explicit ar= bitrary name for the entity. See and for more information." msgstr "" = -#: basic_mapping.xml:435(para) = +#. Tag: para +#: basic_mapping.xml:351 +#, no-c-format msgid "check (optional): A SQL expression used to gener= ate a multi-row check constraint for automatic schema = generation." msgstr "" = -#: basic_mapping.xml:441(para) = +#. Tag: para +#: basic_mapping.xml:357 +#, no-c-format msgid "rowid (optional): Hibernate can use so called RO= WIDs on databases which support. E.g. on Oracle, Hibernate can use the rowid extra column for fast updates if you set this option t= o rowid. A ROWID is an implementation detail and represe= nts the physical location of a stored tuple." msgstr "" = -#: basic_mapping.xml:449(para) = +#. Tag: para +#: basic_mapping.xml:365 +#, no-c-format msgid "subselect (optional): Maps an immutable and read= -only entity to a database subselect. Useful if you want to have a view ins= tead of a base table, but don't. See below for more information." msgstr "" = -#: basic_mapping.xml:456(para) = +#. Tag: para +#: basic_mapping.xml:372 +#, no-c-format msgid "abstract (optional): Used to mark abstract super= classes in <union-subclass> hierarchies." msgstr "" = -#: basic_mapping.xml:464(para) = +#. Tag: para +#: basic_mapping.xml:380 +#, no-c-format msgid "It is perfectly acceptable for the named persistent class to be an = interface. You would then declare implementing classes of that interface us= ing the <subclass> element. You may persist any static inner class. You should specify the class name us= ing the standard form ie. eg.Foo$Bar." msgstr "" = -#: basic_mapping.xml:471(para) = +#. Tag: para +#: basic_mapping.xml:387 +#, no-c-format msgid "Immutable classes, mutable=3D\"false\", may not = be updated or deleted by the application. This allows Hibernate to make som= e minor performance optimizations." msgstr "" = -#: basic_mapping.xml:476(para) = +#. Tag: para +#: basic_mapping.xml:392 +#, no-c-format msgid "The optional proxy attribute enables lazy initia= lization of persistent instances of the class. Hibernate will initially ret= urn CGLIB proxies which implement the named interface. The actual persisten= t object will be loaded when a method of the proxy is invoked. See \"Initia= lizing collections and proxies\" below." msgstr "" = -#: basic_mapping.xml:483(para) = +#. Tag: para +#: basic_mapping.xml:399 +#, no-c-format msgid "Implicit polymorphism means that instances of = the class will be returned by a query that names any superclass or implemen= ted interface or the class and that instances of any subclass of the class = will be returned by a query that names the class itself. Explicit= polymorphism means that class instances will be returned only b= y queries that explicitly name that class and that queries that name the cl= ass will return only instances of subclasses mapped inside this &l= t;class> declaration as a <subclass> = or <joined-subclass>. For most purposes the defaul= t, polymorphism=3D\"implicit\", is appropriate. Explicit= polymorphism is useful when two different classes are mapped to the same t= able (this allows a \"lightweight\" class that contains a subset of the tab= le columns)." msgstr "" = -#: basic_mapping.xml:495(para) = +#. Tag: para +#: basic_mapping.xml:411 +#, no-c-format msgid "The persister attribute lets you customize the p= ersistence strategy used for the class. You may, for example, specify your = own subclass of org.hibernate.persister.EntityPersister = or you might even provide a completely new implementation of the interface = org.hibernate.persister.ClassPersister that implements p= ersistence via, for example, stored procedure calls, serialization to flat = files or LDAP. See org.hibernate.test.CustomPersister fo= r a simple example (of \"persistence\" to a Hashtable)." msgstr "" = -#: basic_mapping.xml:506(para) = +#. Tag: para +#: basic_mapping.xml:422 +#, no-c-format msgid "Note that the dynamic-update and dynami= c-insert settings are not inherited by subclasses and so may also= be specified on the <subclass> or <jo= ined-subclass> elements. These settings may increase performan= ce in some cases, but might actually decrease performance in others. Use ju= diciously." msgstr "" = -#: basic_mapping.xml:514(para) = +#. Tag: para +#: basic_mapping.xml:430 +#, no-c-format msgid "Use of select-before-update will usually decreas= e performance. It is very useful to prevent a database update trigger being= called unnecessarily if you reattach a graph of detached instances to a Session." msgstr "" = -#: basic_mapping.xml:520(para) = +#. Tag: para +#: basic_mapping.xml:436 +#, no-c-format msgid "If you enable dynamic-update, you will have a ch= oice of optimistic locking strategies:" msgstr "" = -#: basic_mapping.xml:526(para) = +#. Tag: para +#: basic_mapping.xml:442 +#, no-c-format msgid "version check the version/timestamp columns" msgstr "" = -#: basic_mapping.xml:531(para) = +#. Tag: para +#: basic_mapping.xml:447 +#, no-c-format msgid "all check all columns" msgstr "" = -#: basic_mapping.xml:536(para) = +#. Tag: para +#: basic_mapping.xml:452 +#, no-c-format msgid "dirty check the changed columns, allowing some c= oncurrent updates" msgstr "" = -#: basic_mapping.xml:541(para) = +#. Tag: para +#: basic_mapping.xml:457 +#, no-c-format msgid "none do not use optimistic locking" msgstr "" = -#: basic_mapping.xml:546(para) = +#. Tag: para +#: basic_mapping.xml:462 +#, no-c-format msgid "We very strongly recommend that you use versio= n/timestamp columns for optimistic locking with Hibernate. This is the opti= mal strategy with respect to performance and is the only strategy that corr= ectly handles modifications made to detached instances (ie. when S= ession.merge() is used)." msgstr "" = -#: basic_mapping.xml:553(para) = +#. Tag: para +#: basic_mapping.xml:469 +#, no-c-format msgid "There is no difference between a view and a base table for a Hibern= ate mapping, as expected this is transparent at the database level (note th= at some DBMS don't support views properly, especially with updates). Someti= mes you want to use a view, but can't create one in the database (ie. with = a legacy schema). In this case, you can map an immutable and read-only enti= ty to a given SQL subselect expression:" msgstr "" = -#: basic_mapping.xml:574(para) = +#. Tag: programlisting +#: basic_mapping.xml:477 +#, no-c-format +msgid "" + "\n" + " \n" + " select item.name, max(bid.amount), count(*)\n" + " from item\n" + " join bid on bid.item_id =3D item.id\n" + " group by item.name\n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:479 +#, no-c-format msgid "Declare the tables to synchronize this entity with, ensuring that a= uto-flush happens correctly, and that queries against the derived entity do= not return stale data. The <subselect> is availab= le as both as an attribute and a nested mapping element." msgstr "" = -#: basic_mapping.xml:584(title) = -msgid "id" +#. Tag: title +#: basic_mapping.xml:489 +#, no-c-format +msgid "id" msgstr "" = -#: basic_mapping.xml:586(para) = +#. Tag: para +#: basic_mapping.xml:491 +#, no-c-format msgid "Mapped classes must declare the primary key co= lumn of the database table. Most classes will also have a JavaBeans-style p= roperty holding the unique identifier of an instance. The <id&g= t; element defines the mapping from that property to the primary = key column." msgstr "" = -#: basic_mapping.xml:613(para) = +#. Tag: programlisting +#: basic_mapping.xml:506 +#, no-c-format +msgid "" + "\n" + " node=3D\"element-name|@attribute-name|element/@attribute|.\= "\n" + "\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:509 +#, no-c-format msgid "name (optional): The name of the identifier prop= erty." msgstr "" = -#: basic_mapping.xml:618(para) = +#. Tag: para +#: basic_mapping.xml:514 +#, no-c-format msgid "type (optional): A name that indicates the Hiber= nate type." msgstr "" = -#: basic_mapping.xml:623(para) = +#. Tag: para +#: basic_mapping.xml:519 +#, no-c-format msgid "column (optional - defaults to the property name= ): The name of the primary key column." msgstr "" = -#: basic_mapping.xml:629(para) = +#. Tag: para +#: basic_mapping.xml:525 +#, no-c-format msgid "unsaved-value (optional - defaults to a \"sensib= le\" value): An identifier property value that indicates that an instance i= s newly instantiated (unsaved), distinguishing it from detached instances t= hat were saved or loaded in a previous session." msgstr "" = -#: basic_mapping.xml:637(para) basic_mapping.xml:1187(para) basic_mapping.= xml:1343(para) basic_mapping.xml:1433(para) basic_mapping.xml:1559(para) ba= sic_mapping.xml:1775(para) basic_mapping.xml:1963(para) basic_mapping.xml:2= 162(para) basic_mapping.xml:2914(para) = +#. Tag: para +#: basic_mapping.xml:533 basic_mapping.xml:1041 basic_mapping.xml:1180 bas= ic_mapping.xml:1262 basic_mapping.xml:1369 basic_mapping.xml:1558 basic_map= ping.xml:1732 basic_mapping.xml:1902 basic_mapping.xml:2481 +#, no-c-format msgid "access (optional - defaults to property= ): The strategy Hibernate should use for accessing the property v= alue." msgstr "" = -#: basic_mapping.xml:645(para) = +#. Tag: para +#: basic_mapping.xml:541 +#, no-c-format msgid "If the name attribute is missing, it is assumed = that the class has no identifier property." msgstr "" = -#: basic_mapping.xml:650(para) = +#. Tag: para +#: basic_mapping.xml:546 +#, no-c-format msgid "The unsaved-value attribute is almost never need= ed in Hibernate3." msgstr "" = -#: basic_mapping.xml:654(para) = +#. Tag: para +#: basic_mapping.xml:550 +#, no-c-format msgid "There is an alternative <composite-id> dec= laration to allow access to legacy data with composite keys. We strongly di= scourage its use for anything else." msgstr "" = -#: basic_mapping.xml:660(title) = +#. Tag: title +#: basic_mapping.xml:556 +#, no-c-format msgid "Generator" msgstr "" = -#: basic_mapping.xml:662(para) = +#. Tag: para +#: basic_mapping.xml:558 +#, no-c-format msgid "The optional <generator> child element nam= es a Java class used to generate unique identifiers for instances of the pe= rsistent class. If any parameters are required to configure or initialize t= he generator instance, they are passed using the <param> element." msgstr "" = -#: basic_mapping.xml:684(literal) = +#. Tag: programlisting +#: basic_mapping.xml:565 +#, no-c-format +msgid "" + "\n" + " = \n" + " uid_table\n" + " next_hi_value_column\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:567 +#, no-c-format +msgid "All generators implement the interface org.hibernate.id.Id= entifierGenerator. This is a very simple interface; some applicat= ions 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:" +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:575 +#, no-c-format msgid "increment" msgstr "" = -#: basic_mapping.xml:686(para) = +#. Tag: para +#: basic_mapping.xml:577 +#, no-c-format msgid "generates identifiers of type long, sho= rt or int that are unique only when no other p= rocess is inserting data into the same table. Do not use in a clu= ster." msgstr "" = -#: basic_mapping.xml:695(literal) = +#. Tag: literal +#: basic_mapping.xml:586 +#, no-c-format msgid "identity" msgstr "" = -#: basic_mapping.xml:697(para) = +#. Tag: para +#: basic_mapping.xml:588 +#, no-c-format msgid "supports identity columns in DB2, MySQL, MS SQL Server, Sybase and = HypersonicSQL. The returned identifier is of type long, = short or int." msgstr "" = -#: basic_mapping.xml:705(literal) = +#. Tag: literal +#: basic_mapping.xml:596 +#, no-c-format msgid "sequence" msgstr "" = -#: basic_mapping.xml:707(para) = +#. Tag: para +#: basic_mapping.xml:598 +#, no-c-format msgid "uses a sequence in DB2, PostgreSQL, Oracle, SAP DB, McKoi or a gene= rator in Interbase. The returned identifier is of type long, short or int" msgstr "" = -#: basic_mapping.xml:715(literal) = +#. Tag: literal +#: basic_mapping.xml:606 +#, no-c-format msgid "hilo" msgstr "" = -#: basic_mapping.xml:717(para) = +#. Tag: para +#: basic_mapping.xml:608 +#, no-c-format msgid "uses a hi/lo algorithm to efficiently generate identifiers of type = long, short or int= , given a table and column (by default hibernate_unique_key and next_hi respectively) as a source of hi values. = The hi/lo algorithm generates identifiers that are unique only for a partic= ular database." msgstr "" = -#: basic_mapping.xml:727(literal) = +#. Tag: literal +#: basic_mapping.xml:618 +#, no-c-format msgid "seqhilo" msgstr "" = -#: basic_mapping.xml:729(para) = +#. Tag: para +#: basic_mapping.xml:620 +#, no-c-format msgid "uses a hi/lo algorithm to efficiently generate identifiers of type = long, short or int= , given a named database sequence." msgstr "" = -#: basic_mapping.xml:737(literal) = +#. Tag: literal +#: basic_mapping.xml:628 +#, no-c-format msgid "uuid" msgstr "" = -#: basic_mapping.xml:739(para) = +#. Tag: para +#: basic_mapping.xml:630 +#, no-c-format msgid "uses a 128-bit UUID algorithm to generate identifiers of type strin= g, unique within a network (the IP address is used). The UUID is encoded as= a string of hexadecimal digits of length 32." msgstr "" = -#: basic_mapping.xml:747(literal) = +#. Tag: literal +#: basic_mapping.xml:638 +#, no-c-format msgid "guid" msgstr "" = -#: basic_mapping.xml:749(para) = +#. Tag: para +#: basic_mapping.xml:640 +#, no-c-format msgid "uses a database-generated GUID string on MS SQL Server and MySQL." msgstr "" = -#: basic_mapping.xml:755(literal) = +#. Tag: literal +#: basic_mapping.xml:646 +#, no-c-format msgid "native" msgstr "" = -#: basic_mapping.xml:757(para) = +#. Tag: para +#: basic_mapping.xml:648 +#, no-c-format msgid "picks identity, sequence or <= literal>hilo depending upon the capabilities of the underlying da= tabase." msgstr "" = -#: basic_mapping.xml:765(literal) = +#. Tag: literal +#: basic_mapping.xml:656 +#, no-c-format msgid "assigned" msgstr "" = -#: basic_mapping.xml:767(para) = +#. Tag: para +#: basic_mapping.xml:658 +#, no-c-format msgid "lets the application to assign an identifier to the object before <= literal>save() is called. This is the default strategy if no <generator> element is specified." msgstr "" = -#: basic_mapping.xml:775(literal) = +#. Tag: literal +#: basic_mapping.xml:666 +#, no-c-format msgid "select" msgstr "" = -#: basic_mapping.xml:777(para) = +#. Tag: para +#: basic_mapping.xml:668 +#, no-c-format msgid "retrieves a primary key assigned by a database trigger by selecting= the row by some unique key and retrieving the primary key value." msgstr "" = -#: basic_mapping.xml:784(literal) = +#. Tag: literal +#: basic_mapping.xml:675 +#, no-c-format msgid "foreign" msgstr "" = -#: basic_mapping.xml:786(para) = +#. Tag: para +#: basic_mapping.xml:677 +#, no-c-format msgid "uses the identifier of another associated object. Usually used in c= onjunction with a <one-to-one> primary key associa= tion." msgstr "" = -#: basic_mapping.xml:793(literal) = +#. Tag: literal +#: basic_mapping.xml:684 +#, no-c-format msgid "sequence-identity" msgstr "" = -#: basic_mapping.xml:795(para) = +#. Tag: para +#: basic_mapping.xml:686 +#, no-c-format msgid "a specialized sequence generation strategy which utilizes a databas= e sequence for the actual value generation, but combines this with JDBC3 ge= tGeneratedKeys to actually return the generated identifier value as part of= the insert statement execution. This strategy is only known to be supporte= d on Oracle 10g drivers targetted for JDK 1.4. Note comments on these inser= t statements are disabled due to a bug in the Oracle drivers." msgstr "" = -#: basic_mapping.xml:676(para) = -msgid "All generators implement the interface org.hibernate.id.Id= entifierGenerator. This is a very simple interface; some applicat= ions 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: " -msgstr "" - -#: basic_mapping.xml:812(title) = +#. Tag: title +#: basic_mapping.xml:703 +#, no-c-format msgid "Hi/lo algorithm" msgstr "" = -#: basic_mapping.xml:813(para) = +#. Tag: para +#: basic_mapping.xml:704 +#, no-c-format msgid "The hilo and seqhilo generato= rs provide two alternate implementations of the hi/lo algorithm, a favorite= approach to identifier generation. The first implementation requires a \"s= pecial\" database table to hold the next available \"hi\" value. The second= uses an Oracle-style sequence (where supported)." msgstr "" = -#: basic_mapping.xml:835(para) = +#. Tag: programlisting +#: basic_mapping.xml:711 +#, no-c-format +msgid "" + "\n" + " \n" + " hi_value\n" + " next_value\n" + " 100\n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:713 +#, no-c-format +msgid "" + "\n" + " \n" + " hi_value\n" + " 100\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:715 +#, no-c-format msgid "Unfortunately, you can't use hilo when supplying= your own Connection to Hibernate. When Hibernate is usi= ng an application server datasource to obtain connections enlisted with JTA= , you must properly configure the hibernate.transaction.manager_lo= okup_class." msgstr "" = -#: basic_mapping.xml:844(title) = +#. Tag: title +#: basic_mapping.xml:724 +#, no-c-format msgid "UUID algorithm" msgstr "" = -#: basic_mapping.xml:845(para) = +#. Tag: para +#: basic_mapping.xml:725 +#, no-c-format msgid "The UUID contains: IP address, startup time of the JVM (accurate to= a quarter second), system time and a counter value (unique within the JVM)= . It's not possible to obtain a MAC address or memory address from Java cod= e, so this is the best we can do without using JNI." msgstr "" = -#: basic_mapping.xml:854(title) = +#. Tag: title +#: basic_mapping.xml:734 +#, no-c-format msgid "Identity columns and sequences" msgstr "" = -#: basic_mapping.xml:855(para) = +#. Tag: para +#: basic_mapping.xml:735 +#, no-c-format msgid "For databases which support identity columns (DB2, MySQL, Sybase, M= S SQL), you may use identity key generation. For databas= es that support sequences (DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP D= B) you may use sequence style key generation. Both these= strategies require two SQL queries to insert a new object." msgstr "" = -#: basic_mapping.xml:873(para) = +#. Tag: programlisting +#: basic_mapping.xml:743 +#, no-c-format +msgid "" + "\= n" + " \n" + " person_id_sequence\n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:745 +#, no-c-format +msgid "" + "\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:747 +#, no-c-format msgid "For cross-platform development, the native strat= egy will choose from the identity, sequence and hilo strategies, dependant upon the capabilit= ies of the underlying database." msgstr "" = -#: basic_mapping.xml:882(title) = +#. Tag: title +#: basic_mapping.xml:756 +#, no-c-format msgid "Assigned identifiers" msgstr "" = -#: basic_mapping.xml:883(para) = +#. Tag: para +#: basic_mapping.xml:757 +#, no-c-format msgid "If you want the application to assign identifiers (as opposed to ha= ving Hibernate generate them), you may use the assigned = generator. This special generator will use the identifier value already ass= igned to the object's identifier property. This generator is used when the = primary key is a natural key instead of a surrogate key. This is the defaul= t behavior if you do no specify a <generator> elem= ent." msgstr "" = -#: basic_mapping.xml:892(para) = +#. Tag: para +#: basic_mapping.xml:766 +#, no-c-format msgid "Choosing the assigned generator makes Hibernate = use unsaved-value=3D\"undefined\", forcing Hibernate to = go to the database to determine if an instance is transient or detached, un= less there is a version or timestamp property, or you define Inter= ceptor.isUnsaved()." msgstr "" = -#: basic_mapping.xml:902(title) = +#. Tag: title +#: basic_mapping.xml:776 +#, no-c-format msgid "Primary keys assigned by triggers" msgstr "" = -#: basic_mapping.xml:903(para) = +#. Tag: para +#: basic_mapping.xml:777 +#, no-c-format msgid "For legacy schemas only (Hibernate does not generate DDL with trigg= ers)." msgstr "" = -#: basic_mapping.xml:913(para) = +#. Tag: programlisting +#: basic_mapping.xml:781 +#, no-c-format +msgid "" + "\= n" + " \n" + " socialSecurityNumber\= n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:783 +#, no-c-format msgid "In the above example, there is a unique valued property named socialSecurityNumber defined by the class, as a natural key, = and a surrogate key named person_id whose value is gener= ated by a trigger." msgstr "" = -#: basic_mapping.xml:925(title) = +#. Tag: title +#: basic_mapping.xml:795 +#, no-c-format msgid "Enhanced identifier generators" msgstr "" = -#: basic_mapping.xml:927(para) = +#. Tag: para +#: basic_mapping.xml:797 +#, no-c-format msgid "Starting with release 3.2.3, there are 2 new generators which repre= sent a re-thinking of 2 different aspects of identifier generation. The fir= st aspect is database portability; the second is optimization (not having t= o query the database for every request for a new identifier value). These t= wo new generators are intended to take the place of some of the named gener= ators described above (starting in 3.3.x); however, they are included in th= e current releases and can be referenced by FQN." msgstr "" = -#: basic_mapping.xml:949(para) = +#. Tag: para +#: basic_mapping.xml:805 +#, no-c-format +msgid "The first of these new generators is org.hibernate.id.enha= nced.SequenceStyleGenerator which is intended firstly as a replac= ement for the sequence generator and secondly as a bette= r portability generator than native (because na= tive (generally) chooses between identity and = sequence which have largely different semantics which ca= n cause subtle isssues in applications eyeing portability). org.hi= bernate.id.enhanced.SequenceStyleGenerator however achieves porta= bility in a different manner. It chooses between using a table or a sequenc= e in the database to store its incrementing values depending on the capabil= ities of the dialect being used. The difference between this and n= ative is that table-based and sequence-based storage have the sam= e exact semantic (in fact sequences are exactly what Hibernate tries to emm= ulate with its! table-based generators). This generator has a number of configuration par= ameters:" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:819 +#, no-c-format msgid "sequence_name (optional, defaults to hi= bernate_sequence): The name of the sequence (or table) to be used= ." msgstr "" = -#: basic_mapping.xml:955(para) = +#. Tag: para +#: basic_mapping.xml:825 +#, no-c-format msgid "initial_value (optional, defaults to 1<= /literal>): The initial value to be retrieved from the sequence/table. In s= equence creation terms, this is analogous to the clause typical named \"STA= RTS WITH\"." msgstr "" = -#: basic_mapping.xml:962(para) = +#. Tag: para +#: basic_mapping.xml:832 +#, no-c-format msgid "increment_size (optional, defaults to 1= ): The value by which subsequent calls to the sequence/table shou= ld differ. In sequence creation terms, this is analogous to the clause typi= cal named \"INCREMENT BY\"." msgstr "" = -#: basic_mapping.xml:969(para) = +#. Tag: para +#: basic_mapping.xml:839 +#, no-c-format msgid "force_table_use (optional, defaults to = false): Should we force the use of a table as the backing structu= re even though the dialect might support sequence?" msgstr "" = -#: basic_mapping.xml:976(para) = +#. Tag: para +#: basic_mapping.xml:846 +#, no-c-format msgid "value_column (optional, defaults to nex= t_val): Only relevant for table structures! The name of the colum= n on the table which is used to hold the value." msgstr "" = -#: basic_mapping.xml:983(para) = -msgid "optimizer (optional, defaults to none): See " +#. Tag: para +#: basic_mapping.xml:853 +#, no-c-format +msgid "optimizer (optional, defaults to none): See" msgstr "" = -#: basic_mapping.xml:935(para) = -msgid "The first of these new generators is org.hibernate.id.enha= nced.SequenceStyleGenerator which is intended firstly as a replac= ement for the sequence generator and secondly as a bette= r portability generator than native (because na= tive (generally) chooses between identity and = sequence which have largely different semantics which ca= n cause subtle isssues in applications eyeing portability). org.hi= bernate.id.enhanced.SequenceStyleGenerator however achieves porta= bility in a different manner. It chooses between using a table or a sequenc= e in the database to store its incrementing values depending on the capabil= ities of the dialect being used. The difference between this and n= ative is that table-based and sequence-based storage have the sam= e exact semantic (in fact sequences are exactly what Hibernate tries to emm= ulate with its! table-based generators). This generator has a number of configuration par= ameters: " +#. Tag: para +#: basic_mapping.xml:860 +#, no-c-format +msgid "The second of these new generators is org.hibernate.id.enh= anced.TableGenerator which is intended firstly as a replacement f= or the table generator (although it actually functions m= uch more like org.hibernate.id.MultipleHiLoPerTableGenerator) and secondly as a re-implementation of org.hibernate.id.Mult= ipleHiLoPerTableGenerator utilizing the notion of pluggable optim= iziers. Essentially this generator defines a table capable of holding a num= ber of different increment values simultaneously by using multiple distinct= ly keyed rows. This generator has a number of configuration parameters:" msgstr "" = -#: basic_mapping.xml:1000(para) = +#. Tag: para +#: basic_mapping.xml:870 +#, no-c-format msgid "table_name (optional, defaults to hiber= nate_sequences): The name of the table to be used." msgstr "" = -#: basic_mapping.xml:1006(para) = +#. Tag: para +#: basic_mapping.xml:876 +#, no-c-format msgid "value_column_name (optional, defaults to next_val): The name of the column on the table which is used to= hold the value." msgstr "" = -#: basic_mapping.xml:1012(para) = +#. Tag: para +#: basic_mapping.xml:882 +#, no-c-format msgid "segment_column_name (optional, defaults to sequence_name): The name of the column on the table which is = used to hold the \"segement key\". This is the value which distinctly ident= ifies which increment value to use." msgstr "" = -#: basic_mapping.xml:1019(para) = +#. Tag: para +#: basic_mapping.xml:889 +#, no-c-format msgid "segment_value (optional, defaults to de= fault): The \"segment key\" value for the segment from which we w= ant to pull increment values for this generator." msgstr "" = -#: basic_mapping.xml:1026(para) = +#. Tag: para +#: basic_mapping.xml:896 +#, no-c-format msgid "segment_value_length (optional, defaults to 255): Used for schema generation; the column size to create = this segment key column." msgstr "" = -#: basic_mapping.xml:1032(para) = +#. Tag: para +#: basic_mapping.xml:902 +#, no-c-format msgid "initial_value (optional, defaults to 1<= /literal>): The initial value to be retrieved from the table." msgstr "" = -#: basic_mapping.xml:1038(para) = +#. Tag: para +#: basic_mapping.xml:908 +#, no-c-format msgid "increment_size (optional, defaults to 1= ): The value by which subsequent calls to the table should differ= ." msgstr "" = -#: basic_mapping.xml:1044(para) = -msgid "optimizer (optional, defaults to ): Se= e " +#. Tag: para +#: basic_mapping.xml:914 +#, no-c-format +msgid "optimizer (optional, defaults to ): See" msgstr "" = -#: basic_mapping.xml:990(para) = -msgid "The second of these new generators is org.hibernate.id.enh= anced.TableGenerator which is intended firstly as a replacement f= or the table generator (although it actually functions m= uch more like org.hibernate.id.MultipleHiLoPerTableGenerator) and secondly as a re-implementation of org.hibernate.id.Mult= ipleHiLoPerTableGenerator utilizing the notion of pluggable optim= iziers. Essentially this generator defines a table capable of holding a num= ber of different increment values simultaneously by using multiple distinct= ly keyed rows. This generator has a number of configuration parameters: " +#. Tag: title +#: basic_mapping.xml:924 +#, no-c-format +msgid "Identifier generator optimization" msgstr "" = -#: basic_mapping.xml:1054(title) = -msgid "Identifier generator optimization" +#. Tag: para +#: basic_mapping.xml:925 +#, no-c-format +msgid "For identifier generators which store values in the database, it is= inefficient for them to hit the database on each and every call to generat= e a new identifier value. Instead, you'd ideally want to group a bunch of t= hem in memory and only hit the database when you have exhausted your in-mem= ory value group. This is the role of the pluggable optimizers. Currently on= ly the two enhanced generators ( support this notion." msgstr "" = -#: basic_mapping.xml:1063(para) = +#. Tag: para +#: basic_mapping.xml:933 +#, no-c-format msgid "none (generally this is the default if no optimi= zer was specified): This says to not perform any optimizations, and hit the= database each and every request." msgstr "" = -#: basic_mapping.xml:1069(para) = +#. Tag: para +#: basic_mapping.xml:939 +#, no-c-format msgid "hilo: applies a hi/lo algorithm around the datab= ase retrieved values. The values from the database for this optimizer are e= xpected to be sequential. The values retrieved from the database structure = for this optimizer indicates the \"group number\"; the increment_s= ize is multiplied by that value in memory to define a group \"hi = value\"." msgstr "" = -#: basic_mapping.xml:1078(para) = +#. Tag: para +#: basic_mapping.xml:948 +#, no-c-format msgid "pooled: like was discussed for hilo, this optimizers attempts to minimize the number of hits to the data= base. Here, however, we simply store the starting value for the \"next grou= p\" into the database structure rather than a sequential value in combinati= on with an in-memory grouping algorithm. increment_size = here refers to the values coming from the database." msgstr "" = -#: basic_mapping.xml:1055(para) = -msgid "For identifier generators which store values in the database, it is= inefficient for them to hit the database on each and every call to generat= e a new identifier value. Instead, you'd ideally want to group a bunch of t= hem in memory and only hit the database when you have exhausted your in-mem= ory value group. This is the role of the pluggable optimizers. Currently on= ly the two enhanced generators ( support this notion. " +#. Tag: title +#: basic_mapping.xml:961 +#, no-c-format +msgid "composite-id" msgstr "" = -#: basic_mapping.xml:1091(title) = -msgid "composite-id" +#. Tag: programlisting +#: basic_mapping.xml:963 +#, no-c-format +msgid "" + "\n" + " node=3D\"element-name|.\"\n" + "\n" + " \n" + " \n" + " ......\n" + "]]>" msgstr "" = -#: basic_mapping.xml:1105(para) = +#. Tag: para +#: basic_mapping.xml:965 +#, no-c-format msgid "For a table with a composite key, you may map multiple properties o= f the class as identifier properties. The <composite-id> element accepts <key-property> property map= pings and <key-many-to-one> mappings as child elem= ents." msgstr "" = -#: basic_mapping.xml:1117(para) = +#. Tag: programlisting +#: basic_mapping.xml:972 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:974 +#, no-c-format msgid "Your persistent class must override e= quals() and hashCode() to implement composite = identifier equality. It must also implements Serializable." msgstr "" = -#: basic_mapping.xml:1123(para) = +#. Tag: para +#: basic_mapping.xml:980 +#, no-c-format msgid "Unfortunately, this approach to composite identifiers means that a = persistent object is its own identifier. There is no convenient \"handle\" = other than the object itself. You must instantiate an instance of the persi= stent class itself and populate its identifier properties before you can load() the persistent state associated with a composite ke= y. We call this approach an embedded composite identif= ier, and discourage it for serious applications." msgstr "" = -#: basic_mapping.xml:1132(para) = +#. Tag: para +#: basic_mapping.xml:989 +#, no-c-format msgid "A second approach is what we call a mapped com= posite identifier, where the identifier properties named inside the <composite-id> element are duplicated on both the persist= ent class and a separate identifier class." msgstr "" = -#: basic_mapping.xml:1143(para) = +#. Tag: programlisting +#: basic_mapping.xml:995 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:997 +#, no-c-format msgid "In this example, both the composite identifier class, Medi= careId, and the entity class itself have properties named medicareNumber and dependent. The identifier= class must override equals() and hashCode() and implement. Serializable. The disadvantage of= this approach is quite obvious—code duplication." msgstr "" = -#: basic_mapping.xml:1152(para) = +#. Tag: para +#: basic_mapping.xml:1006 +#, no-c-format msgid "The following attributes are used to specify a mapped composite ide= ntifier:" msgstr "" = -#: basic_mapping.xml:1158(para) = +#. Tag: para +#: basic_mapping.xml:1012 +#, no-c-format msgid "mapped (optional, defaults to false): indicates that a mapped composite identifier is used, and that the= contained property mappings refer to both the entity class and the composi= te identifier class." msgstr "" = -#: basic_mapping.xml:1166(para) = +#. Tag: para +#: basic_mapping.xml:1020 +#, no-c-format msgid "class (optional, but required for a mapped compo= site identifier): The class used as a composite identifier." msgstr "" = -#: basic_mapping.xml:1173(para) = +#. Tag: para +#: basic_mapping.xml:1027 +#, no-c-format msgid "We will describe a third, even more convenient approach where the c= omposite identifier is implemented as a component class in . The attributes described below apply only to = this alternative approach:" msgstr "" = -#: basic_mapping.xml:1181(para) = +#. Tag: para +#: basic_mapping.xml:1035 +#, no-c-format msgid "name (optional, required for this approach): A p= roperty of component type that holds the composite identifier (see chapter = 9)." msgstr "" = -#: basic_mapping.xml:1193(para) = +#. Tag: para +#: basic_mapping.xml:1047 +#, no-c-format msgid "class (optional - defaults to the property type = determined by reflection): The component class used as a composite identifi= er (see next section)." msgstr "" = -#: basic_mapping.xml:1200(para) = +#. Tag: para +#: basic_mapping.xml:1054 +#, no-c-format msgid "This third approach, an identifier component i= s the one we recommend for almost all applications." msgstr "" = -#: basic_mapping.xml:1208(title) = +#. Tag: title +#: basic_mapping.xml:1062 +#, no-c-format msgid "discriminator" msgstr "" = -#: basic_mapping.xml:1210(para) = +#. Tag: para +#: basic_mapping.xml:1064 +#, no-c-format msgid "The <discriminator> element is required fo= r polymorphic persistence using the table-per-class-hierarchy mapping strat= egy and declares a discriminator column of the table. The discriminator col= umn contains marker values that tell the persistence layer what subclass to= instantiate for a particular row. A restricted set of types may be used: <= literal>string, character, integer, byte, short, boolea= n, yes_no, true_false." msgstr "" = -#: basic_mapping.xml:1237(para) = +#. Tag: programlisting +#: basic_mapping.xml:1082 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1085 +#, no-c-format msgid "column (optional - defaults to class) the name of the discriminator column." msgstr "" = -#: basic_mapping.xml:1243(para) = +#. Tag: para +#: basic_mapping.xml:1091 +#, no-c-format msgid "type (optional - defaults to string) a name that indicates the Hibernate type" msgstr "" = -#: basic_mapping.xml:1249(para) = +#. Tag: para +#: basic_mapping.xml:1097 +#, no-c-format msgid "force (optional - defaults to false) \"force\" Hibernate to specify allowed discriminator values even wh= en retrieving all instances of the root class." msgstr "" = -#: basic_mapping.xml:1256(para) = +#. Tag: para +#: basic_mapping.xml:1104 +#, no-c-format msgid "insert (optional - defaults to true) set this to false if your discriminator column i= s also part of a mapped composite identifier. (Tells Hibernate to not inclu= de the column in SQL INSERTs.)" msgstr "" = -#: basic_mapping.xml:1264(para) = +#. Tag: para +#: basic_mapping.xml:1112 +#, no-c-format msgid "formula (optional) an arbitrary SQL expression t= hat is executed when a type has to be evaluated. Allows content-based discr= imination." msgstr "" = -#: basic_mapping.xml:1272(para) = +#. Tag: para +#: basic_mapping.xml:1120 +#, no-c-format msgid "Actual values of the discriminator column are specified by the discriminator-value attribute of the <class><= /literal> and <subclass> elements." msgstr "" = -#: basic_mapping.xml:1278(para) = +#. Tag: para +#: basic_mapping.xml:1126 +#, no-c-format msgid "The force attribute is (only) useful if the tabl= e contains rows with \"extra\" discriminator values that are not mapped to = a persistent class. This will not usually be the case." msgstr "" = -#: basic_mapping.xml:1284(para) = +#. Tag: para +#: basic_mapping.xml:1132 +#, no-c-format msgid "Using the formula attribute you can declare an a= rbitrary SQL expression that will be used to evaluate the type of a row:" msgstr "" = -#: basic_mapping.xml:1296(title) = +#. Tag: programlisting +#: basic_mapping.xml:1137 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1142 +#, no-c-format msgid "version (optional)" msgstr "" = -#: basic_mapping.xml:1298(para) = +#. Tag: para +#: basic_mapping.xml:1144 +#, no-c-format msgid "The <version> element is optional and indi= cates that the table contains versioned data. This is particularly useful i= f you plan to use long transactions (see below)." msgstr "" = -#: basic_mapping.xml:1326(para) = +#. Tag: programlisting +#: basic_mapping.xml:1160 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1163 +#, no-c-format msgid "column (optional - defaults to the property name= ): The name of the column holding the version number." msgstr "" = -#: basic_mapping.xml:1332(para) = +#. Tag: para +#: basic_mapping.xml:1169 +#, no-c-format msgid "name: The name of a property of the persistent c= lass." msgstr "" = -#: basic_mapping.xml:1337(para) = +#. Tag: para +#: basic_mapping.xml:1174 +#, no-c-format msgid "type (optional - defaults to integer): The type of the version number." msgstr "" = -#: basic_mapping.xml:1349(para) = +#. Tag: para +#: basic_mapping.xml:1186 +#, no-c-format msgid "unsaved-value (optional - defaults to u= ndefined): A version property value that indicates that an instan= ce is newly instantiated (unsaved), distinguishing it from detached instanc= es that were saved or loaded in a previous session. (undefined specifies that the identifier property value should be used.)" msgstr "" = -#: basic_mapping.xml:1358(para) = -msgid "generated (optional - defaults to never= ): Specifies that this version property value is actually generat= ed by the database. See the discussion of generated properties." +#. Tag: para +#: basic_mapping.xml:1195 +#, no-c-format +msgid "generated (optional - defaults to never= ): Specifies that this version property value is actually generat= ed by the database. See the discussion of generated properties." msgstr "" = -#: basic_mapping.xml:1365(para) = +#. Tag: para +#: basic_mapping.xml:1202 +#, no-c-format msgid "insert (optional - defaults to true): Specifies whether the version column should be included in SQL ins= ert statements. May be set to false if and only if the d= atabase column is defined with a default value of 0." msgstr "" = -#: basic_mapping.xml:1375(para) = +#. Tag: para +#: basic_mapping.xml:1212 +#, no-c-format msgid "Version numbers may be of Hibernate type long, <= literal>integer, short, timestamp or calendar." msgstr "" = -#: basic_mapping.xml:1380(para) = +#. Tag: para +#: basic_mapping.xml:1217 +#, no-c-format msgid "A version or timestamp property should never be null for a detached= instance, so Hibernate will detect any instance with a null version or tim= estamp as transient, no matter what other unsaved-value = strategies are specified. Declaring a nullable version or timesta= mp property is an easy way to avoid any problems with transitive reattachme= nt in Hibernate, especially useful for people using assigned identifiers or= composite keys!" msgstr "" = -#: basic_mapping.xml:1391(title) = +#. Tag: title +#: basic_mapping.xml:1228 +#, no-c-format msgid "timestamp (optional)" msgstr "" = -#: basic_mapping.xml:1393(para) = +#. Tag: para +#: basic_mapping.xml:1230 +#, no-c-format msgid "The optional <timestamp> element indicates= that the table contains timestamped data. This is intended as an alternati= ve to versioning. Timestamps are by nature a less safe implementation of op= timistic locking. However, sometimes the application might use the timestam= ps in other ways." msgstr "" = -#: basic_mapping.xml:1420(para) = +#. Tag: programlisting +#: basic_mapping.xml:1246 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1249 +#, no-c-format msgid "column (optional - defaults to the property name= ): The name of a column holding the timestamp." msgstr "" = -#: basic_mapping.xml:1426(para) = +#. Tag: para +#: basic_mapping.xml:1255 +#, no-c-format msgid "name: The name of a JavaBeans style property of = Java type Date or Timestamp of the pe= rsistent class." msgstr "" = -#: basic_mapping.xml:1439(para) = +#. Tag: para +#: basic_mapping.xml:1268 +#, no-c-format msgid "unsaved-value (optional - defaults to n= ull): A version property value that indicates that an instance is= newly instantiated (unsaved), distinguishing it from detached instances th= at were saved or loaded in a previous session. (undefined specifies that the identifier property value should be used.)" msgstr "" = -#: basic_mapping.xml:1448(para) = +#. Tag: para +#: basic_mapping.xml:1277 +#, no-c-format msgid "source (optional - defaults to vm): From where should Hibernate retrieve the timestamp value? From the d= atabase, or from the current JVM? Database-based timestamps incur an overhe= ad because Hibernate must hit the database in order to determine the \"next= value\", but will be safer for use in clustered environments. Note also, t= hat not all Dialects are known to support retrieving of = the database's current timestamp, while others might be unsafe for usage in= locking due to lack of precision (Oracle 8 for example)." msgstr "" = -#: basic_mapping.xml:1460(para) = -msgid "generated (optional - defaults to never= ): Specifies that this timestamp property value is actually gener= ated by the database. See the discussion of generated properties." +#. Tag: para +#: basic_mapping.xml:1289 +#, no-c-format +msgid "generated (optional - defaults to never= ): Specifies that this timestamp property value is actually gener= ated by the database. See the discussion of generated properties." msgstr "" = -#: basic_mapping.xml:1469(para) = +#. Tag: para +#: basic_mapping.xml:1298 +#, no-c-format msgid "Note that <timestamp> is equivalent to <version type=3D\"timestamp\">. And <time= stamp source=3D\"db\"> is equivalent to <version t= ype=3D\"dbtimestamp\">" msgstr "" = -#: basic_mapping.xml:1479(title) = +#. Tag: title +#: basic_mapping.xml:1308 +#, no-c-format msgid "property" msgstr "" = -#: basic_mapping.xml:1481(para) = +#. Tag: para +#: basic_mapping.xml:1310 +#, no-c-format msgid "The <property> element declares a persiste= nt, JavaBean style property of the class." msgstr "" = -#: basic_mapping.xml:1525(para) = +#. Tag: programlisting +#: basic_mapping.xml:1332 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1335 +#, no-c-format msgid "name: the name of the property, with an initial = lowercase letter." msgstr "" = -#: basic_mapping.xml:1531(para) = +#. Tag: para +#: basic_mapping.xml:1341 +#, no-c-format msgid "column (optional - defaults to the property name= ): the name of the mapped database table column. This may also be specified= by nested <column> element(s)." msgstr "" = -#: basic_mapping.xml:1538(para) = +#. Tag: para +#: basic_mapping.xml:1348 +#, no-c-format msgid "type (optional): a name that indicates the Hiber= nate type." msgstr "" = -#: basic_mapping.xml:1543(para) = +#. Tag: para +#: basic_mapping.xml:1353 +#, no-c-format msgid "update, insert (optional - defaults to = true) : specifies that the mapped columns should be included in S= QL UPDATE and/or INSERT statements. S= etting both to false allows a pure \"derived\" property = whose value is initialized from some other property that maps to the same c= olum(s) or by a trigger or other application." msgstr "" = -#: basic_mapping.xml:1552(para) = +#. Tag: para +#: basic_mapping.xml:1362 +#, no-c-format msgid "formula (optional): an SQL expression that defin= es the value for a computed property. Computed propert= ies do not have a column mapping of their own." msgstr "" = -#: basic_mapping.xml:1565(para) = +#. Tag: para +#: basic_mapping.xml:1375 +#, no-c-format msgid "lazy (optional - defaults to false): Specifies that this property should be fetched lazily when the inst= ance variable is first accessed (requires build-time bytecode instrumentati= on)." msgstr "" = -#: basic_mapping.xml:1572(para) = +#. Tag: para +#: basic_mapping.xml:1382 +#, no-c-format msgid "unique (optional): Enable the DDL generation of = a unique constraint for the columns. Also, allow this to be the target of a= property-ref." msgstr "" = -#: basic_mapping.xml:1579(para) = +#. Tag: para +#: basic_mapping.xml:1389 +#, no-c-format msgid "not-null (optional): Enable the DDL generation o= f a nullability constraint for the columns." msgstr "" = -#: basic_mapping.xml:1585(para) = +#. Tag: para +#: basic_mapping.xml:1395 +#, no-c-format msgid "optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not requ= ire acquisition of the optimistic lock. In other words, determines if a ver= sion increment should occur when this property is dirty." msgstr "" = -#: basic_mapping.xml:1593(para) = -msgid "generated (optional - defaults to never= ): Specifies that this property value is actually generated by th= e database. See the discussion of gen= erated properties." +#. Tag: para +#: basic_mapping.xml:1403 +#, no-c-format +msgid "generated (optional - defaults to never= ): Specifies that this property value is actually generated by th= e database. See the discussion of gen= erated properties." msgstr "" = -#: basic_mapping.xml:1602(para) = +#. Tag: para +#: basic_mapping.xml:1412 +#, no-c-format msgid "typename could be:" msgstr "" = -#: basic_mapping.xml:1608(para) = +#. Tag: para +#: basic_mapping.xml:1418 +#, no-c-format msgid "The name of a Hibernate basic type (eg. integer, string, c= haracter, date, timestamp, float, binary, serializable, object, blob)." msgstr "" = -#: basic_mapping.xml:1614(para) = +#. Tag: para +#: basic_mapping.xml:1424 +#, no-c-format msgid "The name of a Java class with a default basic type (eg. in= t, float, char, java.lang.String, java.util.Date, java.lang.Integer, java.s= ql.Clob)." msgstr "" = -#: basic_mapping.xml:1620(para) = +#. Tag: para +#: basic_mapping.xml:1430 +#, no-c-format msgid "The name of a serializable Java class." msgstr "" = -#: basic_mapping.xml:1625(para) = +#. Tag: para +#: basic_mapping.xml:1435 +#, no-c-format msgid "The class name of a custom type (eg. com.illflow.type.MyCu= stomType)." msgstr "" = -#: basic_mapping.xml:1631(para) = +#. Tag: para +#: basic_mapping.xml:1441 +#, no-c-format msgid "If you do not specify a type, Hibernate will use reflection upon th= e named property to take a guess at the correct Hibernate type. Hibernate w= ill try to interpret the name of the return class of the property getter us= ing rules 2, 3, 4 in that order. However, this is not always enough. In cer= tain cases you will still need the type attribute. (For = example, to distinguish between Hibernate.DATE and Hibernate.TIMESTAMP, or to specify a custom type.)" msgstr "" = -#: basic_mapping.xml:1641(para) = +#. Tag: para +#: basic_mapping.xml:1451 +#, no-c-format msgid "The access attribute lets you control how Hibern= ate will access the property at runtime. By default, Hibernate will call th= e property get/set pair. If you specify access=3D\"field\", Hibernate will bypass the get/set pair and access the field directly, u= sing reflection. You may specify your own strategy for property access by n= aming a class that implements the interface org.hibernate.property= .PropertyAccessor." msgstr "" = -#: basic_mapping.xml:1650(para) = +#. Tag: para +#: basic_mapping.xml:1460 +#, no-c-format msgid "An especially powerful feature are derived properties. These proper= ties are by definition read-only, the property value is computed at load ti= me. You declare the computation as a SQL expression, this translates to a <= literal>SELECT clause subquery in the SQL query that loads an ins= tance:" msgstr "" = -#: basic_mapping.xml:1664(para) = +#. Tag: programlisting +#: basic_mapping.xml:1467 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1469 +#, no-c-format msgid "Note that you can reference the entities own table by not declaring= an alias on a particular column (customerId in the give= n example). Also note that you can use the nested <formula><= /literal> mapping element if you don't like to use the attribute." msgstr "" = -#: basic_mapping.xml:1674(title) = +#. Tag: title +#: basic_mapping.xml:1479 +#, no-c-format msgid "many-to-one" msgstr "" = -#: basic_mapping.xml:1676(para) = +#. Tag: para +#: basic_mapping.xml:1481 +#, no-c-format msgid "An ordinary association to another persistent class is declared usi= ng a many-to-one element. The relational model is a many= -to-one association: a foreign key in one table is referencing the primary = key column(s) of the target table." msgstr "" = -#: basic_mapping.xml:1729(para) basic_mapping.xml:1924(para) basic_mapping= .xml:2139(para) = +#. Tag: programlisting +#: basic_mapping.xml:1509 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1512 basic_mapping.xml:1693 basic_mapping.xml:1879 +#, no-c-format msgid "name: The name of the property." msgstr "" = -#: basic_mapping.xml:1734(para) basic_mapping.xml:2703(para) = +#. Tag: para +#: basic_mapping.xml:1517 basic_mapping.xml:2308 +#, no-c-format msgid "column (optional): The name of the foreign key c= olumn. This may also be specified by nested <column> element(s)." msgstr "" = -#: basic_mapping.xml:1741(para) basic_mapping.xml:1929(para) = +#. Tag: para +#: basic_mapping.xml:1524 basic_mapping.xml:1698 +#, no-c-format msgid "class (optional - defaults to the property type = determined by reflection): The name of the associated class." msgstr "" = -#: basic_mapping.xml:1747(para) = +#. Tag: para +#: basic_mapping.xml:1530 +#, no-c-format msgid "cascade (optional): Specifies which operations s= hould be cascaded from the parent object to the associated object." msgstr "" = -#: basic_mapping.xml:1753(para) basic_mapping.xml:1950(para) = +#. Tag: para +#: basic_mapping.xml:1536 basic_mapping.xml:1719 +#, no-c-format msgid "fetch (optional - defaults to select): Chooses between outer-join fetching or sequential select fetching= ." msgstr "" = -#: basic_mapping.xml:1759(para) = +#. Tag: para +#: basic_mapping.xml:1542 +#, no-c-format msgid "update, insert (optional - defaults to = true) specifies that the mapped columns should be included in SQL= UPDATE and/or INSERT statements. Set= ting both to false allows a pure \"derived\" association= whose value is initialized from some other property that maps to the same = colum(s) or by a trigger or other application." msgstr "" = -#: basic_mapping.xml:1768(para) = +#. Tag: para +#: basic_mapping.xml:1551 +#, no-c-format msgid "property-ref: (optional) The name of a property = of the associated class that is joined to this foreign key. If not specifie= d, the primary key of the associated class is used." msgstr "" = -#: basic_mapping.xml:1781(para) = +#. Tag: para +#: basic_mapping.xml:1564 +#, no-c-format msgid "unique (optional): Enable the DDL generation of = a unique constraint for the foreign-key column. Also, allow this to be the = target of a property-ref. This makes the association mul= tiplicity effectively one to one." msgstr "" = -#: basic_mapping.xml:1789(para) = +#. Tag: para +#: basic_mapping.xml:1572 +#, no-c-format msgid "not-null (optional): Enable the DDL generation o= f a nullability constraint for the foreign key columns." msgstr "" = -#: basic_mapping.xml:1795(para) = +#. Tag: para +#: basic_mapping.xml:1578 +#, no-c-format msgid "optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not requ= ire acquisition of the optimistic lock. In other words, dertermines if a ve= rsion increment should occur when this property is dirty." msgstr "" = -#: basic_mapping.xml:1803(para) = +#. Tag: para +#: basic_mapping.xml:1586 +#, no-c-format msgid "lazy (optional - defaults to proxy): By default, single point associations are proxied. lazy=3D= \"no-proxy\" specifies that the property should be fetched lazily= when the instance variable is first accessed (requires build-time bytecode= instrumentation). lazy=3D\"false\" specifies that the a= ssociation will always be eagerly fetched." msgstr "" = -#: basic_mapping.xml:1813(para) = +#. Tag: para +#: basic_mapping.xml:1596 +#, no-c-format msgid "not-found (optional - defaults to excep= tion): Specifies how foreign keys that reference missing rows wil= l be handled: ignore will treat a missing row as a null = association." msgstr "" = -#: basic_mapping.xml:1820(para) basic_mapping.xml:1988(para) = +#. Tag: para +#: basic_mapping.xml:1603 basic_mapping.xml:1757 +#, no-c-format msgid "entity-name (optional): The entity name of the a= ssociated class." msgstr "" = -#: basic_mapping.xml:1826(para) = +#. Tag: para +#: basic_mapping.xml:1608 +#, no-c-format msgid "formula (optional): an SQL expression that defin= es the value for a computed foreign key." msgstr "" = -#: basic_mapping.xml:1833(para) = +#. Tag: para +#: basic_mapping.xml:1616 +#, no-c-format msgid "Setting a value of the cascade attribute to any = meaningful value other than none will propagate certain = operations to the associated object. The meaningful values are the names of= Hibernate's basic operations, persist, merge, delete, save-update= , evict, replicate, lock, refresh, as well as the special values = delete-orphan and all and comma-separ= ated combinations of operation names, for example, cascade=3D\"per= sist,merge,evict\" or cascade=3D\"all,delete-orphan\". See for a full explan= ation. Note that single valued associations (many-to-one and one-to-one ass= ociations) do not support orphan delete." msgstr "" = -#: basic_mapping.xml:1846(para) = +#. Tag: para +#: basic_mapping.xml:1629 +#, no-c-format msgid "A typical many-to-one declaration looks as simpl= e as this:" msgstr "" = -#: basic_mapping.xml:1852(para) = +#. Tag: programlisting +#: basic_mapping.xml:1633 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1635 +#, no-c-format msgid "The property-ref attribute should only be used f= or mapping legacy data where a foreign key refers to a unique key of the as= sociated table other than the primary key. This is an ugly relational model= . For example, suppose the Product class had a unique se= rial number, that is not the primary key. (The unique at= tribute controls Hibernate's DDL generation with the SchemaExport tool.)" msgstr "" = -#: basic_mapping.xml:1863(para) = +#. Tag: programlisting +#: basic_mapping.xml:1644 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1646 +#, no-c-format msgid "Then the mapping for OrderItem might use:" msgstr "" = -#: basic_mapping.xml:1869(para) = +#. Tag: programlisting +#: basic_mapping.xml:1650 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1652 +#, no-c-format msgid "This is certainly not encouraged, however." msgstr "" = -#: basic_mapping.xml:1873(para) = +#. Tag: para +#: basic_mapping.xml:1656 +#, no-c-format msgid "If the referenced unique key comprises multiple properties of the a= ssociated entity, you should map the referenced properties inside a named <= literal><properties> element." msgstr "" = -#: basic_mapping.xml:1878(para) = +#. Tag: para +#: basic_mapping.xml:1661 +#, no-c-format msgid "If the referenced unique key is the property of a component, you ma= y specify a property path:" msgstr "" = -#: basic_mapping.xml:1887(title) = +#. Tag: programlisting +#: basic_mapping.xml:1665 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1670 +#, no-c-format msgid "one-to-one" msgstr "" = -#: basic_mapping.xml:1889(para) = +#. Tag: para +#: basic_mapping.xml:1672 +#, no-c-format msgid "A one-to-one association to another persistent class is declared us= ing a one-to-one element." msgstr "" = -#: basic_mapping.xml:1935(para) = +#. Tag: programlisting +#: basic_mapping.xml:1690 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1704 +#, no-c-format msgid "cascade (optional) specifies which operations sh= ould be cascaded from the parent object to the associated object." msgstr "" = -#: basic_mapping.xml:1941(para) = +#. Tag: para +#: basic_mapping.xml:1710 +#, no-c-format msgid "constrained (optional) specifies that a foreign = key constraint on the primary key of the mapped table references the table = of the associated class. This option affects the order in which sa= ve() and delete() are cascaded, and determines= whether the association may be proxied (it is also used by the schema expo= rt tool)." msgstr "" = -#: basic_mapping.xml:1956(para) = +#. Tag: para +#: basic_mapping.xml:1725 +#, no-c-format msgid "property-ref: (optional) The name of a property = of the associated class that is joined to the primary key of this class. If= not specified, the primary key of the associated class is used." msgstr "" = -#: basic_mapping.xml:1969(para) = +#. Tag: para +#: basic_mapping.xml:1738 +#, no-c-format msgid "formula (optional): Almost all one to one associ= ations map to the primary key of the owning entity. In the rare case that t= his is not the case, you may specify a some other column, columns or expres= sion to join on using an SQL formula. (See org.hibernate.test.onet= ooneformula for an example.)" msgstr "" = -#: basic_mapping.xml:1977(para) = +#. Tag: para +#: basic_mapping.xml:1746 +#, no-c-format msgid "lazy (optional - defaults to proxy): By default, single point associations are proxied. lazy=3D= \"no-proxy\" specifies that the property should be fetched lazily= when the instance variable is first accessed (requires build-time bytecode= instrumentation). lazy=3D\"false\" specifies that the a= ssociation will always be eagerly fetched. Note that if = constrained=3D\"false\", proxying is impossible and Hibernate wil= l eager fetch the association!" msgstr "" = -#: basic_mapping.xml:1995(para) = +#. Tag: para +#: basic_mapping.xml:1764 +#, no-c-format msgid "There are two varieties of one-to-one association:" msgstr "" = -#: basic_mapping.xml:1999(para) = +#. Tag: para +#: basic_mapping.xml:1768 +#, no-c-format msgid "primary key associations" msgstr "" = -#: basic_mapping.xml:2002(para) = +#. Tag: para +#: basic_mapping.xml:1771 +#, no-c-format msgid "unique foreign key associations" msgstr "" = -#: basic_mapping.xml:2007(para) = +#. Tag: para +#: basic_mapping.xml:1776 +#, no-c-format msgid "Primary key associations don't need an extra table column; if two r= ows are related by the association then the two table rows share the same p= rimary key value. So if you want two objects to be related by a primary key= association, you must make sure that they are assigned the same identifier= value!" msgstr "" = -#: basic_mapping.xml:2014(para) = +#. Tag: para +#: basic_mapping.xml:1783 +#, no-c-format msgid "For a primary key association, add the following mappings to Employee and Person, respectively." msgstr "" = -#: basic_mapping.xml:2022(para) = +#. Tag: programlisting +#: basic_mapping.xml:1788 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1789 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1791 +#, no-c-format msgid "Now we must ensure that the primary keys of related rows in the PER= SON and EMPLOYEE tables are equal. We use a special Hibernate identifier ge= neration strategy called foreign:" msgstr "" = -#: basic_mapping.xml:2040(para) = +#. Tag: programlisting +#: basic_mapping.xml:1797 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " employee\n" + " \n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1799 +#, no-c-format msgid "A newly saved instance of Person is then assigne= d the same primary key value as the Employee instance re= fered with the employee property of that Person= ." msgstr "" = -#: basic_mapping.xml:2046(para) = +#. Tag: para +#: basic_mapping.xml:1805 +#, no-c-format msgid "Alternatively, a foreign key with a unique constraint, from Employee to Person, may be expressed as:" msgstr "" = -#: basic_mapping.xml:2053(para) = +#. Tag: programlisting +#: basic_mapping.xml:1810 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1812 +#, no-c-format msgid "And this association may be made bidirectional by adding the follow= ing to the Person mapping:" msgstr "" = -#: basic_mapping.xml:2063(title) = +#. Tag: programlisting +#: basic_mapping.xml:1817 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1822 +#, no-c-format msgid "natural-id" msgstr "" = -#: basic_mapping.xml:2071(para) = +#. Tag: programlisting +#: basic_mapping.xml:1824 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " ......\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1826 +#, no-c-format msgid "Even though we recommend the use of surrogate keys as primary keys,= you should still try to identify natural keys for all entities. A natural = key is a property or combination of properties that is unique and non-null.= If it is also immutable, even better. Map the properties of the natural ke= y inside the <natural-id> element. Hibernate will = generate the necessary unique key and nullability constraints, and your map= ping will be more self-documenting." msgstr "" = -#: basic_mapping.xml:2080(para) = +#. Tag: para +#: basic_mapping.xml:1835 +#, no-c-format msgid "We strongly recommend that you implement equals() and hashCode() to compare the natural key properties o= f the entity." msgstr "" = -#: basic_mapping.xml:2085(para) = +#. Tag: para +#: basic_mapping.xml:1840 +#, no-c-format msgid "This mapping is not intended for use with entities with natural pri= mary keys." msgstr "" = -#: basic_mapping.xml:2091(para) = +#. Tag: para +#: basic_mapping.xml:1846 +#, no-c-format msgid "mutable (optional, defaults to false): By default, natural identifier properties as assumed to be immuta= ble (constant)." msgstr "" = -#: basic_mapping.xml:2101(title) = +#. Tag: title +#: basic_mapping.xml:1856 +#, no-c-format msgid "component, dynamic-component" msgstr "" = -#: basic_mapping.xml:2103(para) = +#. Tag: para +#: basic_mapping.xml:1858 +#, no-c-format msgid "The <component> element maps properties of= a child object to columns of the table of a parent class. Components may, = in turn, declare their own properties, components or collections. See \"Com= ponents\" below." msgstr "" = -#: basic_mapping.xml:2144(para) = +#. Tag: programlisting +#: basic_mapping.xml:1876 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " ........\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1884 +#, no-c-format msgid "class (optional - defaults to the property type = determined by reflection): The name of the component (child) class." msgstr "" = -#: basic_mapping.xml:2150(para) basic_mapping.xml:2250(para) = +#. Tag: para +#: basic_mapping.xml:1890 basic_mapping.xml:1979 +#, no-c-format msgid "insert: Do the mapped columns appear in SQL INSERTs?" msgstr "" = -#: basic_mapping.xml:2156(para) basic_mapping.xml:2256(para) = +#. Tag: para +#: basic_mapping.xml:1896 basic_mapping.xml:1985 +#, no-c-format msgid "update: Do the mapped columns appear in SQL UPDATEs?" msgstr "" = -#: basic_mapping.xml:2168(para) = +#. Tag: para +#: basic_mapping.xml:1908 +#, no-c-format msgid "lazy (optional - defaults to false): Specifies that this component should be fetched lazily when the ins= tance variable is first accessed (requires build-time bytecode instrumentat= ion)." msgstr "" = -#: basic_mapping.xml:2175(para) = +#. Tag: para +#: basic_mapping.xml:1915 +#, no-c-format msgid "optimistic-lock (optional - defaults to true): Specifies that updates to this component do or do not req= uire acquisition of the optimistic lock. In other words, determines if a ve= rsion increment should occur when this property is dirty." msgstr "" = -#: basic_mapping.xml:2183(para) basic_mapping.xml:2270(para) = +#. Tag: para +#: basic_mapping.xml:1923 basic_mapping.xml:1999 +#, no-c-format msgid "unique (optional - defaults to false): Specifies that a unique constraint exists upon all mapped columns= of the component." msgstr "" = -#: basic_mapping.xml:2192(para) = +#. Tag: para +#: basic_mapping.xml:1932 +#, no-c-format msgid "The child <property> tags map properties o= f the child class to table columns." msgstr "" = -#: basic_mapping.xml:2197(para) = +#. Tag: para +#: basic_mapping.xml:1937 +#, no-c-format msgid "The <component> element allows a = <parent> subelement that maps a property of the component c= lass as a reference back to the containing entity." msgstr "" = -#: basic_mapping.xml:2203(para) = +#. Tag: para +#: basic_mapping.xml:1943 +#, no-c-format msgid "The <dynamic-component> element allows a <= literal>Map to be mapped as a component, where the property names= refer to keys of the map, see ." msgstr "" = -#: basic_mapping.xml:2212(title) = +#. Tag: title +#: basic_mapping.xml:1952 +#, no-c-format msgid "properties" msgstr "" = -#: basic_mapping.xml:2214(para) = +#. Tag: para +#: basic_mapping.xml:1954 +#, no-c-format msgid "The <properties> element allows the defini= tion of a named, logical grouping of properties of a class. The most import= ant use of the construct is that it allows a combination of properties to b= e the target of a property-ref. It is also a convenient = way to define a multi-column unique constraint." msgstr "" = -#: basic_mapping.xml:2244(para) = +#. Tag: programlisting +#: basic_mapping.xml:1970 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " ........\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1973 +#, no-c-format msgid "name: The logical name of the grouping - not an actual property name." msgstr "" = -#: basic_mapping.xml:2262(para) = +#. Tag: para +#: basic_mapping.xml:1991 +#, no-c-format msgid "optimistic-lock (optional - defaults to true): Specifies that updates to these properties do or do not r= equire acquisition of the optimistic lock. In other words, determines if a = version increment should occur when these properties are dirty." msgstr "" = -#: basic_mapping.xml:2279(para) = +#. Tag: para +#: basic_mapping.xml:2008 +#, no-c-format msgid "For example, if we have the following <properties> mapping:" msgstr "" = -#: basic_mapping.xml:2294(para) = +#. Tag: programlisting +#: basic_mapping.xml:2012 +#, no-c-format +msgid "" + "\n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2014 +#, no-c-format msgid "Then we might have some legacy data association which refers to thi= s unique key of the Person table, instead of to the prim= ary key:" msgstr "" = -#: basic_mapping.xml:2306(para) = +#. Tag: programlisting +#: basic_mapping.xml:2019 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2021 +#, no-c-format msgid "We don't recommend the use of this kind of thing outside the contex= t of mapping legacy data." msgstr "" = -#: basic_mapping.xml:2314(title) = +#. Tag: title +#: basic_mapping.xml:2029 +#, no-c-format msgid "subclass" msgstr "" = -#: basic_mapping.xml:2316(para) = +#. Tag: para +#: basic_mapping.xml:2031 +#, no-c-format msgid "Finally, polymorphic persistence requires the declaration of each s= ubclass of the root persistent class. For the table-per-class-hierarchy map= ping strategy, the <subclass> declaration is used." msgstr "" = -#: basic_mapping.xml:2345(para) basic_mapping.xml:2422(para) basic_mapping= .xml:2533(para) = +#. Tag: programlisting +#: basic_mapping.xml:2044 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " .....\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2047 basic_mapping.xml:2105 basic_mapping.xml:2168 +#, no-c-format msgid "name: The fully qualified class name of the subc= lass." msgstr "" = -#: basic_mapping.xml:2350(para) = +#. Tag: para +#: basic_mapping.xml:2052 +#, no-c-format msgid "discriminator-value (optional - defaults to the = class name): A value that distiguishes individual subclasses." msgstr "" = -#: basic_mapping.xml:2356(para) basic_mapping.xml:2432(para) basic_mapping= .xml:2543(para) = +#. Tag: para +#: basic_mapping.xml:2058 basic_mapping.xml:2115 basic_mapping.xml:2178 +#, no-c-format msgid "proxy (optional): Specifies a class or interface= to use for lazy initializing proxies." msgstr "" = -#: basic_mapping.xml:2362(para) basic_mapping.xml:2438(para) basic_mapping= .xml:2549(para) = +#. Tag: para +#: basic_mapping.xml:2064 basic_mapping.xml:2121 basic_mapping.xml:2184 +#, no-c-format msgid "lazy (optional, defaults to true): Setting lazy=3D\"false\" disables the use of lazy = fetching." msgstr "" = -#: basic_mapping.xml:2370(para) = +#. Tag: para +#: basic_mapping.xml:2072 +#, no-c-format msgid "Each subclass should declare its own persistent properties and subc= lasses. <version> and <id> properties are assumed to be inherited from the root class. Each subclass= in a heirarchy must define a unique discriminator-value= . If none is specified, the fully qualified Java class name is used." msgstr "" = -#: basic_mapping.xml:2378(para) basic_mapping.xml:2485(para) basic_mapping= .xml:2561(para) = +#. Tag: para +#: basic_mapping.xml:2080 basic_mapping.xml:2138 basic_mapping.xml:2196 +#, no-c-format msgid "For information about inheritance mappings, see ." msgstr "" = -#: basic_mapping.xml:2385(title) = +#. Tag: title +#: basic_mapping.xml:2087 +#, no-c-format msgid "joined-subclass" msgstr "" = -#: basic_mapping.xml:2387(para) = +#. Tag: para +#: basic_mapping.xml:2089 +#, no-c-format msgid "Alternatively, each subclass may be mapped to its own table (table-= per-subclass mapping strategy). Inherited state is retrieved by joining wit= h the table of the superclass. We use the <joined-subclass><= /literal> element." msgstr "" = -#: basic_mapping.xml:2427(para) basic_mapping.xml:2538(para) = +#. Tag: programlisting +#: basic_mapping.xml:2102 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + "\n" + " \n" + " .....\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2110 basic_mapping.xml:2173 +#, no-c-format msgid "table: The name of the subclass table." msgstr "" = -#: basic_mapping.xml:2446(para) = +#. Tag: para +#: basic_mapping.xml:2129 +#, no-c-format msgid "No discriminator column is required for this mapping strategy. Each= subclass must, however, declare a table column holding the object identifi= er using the <key> element. The mapping at the sta= rt of the chapter would be re-written as:" msgstr "" = -#: basic_mapping.xml:2492(title) = +#. Tag: programlisting +#: basic_mapping.xml:2136 +#, no-c-format +msgid "" + "\n" + "\n" + "\n" + "\n" + "\n" + " \n" + " = \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2145 +#, no-c-format msgid "union-subclass" msgstr "" = -#: basic_mapping.xml:2494(para) = +#. Tag: para +#: basic_mapping.xml:2147 +#, no-c-format msgid "A third option is to map only the concrete classes of an inheritanc= e hierarchy to tables, (the table-per-concrete-class strategy) where each t= able defines all persistent state of the class, including inherited state. = In Hibernate, it is not absolutely necessary to explicitly map such inherit= ance hierarchies. You can simply map each class with a separate &l= t;class> declaration. However, if you wish use polymorphic ass= ociations (e.g. an association to the superclass of your hierarchy), you ne= ed to use the <union-subclass> mapping." msgstr "" = -#: basic_mapping.xml:2557(para) = +#. Tag: programlisting +#: basic_mapping.xml:2165 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " .....\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2192 +#, no-c-format msgid "No discriminator column or key column is required for this mapping = strategy." msgstr "" = -#: basic_mapping.xml:2568(title) = +#. Tag: title +#: basic_mapping.xml:2203 +#, no-c-format msgid "join" msgstr "" = -#: basic_mapping.xml:2570(para) = +#. Tag: para +#: basic_mapping.xml:2205 +#, no-c-format msgid "Using the <join> element, it is possible t= o map properties of one class to several tables, when there's a 1-to-1 rela= tionship between the tables." msgstr "" = -#: basic_mapping.xml:2600(para) = +#. Tag: programlisting +#: basic_mapping.xml:2219 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + "\n" + " \n" + " ...\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2223 +#, no-c-format msgid "table: The name of the joined table." msgstr "" = -#: basic_mapping.xml:2617(para) = +#. Tag: para +#: basic_mapping.xml:2240 +#, no-c-format msgid "fetch (optional - defaults to join): If set to join, the default, Hibernate will use = an inner join to retrieve a <join> defined by a cl= ass or its superclasses and an outer join for a <join> defined by a subclass. If set to select then Hibern= ate will use a sequential select for a <join> defi= ned on a subclass, which will be issued only if a row turns out to represen= t an instance of the subclass. Inner joins will still be used to retrieve a= <join> defined by the class and its superclasses." msgstr "" = -#: basic_mapping.xml:2630(para) = +#. Tag: para +#: basic_mapping.xml:2253 +#, no-c-format msgid "inverse (optional - defaults to false): If enabled, Hibernate will not try to insert or update the prope= rties defined by this join." msgstr "" = -#: basic_mapping.xml:2637(para) = +#. Tag: para +#: basic_mapping.xml:2260 +#, no-c-format msgid "optional (optional - defaults to false<= /literal>): If enabled, Hibernate will insert a row only if the properties = defined by this join are non-null and will always use an outer join to retr= ieve the properties." msgstr "" = -#: basic_mapping.xml:2646(para) = +#. Tag: para +#: basic_mapping.xml:2269 +#, no-c-format msgid "For example, the address information for a person can be mapped to = a separate table (while preserving value type semantics for all properties)= :" msgstr "" = -#: basic_mapping.xml:2664(para) = +#. Tag: programlisting +#: basic_mapping.xml:2274 +#, no-c-format +msgid "" + "\n" + "\n" + " ...\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2276 +#, no-c-format msgid "This feature is often only useful for legacy data models, we recomm= end fewer tables than classes and a fine-grained domain model. However, it = is useful for switching between inheritance mapping strategies in a single = hierarchy, as explained later." msgstr "" = -#: basic_mapping.xml:2674(title) = -msgid "key" +#. Tag: title +#: basic_mapping.xml:2286 +#, no-c-format +msgid "key" msgstr "" = -#: basic_mapping.xml:2676(para) = +#. Tag: para +#: basic_mapping.xml:2288 +#, no-c-format msgid "We've seen the <key> element crop up a few= times now. It appears anywhere the parent mapping element defines a join t= o a new table, and defines the foreign key in the joined table, that refere= nces the primary key of the original table." msgstr "" = -#: basic_mapping.xml:2710(para) = +#. Tag: programlisting +#: basic_mapping.xml:2304 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2315 +#, no-c-format msgid "on-delete (optional, defaults to noacti= on): Specifies whether the foreign key constraint has database-le= vel cascade delete enabled." msgstr "" = -#: basic_mapping.xml:2717(para) = +#. Tag: para +#: basic_mapping.xml:2322 +#, no-c-format msgid "property-ref (optional): Specifies that the fore= ign key refers to columns that are not the primary key of the orginal table= . (Provided for legacy data.)" msgstr "" = -#: basic_mapping.xml:2724(para) = +#. Tag: para +#: basic_mapping.xml:2329 +#, no-c-format msgid "not-null (optional): Specifies that the foreign = key columns are not nullable (this is implied whenever the foreign key is a= lso part of the primary key)." msgstr "" = -#: basic_mapping.xml:2731(para) = +#. Tag: para +#: basic_mapping.xml:2336 +#, no-c-format msgid "update (optional): Specifies that the foreign ke= y should never be updated (this is implied whenever the foreign key is also= part of the primary key)." msgstr "" = -#: basic_mapping.xml:2738(para) = +#. Tag: para +#: basic_mapping.xml:2343 +#, no-c-format msgid "unique (optional): Specifies that the foreign ke= y should have a unique constraint (this is implied whenever the foreign key= is also the primary key)." msgstr "" = -#: basic_mapping.xml:2746(para) = +#. Tag: para +#: basic_mapping.xml:2351 +#, no-c-format msgid "We recommend that for systems where delete performance is important= , all keys should be defined on-delete=3D\"cascade\", an= d Hibernate will use a database-level ON CASCADE DELETE = constraint, instead of many individual DELETE statements= . Be aware that this feature bypasses Hibernate's usual optimistic locking = strategy for versioned data." msgstr "" = -#: basic_mapping.xml:2754(para) = +#. Tag: para +#: basic_mapping.xml:2359 +#, no-c-format msgid "The not-null and update attri= butes are useful when mapping a unidirectional one to many association. If = you map a unidirectional one to many to a non-nullable foreign key, you must declare the key column using <key not-nu= ll=3D\"true\">." msgstr "" = -#: basic_mapping.xml:2764(title) = +#. Tag: title +#: basic_mapping.xml:2369 +#, no-c-format msgid "column and formula elements" msgstr "" = -#: basic_mapping.xml:2765(para) = +#. Tag: para +#: basic_mapping.xml:2370 +#, no-c-format msgid "Any mapping element which accepts a column attri= bute will alternatively accept a <column> subeleme= nt. Likewise, <formula> is an alternative to the <= literal>formula attribute." msgstr "" = -#: basic_mapping.xml:2786(para) = +#. Tag: programlisting +#: basic_mapping.xml:2376 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2378 +#, no-c-format +msgid "SQL expression]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2380 +#, no-c-format msgid "column and formula attributes= may even be combined within the same property or association mapping to ex= press, for example, exotic join conditions." msgstr "" = -#: basic_mapping.xml:2801(title) = +#. Tag: programlisting +#: basic_mapping.xml:2386 +#, no-c-format +msgid "" + "\n" + " \n" + " 'MAILING'\n" + "]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2391 +#, no-c-format msgid "import" msgstr "" = -#: basic_mapping.xml:2803(para) = +#. Tag: para +#: basic_mapping.xml:2393 +#, no-c-format msgid "Suppose your application has two persistent classes with the same n= ame, and you don't want to specify the fully qualified (package) name in Hi= bernate queries. Classes may be \"imported\" explicitly, rather than relyin= g upon auto-import=3D\"true\". You may even import class= es and interfaces that are not explicitly mapped." msgstr "" = -#: basic_mapping.xml:2823(para) = +#. Tag: programlisting +#: basic_mapping.xml:2400 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2407 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2410 +#, no-c-format msgid "class: The fully qualified class name of of any = Java class." msgstr "" = -#: basic_mapping.xml:2828(para) = +#. Tag: para +#: basic_mapping.xml:2415 +#, no-c-format msgid "rename (optional - defaults to the unqualified c= lass name): A name that may be used in the query language." msgstr "" = -#: basic_mapping.xml:2839(title) = -msgid "any" +#. Tag: title +#: basic_mapping.xml:2426 +#, no-c-format +msgid "any" msgstr "" = -#: basic_mapping.xml:2841(para) = +#. Tag: para +#: basic_mapping.xml:2428 +#, no-c-format msgid "There is one further type of property mapping. The <any= > mapping element defines a polymorphic association to classes= from multiple tables. This type of mapping always requires more than one c= olumn. The first column holds the type of the associated entity. The remain= ing columns hold the identifier. It is impossible to specify a foreign key = constraint for this kind of association, so this is most certainly not mean= t as the usual way of mapping (polymorphic) associations. You should use th= is only in very special cases (eg. audit logs, user session data, etc)." msgstr "" = -#: basic_mapping.xml:2851(para) = +#. Tag: para +#: basic_mapping.xml:2438 +#, no-c-format msgid "The meta-type attribute lets the application spe= cify a custom type that maps database column values to persistent classes w= hich have identifier properties of the type specified by id-type. You must specify the mapping from values of the meta-type to clas= s names." msgstr "" = -#: basic_mapping.xml:2892(para) = +#. Tag: programlisting +#: basic_mapping.xml:2445 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2456 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " .....\n" + " \n" + " \n" + " .....\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2459 +#, no-c-format msgid "name: the property name." msgstr "" = -#: basic_mapping.xml:2897(para) = +#. Tag: para +#: basic_mapping.xml:2464 +#, no-c-format msgid "id-type: the identifier type." msgstr "" = -#: basic_mapping.xml:2902(para) = +#. Tag: para +#: basic_mapping.xml:2469 +#, no-c-format msgid "meta-type (optional - defaults to strin= g): Any type that is allowed for a discriminator mapping." msgstr "" = -#: basic_mapping.xml:2908(para) = +#. Tag: para +#: basic_mapping.xml:2475 +#, no-c-format msgid "cascade (optional- defaults to none): the cascade style." msgstr "" = -#: basic_mapping.xml:2920(para) = +#. Tag: para +#: basic_mapping.xml:2487 +#, no-c-format msgid "optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not requ= ire acquisition of the optimistic lock. In other words, define if a version= increment should occur if this property is dirty." msgstr "" = -#: basic_mapping.xml:2935(title) = +#. Tag: title +#: basic_mapping.xml:2502 +#, no-c-format msgid "Hibernate Types" msgstr "" = -#: basic_mapping.xml:2938(title) = +#. Tag: title +#: basic_mapping.xml:2505 +#, no-c-format msgid "Entities and values" msgstr "" = -#: basic_mapping.xml:2940(para) = +#. Tag: para +#: basic_mapping.xml:2507 +#, no-c-format msgid "To understand the behaviour of various Java language-level objects = with respect to the persistence service, we need to classify them into two = groups:" msgstr "" = -#: basic_mapping.xml:2945(para) = +#. Tag: para +#: basic_mapping.xml:2512 +#, no-c-format msgid "An entity exists independently of any other ob= jects holding references to the entity. Contrast this with the usual Java m= odel where an unreferenced object is garbage collected. Entities must be ex= plicitly saved and deleted (except that saves and deletions may be cascaded from a parent entity to its children). This is differ= ent from the ODMG model of object persistence by reachablity - and correspo= nds more closely to how application objects are usually used in large syste= ms. Entities support circular and shared references. They may also be versi= oned." msgstr "" = -#: basic_mapping.xml:2956(para) = +#. Tag: para +#: basic_mapping.xml:2523 +#, no-c-format msgid "An entity's persistent state consists of references to other entiti= es and instances of value types. Values are primitives= , collections (not what's inside a collection), components and certain immu= table objects. Unlike entities, values (in particular collections and compo= nents) are persisted and deleted by reachability. Sinc= e value objects (and primitives) are persisted and deleted along with their= containing entity they may not be independently versioned. Values have no = independent identity, so they cannot be shared by two entities or collectio= ns." msgstr "" = -#: basic_mapping.xml:2967(para) = +#. Tag: para +#: basic_mapping.xml:2534 +#, no-c-format msgid "Up until now, we've been using the term \"persistent class\" to ref= er to entities. We will continue to do that. Strictly speaking, however, no= t all user-defined classes with persistent state are entities. A = component is a user defined class with value semantics. A Java p= roperty of type java.lang.String also has value semantic= s. Given this definition, we can say that all types (classes) provided by t= he JDK have value type semantics in Java, while user-defined types may be m= apped with entity or value type semantics. This decision is up to the appli= cation developer. A good hint for an entity class in a domain model are sha= red references to a single instance of that class, while composition or agg= regation usually translates to a value type." msgstr "" = -#: basic_mapping.xml:2981(para) = +#. Tag: para +#: basic_mapping.xml:2548 +#, no-c-format msgid "We'll revisit both concepts throughout the documentation." msgstr "" = -#: basic_mapping.xml:2985(para) = +#. Tag: para +#: basic_mapping.xml:2552 +#, no-c-format msgid "The challenge is to map the Java type system (and the developers' d= efinition of entities and value types) to the SQL/database type system. The= bridge between both systems is provided by Hibernate: for entities we use = <class>, <subclass> and s= o on. For value types we use <property>, = <component>, etc, usually with a type at= tribute. The value of this attribute is the name of a Hibernate m= apping type. Hibernate provides many mappings (for standard JDK = value types) out of the box. You can write your own mapping types and imple= ment your custom conversion strategies as well, as you'll see later." msgstr "" = -#: basic_mapping.xml:2998(para) = +#. Tag: para +#: basic_mapping.xml:2565 +#, no-c-format msgid "All built-in Hibernate types except collections support null semant= ics." msgstr "" = -#: basic_mapping.xml:3005(title) = +#. Tag: title +#: basic_mapping.xml:2572 +#, no-c-format msgid "Basic value types" msgstr "" = -#: basic_mapping.xml:3012(literal) = +#. Tag: para +#: basic_mapping.xml:2574 +#, no-c-format +msgid "The built-in basic mapping types may be roughl= y categorized into" +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:2579 +#, no-c-format msgid "integer, long, short, float, double, character, byte, boolean, yes_= no, true_false" msgstr "" = -#: basic_mapping.xml:3015(para) = +#. Tag: para +#: basic_mapping.xml:2582 +#, no-c-format msgid "Type mappings from Java primitives or wrapper classes to appropriat= e (vendor-specific) SQL column types. boolean, yes_no an= d true_false are all alternative encodings for a Java boolean or java.lang.Boolean." msgstr "" = -#: basic_mapping.xml:3024(literal) = +#. Tag: literal +#: basic_mapping.xml:2591 +#, no-c-format msgid "string" msgstr "" = -#: basic_mapping.xml:3026(para) = +#. Tag: para +#: basic_mapping.xml:2593 +#, no-c-format msgid "A type mapping from java.lang.String to VARCHAR (or Oracle VARCHAR2)." msgstr "" = -#: basic_mapping.xml:3033(literal) = +#. Tag: literal +#: basic_mapping.xml:2600 +#, no-c-format msgid "date, time, timestamp" msgstr "" = -#: basic_mapping.xml:3035(para) = +#. Tag: para +#: basic_mapping.xml:2602 +#, no-c-format msgid "Type mappings from java.util.Date and its subcla= sses to SQL types DATE, TIME and TIMESTAMP (or equivalent)." msgstr "" = -#: basic_mapping.xml:3043(literal) = +#. Tag: literal +#: basic_mapping.xml:2610 +#, no-c-format msgid "calendar, calendar_date" msgstr "" = -#: basic_mapping.xml:3045(para) = +#. Tag: para +#: basic_mapping.xml:2612 +#, no-c-format msgid "Type mappings from java.util.Calendar to SQL typ= es TIMESTAMP and DATE (or equivalent)= ." msgstr "" = -#: basic_mapping.xml:3053(literal) = +#. Tag: literal +#: basic_mapping.xml:2620 +#, no-c-format msgid "big_decimal, big_integer" msgstr "" = -#: basic_mapping.xml:3055(para) = +#. Tag: para +#: basic_mapping.xml:2622 +#, no-c-format msgid "Type mappings from java.math.BigDecimal and java.math.BigInteger to NUMERIC (or Oracl= e NUMBER)." msgstr "" = -#: basic_mapping.xml:3063(literal) = +#. Tag: literal +#: basic_mapping.xml:2630 +#, no-c-format msgid "locale, timezone, currency" msgstr "" = -#: basic_mapping.xml:3065(para) = +#. Tag: para +#: basic_mapping.xml:2632 +#, no-c-format msgid "Type mappings from java.util.Locale, ja= va.util.TimeZone and java.util.Currency to VARCHAR (or Oracle VARCHAR2). Instances = of Locale and Currency are mapped to = their ISO codes. Instances of TimeZone are mapped to the= ir ID." msgstr "" = -#: basic_mapping.xml:3079(para) = +#. Tag: literal +#: basic_mapping.xml:2644 +#, no-c-format +msgid "class" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2646 +#, no-c-format msgid "A type mapping from java.lang.Class to = VARCHAR (or Oracle VARCHAR2). A Class= is mapped to its fully qualified name." msgstr "" = -#: basic_mapping.xml:3087(literal) = +#. Tag: literal +#: basic_mapping.xml:2654 +#, no-c-format msgid "binary" msgstr "" = -#: basic_mapping.xml:3089(para) = +#. Tag: para +#: basic_mapping.xml:2656 +#, no-c-format msgid "Maps byte arrays to an appropriate SQL binary type." msgstr "" = -#: basic_mapping.xml:3095(literal) = +#. Tag: literal +#: basic_mapping.xml:2662 +#, no-c-format msgid "text" msgstr "" = -#: basic_mapping.xml:3097(para) = +#. Tag: para +#: basic_mapping.xml:2664 +#, no-c-format msgid "Maps long Java strings to a SQL CLOB or TEXT type." msgstr "" = -#: basic_mapping.xml:3104(literal) = +#. Tag: literal +#: basic_mapping.xml:2671 +#, no-c-format msgid "serializable" msgstr "" = -#: basic_mapping.xml:3106(para) = +#. Tag: para +#: basic_mapping.xml:2673 +#, no-c-format msgid "Maps serializable Java types to an appropriate SQL binary type. You= may also indicate the Hibernate type serializable with = the name of a serializable Java class or interface that does not default to= a basic type." msgstr "" = -#: basic_mapping.xml:3115(literal) = +#. Tag: literal +#: basic_mapping.xml:2682 +#, no-c-format msgid "clob, blob" msgstr "" = -#: basic_mapping.xml:3117(para) = +#. Tag: para +#: basic_mapping.xml:2684 +#, no-c-format msgid "Type mappings for the JDBC classes java.sql.Clob= and java.sql.Blob. These types may be inconvenient for = some applications, since the blob or clob object may not be reused outside = of a transaction. (Furthermore, driver support is patchy and inconsistent.)" msgstr "" = -#: basic_mapping.xml:3127(literal) = +#. Tag: literal +#: basic_mapping.xml:2694 +#, no-c-format msgid "imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date,= imm_serializable, imm_binary" msgstr "" = -#: basic_mapping.xml:3131(para) = +#. Tag: para +#: basic_mapping.xml:2698 +#, no-c-format msgid "Type mappings for what are usually considered mutable Java types, w= here Hibernate makes certain optimizations appropriate only for immutable J= ava types, and the application treats the object as immutable. For example,= you should not call Date.setTime() for an instance mapp= ed as imm_timestamp. To change the value of the property= , and have that change made persistent, the application must assign a new (= nonidentical) object to the property." msgstr "" = -#: basic_mapping.xml:3007(para) = -msgid "The built-in basic mapping types may be roughl= y categorized into " -msgstr "" - -#: basic_mapping.xml:3146(para) = +#. Tag: para +#: basic_mapping.xml:2713 +#, no-c-format msgid "Unique identifiers of entities and collections may be of any basic = type except binary, blob and clob. (Composite identifiers are also allowed, see below.)" msgstr "" = -#: basic_mapping.xml:3152(para) = +#. Tag: para +#: basic_mapping.xml:2719 +#, no-c-format msgid "The basic value types have corresponding Type co= nstants defined on org.hibernate.Hibernate. For example,= Hibernate.STRING represents the string type." msgstr "" = -#: basic_mapping.xml:3161(title) = +#. Tag: title +#: basic_mapping.xml:2728 +#, no-c-format msgid "Custom value types" msgstr "" = -#: basic_mapping.xml:3163(para) = +#. Tag: para +#: basic_mapping.xml:2730 +#, no-c-format msgid "It is relatively easy for developers to create their own value type= s. For example, you might want to persist properties of type java.= lang.BigInteger to VARCHAR columns. Hibernate = does not provide a built-in type for this. But custom types are not limited= to mapping a property (or collection element) to a single table column. So= , for example, you might have a Java property getName()/= setName() of type java.lang.String th= at is persisted to the columns FIRST_NAME, INIT= IAL, SURNAME." msgstr "" = -#: basic_mapping.xml:3174(para) = +#. Tag: para +#: basic_mapping.xml:2741 +#, no-c-format msgid "To implement a custom type, implement either org.hibernate= .UserType or org.hibernate.CompositeUserType a= nd declare properties using the fully qualified classname of the type. Chec= k out org.hibernate.test.DoubleStringType to see the kin= d of things that are possible." msgstr "" = -#: basic_mapping.xml:3187(para) = +#. Tag: programlisting +#: basic_mapping.xml:2749 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2751 +#, no-c-format msgid "Notice the use of <column> tags to map a p= roperty to multiple columns." msgstr "" = -#: basic_mapping.xml:3192(para) = +#. Tag: para +#: basic_mapping.xml:2756 +#, no-c-format msgid "The CompositeUserType, EnhancedUserType= , UserCollectionType, and UserVersion= Type interfaces provide support for more specialized uses." msgstr "" = -#: basic_mapping.xml:3198(para) = +#. Tag: para +#: basic_mapping.xml:2762 +#, no-c-format msgid "You may even supply parameters to a UserType in = the mapping file. To do this, your UserType must impleme= nt the org.hibernate.usertype.ParameterizedType interfac= e. To supply parameters to your custom type, you can use the <t= ype> element in your mapping files." msgstr "" = -#: basic_mapping.xml:3212(para) = +#. Tag: programlisting +#: basic_mapping.xml:2770 +#, no-c-format +msgid "" + "\n" + " \n" + " 0\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2772 +#, no-c-format msgid "The UserType can now retrieve the value for the = parameter named default from the Properties object passed to it." msgstr "" = -#: basic_mapping.xml:3217(para) = +#. Tag: para +#: basic_mapping.xml:2777 +#, no-c-format msgid "If you use a certain UserType very often, it may= be useful to define a shorter name for it. You can do this using the <typedef> element. Typedefs assign a name to a custom t= ype, and may also contain a list of default parameter values if the type is= parameterized." msgstr "" = -#: basic_mapping.xml:3230(para) = +#. Tag: programlisting +#: basic_mapping.xml:2784 +#, no-c-format +msgid "" + "\n" + " 0\n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2786 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2788 +#, no-c-format msgid "It is also possible to override the parameters supplied in a typede= f on a case-by-case basis by using type parameters on the property mapping." msgstr "" = -#: basic_mapping.xml:3235(para) = +#. Tag: para +#: basic_mapping.xml:2793 +#, no-c-format msgid "Even though Hibernate's rich range of built-in types and support fo= r components means you will very rarely need to use a = custom type, it is nevertheless considered good form to use custom types fo= r (non-entity) classes that occur frequently in your application. For examp= le, a MonetaryAmount class is a good candidate for a CompositeUserType, even though it could easily be mapped as= a component. One motivation for this is abstraction. With a custom type, y= our mapping documents would be future-proofed against possible changes in y= our way of representing monetary values." msgstr "" = -#: basic_mapping.xml:3251(title) = +#. Tag: title +#: basic_mapping.xml:2809 +#, no-c-format msgid "Mapping a class more than once" msgstr "" = -#: basic_mapping.xml:3252(para) = +#. Tag: para +#: basic_mapping.xml:2810 +#, no-c-format msgid "It is possible to provide more than one mapping for a particular pe= rsistent class. In this case you must specify an entity name do disambiguate between instances of the two mapped entities. (By de= fault, the entity name is the same as the class name.) Hibernate lets you s= pecify the entity name when working with persistent objects, when writing q= ueries, or when mapping associations to the named entity." msgstr "" = -#: basic_mapping.xml:3278(para) = +#. Tag: programlisting +#: basic_mapping.xml:2818 +#, no-c-format +msgid "" + "\n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2820 +#, no-c-format msgid "Notice how associations are now specified using entity-nam= e instead of class." msgstr "" = -#: basic_mapping.xml:3286(title) = +#. Tag: title +#: basic_mapping.xml:2828 +#, no-c-format msgid "SQL quoted identifiers" msgstr "" = -#: basic_mapping.xml:3287(para) = +#. Tag: para +#: basic_mapping.xml:2829 +#, no-c-format msgid "You may force Hibernate to quote an identifier in the generated SQL= by enclosing the table or column name in backticks in the mapping document= . Hibernate will use the correct quotation style for the SQL Diale= ct (usually double quotes, but brackets for SQL Server and backti= cks for MySQL)." msgstr "" = -#: basic_mapping.xml:3304(title) = +#. Tag: programlisting +#: basic_mapping.xml:2836 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " ...\n" + "]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2842 +#, no-c-format msgid "Metadata alternatives" msgstr "" = -#: basic_mapping.xml:3306(para) = +#. Tag: para +#: basic_mapping.xml:2844 +#, no-c-format msgid "XML isn't for everyone, and so there are some alternative ways to d= efine O/R mapping metadata in Hibernate." msgstr "" = -#: basic_mapping.xml:3311(title) = +#. Tag: title +#: basic_mapping.xml:2849 +#, no-c-format msgid "Using XDoclet markup" msgstr "" = -#: basic_mapping.xml:3313(para) = +#. Tag: para +#: basic_mapping.xml:2851 +#, no-c-format msgid "Many Hibernate users prefer to embed mapping information directly i= n sourcecode using XDoclet @hibernate.tags. We will not = cover this approach in this document, since strictly it is considered part = of XDoclet. However, we include the following example of the Cat class with XDoclet mappings." msgstr "" = -#: basic_mapping.xml:3425(para) = +#. Tag: programlisting +#: basic_mapping.xml:2858 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2860 +#, no-c-format msgid "See the Hibernate web site for more examples of XDoclet and Hiberna= te." msgstr "" = -#: basic_mapping.xml:3432(title) = +#. Tag: title +#: basic_mapping.xml:2867 +#, no-c-format msgid "Using JDK 5.0 Annotations" msgstr "" = -#: basic_mapping.xml:3434(para) = +#. Tag: para +#: basic_mapping.xml:2869 +#, no-c-format msgid "JDK 5.0 introduced XDoclet-style annotations at the language level,= type-safe and checked at compile time. This mechnism is more powerful than= XDoclet annotations and better supported by tools and IDEs. IntelliJ IDEA,= for example, supports auto-completion and syntax highlighting of JDK 5.0 a= nnotations. The new revision of the EJB specification (JSR-220) uses JDK 5.= 0 annotations as the primary metadata mechanism for entity beans. Hibernate= 3 implements the EntityManager of JSR-220 (the persisten= ce API), support for mapping metadata is available via the Hibern= ate Annotations package, as a separate download. Both EJB3 (JSR-= 220) and Hibernate3 metadata is supported." msgstr "" = -#: basic_mapping.xml:3445(para) = +#. Tag: para +#: basic_mapping.xml:2880 +#, no-c-format msgid "This is an example of a POJO class annotated as an EJB entity bean:" msgstr "" = -#: basic_mapping.xml:3472(para) = +#. Tag: programlisting +#: basic_mapping.xml:2884 +#, no-c-format +msgid "" + " orders;\n" + "\n" + " // Getter/setter and business methods\n" + "}]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2886 +#, no-c-format msgid "Note that support for JDK 5.0 Annotations (and JSR-220) is still wo= rk in progress and not completed. Please refer to the Hibernate Annotations= module for more details." msgstr "" = -#: basic_mapping.xml:3481(title) = +#. Tag: title +#: basic_mapping.xml:2895 +#, no-c-format msgid "Generated Properties" msgstr "" = -#: basic_mapping.xml:3482(para) = +#. Tag: para +#: basic_mapping.xml:2896 +#, no-c-format msgid "Generated properties are properties which have their values generat= ed by the database. Typically, Hibernate applications needed to re= fresh objects which contain any properties for which the database= was generating values. Marking properties as generated, however, lets the = application delegate this responsibility to Hibernate. Essentially, wheneve= r Hibernate issues an SQL INSERT or UPDATE for an entity which has defined = generated properties, it immediately issues a select afterwards to retrieve= the generated values." msgstr "" = -#: basic_mapping.xml:3491(para) = -msgid "Properties marked as generated must additionally be non-insertable = and non-updateable. Only ve= rsions, timestamps= , and simple proper= ties can be marked as generated." +#. Tag: para +#: basic_mapping.xml:2905 +#, no-c-format +msgid "Properties marked as generated must additionally be non-insertable = and non-updateable. Only ve= rsions, timestamps= , and simple proper= ties can be marked as generated." msgstr "" = -#: basic_mapping.xml:3498(para) = +#. Tag: para +#: basic_mapping.xml:2912 +#, no-c-format msgid "never (the default) - means that the given prope= rty value is not generated within the database." msgstr "" = -#: basic_mapping.xml:3502(para) = -msgid "insert - states that the given property value is= generated on insert, but is not regenerated on subsequent updates. Things = like created-date would fall into this category. Note that even thought version and timestamp properties can be m= arked as generated, this option is not available there..." +#. Tag: para +#: basic_mapping.xml:2916 +#, no-c-format +msgid "insert - states that the given property value is= generated on insert, but is not regenerated on subsequent updates. Things = like created-date would fall into this category. Note that even thought version and timestamp properties can be m= arked as generated, this option is not available there..." msgstr "" = -#: basic_mapping.xml:3510(para) = +#. Tag: para +#: basic_mapping.xml:2924 +#, no-c-format msgid "always - states that the property value is gener= ated both on insert and on update." msgstr "" = -#: basic_mapping.xml:3517(title) = +#. Tag: title +#: basic_mapping.xml:2931 +#, no-c-format msgid "Auxiliary Database Objects" msgstr "" = -#: basic_mapping.xml:3518(para) = +#. Tag: para +#: basic_mapping.xml:2932 +#, no-c-format msgid "Allows CREATE and DROP of arbitrary database objects, in conjunctio= n with Hibernate's schema evolution tools, to provide the ability to fully = define a user schema within the Hibernate mapping files. Although designed = specifically for creating and dropping things like triggers or stored proce= dures, really any SQL command that can be run via a java.sql.State= ment.execute() method is valid here (ALTERs, INSERTS, etc). There= are essentially two modes for defining auxiliary database objects..." msgstr "" = -#: basic_mapping.xml:3527(para) = +#. Tag: para +#: basic_mapping.xml:2941 +#, no-c-format msgid "The first mode is to explicitly list the CREATE and DROP commands o= ut in the mapping file:" msgstr "" = -#: basic_mapping.xml:3538(para) = +#. Tag: programlisting +#: basic_mapping.xml:2945 +#, no-c-format +msgid "" + "\n" + " ...\n" + " \n" + " CREATE TRIGGER my_trigger ...\n" + " DROP TRIGGER my_trigger\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2946 +#, no-c-format msgid "The second mode is to supply a custom class which knows how to cons= truct the CREATE and DROP commands. This custom class must implement the org.hibernate.mapping.AuxiliaryDatabaseObject interface." msgstr "" = -#: basic_mapping.xml:3549(para) = +#. Tag: programlisting +#: basic_mapping.xml:2951 +#, no-c-format +msgid "" + "\n" + " ...\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2952 +#, no-c-format msgid "Additionally, these database objects can be optionally scoped such = that they only apply when certain dialects are used." msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: basic_mapping.xml:0(None) = -msgid "translator-credits" +#. Tag: programlisting +#: basic_mapping.xml:2956 +#, no-c-format +msgid "" + "\n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" msgstr "" = Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/batc= h.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/batch.pot = 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/batch.pot = 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,152 +1,373 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:29-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: batch.xml:5(title) = +#. Tag: title +#: batch.xml:29 +#, no-c-format msgid "Batch processing" msgstr "" = -#: batch.xml:7(para) = +#. Tag: para +#: batch.xml:31 +#, no-c-format msgid "A naive approach to inserting 100 000 rows in the database using Hi= bernate might look like this:" msgstr "" = -#: batch.xml:21(para) = +#. Tag: programlisting +#: batch.xml:36 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: batch.xml:38 +#, no-c-format msgid "This would fall over with an OutOfMemoryException somewhere around the 50 000th row. That's because Hibernate caches all th= e newly inserted Customer instances in the session-level= cache." msgstr "" = -#: batch.xml:27(para) = +#. Tag: para +#: batch.xml:44 +#, no-c-format msgid "In this chapter we'll show you how to avoid this problem. First, ho= wever, if you are doing batch processing, it is absolutely critical that yo= u enable the use of JDBC batching, if you intend to achieve reasonable perf= ormance. Set the JDBC batch size to a reasonable number (say, 10-50):" msgstr "" = -#: batch.xml:36(para) = +#. Tag: programlisting +#: batch.xml:51 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: batch.xml:53 +#, no-c-format msgid "Note that Hibernate disables insert batching at the JDBC level tran= sparently if you use an identiy identifier generator." msgstr "" = -#: batch.xml:41(para) = +#. Tag: para +#: batch.xml:58 +#, no-c-format msgid "You also might like to do this kind of work in a process where inte= raction with the second-level cache is completely disabled:" msgstr "" = -#: batch.xml:48(para) = +#. Tag: programlisting +#: batch.xml:63 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: batch.xml:65 +#, no-c-format msgid "However, this is not absolutely necessary, since we can explicitly = set the CacheMode to disable interaction with the second= -level cache." msgstr "" = -#: batch.xml:54(title) = +#. Tag: title +#: batch.xml:71 +#, no-c-format msgid "Batch inserts" msgstr "" = -#: batch.xml:56(para) = +#. Tag: para +#: batch.xml:73 +#, no-c-format msgid "When making new objects persistent, you must flush() and then clear() the session regularly, to control = the size of the first-level cache." msgstr "" = -#: batch.xml:81(title) = +#. Tag: programlisting +#: batch.xml:79 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: batch.xml:84 +#, no-c-format msgid "Batch updates" msgstr "" = -#: batch.xml:83(para) = +#. Tag: para +#: batch.xml:86 +#, no-c-format msgid "For retrieving and updating data the same ideas apply. In addition,= you need to use scroll() to take advantage of server-si= de cursors for queries that return many rows of data." msgstr "" = -#: batch.xml:112(title) = +#. Tag: programlisting +#: batch.xml:92 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: batch.xml:97 +#, no-c-format msgid "The StatelessSession interface" msgstr "" = -#: batch.xml:113(para) = +#. Tag: para +#: batch.xml:98 +#, no-c-format msgid "Alternatively, Hibernate provides a command-oriented API that may b= e used for streaming data to and from the database in the form of detached = objects. A StatelessSession has no persistence context a= ssociated with it and does not provide many of the higher-level life cycle = semantics. In particular, a stateless session does not implement a first-le= vel cache nor interact with any second-level or query cache. It does not im= plement transactional write-behind or automatic dirty checking. Operations = performed using a stateless session do not ever cascade to associated insta= nces. Collections are ignored by a stateless session. Operations performed = via a stateless session bypass Hibernate's event model and interceptors. St= ateless sessions are vulnerable to data aliasing effects, due to the lack o= f a first-level cache. A stateless session is a lower-level abstraction, mu= ch closer to the underlying JDBC." msgstr "" = -#: batch.xml:142(para) = +#. Tag: programlisting +#: batch.xml:113 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: batch.xml:115 +#, no-c-format msgid "Note that in this code example, the Customer ins= tances returned by the query are immediately detached. They are never assoc= iated with any persistence context." msgstr "" = -#: batch.xml:148(para) = +#. Tag: para +#: batch.xml:121 +#, no-c-format msgid "The insert(), update() and delete() operations defined by the StatelessSession interf= ace are considered to be direct database row-level operations, which result= in immediate execution of a SQL INSERT, UPDATE or DELETE respectively. Thus, they have very different semantics= to the save(), saveOrUpdate() and delete() operations defined by the Session interface." msgstr "" = -#: batch.xml:161(title) = +#. Tag: title +#: batch.xml:134 +#, no-c-format msgid "DML-style operations" msgstr "" = -#: batch.xml:163(para) = -msgid "As already discussed, automatic and transparent object/relational m= apping is concerned with the management of object state. This implies that = the object state is available in memory, hence manipulating (using the SQL = Data Manipulation Language (DML) statements: IN= SERT, UPDATE, DELETE) data = directly in the database will not affect in-memory state. However, Hibernat= e provides methods for bulk SQL-style DML statement execution which are per= formed through the Hibernate Query Language (H= QL)." +#. Tag: para +#: batch.xml:136 +#, no-c-format +msgid "As already discussed, automatic and transparent object/relational m= apping is concerned with the management of object state. This implies that = the object state is available in memory, hence manipulating (using the SQL = Data Manipulation Language (DML) statements: IN= SERT, UPDATE, DELETE) data = directly in the database will not affect in-memory state. However, Hibernat= e provides methods for bulk SQL-style DML statement execution which are per= formed through the Hibernate Query Language (H= QL)." msgstr "" = -#: batch.xml:173(para) = +#. Tag: para +#: batch.xml:146 +#, no-c-format msgid "The pseudo-syntax for UPDATE and DELETE= statements is: ( UPDATE | DELETE ) FROM? EntityName (WH= ERE where_conditions)?. Some points to note:" msgstr "" = -#: batch.xml:181(para) = +#. Tag: para +#: batch.xml:154 +#, no-c-format msgid "In the from-clause, the FROM keyword is optional" msgstr "" = -#: batch.xml:186(para) = +#. Tag: para +#: batch.xml:159 +#, no-c-format msgid "There can only be a single entity named in the from-clause; it can = optionally be aliased. If the entity name is aliased, then any property ref= erences must be qualified using that alias; if the entity name is not alias= ed, then it is illegal for any property references to be qualified." msgstr "" = -#: batch.xml:194(para) = -msgid "No joins (either im= plicit or explicit) can be specified in a bulk HQL query. Sub-queries may b= e used in the where-clause; the subqueries, themselves, may contain joins." +#. Tag: para +#: batch.xml:167 +#, no-c-format +msgid "No joins (either im= plicit or explicit) can be specified in a bulk HQL query. Sub-queries may b= e used in the where-clause; the subqueries, themselves, may contain joins." msgstr "" = -#: batch.xml:201(para) = +#. Tag: para +#: batch.xml:174 +#, no-c-format msgid "The where-clause is also optional." msgstr "" = -#: batch.xml:207(para) = +#. Tag: para +#: batch.xml:180 +#, no-c-format msgid "As an example, to execute an HQL UPDATE, use the= Query.executeUpdate() method (the method is named for t= hose familiar with JDBC's PreparedStatement.executeUpdate()):" msgstr "" = -#: batch.xml:225(para) = -msgid "HQL UPDATE statements, by default do not effect = the version or the <= xref linkend=3D\"mapping-declaration-timestamp\">timestamp property = values for the affected entities; this is in keeping with the EJB3 specific= ation. However, you can force Hibernate to properly reset the vers= ion or timestamp property values through the u= se of a versioned update. This is achieved by adding the= VERSIONED keyword after the UPDATE k= eyword." +#. Tag: programlisting +#: batch.xml:186 +#, no-c-format +msgid "" + "" msgstr "" = -#: batch.xml:245(para) = +#. Tag: para +#: batch.xml:188 +#, no-c-format +msgid "HQL UPDATE statements, by default do not effect = the version or the <= link linkend=3D\"mapping-declaration-timestamp\">timestamp property = values for the affected entities; this is in keeping with the EJB3 specific= ation. However, you can force Hibernate to properly reset the vers= ion or timestamp property values through the u= se of a versioned update. This is achieved by adding the= VERSIONED keyword after the UPDATE k= eyword." +msgstr "" + +#. Tag: programlisting +#: batch.xml:198 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: batch.xml:200 +#, no-c-format msgid "Note that custom version types (org.hibernate.usertype.Use= rVersionType) are not allowed in conjunction with a upda= te versioned statement." msgstr "" = -#: batch.xml:250(para) = +#. Tag: para +#: batch.xml:205 +#, no-c-format msgid "To execute an HQL DELETE, use the same = Query.executeUpdate() method:" msgstr "" = -#: batch.xml:266(para) = +#. Tag: programlisting +#: batch.xml:210 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: batch.xml:212 +#, no-c-format msgid "The int value returned by the Query.exe= cuteUpdate() method indicate the number of entities effected by t= he operation. Consider this may or may not correlate to the number of rows = effected in the database. An HQL bulk operation might result in multiple ac= tual SQL statements being executed, for joined-subclass, for example. The r= eturned number indicates the number of actual entities affected by the stat= ement. Going back to the example of joined-subclass, a delete against one o= f the subclasses may actually result in deletes against not just the table = to which that subclass is mapped, but also the \"root\" table and potential= ly joined-subclass tables further down the inheritence hierarchy." msgstr "" = -#: batch.xml:277(para) = +#. Tag: para +#: batch.xml:223 +#, no-c-format msgid "The pseudo-syntax for INSERT statements is: INSERT INTO EntityName properties_list select_statement. Som= e points to note:" msgstr "" = -#: batch.xml:285(para) = +#. Tag: para +#: batch.xml:231 +#, no-c-format msgid "Only the INSERT INTO ... SELECT ... form is supported; not the INSE= RT INTO ... VALUES ... form." msgstr "" = -#: batch.xml:288(para) = +#. Tag: para +#: batch.xml:234 +#, no-c-format msgid "The properties_list is analogous to the column speficiatio= n in the SQL INSERT statement. For entities in= volved in mapped inheritence, only properties directly defined on that give= n class-level can be used in the properties_list. Superclass properties are= not allowed; and subclass properties do not make sense. In other words, INSERT statements are inherently non-polymorphic." msgstr "" = -#: batch.xml:298(para) = +#. Tag: para +#: batch.xml:244 +#, no-c-format msgid "select_statement can be any valid HQL select query, with the caveat= that the return types must match the types expected by the insert. Current= ly, this is checked during query compilation rather than allowing the check= to relegate to the database. Note however that this might cause problems b= etween Hibernate Types which are equivalent as opposed to equal. This might cause issues = with mismatches between a property defined as a org.hibernate.type= .DateType and a property defined as a org.hibernate.type= .TimestampType, even though the database might not make a distinc= tion or might be able to handle the conversion." msgstr "" = -#: batch.xml:310(para) = +#. Tag: para +#: batch.xml:256 +#, no-c-format msgid "For the id property, the insert statement gives you two options. Yo= u can either explicitly specify the id property in the properties_list (in = which case its value is taken from the corresponding select expression) or = omit it from the properties_list (in which case a generated value is used).= This later option is only available when using id generators that operate = in the database; attempting to use this option with any \"in memory\" type = generators will cause an exception during parsing. Note that for the purpos= es of this discussion, in-database generators are considered to be org.hibernate.id.SequenceGenerator (and its subclasses) and any = implementors of org.hibernate.id.PostInsertIdentifierGenerator. The most notable exception here is org.hibernate.id.TableH= iLoGenerator, which cannot be used because it does not expose a s= electable way to get its values." msgstr "" = -#: batch.xml:325(para) = +#. Tag: para +#: batch.xml:271 +#, no-c-format msgid "For properties mapped as either version or timestamp, the insert statement gives you two options. You ca= n either specify the property in the properties_list (in which case its val= ue is taken from the corresponding select expressions) or omit it from the = properties_list (in which case the seed value defined by= the org.hibernate.type.VersionType is used)." msgstr "" = -#: batch.xml:335(para) = +#. Tag: para +#: batch.xml:281 +#, no-c-format msgid "An example HQL INSERT statement execution:" msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: batch.xml:0(None) = -msgid "translator-credits" +#. Tag: programlisting +#: batch.xml:285 +#, no-c-format +msgid "" + "" msgstr "" = Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/best= _practices.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/best_pract= ices.pot 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/best_pract= ices.pot 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,172 +1,250 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:29-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: best_practices.xml:5(title) = +#. Tag: title +#: best_practices.xml:29 +#, no-c-format msgid "Best Practices" msgstr "" = -#: best_practices.xml:9(term) = +#. Tag: term +#: best_practices.xml:33 +#, no-c-format msgid "Write fine-grained classes and map them using <componen= t>." msgstr "" = -#: best_practices.xml:11(para) = +#. Tag: para +#: best_practices.xml:35 +#, no-c-format msgid "Use an Address class to encapsulate str= eet, suburb, state, postcode. This encourages code reuse and simplifies refactoring= ." msgstr "" = -#: best_practices.xml:19(term) = +#. Tag: term +#: best_practices.xml:43 +#, no-c-format msgid "Declare identifier properties on persistent classes." msgstr "" = -#: best_practices.xml:21(para) = +#. Tag: para +#: best_practices.xml:45 +#, no-c-format msgid "Hibernate makes identifier properties optional. There are all sorts= of reasons why you should use them. We recommend that identifiers be 'synt= hetic' (generated, with no business meaning)." msgstr "" = -#: best_practices.xml:29(term) = +#. Tag: term +#: best_practices.xml:53 +#, no-c-format msgid "Identify natural keys." msgstr "" = -#: best_practices.xml:31(para) = +#. Tag: para +#: best_practices.xml:55 +#, no-c-format msgid "Identify natural keys for all entities, and map them using <natural-id>. Implement equals() and hashCode() to compare the properties that make up the natu= ral key." msgstr "" = -#: best_practices.xml:39(term) = +#. Tag: term +#: best_practices.xml:63 +#, no-c-format msgid "Place each class mapping in its own file." msgstr "" = -#: best_practices.xml:41(para) = +#. Tag: para +#: best_practices.xml:65 +#, no-c-format msgid "Don't use a single monolithic mapping document. Map com.eg= .Foo in the file com/eg/Foo.hbm.xml. This make= s particularly good sense in a team environment." msgstr "" = -#: best_practices.xml:49(term) = +#. Tag: term +#: best_practices.xml:73 +#, no-c-format msgid "Load mappings as resources." msgstr "" = -#: best_practices.xml:51(para) = +#. Tag: para +#: best_practices.xml:75 +#, no-c-format msgid "Deploy the mappings along with the classes they map." msgstr "" = -#: best_practices.xml:57(term) = +#. Tag: term +#: best_practices.xml:81 +#, no-c-format msgid "Consider externalising query strings." msgstr "" = -#: best_practices.xml:59(para) = +#. Tag: para +#: best_practices.xml:83 +#, no-c-format msgid "This is a good practice if your queries call non-ANSI-standard SQL = functions. Externalising the query strings to mapping files will make the a= pplication more portable." msgstr "" = -#: best_practices.xml:67(term) = +#. Tag: term +#: best_practices.xml:91 +#, no-c-format msgid "Use bind variables." msgstr "" = -#: best_practices.xml:69(para) = +#. Tag: para +#: best_practices.xml:93 +#, no-c-format msgid "As in JDBC, always replace non-constant values by \"?\". Never use = string manipulation to bind a non-constant value in a query! Even better, c= onsider using named parameters in queries." msgstr "" = -#: best_practices.xml:77(term) = +#. Tag: term +#: best_practices.xml:101 +#, no-c-format msgid "Don't manage your own JDBC connections." msgstr "" = -#: best_practices.xml:79(para) = +#. Tag: para +#: best_practices.xml:103 +#, no-c-format msgid "Hibernate lets the application manage JDBC connections. This approa= ch should be considered a last-resort. If you can't use the built-in connec= tions providers, consider providing your own implementation of org= .hibernate.connection.ConnectionProvider." msgstr "" = -#: best_practices.xml:87(term) = +#. Tag: term +#: best_practices.xml:111 +#, no-c-format msgid "Consider using a custom type." msgstr "" = -#: best_practices.xml:89(para) = +#. Tag: para +#: best_practices.xml:113 +#, no-c-format msgid "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 compon= ent. You should consider implementing org.hibernate.UserType. This approach frees the application code from implementing transforma= tions to / from a Hibernate type." msgstr "" = -#: best_practices.xml:98(term) = +#. Tag: term +#: best_practices.xml:122 +#, no-c-format msgid "Use hand-coded JDBC in bottlenecks." msgstr "" = -#: best_practices.xml:100(para) = +#. Tag: para +#: best_practices.xml:124 +#, no-c-format msgid "In performance-critical areas of the system, some kinds of operatio= ns might benefit from direct JDBC. But please, wait until you kno= w something is a bottleneck. And don't assume that direct JDBC i= s necessarily faster. If you need to use direct JDBC, it might be worth ope= ning a Hibernate Session and using that JDBC connection.= That way you can still use the same transaction strategy and underlying co= nnection provider." msgstr "" = -#: best_practices.xml:110(term) = +#. Tag: term +#: best_practices.xml:134 +#, no-c-format msgid "Understand Session flushing." msgstr "" = -#: best_practices.xml:112(para) = +#. Tag: para +#: best_practices.xml:136 +#, no-c-format msgid "From time to time the Session synchronizes its persistent state wit= h the database. Performance will be affected if this process occurs too oft= en. You may sometimes minimize unnecessary flushing by disabling automatic = flushing or even by changing the order of queries and other operations with= in a particular transaction." msgstr "" = -#: best_practices.xml:121(term) = +#. Tag: term +#: best_practices.xml:145 +#, no-c-format msgid "In a three tiered architecture, consider using detached objects." msgstr "" = -#: best_practices.xml:123(para) = +#. Tag: para +#: best_practices.xml:147 +#, no-c-format msgid "When using a servlet / session bean architecture, you could pass pe= rsistent objects loaded in the session bean to and from the servlet / JSP l= ayer. Use a new session to service each request. Use Session.merge= () or Session.saveOrUpdate() to synchronize ob= jects with the database." msgstr "" = -#: best_practices.xml:132(term) = +#. Tag: term +#: best_practices.xml:156 +#, no-c-format msgid "In a two tiered architecture, consider using long persistence conte= xts." msgstr "" = -#: best_practices.xml:134(para) = +#. Tag: para +#: best_practices.xml:158 +#, no-c-format msgid "Database Transactions have to be as short as possible for best scal= ability. However, it is often neccessary to implement long running application transactions, a single unit-of-work from the point= of view of a user. An application transaction might span several client re= quest/response cycles. It is common to use detached objects to implement ap= plication transactions. An alternative, extremely appropriate in two tiered= architecture, is to maintain a single open persistence contact (session) f= or the whole life cycle of the application transaction and simply disconnec= t from the JDBC connection at the end of each request and reconnect at the = beginning of the subsequent request. Never share a single session across mo= re than one application transaction, or you will be working with stale data= ." msgstr "" = -#: best_practices.xml:148(term) = +#. Tag: term +#: best_practices.xml:172 +#, no-c-format msgid "Don't treat exceptions as recoverable." msgstr "" = -#: best_practices.xml:150(para) = +#. Tag: para +#: best_practices.xml:174 +#, no-c-format msgid "This is more of a necessary practice than a \"best\" practice. When= an exception occurs, roll back the Transaction and clos= e the Session. If you don't, Hibernate can't guarantee t= hat in-memory state accurately represents persistent state. As a special ca= se of this, do not use Session.load() to determine if an= instance with the given identifier exists on the database; use Se= ssion.get() or a query instead." msgstr "" = -#: best_practices.xml:160(term) = +#. Tag: term +#: best_practices.xml:184 +#, no-c-format msgid "Prefer lazy fetching for associations." msgstr "" = -#: best_practices.xml:162(para) = +#. Tag: para +#: best_practices.xml:186 +#, no-c-format msgid "Use eager fetching sparingly. Use proxies and lazy collections for = most associations to classes that are not likely to be completely held in t= he second-level cache. For associations to cached classes, where there is a= n a extremely high probability of a cache hit, explicitly disable eager fet= ching using lazy=3D\"false\". When an join fetching is a= ppropriate to a particular use case, use a query with a left join = fetch." msgstr "" = -#: best_practices.xml:172(term) = +#. Tag: term +#: best_practices.xml:196 +#, no-c-format msgid "Use the open session in view pattern, or a dis= ciplined assembly phase to avoid problems with unfetch= ed data." msgstr "" = -#: best_practices.xml:177(para) = +#. Tag: para +#: best_practices.xml:201 +#, no-c-format msgid "Hibernate frees the developer from writing tedious Data T= ransfer Objects (DTO). In a traditional EJB architecture, DTOs s= erve dual purposes: first, they work around the problem that entity beans a= re not serializable; second, they implicitly define an assembly phase where= all data to be used by the view is fetched and marshalled into the DTOs be= fore returning control to the presentation tier. Hibernate eliminates the f= irst purpose. However, you will still need an assembly phase (think of your= business methods as having a strict contract with the presentation tier ab= out what data is available in the detached objects) unless you are prepared= to hold the persistence context (the session) open across the view renderi= ng process. This is not a limitation of Hibernate! It is a fundamental requ= irement of safe transactional data access." msgstr "" = -#: best_practices.xml:191(term) = +#. Tag: term +#: best_practices.xml:215 +#, no-c-format msgid "Consider abstracting your business logic from Hibernate." msgstr "" = -#: best_practices.xml:193(para) = +#. Tag: para +#: best_practices.xml:217 +#, no-c-format msgid "Hide (Hibernate) data-access code behind an interface. Combine the = DAO and Thread Local Session patt= erns. You can even have some classes persisted by handcoded JDBC, associate= d to Hibernate via a UserType. (This advice is intended = for \"sufficiently large\" applications; it is not appropriate for an appli= cation with five tables!)" msgstr "" = -#: best_practices.xml:203(term) = +#. Tag: term +#: best_practices.xml:227 +#, no-c-format msgid "Don't use exotic association mappings." msgstr "" = -#: best_practices.xml:205(para) = +#. Tag: para +#: best_practices.xml:229 +#, no-c-format msgid "Good usecases for a real many-to-many associations are rare. Most o= f the time you need additional information stored in the \"link table\". In= this case, it is much better to use two one-to-many associations to an int= ermediate link class. In fact, we think that most associations are one-to-m= any and many-to-one, you should be careful when using any other association= style and ask yourself if it is really neccessary." msgstr "" = -#: best_practices.xml:215(term) = +#. Tag: term +#: best_practices.xml:239 +#, no-c-format msgid "Prefer bidirectional associations." msgstr "" = -#: best_practices.xml:217(para) = +#. Tag: para +#: best_practices.xml:241 +#, no-c-format msgid "Unidirectional associations are more difficult to query. In a large= application, almost all associations must be navigable in both directions = in queries." msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: best_practices.xml:0(None) = -msgid "translator-credits" -msgstr "" - Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/coll= ection_mapping.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/collection= _mapping.pot 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/collection= _mapping.pot 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,492 +1,1193 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:30-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: collection_mapping.xml:5(title) = +#. Tag: title +#: collection_mapping.xml:29 +#, no-c-format msgid "Collection Mapping" msgstr "" = -#: collection_mapping.xml:8(title) = +#. Tag: title +#: collection_mapping.xml:32 +#, no-c-format msgid "Persistent collections" msgstr "" = -#: collection_mapping.xml:10(para) = +#. Tag: para +#: collection_mapping.xml:34 +#, no-c-format msgid "Hibernate requires that persistent collection-valued fields be decl= ared as an interface type, for example:" msgstr "" = -#: collection_mapping.xml:25(para) = +#. Tag: programlisting +#: collection_mapping.xml:39 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:41 +#, no-c-format msgid "The actual interface might be java.util.Set, java.util.Collection, java.util.List, java.util.Map, java.util.SortedSet, java.util.SortedMap or ... anything you like! (Where \"anyt= hing you like\" means you will have to write an implementation of = org.hibernate.usertype.UserCollectionType.)" msgstr "" = -#: collection_mapping.xml:34(para) = +#. Tag: para +#: collection_mapping.xml:50 +#, no-c-format msgid "Notice how we initialized the instance variable with an instance of= HashSet. This is the best way to initialize collection = valued properties of newly instantiated (non-persistent) instances. When yo= u make the instance persistent - by calling persist(), f= or example - Hibernate will actually replace the HashSet= with an instance of Hibernate's own implementation of Set. Watch out for errors like this:" msgstr "" = -#: collection_mapping.xml:54(para) = +#. Tag: programlisting +#: collection_mapping.xml:60 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:62 +#, no-c-format msgid "The persistent collections injected by Hibernate behave like HashMap, HashSet, TreeMap, TreeSet or ArrayList, depending up= on the interface type." msgstr "" = -#: collection_mapping.xml:61(para) = +#. Tag: para +#: collection_mapping.xml:69 +#, no-c-format msgid "Collections instances have the usual behavior of value types. They = are automatically persisted when referenced by a persistent object and auto= matically deleted when unreferenced. If a collection is passed from one per= sistent object to another, its elements might be moved from one table to an= other. Two entities may not share a reference to the same collection instan= ce. Due to the underlying relational model, collection-valued properties do= not support null value semantics; Hibernate does not distinguish between a= null collection reference and an empty collection." msgstr "" = -#: collection_mapping.xml:72(para) = +#. Tag: para +#: collection_mapping.xml:80 +#, no-c-format msgid "You shouldn't have to worry much about any of this. Use persistent = collections the same way you use ordinary Java collections. Just make sure = you understand the semantics of bidirectional associations (discussed later= )." msgstr "" = -#: collection_mapping.xml:81(title) = +#. Tag: title +#: collection_mapping.xml:89 +#, no-c-format msgid "Collection mappings" msgstr "" = -#: collection_mapping.xml:83(para) = +#. Tag: para +#: collection_mapping.xml:92 +#, no-c-format +msgid "There are quite a range of mappings that can be generated for colle= ctions, covering many common relational models. We suggest you experiment w= ith the schema generation tool to get a feeling for how various mapping dec= larations translate to database tables." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:99 +#, no-c-format msgid "The Hibernate mapping element used for mapping a collection depends= upon the type of the interface. For example, a <set> element is used for mapping properties of type Set." msgstr "" = -#: collection_mapping.xml:97(para) = +#. Tag: programlisting +#: collection_mapping.xml:105 +#, no-c-format +msgid "" + "\n" + " \= n" + " \n" + " = \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:107 +#, no-c-format msgid "Apart from <set>, there is also &= lt;list>, <map>, <bag>= , <array> and <primitive-arr= ay> mapping elements. The <map> eleme= nt is representative:" msgstr "" = -#: collection_mapping.xml:147(para) = +#. Tag: programlisting +#: collection_mapping.xml:132 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:135 +#, no-c-format msgid "name the collection property name" msgstr "" = -#: collection_mapping.xml:152(para) = +#. Tag: para +#: collection_mapping.xml:140 +#, no-c-format msgid "table (optional - defaults to property name) the= name of the collection table (not used for one-to-many associations)" msgstr "" = -#: collection_mapping.xml:158(para) = +#. Tag: para +#: collection_mapping.xml:146 +#, no-c-format msgid "schema (optional) the name of a table schema to = override the schema declared on the root element" msgstr "" = -#: collection_mapping.xml:164(para) = +#. Tag: para +#: collection_mapping.xml:152 +#, no-c-format msgid "lazy (optional - defaults to true) may be used to disable lazy fetching and specify that the association= is always eagerly fetched, or to enable \"extra-lazy\" fetching where most= operations do not initialize the collection (suitable for very large colle= ctions)" msgstr "" = -#: collection_mapping.xml:173(para) = +#. Tag: para +#: collection_mapping.xml:161 +#, no-c-format msgid "inverse (optional - defaults to false) mark this collection as the \"inverse\" end of a bidirectional as= sociation" msgstr "" = -#: collection_mapping.xml:179(para) = +#. Tag: para +#: collection_mapping.xml:167 +#, no-c-format msgid "cascade (optional - defaults to none) enable operations to cascade to child entities" msgstr "" = -#: collection_mapping.xml:185(para) = +#. Tag: para +#: collection_mapping.xml:173 +#, no-c-format msgid "sort (optional) specify a sorted collection with= natural sort order, or a given comparator class" msgstr "" = -#: collection_mapping.xml:191(para) = +#. Tag: para +#: collection_mapping.xml:179 +#, no-c-format msgid "order-by (optional, JDK1.4 only) specify a table= column (or columns) that define the iteration order of the Map, Set or bag, together with an optional = asc or desc" msgstr "" = -#: collection_mapping.xml:198(para) = +#. Tag: para +#: collection_mapping.xml:186 +#, no-c-format msgid "where (optional) specify an arbitrary SQL WHERE condition to be used when retrieving or removing the col= lection (useful if the collection should contain only a subset of the avail= able data)" msgstr "" = -#: collection_mapping.xml:205(para) = +#. Tag: para +#: collection_mapping.xml:193 +#, no-c-format msgid "fetch (optional, defaults to select) Choose between outer-join fetching, fetching by sequential select, = and fetching by sequential subselect." msgstr "" = -#: collection_mapping.xml:212(para) = +#. Tag: para +#: collection_mapping.xml:200 +#, no-c-format msgid "batch-size (optional, defaults to 1) specify a \"batch size\" for lazily fetching instances of this coll= ection." msgstr "" = -#: collection_mapping.xml:218(para) = +#. Tag: para +#: collection_mapping.xml:206 +#, no-c-format msgid "access (optional - defaults to property= ): The strategy Hibernate should use for accessing the collection= property value." msgstr "" = -#: collection_mapping.xml:224(para) = +#. Tag: para +#: collection_mapping.xml:212 +#, no-c-format msgid "optimistic-lock (optional - defaults to true): Species that changes to the state of the collection resul= ts in increment of the owning entity's version. (For one to many associatio= ns, it is often reasonable to disable this setting.)" msgstr "" = -#: collection_mapping.xml:232(para) = +#. Tag: para +#: collection_mapping.xml:220 +#, no-c-format msgid "mutable (optional - defaults to true): A value of false specifies that the elements o= f the collection never change (a minor performance optimization in some cas= es)." msgstr "" = -#: collection_mapping.xml:242(title) = +#. Tag: title +#: collection_mapping.xml:230 +#, no-c-format msgid "Collection foreign keys" msgstr "" = -#: collection_mapping.xml:244(para) = +#. Tag: para +#: collection_mapping.xml:232 +#, no-c-format msgid "Collection instances are distinguished in the database by the forei= gn key of the entity that owns the collection. This foreign key is referred= to as the collection key column (or columns) of the c= ollection table. The collection key column is mapped by the <ke= y> element." msgstr "" = -#: collection_mapping.xml:252(para) = +#. Tag: para +#: collection_mapping.xml:240 +#, no-c-format msgid "There may be a nullability constraint on the foreign key column. Fo= r most collections, this is implied. For unidirectional one to many associa= tions, the foreign key column is nullable by default, so you might need to = specify not-null=3D\"true\"." msgstr "" = -#: collection_mapping.xml:261(para) = +#. Tag: programlisting +#: collection_mapping.xml:247 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:249 +#, no-c-format msgid "The foreign key constraint may use ON DELETE CASCADE." msgstr "" = -#: collection_mapping.xml:267(para) = +#. Tag: programlisting +#: collection_mapping.xml:253 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:255 +#, no-c-format msgid "See the previous chapter for a full definition of the <= key> element." msgstr "" = -#: collection_mapping.xml:275(title) = +#. Tag: title +#: collection_mapping.xml:263 +#, no-c-format msgid "Collection elements" msgstr "" = -#: collection_mapping.xml:277(para) = +#. Tag: para +#: collection_mapping.xml:265 +#, no-c-format msgid "Collections may contain almost any other Hibernate type, including = all basic types, custom types, components, and of course, references to oth= er entities. This is an important distinction: an object in a collection mi= ght be handled with \"value\" semantics (its life cycle fully depends on th= e collection owner) or it might be a reference to another entity, with its = own life cycle. In the latter case, only the \"link\" between the two objec= ts is considered to be state held by the collection." msgstr "" = -#: collection_mapping.xml:286(para) = +#. Tag: para +#: collection_mapping.xml:274 +#, no-c-format msgid "The contained type is referred to as the collection eleme= nt type. Collection elements are mapped by <element&= gt; or <composite-element>, or in the ca= se of entity references, with <one-to-many> or <many-to-many>. The first two map elements with value= semantics, the next two are used to map entity associations." msgstr "" = -#: collection_mapping.xml:298(title) = +#. Tag: title +#: collection_mapping.xml:286 +#, no-c-format msgid "Indexed collections" msgstr "" = -#: collection_mapping.xml:300(para) = +#. Tag: para +#: collection_mapping.xml:288 +#, no-c-format msgid "All collection mappings, except those with set and bag semantics, n= eed an index column in the collection table - a column= that maps to an array index, or List index, or Map key. The index of a Map may be of any bas= ic type, mapped with <map-key>, it may be an entit= y reference mapped with <map-key-many-to-many>, or= it may be a composite type, mapped with <composite-map-key>= . The index of an array or list is always of type intege= r and is mapped using the <list-index> e= lement. The mapped column contains sequential integers (numbered from zero,= by default)." msgstr "" = -#: collection_mapping.xml:323(para) = -msgid "column_name (required): The name of the column h= olding the collection index values." +#. Tag: sect2 +#: collection_mapping.xml:299 +#, no-c-format +msgid "" + " = ]]> column_name (required= ): The name of the column holding the collection index values. base (opti= onal, defaults to 0): The value of the index column that= corresponds to the first element of the list or array. = <= ![CDATA[]]> column (optional): The n= ame of the column holding the collection index values. <= callout arearefs=3D\"mapkey2\"> formula (optional= ): A SQL formula used to evaluate the key of the map. type (reguired): T= he type of the map keys. ]]> column (optional): The name of the fo= reign key column for the collection index values. formula (opti= onal): A SQL formula used to evaluate the foreign key of the map key. cla= ss (required): The entity class used as the map key. " msgstr "" = -#: collection_mapping.xml:329(para) = -msgid "base (optional, defaults to 0= ): The value of the index column that corresponds to the first element of t= he list or array." -msgstr "" - -#: collection_mapping.xml:351(para) = -msgid "column (optional): The name of the column holdin= g the collection index values." -msgstr "" - -#: collection_mapping.xml:357(para) = -msgid "formula (optional): A SQL formula used to evalua= te the key of the map." -msgstr "" - -#: collection_mapping.xml:363(para) = -msgid "type (reguired): The type of the map keys." -msgstr "" - -#: collection_mapping.xml:383(para) = -msgid "column (optional): The name of the foreign key c= olumn for the collection index values." -msgstr "" - -#: collection_mapping.xml:389(para) = -msgid "formula (optional): A SQL formula used to evalua= te the foreign key of the map key." -msgstr "" - -#: collection_mapping.xml:395(para) = -msgid "class (required): The entity class used as the m= ap key." -msgstr "" - -#: collection_mapping.xml:403(para) = +#. Tag: para +#: collection_mapping.xml:380 +#, no-c-format msgid "If your table doesn't have an index column, and you still wish to u= se List as the property type, you should map the propert= y as a Hibernate <bag>. A bag does not retain it= s order when it is retrieved from the database, but it may be optionally so= rted or ordered." msgstr "" = -#: collection_mapping.xml:412(para) = -msgid "There are quite a range of mappings that can be generated for colle= ctions, covering many common relational models. We suggest you experiment w= ith the schema generation tool to get a feeling for how various mapping dec= larations translate to database tables." -msgstr "" - -#: collection_mapping.xml:419(title) = +#. Tag: title +#: collection_mapping.xml:390 +#, no-c-format msgid "Collections of values and many-to-many associations" msgstr "" = -#: collection_mapping.xml:421(para) = +#. Tag: para +#: collection_mapping.xml:392 +#, no-c-format msgid "Any collection of values or many-to-many association requires a ded= icated collection table with a foreign key column or c= olumns, collection element column or columns and possi= bly an index column or columns." msgstr "" = -#: collection_mapping.xml:428(para) = +#. Tag: para +#: collection_mapping.xml:399 +#, no-c-format msgid "For a collection of values, we use the <element> tag." msgstr "" = -#: collection_mapping.xml:451(para) = -msgid "column (optional): The name of the column holdin= g the collection element values." +#. Tag: sect2 +#: collection_mapping.xml:401 +#, no-c-format +msgid "" + " ]]> column (optional): The name of the column ho= lding the collection element values. formula (optional): An SQL form= ula used to evaluate the element. type (required): The type of the col= lection element. A many-to-many association is specified using the <= literal><many-to-many> element. = ]]> column (optional): The name of the ele= ment foreign key column. formula (optional): An SQL formula used to = evaluate the element foreign key value. class (required): The name o= f the associated class. fetch (optional - defaults to join<= /literal>): enables outer-join or sequential select fetching for this assoc= iation. This is a special case; for full eager fetching (in a single SELECT) of an entity and its many-to-many relationships to oth= er entities, you would enable join fetching not only of = the collection itself, but also with this attribute on the <man= y-to-many> nested element. = unique (optional): Enable the DDL generation of a= unique constraint for the foreign-key column. This makes the association m= ultiplicity effectively one to many. not-found (optional - default= s to exception): Specifies how foreign keys that referen= ce missing rows will be handled: ignore will treat a mis= sing row as a null association. entity-name (optional): The entity n= ame of the associated class, as an alternative to class.= pr= operty-ref: (optional) The name of a property of the associated c= lass that is joined to this foreign key. If not specified, the primary key = of the associated class ! is used. " msgstr "" = -#: collection_mapping.xml:457(para) = -msgid "formula (optional): An SQL formula used to evalu= ate the element." +#. Tag: para +#: collection_mapping.xml:506 +#, no-c-format +msgid "Some examples, first, a set of strings:" msgstr "" = -#: collection_mapping.xml:463(para) = -msgid "type (required): The type of the collection elem= ent." +#. Tag: programlisting +#: collection_mapping.xml:510 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" msgstr "" = -#: collection_mapping.xml:470(para) = -msgid "A many-to-many association is specified using = the <many-to-many> element." +#. Tag: para +#: collection_mapping.xml:512 +#, no-c-format +msgid "A bag containing integers (with an iteration order determined by th= e order-by attribute):" msgstr "" = -#: collection_mapping.xml:500(para) = -msgid "column (optional): The name of the element forei= gn key column." +#. Tag: programlisting +#: collection_mapping.xml:517 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" msgstr "" = -#: collection_mapping.xml:505(para) = -msgid "formula (optional): An SQL formula used to evalu= ate the element foreign key value." +#. Tag: para +#: collection_mapping.xml:519 +#, no-c-format +msgid "An array of entities - in this case, a many to many association:" msgstr "" = -#: collection_mapping.xml:511(para) collection_mapping.xml:665(para) = -msgid "class (required): The name of the associated cla= ss." +#. Tag: programlisting +#: collection_mapping.xml:523 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "]]>" msgstr "" = -#: collection_mapping.xml:516(para) = -msgid "fetch (optional - defaults to join): enables outer-join or sequential select fetching for this associati= on. This is a special case; for full eager fetching (in a single S= ELECT) of an entity and its many-to-many relationships to other e= ntities, you would enable join fetching not only of the = collection itself, but also with this attribute on the <many-to= -many> nested element." +#. Tag: para +#: collection_mapping.xml:525 +#, no-c-format +msgid "A map from string indices to dates:" msgstr "" = -#: collection_mapping.xml:527(para) = -msgid "unique (optional): Enable the DDL generation of = a unique constraint for the foreign-key column. This makes the association = multiplicity effectively one to many." +#. Tag: programlisting +#: collection_mapping.xml:529 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "]]>" msgstr "" = -#: collection_mapping.xml:534(para) = -msgid "not-found (optional - defaults to excep= tion): Specifies how foreign keys that reference missing rows wil= l be handled: ignore will treat a missing row as a null = association." +#. Tag: para +#: collection_mapping.xml:531 +#, no-c-format +msgid "A list of components (discussed in the next chapter):" msgstr "" = -#: collection_mapping.xml:541(para) collection_mapping.xml:677(para) = -msgid "entity-name (optional): The entity name of the a= ssociated class, as an alternative to class." +#. Tag: programlisting +#: collection_mapping.xml:535 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \= n" + " \n" + "]]>" msgstr "" = -#: collection_mapping.xml:547(para) = -msgid "property-ref: (optional) The name of a property = of the associated class that is joined to this foreign key. If not specifie= d, the primary key of the associated class is used." +#. Tag: title +#: collection_mapping.xml:540 +#, no-c-format +msgid "One-to-many associations" msgstr "" = -#: collection_mapping.xml:556(para) = -msgid "Some examples, first, a set of strings:" +#. Tag: para +#: collection_mapping.xml:542 +#, no-c-format +msgid "A one to many association links the tables of = two classes via a foreign key, with no intervening collection table. This m= apping loses certain semantics of normal Java collections:" msgstr "" = -#: collection_mapping.xml:565(para) = -msgid "A bag containing integers (with an iteration order determined by th= e order-by attribute):" +#. Tag: para +#: collection_mapping.xml:550 +#, no-c-format +msgid "An instance of the contained entity class may not belong to more th= an one instance of the collection" msgstr "" = -#: collection_mapping.xml:577(para) = -msgid "An array of entities - in this case, a many to many association:" +#. Tag: para +#: collection_mapping.xml:556 +#, no-c-format +msgid "An instance of the contained entity class may not appear at more th= an one value of the collection index" msgstr "" = -#: collection_mapping.xml:589(para) = -msgid "A map from string indices to dates:" +#. Tag: para +#: collection_mapping.xml:563 +#, no-c-format +msgid "An association from Product to Part requires existence of a foreign key column and possibly an index col= umn to the Part table. A <one-to-many> tag indicates that this is a one to many association." msgstr "" = -#: collection_mapping.xml:602(para) = -msgid "A list of components (discussed in the next chapter):" +#. Tag: programlisting +#: collection_mapping.xml:576 +#, no-c-format +msgid "" + "]]>" msgstr "" = -#: collection_mapping.xml:620(title) = -msgid "One-to-many associations" +#. Tag: para +#: collection_mapping.xml:579 +#, no-c-format +msgid "class (required): The name of the associated cla= ss." msgstr "" = -#: collection_mapping.xml:622(para) = -msgid "A one to many association links the tables of = two classes via a foreign key, with no intervening collection table. This m= apping loses certain semantics of normal Java collections:" +#. Tag: para +#: collection_mapping.xml:584 +#, no-c-format +msgid "not-found (optional - defaults to excep= tion): Specifies how cached identifiers that reference missing ro= ws will be handled: ignore will treat a missing row as a= null association." msgstr "" = -#: collection_mapping.xml:630(para) = -msgid "An instance of the contained entity class may not belong to more th= an one instance of the collection" +#. Tag: para +#: collection_mapping.xml:591 +#, no-c-format +msgid "entity-name (optional): The entity name of the a= ssociated class, as an alternative to class." msgstr "" = -#: collection_mapping.xml:636(para) = -msgid "An instance of the contained entity class may not appear at more th= an one value of the collection index" -msgstr "" - -#: collection_mapping.xml:643(para) = -msgid "An association from Product to Part requires existence of a foreign key column and possibly an index col= umn to the Part table. A <one-to-many> tag indicates that this is a one to many association." -msgstr "" - -#: collection_mapping.xml:670(para) = -msgid "not-found (optional - defaults to excep= tion): Specifies how cached identifiers that reference missing ro= ws will be handled: ignore will treat a missing row as a= null association." -msgstr "" - -#: collection_mapping.xml:685(para) = +#. Tag: para +#: collection_mapping.xml:599 +#, no-c-format msgid "Notice that the <one-to-many> element does= not need to declare any columns. Nor is it necessary to specify the table name anywhere." msgstr "" = -#: collection_mapping.xml:691(para) = +#. Tag: para +#: collection_mapping.xml:605 +#, no-c-format msgid "Very important note: If the foreign key column= of a <one-to-many> association is declared NOT NULL, you must declare the <key> = mapping not-null=3D\"true\" or use a bidirecti= onal association with the collection mapping marked inv= erse=3D\"true\". See the discussion of bidirectional associations= later in this chapter." msgstr "" = -#: collection_mapping.xml:700(para) = +#. Tag: para +#: collection_mapping.xml:614 +#, no-c-format msgid "This example shows a map of Part entities by nam= e (where partName is a persistent property of P= art). Notice the use of a formula-based index." msgstr "" = -#: collection_mapping.xml:717(title) = +#. Tag: programlisting +#: collection_mapping.xml:620 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:626 +#, no-c-format msgid "Advanced collection mappings" msgstr "" = -#: collection_mapping.xml:720(title) = +#. Tag: title +#: collection_mapping.xml:629 +#, no-c-format msgid "Sorted collections" msgstr "" = -#: collection_mapping.xml:722(para) = +#. Tag: para +#: collection_mapping.xml:631 +#, no-c-format msgid "Hibernate supports collections implementing java.util.Sort= edMap and java.util.SortedSet. You must specif= y a comparator in the mapping file:" msgstr "" = -#: collection_mapping.xml:740(para) = +#. Tag: programlisting +#: collection_mapping.xml:636 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:638 +#, no-c-format msgid "Allowed values of the sort attribute are unsorted, natural and the name of a class im= plementing java.util.Comparator." msgstr "" = -#: collection_mapping.xml:746(para) = +#. Tag: para +#: collection_mapping.xml:644 +#, no-c-format msgid "Sorted collections actually behave like java.util.TreeSet<= /literal> or java.util.TreeMap." msgstr "" = -#: collection_mapping.xml:751(para) = +#. Tag: para +#: collection_mapping.xml:649 +#, no-c-format msgid "If you want the database itself to order the collection elements us= e the order-by attribute of set, bag or map mappings. This solution is onl= y available under JDK 1.4 or higher (it is implemented using Linke= dHashSet or LinkedHashMap). This performs the = ordering in the SQL query, not in memory." msgstr "" = -#: collection_mapping.xml:771(para) = +#. Tag: programlisting +#: collection_mapping.xml:658 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:660 +#, no-c-format msgid "Note that the value of the order-by attribute is= an SQL ordering, not a HQL ordering!" msgstr "" = -#: collection_mapping.xml:776(para) = +#. Tag: para +#: collection_mapping.xml:665 +#, no-c-format msgid "Associations may even be sorted by some arbitrary criteria at runti= me using a collection filter()." msgstr "" = -#: collection_mapping.xml:786(title) = +#. Tag: programlisting +#: collection_mapping.xml:670 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:675 +#, no-c-format msgid "Bidirectional associations" msgstr "" = -#: collection_mapping.xml:795(term) = +#. Tag: para +#: collection_mapping.xml:677 +#, no-c-format +msgid "A bidirectional association allows navigation = from both \"ends\" of the association. Two kinds of bidirectional associati= on are supported:" +msgstr "" + +#. Tag: term +#: collection_mapping.xml:684 +#, no-c-format msgid "one-to-many" msgstr "" = -#: collection_mapping.xml:797(para) = +#. Tag: para +#: collection_mapping.xml:686 +#, no-c-format msgid "set or bag valued at one end, single-valued at the other" msgstr "" = -#: collection_mapping.xml:803(term) = +#. Tag: term +#: collection_mapping.xml:692 +#, no-c-format msgid "many-to-many" msgstr "" = -#: collection_mapping.xml:805(para) = +#. Tag: para +#: collection_mapping.xml:694 +#, no-c-format msgid "set or bag valued at both ends" msgstr "" = -#: collection_mapping.xml:788(para) = -msgid "A bidirectional association allows navigation = from both \"ends\" of the association. Two kinds of bidirectional associati= on are supported: " -msgstr "" - -#: collection_mapping.xml:814(para) = +#. Tag: para +#: collection_mapping.xml:703 +#, no-c-format msgid "You may specify a bidirectional many-to-many association simply by = mapping two many-to-many associations to the same database table and declar= ing one end as inverse (which one is your choice, but = it can not be an indexed collection)." msgstr "" = -#: collection_mapping.xml:821(para) = +#. Tag: para +#: collection_mapping.xml:710 +#, no-c-format msgid "Here's an example of a bidirectional many-to-many association; each= category can have many items and each item can be in many categories:" msgstr "" = -#: collection_mapping.xml:846(para) = +#. Tag: programlisting +#: collection_mapping.xml:715 +#, no-c-format +msgid "" + "\n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " ...\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:717 +#, no-c-format msgid "Changes made only to the inverse end of the association are not persisted. This means that Hibernate has two representati= ons in memory for every bidirectional association, one link from A to B and= another link from B to A. This is easier to understand if you think about = the Java object model and how we create a many-to-many relationship in Java= :" msgstr "" = -#: collection_mapping.xml:861(para) = +#. Tag: programlisting +#: collection_mapping.xml:725 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:727 +#, no-c-format msgid "The non-inverse side is used to save the in-memory representation t= o the database." msgstr "" = -#: collection_mapping.xml:865(para) = +#. Tag: para +#: collection_mapping.xml:731 +#, no-c-format msgid "You may define a bidirectional one-to-many association by mapping a= one-to-many association to the same table column(s) as a many-to-one assoc= iation and declaring the many-valued end inverse=3D\"true\"." msgstr "" = -#: collection_mapping.xml:889(para) = +#. Tag: programlisting +#: collection_mapping.xml:737 +#, no-c-format +msgid "" + "\n" + " \n" + " ....\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " ....\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:739 +#, no-c-format msgid "Mapping one end of an association with inverse=3D\"true\"<= /literal> doesn't affect the operation of cascades, these are orthogonal co= ncepts!" msgstr "" = -#: collection_mapping.xml:897(title) = +#. Tag: title +#: collection_mapping.xml:747 +#, no-c-format msgid "Bidirectional associations with indexed collections" msgstr "" = -#: collection_mapping.xml:898(para) = +#. Tag: para +#: collection_mapping.xml:748 +#, no-c-format msgid "A bidirectional association where one end is represented as a <list> or <map> requires speci= al consideration. If there is a property of the child class which maps to t= he index column, no problem, we can continue using inverse=3D\"tru= e\" on the collection mapping:" msgstr "" = -#: collection_mapping.xml:927(para) = +#. Tag: programlisting +#: collection_mapping.xml:755 +#, no-c-format +msgid "" + "\n" + " \n" + " ....\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " ....\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:757 +#, no-c-format msgid "But, if there is no such property on the child class, we can't thin= k of the association as truly bidirectional (there is information available= at one end of the association that is not available at the other end). In = this case, we can't map the collection inverse=3D\"true\". Instead, we could use the following mapping:" msgstr "" = -#: collection_mapping.xml:957(para) = +#. Tag: programlisting +#: collection_mapping.xml:764 +#, no-c-format +msgid "" + "\n" + " \n" + " ....\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " ....\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:766 +#, no-c-format msgid "Note that in this mapping, the collection-valued end of the associa= tion is responsible for updates to the foreign key. TODO: Does this really = result in some unnecessary update statements?" msgstr "" = -#: collection_mapping.xml:965(title) = +#. Tag: title +#: collection_mapping.xml:774 +#, no-c-format msgid "Ternary associations" msgstr "" = -#: collection_mapping.xml:967(para) = +#. Tag: para +#: collection_mapping.xml:776 +#, no-c-format msgid "There are three possible approaches to mapping a ternary associatio= n. One is to use a Map with an association as its index:" msgstr "" = -#: collection_mapping.xml:984(para) = +#. Tag: programlisting +#: collection_mapping.xml:781 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:783 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:785 +#, no-c-format msgid "A second approach is to simply remodel the association as an entity= class. This is the approach we use most commonly." msgstr "" = -#: collection_mapping.xml:989(para) = +#. Tag: para +#: collection_mapping.xml:790 +#, no-c-format msgid "A final alternative is to use composite elements, which we will dis= cuss later." msgstr "" = -#: collection_mapping.xml:996(literal) = +#. Tag: literal +#: collection_mapping.xml:797 +#, no-c-format msgid "Using an <idbag>" msgstr "" = -#: collection_mapping.xml:998(para) = +#. Tag: para +#: collection_mapping.xml:799 +#, no-c-format msgid "If you've fully embraced our view that composite keys are a bad thi= ng and that entities should have synthetic identifiers (surrogate keys), th= en you might find it a bit odd that the many to many associations and colle= ctions of values that we've shown so far all map to tables with composite k= eys! Now, this point is quite arguable; a pure association table doesn't se= em to benefit much from a surrogate key (though a collection of composite v= alues might). Nevertheless, Hibernate provides a featu= re that allows you to map many to many associations and collections of valu= es to a table with a surrogate key." msgstr "" = -#: collection_mapping.xml:1009(para) = +#. Tag: para +#: collection_mapping.xml:810 +#, no-c-format msgid "The <idbag> element lets you map a List (or Collection) with bag semantics." msgstr "" = -#: collection_mapping.xml:1022(para) = +#. Tag: programlisting +#: collection_mapping.xml:815 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:817 +#, no-c-format msgid "As you can see, an <idbag> has a synthetic= id generator, just like an entity class! A different surrogate key is assi= gned to each collection row. Hibernate does not provide any mechanism to di= scover the surrogate key value of a particular row, however." msgstr "" = -#: collection_mapping.xml:1029(para) = +#. Tag: para +#: collection_mapping.xml:824 +#, no-c-format msgid "Note that the update performance of an <idbag> is much better than a regular <bag>= ;! Hibernate can locate individual rows efficiently and update or= delete them individually, just like a list, map or set." msgstr "" = -#: collection_mapping.xml:1036(para) = +#. Tag: para +#: collection_mapping.xml:831 +#, no-c-format msgid "In the current implementation, the native identi= fier generation strategy is not supported for <idbag> collection identifiers." msgstr "" = -#: collection_mapping.xml:1060(title) = +#. Tag: title +#: collection_mapping.xml:855 +#, no-c-format msgid "Collection examples" msgstr "" = -#: collection_mapping.xml:1062(para) = +#. Tag: para +#: collection_mapping.xml:857 +#, no-c-format msgid "The previous sections are pretty confusing. So lets look at an exam= ple. This class:" msgstr "" = -#: collection_mapping.xml:1084(para) = +#. Tag: programlisting +#: collection_mapping.xml:862 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:864 +#, no-c-format msgid "has a collection of Child instances. If each chi= ld has at most one parent, the most natural mapping is a one-to-many associ= ation:" msgstr "" = -#: collection_mapping.xml:1111(para) = +#. Tag: programlisting +#: collection_mapping.xml:870 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:872 +#, no-c-format msgid "This maps to the following table definitions:" msgstr "" = -#: collection_mapping.xml:1119(para) = +#. Tag: programlisting +#: collection_mapping.xml:876 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:878 +#, no-c-format msgid "If the parent is required, use a bidirectional= one-to-many association:" msgstr "" = -#: collection_mapping.xml:1146(para) = +#. Tag: programlisting +#: collection_mapping.xml:883 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:885 +#, no-c-format msgid "Notice the NOT NULL constraint:" msgstr "" = -#: collection_mapping.xml:1157(para) = +#. Tag: programlisting +#: collection_mapping.xml:889 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:891 +#, no-c-format msgid "Alternatively, if you absolutely insist that this association shoul= d be unidirectional, you can declare the NOT NULL constr= aint on the <key> mapping:" msgstr "" = -#: collection_mapping.xml:1184(para) = +#. Tag: programlisting +#: collection_mapping.xml:897 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:899 +#, no-c-format msgid "On the other hand, if a child might have multiple parents, a many-t= o-many association is appropriate:" msgstr "" = -#: collection_mapping.xml:1210(para) = +#. Tag: programlisting +#: collection_mapping.xml:904 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " = \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:906 +#, no-c-format msgid "Table definitions:" msgstr "" = -#: collection_mapping.xml:1222(para) = +#. Tag: programlisting +#: collection_mapping.xml:910 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:912 +#, no-c-format msgid "For more examples and a complete walk-through a parent/child relati= onship mapping, see ." msgstr "" = -#: collection_mapping.xml:1227(para) = +#. Tag: para +#: collection_mapping.xml:917 +#, no-c-format msgid "Even more exotic association mappings are possible, we will catalog= all possibilities in the next chapter." msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: collection_mapping.xml:0(None) = -msgid "translator-credits" -msgstr "" - Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/comp= onent_mapping.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/component_= mapping.pot 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/component_= mapping.pot 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,164 +1,476 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:30-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: component_mapping.xml:5(title) = +#. Tag: title +#: component_mapping.xml:29 +#, no-c-format msgid "Component Mapping" msgstr "" = -#: component_mapping.xml:7(para) = +#. Tag: para +#: component_mapping.xml:31 +#, no-c-format msgid "The notion of a component is re-used in severa= l different contexts, for different purposes, throughout Hibernate." msgstr "" = -#: component_mapping.xml:13(title) = +#. Tag: title +#: component_mapping.xml:37 +#, no-c-format msgid "Dependent objects" msgstr "" = -#: component_mapping.xml:15(para) = +#. Tag: para +#: component_mapping.xml:39 +#, no-c-format msgid "A component is a contained object that is persisted as a value type= , not an entity reference. The term \"component\" refers to the object-orie= nted notion of composition (not to architecture-level components). For exam= ple, you might model a person like this:" msgstr "" = -#: component_mapping.xml:71(para) = +#. Tag: programlisting +#: component_mapping.xml:45 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: component_mapping.xml:47 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: component_mapping.xml:49 +#, no-c-format msgid "Now Name may be persisted as a component of Person. Notice that Name defines getter a= nd setter methods for its persistent properties, but doesn't need to declar= e any interfaces or identifier properties." msgstr "" = -#: component_mapping.xml:78(para) = +#. Tag: para +#: component_mapping.xml:56 +#, no-c-format msgid "Our Hibernate mapping would look like:" msgstr "" = -#: component_mapping.xml:94(para) = +#. Tag: programlisting +#: component_mapping.xml:60 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:62 +#, no-c-format msgid "The person table would have the columns pid, birthday, initial, first and last." msgstr "" = -#: component_mapping.xml:102(para) = +#. Tag: para +#: component_mapping.xml:70 +#, no-c-format msgid "Like all value types, components do not support shared references. = In other words, two persons could have the same name, but the two person ob= jects would contain two independent name ojects, only \"the same\" by value= . The null value semantics of a component are ad hoc. = When reloading the containing object, Hibernate will assume that if all com= ponent columns are null, then the entire component is null. This should be = okay for most purposes." msgstr "" = -#: component_mapping.xml:111(para) = +#. Tag: para +#: component_mapping.xml:79 +#, no-c-format msgid "The properties of a component may be of any Hibernate type (collect= ions, many-to-one associations, other components, etc). Nested components s= hould not be considered an exotic usage. Hibernate is = intended to support a very fine-grained object model." msgstr "" = -#: component_mapping.xml:118(para) = +#. Tag: para +#: component_mapping.xml:86 +#, no-c-format msgid "The <component> element allows a = <parent> subelement that maps a property of the component c= lass as a reference back to the containing entity." msgstr "" = -#: component_mapping.xml:140(title) = +#. Tag: programlisting +#: component_mapping.xml:92 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: component_mapping.xml:97 +#, no-c-format msgid "Collections of dependent objects" msgstr "" = -#: component_mapping.xml:142(para) = +#. Tag: para +#: component_mapping.xml:99 +#, no-c-format msgid "Collections of components are supported (eg. an array of type Name). Declare your component collection by replacing the <element> tag with a <composite-element&g= t; tag." msgstr "" = -#: component_mapping.xml:158(para) = +#. Tag: programlisting +#: component_mapping.xml:106 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:108 +#, no-c-format msgid "Note: if you define a Set of composite elements,= it is very important to implement equals() and hashCode() correctly." msgstr "" = -#: component_mapping.xml:164(para) = +#. Tag: para +#: component_mapping.xml:114 +#, no-c-format msgid "Composite elements may contain components but not collections. If y= our composite element itself contains components, use the <nest= ed-composite-element> tag. This is a pretty exotic case - a co= llection of components which themselves have components. By this stage you = should be asking yourself if a one-to-many association is more appropriate.= Try remodelling the composite element as an entity - but note that even th= ough the Java model is the same, the relational model and persistence seman= tics are still slightly different." msgstr "" = -#: component_mapping.xml:176(para) = +#. Tag: para +#: component_mapping.xml:126 +#, no-c-format msgid "Please note that a composite element mapping doesn't support null-a= ble properties if you're using a <set>. Hibernate = has to use each columns value to identify a record when deleting objects (t= here is no separate primary key column in the composite element table), whi= ch is not possible with null values. You have to either use only not-null p= roperties in a composite-element or choose a <list>, <map>, <bag> or <idbag>." msgstr "" = -#: component_mapping.xml:187(para) = +#. Tag: para +#: component_mapping.xml:137 +#, no-c-format msgid "A special case of a composite element is a composite element with a= nested <many-to-one> element. A mapping like this= allows you to map extra columns of a many-to-many association table to the= composite element class. The following is a many-to-many association from = Order to Item where purchase= Date, price and quantity ar= e properties of the association:" msgstr "" = -#: component_mapping.xml:210(para) = +#. Tag: programlisting +#: component_mapping.xml:147 +#, no-c-format +msgid "" + "\n" + " ....\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:149 +#, no-c-format msgid "Of course, there can't be a reference to the purchae on the other s= ide, for bidirectional association navigation. Remember that components are= value types and don't allow shared references. A single Purchase<= /literal> can be in the set of an Order, but it can't be= referenced by the Item at the same time." msgstr "" = -#: component_mapping.xml:218(para) = +#. Tag: para +#: component_mapping.xml:157 +#, no-c-format msgid "Even ternary (or quaternary, etc) associations are possible:" msgstr "" = -#: component_mapping.xml:231(para) = +#. Tag: programlisting +#: component_mapping.xml:159 +#, no-c-format +msgid "" + "\n" + " ....\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:161 +#, no-c-format msgid "Composite elements may appear in queries using the same syntax as a= ssociations to other entities." msgstr "" = -#: component_mapping.xml:239(title) = +#. Tag: title +#: component_mapping.xml:169 +#, no-c-format msgid "Components as Map indices" msgstr "" = -#: component_mapping.xml:241(para) = +#. Tag: para +#: component_mapping.xml:171 +#, no-c-format msgid "The <composite-map-key> element lets you m= ap a component class as the key of a Map. Make sure you = override hashCode() and equals() corr= ectly on the component class." msgstr "" = -#: component_mapping.xml:250(title) = +#. Tag: title +#: component_mapping.xml:180 +#, no-c-format msgid "Components as composite identifiers" msgstr "" = -#: component_mapping.xml:252(para) = +#. Tag: para +#: component_mapping.xml:182 +#, no-c-format msgid "You may use a component as an identifier of an entity class. Your c= omponent class must satisfy certain requirements:" msgstr "" = -#: component_mapping.xml:259(para) = +#. Tag: para +#: component_mapping.xml:189 +#, no-c-format msgid "It must implement java.io.Serializable." msgstr "" = -#: component_mapping.xml:264(para) = +#. Tag: para +#: component_mapping.xml:194 +#, no-c-format msgid "It must re-implement equals() and hashC= ode(), consistently with the database's notion of composite key e= quality." msgstr "" = -#: component_mapping.xml:273(emphasis) = +#. Tag: emphasis +#: component_mapping.xml:203 +#, no-c-format msgid "Note: in Hibernate3, the second requirement is not an absolutely ha= rd requirement of Hibernate. But do it anyway." msgstr "" = -#: component_mapping.xml:277(para) = +#. Tag: para +#: component_mapping.xml:207 +#, no-c-format msgid "You can't use an IdentifierGenerator to generate= composite keys. Instead the application must assign its own identifiers." msgstr "" = -#: component_mapping.xml:282(para) = +#. Tag: para +#: component_mapping.xml:212 +#, no-c-format msgid "Use the <composite-id> tag (with nested <key-property> elements) in place of the usual <id> declaration. For example, the OrderLine class has a primary key that depends upon the (composite) primary = key of Order." msgstr "" = -#: component_mapping.xml:309(para) = +#. Tag: programlisting +#: component_mapping.xml:220 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ....\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:222 +#, no-c-format msgid "Now, any foreign keys referencing the OrderLine = table are also composite. You must declare this in your mappings for other = classes. An association to OrderLine would be mapped lik= e this:" msgstr "" = -#: component_mapping.xml:322(para) = +#. Tag: programlisting +#: component_mapping.xml:228 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:230 +#, no-c-format msgid "(Note that the <column> tag is an alternat= ive to the column attribute everywhere.)" msgstr "" = -#: component_mapping.xml:327(para) = +#. Tag: para +#: component_mapping.xml:235 +#, no-c-format msgid "A many-to-many association to OrderLine= also uses the composite foreign key:" msgstr "" = -#: component_mapping.xml:341(para) = +#. Tag: programlisting +#: component_mapping.xml:240 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:242 +#, no-c-format msgid "The collection of OrderLines in Order would use:" msgstr "" = -#: component_mapping.xml:354(para) = +#. Tag: programlisting +#: component_mapping.xml:247 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:249 +#, no-c-format msgid "(The <one-to-many> element, as usual, decl= ares no columns.)" msgstr "" = -#: component_mapping.xml:358(para) = +#. Tag: para +#: component_mapping.xml:253 +#, no-c-format msgid "If OrderLine itself owns a collection, it also h= as a composite foreign key." msgstr "" = -#: component_mapping.xml:382(title) = +#. Tag: programlisting +#: component_mapping.xml:258 +#, no-c-format +msgid "" + "\n" + " ....\n" + " ....\n" + " \n" + " \n" + " \n" + "\n" + " \n" + " java:/comp/env/j= dbc/MyDB\n" + " org.hibernate.dialect.MySQLDia= lect\n" + " false\n" + " \n" + " org.hibernate.transaction.JTATransactionFactory\n" + " \n" + " java:comp/UserTran= saction\n" + "\n" + " \n" + " \n" + " = \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: configuration.xml:1351 +#, no-c-format msgid "As you can see, the advantage of this approach is the externalizati= on of the mapping file names to configuration. The hibernate.cfg.x= ml is also more convenient once you have to tune the Hibernate ca= che. Note that is your choice to use either hibernate.properties or hibernate.cfg.xml, both are equivalent, exce= pt for the above mentioned benefits of using the XML syntax." msgstr "" = -#: configuration.xml:1399(para) = +#. Tag: para +#: configuration.xml:1360 +#, no-c-format msgid "With the XML configuration, starting Hibernate is then as simple as" msgstr "" = -#: configuration.xml:1405(para) = +#. Tag: programlisting +#: configuration.xml:1364 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: configuration.xml:1366 +#, no-c-format msgid "You can pick a different XML configuration file using" msgstr "" = -#: configuration.xml:1416(title) = +#. Tag: programlisting +#: configuration.xml:1370 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: configuration.xml:1375 +#, no-c-format msgid "J2EE Application Server integration" msgstr "" = -#: configuration.xml:1418(para) = +#. Tag: para +#: configuration.xml:1377 +#, no-c-format msgid "Hibernate has the following integration points for J2EE infrastruct= ure:" msgstr "" = -#: configuration.xml:1424(para) = +#. Tag: para +#: configuration.xml:1383 +#, no-c-format msgid "Container-managed datasources: Hibernate can u= se JDBC connections managed by the container and provided through JNDI. Usu= ally, a JTA compatible TransactionManager and a ResourceManager take care of transaction management (CMT), esp. = distributed transaction handling across several datasources. You may of cou= rse also demarcate transaction boundaries programmatically (BMT) or you mig= ht want to use the optional Hibernate Transaction API fo= r this to keep your code portable." msgstr "" = -#: configuration.xml:1439(para) = +#. Tag: para +#: configuration.xml:1398 +#, no-c-format msgid "Automatic JNDI binding: Hibernate can bind its= SessionFactory to JNDI after startup." msgstr "" = -#: configuration.xml:1448(para) = +#. Tag: para +#: configuration.xml:1407 +#, no-c-format msgid "JTA Session binding: The Hibernate Se= ssion may be automatically bound to the scope of JTA transactions= . Simply lookup the SessionFactory from JNDI and get the= current Session. Let Hibernate take care of flushing an= d closing the Session when your JTA transaction complete= s. Transaction demarcation is either declarative (CMT) or programmatic (BMT= /UserTransaction)." msgstr "" = -#: configuration.xml:1461(para) = +#. Tag: para +#: configuration.xml:1420 +#, no-c-format msgid "JMX deployment: If you have a JMX capable appl= ication server (e.g. JBoss AS), you can chose to deploy Hibernate as a mana= ged MBean. This saves you the one line startup code to build your = SessionFactory from a Configuration. The conta= iner will startup your HibernateService, and ideally als= o take care of service dependencies (Datasource has to be available before = Hibernate starts, etc)." msgstr "" = -#: configuration.xml:1472(para) = +#. Tag: para +#: configuration.xml:1431 +#, no-c-format msgid "Depending on your environment, you might have to set the configurat= ion option hibernate.connection.aggressive_release to tr= ue if your application server shows \"connection containment\" exceptions." msgstr "" = -#: configuration.xml:1479(title) = +#. Tag: title +#: configuration.xml:1438 +#, no-c-format msgid "Transaction strategy configuration" msgstr "" = -#: configuration.xml:1481(para) = +#. Tag: para +#: configuration.xml:1440 +#, no-c-format msgid "The Hibernate Session API is independent of any = transaction demarcation system in your architecture. If you let Hibernate u= se JDBC directly, through a connection pool, you may begin and end your tra= nsactions by calling the JDBC API. If you run in a J2EE application server,= you might want to use bean-managed transactions and call the JTA API and <= literal>UserTransaction when needed." msgstr "" = -#: configuration.xml:1489(para) = +#. Tag: para +#: configuration.xml:1448 +#, no-c-format msgid "To keep your code portable between these two (and other) environmen= ts we recommend the optional Hibernate Transaction API, = which wraps and hides the underlying system. You have to specify a factory = class for Transaction instances by setting the Hibernate= configuration property hibernate.transaction.factory_class." msgstr "" = -#: configuration.xml:1496(para) = +#. Tag: para +#: configuration.xml:1455 +#, no-c-format msgid "There are three standard (built-in) choices:" msgstr "" = -#: configuration.xml:1502(literal) = +#. Tag: literal +#: configuration.xml:1461 +#, no-c-format msgid "org.hibernate.transaction.JDBCTransactionFactory" msgstr "" = -#: configuration.xml:1504(para) = +#. Tag: para +#: configuration.xml:1463 +#, no-c-format msgid "delegates to database (JDBC) transactions (default)" msgstr "" = -#: configuration.xml:1508(literal) = +#. Tag: literal +#: configuration.xml:1467 +#, no-c-format msgid "org.hibernate.transaction.JTATransactionFactory" msgstr "" = -#: configuration.xml:1510(para) = +#. Tag: para +#: configuration.xml:1469 +#, no-c-format msgid "delegates to container-managed transaction if an existing transacti= on is underway in this context (e.g. EJB session bean method), otherwise a = new transaction is started and bean-managed transaction are used." msgstr "" = -#: configuration.xml:1518(literal) = +#. Tag: literal +#: configuration.xml:1477 +#, no-c-format msgid "org.hibernate.transaction.CMTTransactionFactory" msgstr "" = -#: configuration.xml:1520(para) = +#. Tag: para +#: configuration.xml:1479 +#, no-c-format msgid "delegates to container-managed JTA transactions" msgstr "" = -#: configuration.xml:1525(para) = +#. Tag: para +#: configuration.xml:1484 +#, no-c-format msgid "You may also define your own transaction strategies (for a CORBA tr= ansaction service, for example)." msgstr "" = -#: configuration.xml:1530(para) = +#. Tag: para +#: configuration.xml:1489 +#, no-c-format msgid "Some features in Hibernate (i.e. the second level cache, Contextual= Sessions with JTA, etc.) require access to the JTA TransactionMan= ager in a managed environment. In an application server you have = to specify how Hibernate should obtain a reference to the Transact= ionManager, since J2EE does not standardize a single mechanism:" msgstr "" = -#: configuration.xml:1538(title) = +#. Tag: title +#: configuration.xml:1497 +#, no-c-format msgid "JTA TransactionManagers" msgstr "" = -#: configuration.xml:1544(entry) = +#. Tag: entry +#: configuration.xml:1503 +#, no-c-format msgid "Transaction Factory" msgstr "" = -#: configuration.xml:1545(entry) = +#. Tag: entry +#: configuration.xml:1504 +#, no-c-format msgid "Application Server" msgstr "" = -#: configuration.xml:1550(literal) = +#. Tag: literal +#: configuration.xml:1509 +#, no-c-format msgid "org.hibernate.transaction.JBossTransactionManagerLookup" msgstr "" = -#: configuration.xml:1551(entry) = +#. Tag: entry +#: configuration.xml:1510 +#, no-c-format msgid "JBoss" msgstr "" = -#: configuration.xml:1554(literal) = +#. Tag: literal +#: configuration.xml:1513 +#, no-c-format msgid "org.hibernate.transaction.WeblogicTransactionManagerLookup" msgstr "" = -#: configuration.xml:1555(entry) = +#. Tag: entry +#: configuration.xml:1514 +#, no-c-format msgid "Weblogic" msgstr "" = -#: configuration.xml:1558(literal) = +#. Tag: literal +#: configuration.xml:1517 +#, no-c-format msgid "org.hibernate.transaction.WebSphereTransactionManagerLookup" msgstr "" = -#: configuration.xml:1559(entry) = +#. Tag: entry +#: configuration.xml:1518 +#, no-c-format msgid "WebSphere" msgstr "" = -#: configuration.xml:1562(literal) = +#. Tag: literal +#: configuration.xml:1521 +#, no-c-format msgid "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup" msgstr "" = -#: configuration.xml:1563(entry) = +#. Tag: entry +#: configuration.xml:1522 +#, no-c-format msgid "WebSphere 6" msgstr "" = -#: configuration.xml:1566(literal) = +#. Tag: literal +#: configuration.xml:1525 +#, no-c-format msgid "org.hibernate.transaction.OrionTransactionManagerLookup" msgstr "" = -#: configuration.xml:1567(entry) = +#. Tag: entry +#: configuration.xml:1526 +#, no-c-format msgid "Orion" msgstr "" = -#: configuration.xml:1570(literal) = +#. Tag: literal +#: configuration.xml:1529 +#, no-c-format msgid "org.hibernate.transaction.ResinTransactionManagerLookup" msgstr "" = -#: configuration.xml:1571(entry) = +#. Tag: entry +#: configuration.xml:1530 +#, no-c-format msgid "Resin" msgstr "" = -#: configuration.xml:1574(literal) = +#. Tag: literal +#: configuration.xml:1533 +#, no-c-format msgid "org.hibernate.transaction.JOTMTransactionManagerLookup" msgstr "" = -#: configuration.xml:1575(entry) = +#. Tag: entry +#: configuration.xml:1534 +#, no-c-format msgid "JOTM" msgstr "" = -#: configuration.xml:1578(literal) = +#. Tag: literal +#: configuration.xml:1537 +#, no-c-format msgid "org.hibernate.transaction.JOnASTransactionManagerLookup" msgstr "" = -#: configuration.xml:1579(entry) = +#. Tag: entry +#: configuration.xml:1538 +#, no-c-format msgid "JOnAS" msgstr "" = -#: configuration.xml:1582(literal) = +#. Tag: literal +#: configuration.xml:1541 +#, no-c-format msgid "org.hibernate.transaction.JRun4TransactionManagerLookup" msgstr "" = -#: configuration.xml:1583(entry) = +#. Tag: entry +#: configuration.xml:1542 +#, no-c-format msgid "JRun4" msgstr "" = -#: configuration.xml:1586(literal) = +#. Tag: literal +#: configuration.xml:1545 +#, no-c-format msgid "org.hibernate.transaction.BESTransactionManagerLookup" msgstr "" = -#: configuration.xml:1587(entry) = +#. Tag: entry +#: configuration.xml:1546 +#, no-c-format msgid "Borland ES" msgstr "" = -#: configuration.xml:1596(title) = +#. Tag: title +#: configuration.xml:1555 +#, no-c-format msgid "JNDI-bound SessionFactory" msgstr "" = -#: configuration.xml:1598(para) = +#. Tag: para +#: configuration.xml:1557 +#, no-c-format msgid "A JNDI bound Hibernate SessionFactory can simpli= fy the lookup of the factory and the creation of new Sessions. Note that this is not related to a JNDI bound Datasource, both simply use the same registry!" msgstr "" = -#: configuration.xml:1605(para) = +#. Tag: para +#: configuration.xml:1564 +#, no-c-format msgid "If you wish to have the SessionFactory bound to = a JNDI namespace, specify a name (eg. java:hibernate/SessionFactor= y) using the property hibernate.session_factory_name. If this property is omitted, the SessionFactory = will not be bound to JNDI. (This is especially useful in environments with = a read-only JNDI default implementation, e.g. Tomcat.)" msgstr "" = -#: configuration.xml:1613(para) = +#. Tag: para +#: configuration.xml:1572 +#, no-c-format msgid "When binding the SessionFactory to JNDI, Hiberna= te will use the values of hibernate.jndi.url, h= ibernate.jndi.class to instantiate an initial context. If they ar= e not specified, the default InitialContext will be used= ." msgstr "" = -#: configuration.xml:1620(para) = +#. Tag: para +#: configuration.xml:1579 +#, no-c-format msgid "Hibernate will automatically place the SessionFactory in JNDI after you call cfg.buildSessionFactory(). = This means you will at least have this call in some startup code (or utilit= y class) in your application, unless you use JMX deployment with the HibernateService (discussed later)." msgstr "" = -#: configuration.xml:1627(para) = +#. Tag: para +#: configuration.xml:1586 +#, no-c-format msgid "If you use a JNDI SessionFactory, an EJB or any = other class may obtain the SessionFactory using a JNDI l= ookup." msgstr "" = -#: configuration.xml:1632(para) = +#. Tag: para +#: configuration.xml:1591 +#, no-c-format msgid "We recommend that you bind the SessionFactory to= JNDI in a managed environment and use a static singleto= n otherwise. To shield your application code from these details, we also re= commend to hide the actual lookup code for a SessionFactory in a helper class, such as HibernateUtil.getSessionFactory(). Note that such a class is also a convenient way to startup Hibern= ate—see chapter 1." msgstr "" = -#: configuration.xml:1644(title) = +#. Tag: title +#: configuration.xml:1603 +#, no-c-format msgid "Current Session context management with JTA" msgstr "" = -#: configuration.xml:1646(para) = -msgid "The easiest way to handle Sessions and transacti= ons is Hibernates automatic \"current\" Session manageme= nt. See the discussion of = current sessions. Using the \"jta\" session conte= xt, if there is no Hibernate Session associated with the= current JTA transaction, one will be started and associated with that JTA = transaction the first time you call sessionFactory.getCurrentSessi= on(). The Sessions retrieved via getC= urrentSession() in \"jta\" context will be set= to automatically flush before the transaction completes, close after the t= ransaction completes, and aggressively release JDBC connections after each = statement. This allows the Sessions to be managed by the= life cycle of the JTA transaction to which it is associated, keeping user = code clean of su! ch management concerns. Your code can either use JTA programmatically thro= ugh UserTransaction, or (recommended for portable code) = use the Hibernate Transaction API to set transaction bou= ndaries. If you run in an EJB container, declarative transaction demarcatio= n with CMT is preferred." +#. Tag: para +#: configuration.xml:1605 +#, no-c-format +msgid "The easiest way to handle Sessions and transacti= ons is Hibernates automatic \"current\" Session manageme= nt. See the discussion of = current sessions. Using the \"jta\" session conte= xt, if there is no Hibernate Session associated with the= current JTA transaction, one will be started and associated with that JTA = transaction the first time you call sessionFactory.getCurrentSessi= on(). The Sessions retrieved via getC= urrentSession() in \"jta\" context will be set= to automatically flush before the transaction completes, close after the t= ransaction completes, and aggressively release JDBC connections after each = statement. This allows the Sessions to be managed by the= life cycle of the JTA transaction to which it is associated, keeping user = code clean of su! ch management concerns. Your code can either use JTA programmatically thro= ugh UserTransaction, or (recommended for portable code) = use the Hibernate Transaction API to set transaction bou= ndaries. If you run in an EJB container, declarative transaction demarcatio= n with CMT is preferred." msgstr "" = -#: configuration.xml:1669(title) = +#. Tag: title +#: configuration.xml:1628 +#, no-c-format msgid "JMX deployment" msgstr "" = -#: configuration.xml:1671(para) = +#. Tag: para +#: configuration.xml:1630 +#, no-c-format msgid "The line cfg.buildSessionFactory() still has to = be executed somewhere to get a SessionFactory into JNDI.= You can do this either in a static initializer block (l= ike the one in HibernateUtil) or you deploy Hibernate as= a managed service." msgstr "" = -#: configuration.xml:1679(para) = +#. Tag: para +#: configuration.xml:1638 +#, no-c-format msgid "Hibernate is distributed with org.hibernate.jmx.HibernateS= ervice for deployment on an application server with JMX capabilit= ies, such as JBoss AS. The actual deployment and configuration is vendor sp= ecific. Here is an example jboss-service.xml for JBoss 4= .0.x:" msgstr "" = -#: configuration.xml:1729(para) = -msgid "This file is deployed in a directory called META-INF and packaged in a JAR file with the extension .sar = (service archive). You also need to package Hibernate, its required third-p= arty libraries, your compiled persistent classes, as well as your mapping f= iles in the same archive. Your enterprise beans (usually session beans) may= be kept in their own JAR file, but you may include this EJB JAR file in th= e main service archive to get a single (hot-)deployable unit. Consult the J= Boss AS documentation for more information about JMX service and EJB deploy= ment." +#. Tag: programlisting +#: configuration.xml:1645 +#, no-c-format +msgid "" + "\n" + "\n" + "\n" + "\n" + "\n" + " \n" + " jboss.jca:service=3DRARDeployer\n" + " jboss.jca:service=3DLocalTxCM,name=3DHsqlDS\= n" + "\n" + " \n" + " java:/hibernate/SessionFactory\n" + "\n" + " \n" + " java:HsqlDS\n" + " org.hibernate.dialect.HSQLDialect= \n" + "\n" + " \n" + " \n" + " org.hibernate.transaction.JTATransactionFactory= \n" + " \n" + " org.hibernate.transaction.JBossTransactionManagerLookup\n" + " true\n" + " true\= n" + "\n" + " \n" + " 5\n" + "\n" + " \n" + " true\= n" + " org.hibernate.cache.Eh= CacheProvider\n" + " true\n" + "\n" + " \n" + " true\n" + "\n" + " \n" + " auction/Item.hbm.xml,auction= /Category.hbm.xml\n" + "\n" + "\n" + "\n" + "]]>" msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: configuration.xml:0(None) = -msgid "translator-credits" +#. Tag: para +#: configuration.xml:1647 +#, no-c-format +msgid "This file is deployed in a directory called META-INF and packaged in a JAR file with the extension .sar = (service archive). You also need to package Hibernate, its required third-p= arty libraries, your compiled persistent classes, as well as your mapping f= iles in the same archive. Your enterprise beans (usually session beans) may= be kept in their own JAR file, but you may include this EJB JAR file in th= e main service archive to get a single (hot-)deployable unit. Consult the J= Boss AS documentation for more information about JMX service and EJB deploy= ment." msgstr "" = Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/even= ts.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/events.pot= 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/events.pot= 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,108 +1,311 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:31-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: events.xml:5(title) = +#. Tag: title +#: events.xml:29 +#, no-c-format msgid "Interceptors and events" msgstr "" = -#: events.xml:7(para) = +#. Tag: para +#: events.xml:31 +#, no-c-format msgid "It is often useful for the application to react to certain events t= hat occur inside Hibernate. This allows implementation of certain kinds of = generic functionality, and extension of Hibernate functionality." msgstr "" = -#: events.xml:14(title) = +#. Tag: title +#: events.xml:38 +#, no-c-format msgid "Interceptors" msgstr "" = -#: events.xml:16(para) = +#. Tag: para +#: events.xml:40 +#, no-c-format msgid "The Interceptor interface provides callbacks fro= m the session to the application allowing the application to inspect and/or= manipulate properties of a persistent object before it is saved, updated, = deleted or loaded. One possible use for this is to track auditing informati= on. For example, the following Interceptor automatically= sets the createTimestamp when an Auditable is created and updates the lastUpdateTimestamp pr= operty when an Auditable is updated." msgstr "" = -#: events.xml:27(para) = +#. Tag: para +#: events.xml:51 +#, no-c-format msgid "You may either implement Interceptor directly or= (better) extend EmptyInterceptor." msgstr "" = -#: events.xml:115(para) = +#. Tag: programlisting +#: events.xml:56 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: events.xml:58 +#, no-c-format msgid "Interceptors come in two flavors: Session-scoped= and SessionFactory-scoped." msgstr "" = -#: events.xml:120(para) = +#. Tag: para +#: events.xml:63 +#, no-c-format msgid "A Session-scoped interceptor is specified when a= session is opened using one of the overloaded SessionFactory.openSession()= methods accepting an Interceptor." msgstr "" = -#: events.xml:128(para) = +#. Tag: programlisting +#: events.xml:69 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: events.xml:71 +#, no-c-format msgid "A SessionFactory-scoped interceptor is registere= d with the Configuration object prior to building the SessionFactory. In this case, the supplied interceptor wil= l be applied to all sessions opened from that SessionFactory; this is true unless a session is opened explicitly specifying the int= erceptor to use. SessionFactory-scoped interceptors must= be thread safe, taking care to not store session-specific state since mult= iple sessions will use this interceptor (potentially) concurrently." msgstr "" = -#: events.xml:142(title) = +#. Tag: programlisting +#: events.xml:80 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: title +#: events.xml:85 +#, no-c-format msgid "Event system" msgstr "" = -#: events.xml:144(para) = +#. Tag: para +#: events.xml:87 +#, no-c-format msgid "If you have to react to particular events in your persistence layer= , you may also use the Hibernate3 event architecture. = The event system can be used in addition or as a replacement for intercepto= rs." msgstr "" = -#: events.xml:150(para) = +#. Tag: para +#: events.xml:93 +#, no-c-format msgid "Essentially all of the methods of the Session in= terface correlate to an event. You have a LoadEvent, a <= literal>FlushEvent, etc (consult the XML configuration-file DTD o= r the org.hibernate.event package for the full list of d= efined event types). When a request is made of one of these methods, the Hi= bernate Session generates an appropriate event and passe= s it to the configured event listeners for that type. Out-of-the-box, these= listeners implement the same processing in which those methods always resu= lted. However, you are free to implement a customization of one of the list= ener interfaces (i.e., the LoadEvent is processed by the= registered implemenation of the LoadEventListener inter= face), in which case their implementation would be responsible for processi= ng any load() requests made of the Session." msgstr "" = -#: events.xml:165(para) = +#. Tag: para +#: events.xml:108 +#, no-c-format msgid "The listeners should be considered effectively singletons; meaning,= they are shared between requests, and thus should not save any state as in= stance variables." msgstr "" = -#: events.xml:170(para) = +#. Tag: para +#: events.xml:113 +#, no-c-format msgid "A custom listener should implement the appropriate interface for th= e event it wants to process and/or extend one of the convenience base class= es (or even the default event listeners used by Hibernate out-of-the-box as= these are declared non-final for this purpose). Custom listeners can eithe= r be registered programmatically through the Configuration object, or specified in the Hibernate configuration XML (declarative con= figuration through the properties file is not supported). Here's an example= of a custom load event listener:" msgstr "" = -#: events.xml:190(para) = +#. Tag: programlisting +#: events.xml:123 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: events.xml:125 +#, no-c-format msgid "You also need a configuration entry telling Hibernate to use the li= stener in addition to the default listener:" msgstr "" = -#: events.xml:205(para) = +#. Tag: programlisting +#: events.xml:130 +#, no-c-format +msgid "" + "\n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: events.xml:132 +#, no-c-format msgid "Instead, you may register it programmatically:" msgstr "" = -#: events.xml:213(para) = +#. Tag: programlisting +#: events.xml:136 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: events.xml:138 +#, no-c-format msgid "Listeners registered declaratively cannot share instances. If the s= ame class name is used in multiple <listener/> ele= ments, each reference will result in a separate instance of that class. If = you need the capability to share listener instances between listener types = you must use the programmatic registration approach." msgstr "" = -#: events.xml:221(para) = +#. Tag: para +#: events.xml:146 +#, no-c-format msgid "Why implement an interface and define the specific type during conf= iguration? Well, a listener implementation could implement multiple event l= istener interfaces. Having the type additionally defined during registratio= n makes it easier to turn custom listeners on or off during configuration." msgstr "" = -#: events.xml:231(title) = +#. Tag: title +#: events.xml:156 +#, no-c-format msgid "Hibernate declarative security" msgstr "" = -#: events.xml:232(para) = +#. Tag: para +#: events.xml:157 +#, no-c-format msgid "Usually, declarative security in Hibernate applications is managed = in a session facade layer. Now, Hibernate3 allows certain actions to be per= missioned via JACC, and authorized via JAAS. This is optional functionality= built on top of the event architecture." msgstr "" = -#: events.xml:238(para) = +#. Tag: para +#: events.xml:163 +#, no-c-format msgid "First, you must configure the appropriate event listeners, to enabl= e the use of JAAS authorization." msgstr "" = -#: events.xml:248(para) = +#. Tag: programlisting +#: events.xml:168 +#, no-c-format +msgid "" + "\n" + "\n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: events.xml:170 +#, no-c-format msgid "Note that <listener type=3D\"...\" class=3D\"...\"/>= is just a shorthand for <event type=3D\"...\"><= ;listener class=3D\"...\"/></event> when there is exactl= y one listener for a particular event type." msgstr "" = -#: events.xml:254(para) = +#. Tag: para +#: events.xml:176 +#, no-c-format msgid "Next, still in hibernate.cfg.xml, bind the permi= ssions to roles:" msgstr "" = -#: events.xml:261(para) = -msgid "The role names are the roles understood by your JACC provider." +#. Tag: programlisting +#: events.xml:180 +#, no-c-format +msgid "" + "\n" + "]]>" msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: events.xml:0(None) = -msgid "translator-credits" +#. Tag: para +#: events.xml:182 +#, no-c-format +msgid "The role names are the roles understood by your JACC provider." msgstr "" = Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/exam= ple_mappings.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/example_ma= ppings.pot 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/example_ma= ppings.pot 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,122 +1,723 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:31-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#. When image changes, this message will be marked fuzzy or untranslated f= or you. -#. It doesn't matter what you translate it to: it's not used at all. -#: example_mappings.xml:39(None) example_mappings.xml:42(None) = -msgid "@@image: '../images/EmployerEmployee.png'; md5=3D51e3da273e772b7def= c753746eb5223f" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated f= or you. -#. It doesn't matter what you translate it to: it's not used at all. -#: example_mappings.xml:153(None) example_mappings.xml:156(None) = -msgid "@@image: '../images/AuthorWork.png'; md5=3Dfdbc5f105890c04d206674e7= df6af6cf" -msgstr "" - -#. When image changes, this message will be marked fuzzy or untranslated f= or you. -#. It doesn't matter what you translate it to: it's not used at all. -#: example_mappings.xml:277(None) example_mappings.xml:280(None) = -msgid "@@image: '../images/CustomerOrderProduct.png'; md5=3D39dcb639a19768= 4dc020904a3f9a4b3d" -msgstr "" - -#: example_mappings.xml:20(title) = +#. Tag: title +#: example_mappings.xml:29 +#, no-c-format msgid "Example: Various Mappings" msgstr "" = -#: example_mappings.xml:22(para) = +#. Tag: para +#: example_mappings.xml:31 +#, no-c-format msgid "This chapters shows off some more complex association mappings." msgstr "" = -#: example_mappings.xml:27(title) = +#. Tag: title +#: example_mappings.xml:36 +#, no-c-format msgid "Employer/Employee" msgstr "" = -#: example_mappings.xml:29(para) = +#. Tag: para +#: example_mappings.xml:38 +#, no-c-format msgid "The following model of the relationship between Employer and Employee uses an actual entity class (Employment) to represent the association. This is done becaus= e there might be more than one period of employment for the same two partie= s. Components are used to model monetary values and employee names." msgstr "" = -#: example_mappings.xml:46(para) = +#. Tag: para +#: example_mappings.xml:55 +#, no-c-format msgid "Heres a possible mapping document:" msgstr "" = -#: example_mappings.xml:99(para) = +#. Tag: programlisting +#: example_mappings.xml:59 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " employer_id_seq\= n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + " employment_id_seq\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " employee_id_seq\= n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:61 +#, no-c-format msgid "And heres the table schema generated by SchemaExport." msgstr "" = -#: example_mappings.xml:140(title) = +#. Tag: programlisting +#: example_mappings.xml:65 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: example_mappings.xml:70 +#, no-c-format msgid "Author/Work" msgstr "" = -#: example_mappings.xml:142(para) = +#. Tag: para +#: example_mappings.xml:72 +#, no-c-format msgid "Consider the following model of the relationships between = Work, Author and Person. We= represent the relationship between Work and Au= thor as a many-to-many association. We choose to represent the re= lationship between Author and Person = as one-to-one association. Another possibility would be to have Au= thor extend Person." msgstr "" = -#: example_mappings.xml:160(para) = +#. Tag: para +#: example_mappings.xml:90 +#, no-c-format msgid "The following mapping document correctly represents these relations= hips:" msgstr "" = -#: example_mappings.xml:216(para) = +#. Tag: programlisting +#: example_mappings.xml:94 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:96 +#, no-c-format msgid "There are four tables in this mapping. works, authors and persons hold work, author a= nd person data respectively. author_work is an associati= on table linking authors to works. Heres the table schema, as generated by = SchemaExport." msgstr "" = -#: example_mappings.xml:262(title) = +#. Tag: programlisting +#: example_mappings.xml:104 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: example_mappings.xml:109 +#, no-c-format msgid "Customer/Order/Product" msgstr "" = -#: example_mappings.xml:264(para) = +#. Tag: para +#: example_mappings.xml:111 +#, no-c-format msgid "Now consider a model of the relationships between Customer= , Order and LineItem and Product. There is a one-to-many association between Customer and Order, but how should we repre= sent Order / LineItem / Prod= uct? I've chosen to map LineItem as an associa= tion class representing the many-to-many association between Order= and Product. In Hibernate, this is called a c= omposite element." msgstr "" = -#: example_mappings.xml:284(para) = +#. Tag: para +#: example_mappings.xml:131 +#, no-c-format msgid "The mapping document:" msgstr "" = -#: example_mappings.xml:326(para) = +#. Tag: programlisting +#: example_mappings.xml:135 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " = \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:137 +#, no-c-format msgid "customers, orders, l= ine_items and products hold customer, order, o= rder line item and product data respectively. line_items= also acts as an association table linking orders with products." msgstr "" = -#: example_mappings.xml:370(title) = +#. Tag: programlisting +#: example_mappings.xml:144 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: example_mappings.xml:149 +#, no-c-format msgid "Miscellaneous example mappings" msgstr "" = -#: example_mappings.xml:372(para) = +#. Tag: para +#: example_mappings.xml:151 +#, no-c-format msgid "These examples are all taken from the Hibernate test suite. You wil= l find many other useful example mappings there. Look in the test<= /literal> folder of the Hibernate distribution." msgstr "" = -#: example_mappings.xml:378(para) = +#. Tag: para +#: example_mappings.xml:157 +#, no-c-format msgid "TODO: put words around this stuff" msgstr "" = -#: example_mappings.xml:381(title) = +#. Tag: title +#: example_mappings.xml:160 +#, no-c-format msgid "\"Typed\" one-to-one association" msgstr "" = -#: example_mappings.xml:411(title) = +#. Tag: programlisting +#: example_mappings.xml:161 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " name\n" + " 'HOME'\n" + " \n" + " \n" + " name\n" + " 'MAILING'\n" + " \n" + "\n" + "\n" + "= \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:165 +#, no-c-format msgid "Composite key example" msgstr "" = -#: example_mappings.xml:528(title) = +#. Tag: programlisting +#: example_mappings.xml:166 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + "\= n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ( select sum(li.quantity*p.price) \n" + " from LineItem li, Product p \n" + " where li.productId =3D p.productId \n" + " and li.customerId =3D customerId \n" + " and li.orderNumber =3D orderNumber )\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ( select sum(li.quantity) \n" + " from LineItem li \n" + " where li.productId =3D productId )\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:170 +#, no-c-format msgid "Many-to-many with shared composite key attribute" msgstr "" = -#: example_mappings.xml:567(title) = +#. Tag: programlisting +#: example_mappings.xml:171 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " org\n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " = \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " org\n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:175 +#, no-c-format msgid "Content based discrimination" msgstr "" = -#: example_mappings.xml:621(title) = +#. Tag: programlisting +#: example_mappings.xml:176 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " case \n" + " when title is not null then 'E' \n" + " when salesperson is not null then 'C' \n" + " else 'P' \n" + " end\n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:180 +#, no-c-format msgid "Associations on alternate keys" msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: example_mappings.xml:0(None) = -msgid "translator-credits" +#. Tag: programlisting +#: example_mappings.xml:181 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" msgstr "" = Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/exam= ple_parentchild.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/example_pa= rentchild.pot 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/example_pa= rentchild.pot 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,168 +1,397 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:31-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: example_parentchild.xml:5(title) = +#. Tag: title +#: example_parentchild.xml:29 +#, no-c-format msgid "Example: Parent/Child" msgstr "" = -#: example_parentchild.xml:7(para) = +#. Tag: para +#: example_parentchild.xml:31 +#, no-c-format msgid "One of the very first things that new users try to do with Hibernat= e is to model a parent / child type relationship. There are two different a= pproaches to this. For various reasons the most convenient approach, especi= ally for new users, is to model both Parent and Child as entity classes with a <one-to-many> association from Parent to Child. (The alternative approach is to declare the Child as = a <composite-element>.) Now, it turns out that def= ault semantics of a one to many association (in Hibernate) are much less cl= ose to the usual semantics of a parent / child relationship than those of a= composite element mapping. We will explain how to use a bidirect= ional one to many association with cascades to model a parent / = child relationship efficiently and elegantly. It's not at all difficult!" msgstr "" = -#: example_parentchild.xml:21(title) = +#. Tag: title +#: example_parentchild.xml:45 +#, no-c-format msgid "A note about collections" msgstr "" = -#: example_parentchild.xml:23(para) = +#. Tag: para +#: example_parentchild.xml:47 +#, no-c-format msgid "Hibernate collections are considered to be a logical part of their = owning entity; never of the contained entities. This is a crucial distincti= on! It has the following consequences:" msgstr "" = -#: example_parentchild.xml:30(para) = +#. Tag: para +#: example_parentchild.xml:54 +#, no-c-format msgid "When we remove / add an object from / to a collection, the version = number of the collection owner is incremented." msgstr "" = -#: example_parentchild.xml:36(para) = +#. Tag: para +#: example_parentchild.xml:60 +#, no-c-format msgid "If an object that was removed from a collection is an instance of a= value type (eg, a composite element), that object will cease to be persist= ent and its state will be completely removed from the database. Likewise, a= dding a value type instance to the collection will cause its state to be im= mediately persistent." msgstr "" = -#: example_parentchild.xml:44(para) = +#. Tag: para +#: example_parentchild.xml:68 +#, no-c-format msgid "On the other hand, if an entity is removed from a collection (a one= -to-many or many-to-many association), it will not be deleted, by default. = This behaviour is completely consistent - a change to the internal state of= another entity should not cause the associated entity to vanish! Likewise,= adding an entity to a collection does not cause that entity to become pers= istent, by default." msgstr "" = -#: example_parentchild.xml:54(para) = +#. Tag: para +#: example_parentchild.xml:78 +#, no-c-format msgid "Instead, the default behaviour is that adding an entity to a collec= tion merely creates a link between the two entities, while removing it remo= ves the link. This is very appropriate for all sorts of cases. Where it is = not appropriate at all is the case of a parent / child relationship, where = the life of the child is bound to the life cycle of the parent." msgstr "" = -#: example_parentchild.xml:64(title) = +#. Tag: title +#: example_parentchild.xml:88 +#, no-c-format msgid "Bidirectional one-to-many" msgstr "" = -#: example_parentchild.xml:66(para) = +#. Tag: para +#: example_parentchild.xml:90 +#, no-c-format msgid "Suppose we start with a simple <one-to-many> association from Parent to Child." msgstr "" = -#: example_parentchild.xml:76(para) = +#. Tag: programlisting +#: example_parentchild.xml:95 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:97 +#, no-c-format msgid "If we were to execute the following code" msgstr "" = -#: example_parentchild.xml:86(para) = +#. Tag: programlisting +#: example_parentchild.xml:101 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:103 +#, no-c-format msgid "Hibernate would issue two SQL statements:" msgstr "" = -#: example_parentchild.xml:92(para) = +#. Tag: para +#: example_parentchild.xml:109 +#, no-c-format msgid "an INSERT to create the record for c" msgstr "" = -#: example_parentchild.xml:95(para) = +#. Tag: para +#: example_parentchild.xml:112 +#, no-c-format msgid "an UPDATE to create the link from p to c" msgstr "" = -#: example_parentchild.xml:102(para) = +#. Tag: para +#: example_parentchild.xml:119 +#, no-c-format msgid "This is not only inefficient, but also violates any NOT NU= LL constraint on the parent_id column. We can = fix the nullability constraint violation by specifying not-null=3D= \"true\" in the collection mapping:" msgstr "" = -#: example_parentchild.xml:113(para) = +#. Tag: programlisting +#: example_parentchild.xml:125 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:127 +#, no-c-format msgid "However, this is not the recommended solution." msgstr "" = -#: example_parentchild.xml:116(para) = +#. Tag: para +#: example_parentchild.xml:130 +#, no-c-format msgid "The underlying cause of this behaviour is that the link (the foreig= n key parent_id) from p to c= is not considered part of the state of the Child object and is therefore not created in the INSERT. S= o the solution is to make the link part of the Child map= ping." msgstr "" = -#: example_parentchild.xml:125(para) = +#. Tag: programlisting +#: example_parentchild.xml:137 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:139 +#, no-c-format msgid "(We also need to add the parent property to the = Child class.)" msgstr "" = -#: example_parentchild.xml:129(para) = +#. Tag: para +#: example_parentchild.xml:143 +#, no-c-format msgid "Now that the Child entity is managing the state = of the link, we tell the collection not to update the link. We use the inverse attribute." msgstr "" = -#: example_parentchild.xml:139(para) = +#. Tag: programlisting +#: example_parentchild.xml:148 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:150 +#, no-c-format msgid "The following code would be used to add a new Child" msgstr "" = -#: example_parentchild.xml:150(para) = +#. Tag: programlisting +#: example_parentchild.xml:154 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:156 +#, no-c-format msgid "And now, only one SQL INSERT would be issued!" msgstr "" = -#: example_parentchild.xml:154(para) = +#. Tag: para +#: example_parentchild.xml:160 +#, no-c-format msgid "To tighten things up a bit, we could create an addChild()<= /literal> method of Parent." msgstr "" = -#: example_parentchild.xml:164(para) = +#. Tag: programlisting +#: example_parentchild.xml:165 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:167 +#, no-c-format msgid "Now, the code to add a Child looks like" msgstr "" = -#: example_parentchild.xml:177(title) = +#. Tag: programlisting +#: example_parentchild.xml:171 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: example_parentchild.xml:176 +#, no-c-format msgid "Cascading life cycle" msgstr "" = -#: example_parentchild.xml:179(para) = +#. Tag: para +#: example_parentchild.xml:178 +#, no-c-format msgid "The explicit call to save() is still annoying. W= e will address this by using cascades." msgstr "" = -#: example_parentchild.xml:189(para) = +#. Tag: programlisting +#: example_parentchild.xml:183 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:185 +#, no-c-format msgid "This simplifies the code above to" msgstr "" = -#: example_parentchild.xml:198(para) = +#. Tag: programlisting +#: example_parentchild.xml:189 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:191 +#, no-c-format msgid "Similarly, we don't need to iterate over the children when saving o= r deleting a Parent. The following removes p and all its children from the database." msgstr "" = -#: example_parentchild.xml:207(para) = +#. Tag: programlisting +#: example_parentchild.xml:196 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:198 +#, no-c-format msgid "However, this code" msgstr "" = -#: example_parentchild.xml:217(para) = +#. Tag: programlisting +#: example_parentchild.xml:202 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:204 +#, no-c-format msgid "will not remove c from the database; it will ony= remove the link to p (and cause a NOT NULL constraint violation, in this case). You need to explicitly delete() the Child." msgstr "" = -#: example_parentchild.xml:229(para) = +#. Tag: programlisting +#: example_parentchild.xml:210 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:212 +#, no-c-format msgid "Now, in our case, a Child can't really exist wit= hout its parent. So if we remove a Child from the collec= tion, we really do want it to be deleted. For this, we must use ca= scade=3D\"all-delete-orphan\"." msgstr "" = -#: example_parentchild.xml:240(para) = +#. Tag: programlisting +#: example_parentchild.xml:218 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:220 +#, no-c-format msgid "Note: even though the collection mapping specifies inverse= =3D\"true\", cascades are still processed by iterating the collec= tion elements. So if you require that an object be saved, deleted or update= d by cascade, you must add it to the collection. It is not enough to simply= call setParent()." msgstr "" = -#: example_parentchild.xml:250(title) = +#. Tag: title +#: example_parentchild.xml:230 +#, no-c-format msgid "Cascades and unsaved-value" msgstr "" = -#: example_parentchild.xml:252(para) = +#. Tag: para +#: example_parentchild.xml:232 +#, no-c-format msgid "Suppose we loaded up a Parent in one Se= ssion, made some changes in a UI action and wish to persist these= changes in a new session by calling update(). The Parent will contain a collection of childen and, since cascad= ing update is enabled, Hibernate needs to know which children are newly ins= tantiated and which represent existing rows in the database. Lets assume th= at both Parent and Child have genener= ated identifier properties of type Long. Hibernate will = use the identifier and version/timestamp property value to determine which = of the children are new. (See .) In Hibernate3, it is no longer necessary to specify an unsaved-value explicitly." msgstr "" = -#: example_parentchild.xml:264(para) = +#. Tag: para +#: example_parentchild.xml:244 +#, no-c-format msgid "The following code will update parent and child and insert newChild." msgstr "" = -#: example_parentchild.xml:276(para) = +#. Tag: programlisting +#: example_parentchild.xml:249 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:251 +#, no-c-format msgid "Well, that's all very well for the case of a generated identifier, = but what about assigned identifiers and composite identifiers? This is more= difficult, since Hibernate can't use the identifier property to distinguis= h between a newly instantiated object (with an identifier assigned by the u= ser) and an object loaded in a previous session. In this case, Hibernate wi= ll either use the timestamp or version property, or will actually query the= second-level cache or, worst case, the database, to see if the row exists." msgstr "" = -#: example_parentchild.xml:348(title) = +#. Tag: title +#: example_parentchild.xml:284 +#, no-c-format msgid "Conclusion" msgstr "" = -#: example_parentchild.xml:350(para) = +#. Tag: para +#: example_parentchild.xml:286 +#, no-c-format msgid "There is quite a bit to digest here and it might look confusing fir= st time around. However, in practice, it all works out very nicely. Most Hi= bernate applications use the parent / child pattern in many places." msgstr "" = -#: example_parentchild.xml:355(para) = +#. Tag: para +#: example_parentchild.xml:291 +#, no-c-format msgid "We mentioned an alternative in the first paragraph. None of the abo= ve issues exist in the case of <composite-element>= mappings, which have exactly the semantics of a parent / child relationshi= p. Unfortunately, there are two big limitations to composite element classe= s: composite elements may not own collections, and they should not be the c= hild of any entity other than the unique parent." msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: example_parentchild.xml:0(None) = -msgid "translator-credits" -msgstr "" - Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/exam= ple_weblog.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/example_we= blog.pot 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/example_we= blog.pot 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,44 +1,478 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:32-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: example_weblog.xml:5(title) = +#. Tag: title +#: example_weblog.xml:29 +#, no-c-format msgid "Example: Weblog Application" msgstr "" = -#: example_weblog.xml:8(title) = +#. Tag: title +#: example_weblog.xml:32 +#, no-c-format msgid "Persistent Classes" msgstr "" = -#: example_weblog.xml:10(para) = +#. Tag: para +#: example_weblog.xml:34 +#, no-c-format msgid "The persistent classes represent a weblog, and an item posted in a = weblog. They are to be modelled as a standard parent/child relationship, bu= t we will use an ordered bag, instead of a set." msgstr "" = -#: example_weblog.xml:92(title) = +#. Tag: programlisting +#: example_weblog.xml:40 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: example_weblog.xml:42 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: example_weblog.xml:47 +#, no-c-format msgid "Hibernate Mappings" msgstr "" = -#: example_weblog.xml:94(para) = +#. Tag: para +#: example_weblog.xml:49 +#, no-c-format msgid "The XML mappings should now be quite straightforward." msgstr "" = -#: example_weblog.xml:185(title) = +#. Tag: programlisting +#: example_weblog.xml:53 +#, no-c-format +msgid "" + "\n" + "= \n" + "\n" + "\n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: example_weblog.xml:55 +#, no-c-format +msgid "" + "\n" + "= \n" + "\n" + "\n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: title +#: example_weblog.xml:60 +#, no-c-format msgid "Hibernate Code" msgstr "" = -#: example_weblog.xml:187(para) = +#. Tag: para +#: example_weblog.xml:62 +#, no-c-format msgid "The following class demonstrates some of the kinds of things we can= do with these classes, using Hibernate." msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: example_weblog.xml:0(None) = -msgid "translator-credits" +#. Tag: programlisting +#: example_weblog.xml:67 +#, no-c-format +msgid "" + " :minDate\"\n" + " );\n" + "\n" + " Calendar cal =3D Calendar.getInstance();\n" + " cal.roll(Calendar.MONTH, false);\n" + " q.setCalendar(\"minDate\", cal);\n" + " \n" + " result =3D q.list();\n" + " tx.commit();\n" + " }\n" + " catch (HibernateException he) {\n" + " if (tx!=3Dnull) tx.rollback();\n" + " throw he;\n" + " }\n" + " finally {\n" + " session.close();\n" + " }\n" + " return result;\n" + " }\n" + "}]]>" msgstr "" = Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/filt= ers.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/filters.po= t 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/filters.po= t 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,80 +1,199 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:32-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: filters.xml:5(title) = +#. Tag: title +#: filters.xml:29 +#, no-c-format msgid "Filtering data" msgstr "" = -#: filters.xml:7(para) = +#. Tag: para +#: filters.xml:31 +#, no-c-format msgid "Hibernate3 provides an innovative new approach to handling data wit= h \"visibility\" rules. A Hibernate filter is a global= , named, parameterized filter that may be enabled or disabled for a particu= lar Hibernate session." msgstr "" = -#: filters.xml:14(title) = +#. Tag: title +#: filters.xml:38 +#, no-c-format msgid "Hibernate filters" msgstr "" = -#: filters.xml:16(para) = +#. Tag: para +#: filters.xml:40 +#, no-c-format msgid "Hibernate3 adds the ability to pre-define filter criteria and attac= h those filters at both a class and a collection level. A filter criteria i= s the ability to define a restriction clause very similiar to the existing = \"where\" attribute available on the class and various collection elements.= Except these filter conditions can be parameterized. The application can t= hen make the decision at runtime whether given filters should be enabled an= d what their parameter values should be. Filters can be used like database = views, but parameterized inside the application." msgstr "" = -#: filters.xml:26(para) = +#. Tag: para +#: filters.xml:50 +#, no-c-format msgid "In order to use filters, they must first be defined and then attach= ed to the appropriate mapping elements. To define a filter, use the <filter-def/> element within a <hibernate-map= ping/> element:" msgstr "" = -#: filters.xml:36(para) = +#. Tag: programlisting +#: filters.xml:56 +#, no-c-format +msgid "" + "\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: filters.xml:58 +#, no-c-format msgid "Then, this filter can be attached to a class:" msgstr "" = -#: filters.xml:45(para) = +#. Tag: programlisting +#: filters.xml:62 +#, no-c-format +msgid "" + "\n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: filters.xml:64 +#, no-c-format msgid "or, to a collection:" msgstr "" = -#: filters.xml:53(para) = +#. Tag: programlisting +#: filters.xml:68 +#, no-c-format +msgid "" + "\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: filters.xml:70 +#, no-c-format msgid "or, even to both (or multiples of each) at the same time." msgstr "" = -#: filters.xml:57(para) = +#. Tag: para +#: filters.xml:74 +#, no-c-format msgid "The methods on Session are: enableFilte= r(String filterName), getEnabledFilter(String filterName= ), and disableFilter(String filterName). By de= fault, filters are not enabled for a given session; th= ey must be explcitly enabled through use of the Session.enableFilt= er() method, which returns an instance of the Filter interface. Using the simple filter defined above, this would look li= ke:" msgstr "" = -#: filters.xml:68(para) = +#. Tag: programlisting +#: filters.xml:83 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: filters.xml:85 +#, no-c-format msgid "Note that methods on the org.hibernate.Filter interface do allow th= e method-chaining common to much of Hibernate." msgstr "" = -#: filters.xml:72(para) = +#. Tag: para +#: filters.xml:89 +#, no-c-format msgid "A full example, using temporal data with an effective record date p= attern:" msgstr "" = -#: filters.xml:104(para) = +#. Tag: programlisting +#: filters.xml:93 +#, no-c-format +msgid "" + "\n" + " \n" + "\n" + "\n" + "\n" + "...\n" + " \n" + " \n" + " \n" + "...\n" + " \n" + " \n" + "\n" + "\n" + "\n" + "...\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: filters.xml:95 +#, no-c-format msgid "Then, in order to ensure that you always get back currently effecti= ve records, simply enable the filter on the session prior to retrieving emp= loyee data:" msgstr "" = -#: filters.xml:116(para) = +#. Tag: programlisting +#: filters.xml:100 +#, no-c-format +msgid "" + " :targetSalary\")\n" + " .setLong(\"targetSalary\", new Long(1000000))\n" + " .list();\n" + "]]>" +msgstr "" + +#. Tag: para +#: filters.xml:102 +#, no-c-format msgid "In the HQL above, even though we only explicitly mentioned a salary= constraint on the results, because of the enabled filter the query will re= turn only currently active employees who have a salary greater than a milli= on dollars." msgstr "" = -#: filters.xml:122(para) = +#. Tag: para +#: filters.xml:108 +#, no-c-format msgid "Note: if you plan on using filters with outer joining (either throu= gh HQL or load fetching) be careful of the direction of the condition expre= ssion. Its safest to set this up for left outer joining; in general, place = the parameter first followed by the column name(s) after the operator." msgstr "" = -#: filters.xml:129(para) = +#. Tag: para +#: filters.xml:115 +#, no-c-format msgid "After being defined a filter might be attached to multiple entities= and/or collections each with its own condition. That can be tedious when t= he conditions are the same each time. Thus <filter-def/> allows defining a default condition, either as an attribute or CDATA= :" msgstr "" = -#: filters.xml:139(para) = -msgid "This default condition will then be used whenever the filter is att= ached to something without specifying a condition. Note that this means you= can give a specific condition as part of the attachment of the filter whic= h overrides the default condition in that particular case." +#. Tag: programlisting +#: filters.xml:122 +#, no-c-format +msgid "" + " xyz\">= ...\n" + "abc=3Dxyz]]>" msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: filters.xml:0(None) = -msgid "translator-credits" +#. Tag: para +#: filters.xml:124 +#, no-c-format +msgid "This default condition will then be used whenever the filter is att= ached to something without specifying a condition. Note that this means you= can give a specific condition as part of the attachment of the filter whic= h overrides the default condition in that particular case." msgstr "" = Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/inhe= ritance_mapping.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/inheritanc= e_mapping.pot 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/inheritanc= e_mapping.pot 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,280 +1,631 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:32-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: inheritance_mapping.xml:5(title) = +#. Tag: title +#: inheritance_mapping.xml:29 +#, no-c-format msgid "Inheritance Mapping" msgstr "" = -#: inheritance_mapping.xml:8(title) = +#. Tag: title +#: inheritance_mapping.xml:32 +#, no-c-format msgid "The Three Strategies" msgstr "" = -#: inheritance_mapping.xml:10(para) = +#. Tag: para +#: inheritance_mapping.xml:34 +#, no-c-format msgid "Hibernate supports the three basic inheritance mapping strategies:" msgstr "" = -#: inheritance_mapping.xml:16(para) = +#. Tag: para +#: inheritance_mapping.xml:40 +#, no-c-format msgid "table per class hierarchy" msgstr "" = -#: inheritance_mapping.xml:21(para) inheritance_mapping.xml:456(entry) = -msgid "table per subclass" +#. Tag: para +#: inheritance_mapping.xml:45 +#, no-c-format +msgid "table per subclass" msgstr "" = -#: inheritance_mapping.xml:26(para) = +#. Tag: para +#: inheritance_mapping.xml:50 +#, no-c-format msgid "table per concrete class" msgstr "" = -#: inheritance_mapping.xml:32(para) = +#. Tag: para +#: inheritance_mapping.xml:56 +#, no-c-format msgid "In addition, Hibernate supports a fourth, slightly different kind o= f polymorphism:" msgstr "" = -#: inheritance_mapping.xml:39(para) = +#. Tag: para +#: inheritance_mapping.xml:63 +#, no-c-format msgid "implicit polymorphism" msgstr "" = -#: inheritance_mapping.xml:45(para) = +#. Tag: para +#: inheritance_mapping.xml:69 +#, no-c-format msgid "It is possible to use different mapping strategies for different br= anches of the same inheritance hierarchy, and then make use of implicit pol= ymorphism to achieve polymorphism across the whole hierarchy. However, Hibe= rnate does not support mixing <subclass>, and <joined-subclass> and <union-subclass><= /literal> mappings under the same root <class> ele= ment. It is possible to mix together the table per hierarchy and table per = subclass strategies, under the the same <class> el= ement, by combining the <subclass> and &l= t;join> elements (see below)." msgstr "" = -#: inheritance_mapping.xml:59(para) = +#. Tag: para +#: inheritance_mapping.xml:83 +#, no-c-format msgid "It is possible to define subclass, unio= n-subclass, and joined-subclass mappings in se= parate mapping documents, directly beneath hibernate-mapping. This allows you to extend a class hierachy just by adding a new mappi= ng file. You must specify an extends attribute in the su= bclass mapping, naming a previously mapped superclass. Note: Previously thi= s feature made the ordering of the mapping documents important. Since Hiber= nate3, the ordering of mapping files does not matter when using the extends= keyword. The ordering inside a single mapping file still needs to be defin= ed as superclasses before subclasses." msgstr "" = -#: inheritance_mapping.xml:79(title) = +#. Tag: programlisting +#: inheritance_mapping.xml:94 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " ]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:98 +#, no-c-format msgid "Table per class hierarchy" msgstr "" = -#: inheritance_mapping.xml:81(para) = +#. Tag: para +#: inheritance_mapping.xml:100 +#, no-c-format msgid "Suppose we have an interface Payment, with imple= mentors CreditCardPayment, CashPayment, ChequePayment. The table per hierarchy mapping would = look like:" msgstr "" = -#: inheritance_mapping.xml:107(para) = +#. Tag: programlisting +#: inheritance_mapping.xml:107 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:109 +#, no-c-format msgid "Exactly one table is required. There is one big limitation of this = mapping strategy: columns declared by the subclasses, such as CCTY= PE, may not have NOT NULL constraints." msgstr "" = -#: inheritance_mapping.xml:116(title) = +#. Tag: title +#: inheritance_mapping.xml:118 +#, no-c-format msgid "Table per subclass" msgstr "" = -#: inheritance_mapping.xml:118(para) = +#. Tag: para +#: inheritance_mapping.xml:120 +#, no-c-format msgid "A table per subclass mapping would look like:" msgstr "" = -#: inheritance_mapping.xml:143(para) = +#. Tag: programlisting +#: inheritance_mapping.xml:124 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:126 +#, no-c-format msgid "Four tables are required. The three subclass tables have primary ke= y associations to the superclass table (so the relational model is actually= a one-to-one association)." msgstr "" = -#: inheritance_mapping.xml:152(title) = +#. Tag: title +#: inheritance_mapping.xml:135 +#, no-c-format msgid "Table per subclass, using a discriminator" msgstr "" = -#: inheritance_mapping.xml:154(para) = +#. Tag: para +#: inheritance_mapping.xml:137 +#, no-c-format msgid "Note that Hibernate's implementation of table per subclass requires= no discriminator column. Other object/relational mappers use a different i= mplementation of table per subclass which requires a type discriminator col= umn in the superclass table. The approach taken by Hibernate is much more d= ifficult to implement but arguably more correct from a relational point of = view. If you would like to use a discriminator column with the table per su= bclass strategy, you may combine the use of <subclass> and <join>, as follow:" msgstr "" = -#: inheritance_mapping.xml:194(para) = +#. Tag: programlisting +#: inheritance_mapping.xml:149 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:151 +#, no-c-format msgid "The optional fetch=3D\"select\" declaration tell= s Hibernate not to fetch the ChequePayment subclass data= using an outer join when querying the superclass." msgstr "" = -#: inheritance_mapping.xml:203(title) = +#. Tag: title +#: inheritance_mapping.xml:160 +#, no-c-format msgid "Mixing table per class hierarchy with table per subclass" msgstr "" = -#: inheritance_mapping.xml:205(para) = +#. Tag: para +#: inheritance_mapping.xml:162 +#, no-c-format msgid "You may even mix the table per hierarchy and table per subclass str= ategies using this approach:" msgstr "" = -#: inheritance_mapping.xml:231(para) = +#. Tag: programlisting +#: inheritance_mapping.xml:167 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:169 +#, no-c-format msgid "For any of these mapping strategies, a polymorphic association to t= he root Payment class is mapped using <many-= to-one>." msgstr "" = -#: inheritance_mapping.xml:242(title) = +#. Tag: programlisting +#: inheritance_mapping.xml:175 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:180 +#, no-c-format msgid "Table per concrete class" msgstr "" = -#: inheritance_mapping.xml:244(para) = +#. Tag: para +#: inheritance_mapping.xml:182 +#, no-c-format msgid "There are two ways we could go about mapping the table per concrete= class strategy. The first is to use <union-subclass>." msgstr "" = -#: inheritance_mapping.xml:267(para) = +#. Tag: programlisting +#: inheritance_mapping.xml:187 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:189 +#, no-c-format msgid "Three tables are involved for the subclasses. Each table defines co= lumns for all properties of the class, including inherited properties." msgstr "" = -#: inheritance_mapping.xml:272(para) = +#. Tag: para +#: inheritance_mapping.xml:194 +#, no-c-format msgid "The limitation of this approach is that if a property is mapped on = the superclass, the column name must be the same on all subclass tables. (W= e might relax this in a future release of Hibernate.) The identity generato= r strategy is not allowed in union subclass inheritance, indeed the primary= key seed has to be shared accross all unioned subclasses of a hierarchy." msgstr "" = -#: inheritance_mapping.xml:281(para) = +#. Tag: para +#: inheritance_mapping.xml:203 +#, no-c-format msgid "If your superclass is abstract, map it with abstract=3D\"t= rue\". Of course, if it is not abstract, an additional table (def= aults to PAYMENT in the example above) is needed to hold= instances of the superclass." msgstr "" = -#: inheritance_mapping.xml:291(title) = +#. Tag: title +#: inheritance_mapping.xml:213 +#, no-c-format msgid "Table per concrete class, using implicit polymorphism" msgstr "" = -#: inheritance_mapping.xml:293(para) = +#. Tag: para +#: inheritance_mapping.xml:215 +#, no-c-format msgid "An alternative approach is to make use of implicit polymorphism:" msgstr "" = -#: inheritance_mapping.xml:321(para) = +#. Tag: programlisting +#: inheritance_mapping.xml:219 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + "\n" + "\n" + "\n" + " = \n" + " \n" + " \n" + " \n" + " ...\n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + "]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:221 +#, no-c-format msgid "Notice that nowhere do we mention the Payment in= terface explicitly. Also notice that properties of Payment are mapped in each of the subclasses. If you want to avoid duplication, = consider using XML entities (e.g. [ <!ENTITY allproperties SYST= EM \"allproperties.xml\"> ] in the DOCTYPE = declartion and &allproperties; in the mapping)." msgstr "" = -#: inheritance_mapping.xml:331(para) = +#. Tag: para +#: inheritance_mapping.xml:231 +#, no-c-format msgid "The disadvantage of this approach is that Hibernate does not genera= te SQL UNIONs when performing polymorphic queries." msgstr "" = -#: inheritance_mapping.xml:336(para) = +#. Tag: para +#: inheritance_mapping.xml:236 +#, no-c-format msgid "For this mapping strategy, a polymorphic association to Pa= yment is usually mapped using <any>." msgstr "" = -#: inheritance_mapping.xml:352(title) = +#. Tag: programlisting +#: inheritance_mapping.xml:241 +#, no-c-format +msgid "" + "\n" + " \= n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:246 +#, no-c-format msgid "Mixing implicit polymorphism with other inheritance mappings" msgstr "" = -#: inheritance_mapping.xml:354(para) = +#. Tag: para +#: inheritance_mapping.xml:248 +#, no-c-format msgid "There is one further thing to notice about this mapping. Since the = subclasses are each mapped in their own <class> el= ement (and since Payment is just an interface), each of = the subclasses could easily be part of another inheritance hierarchy! (And = you can still use polymorphic queries against the Payment interface.)" msgstr "" = -#: inheritance_mapping.xml:390(para) = +#. Tag: programlisting +#: inheritance_mapping.xml:256 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:258 +#, no-c-format msgid "Once again, we don't mention Payment explicitly.= If we execute a query against the Payment interface - f= or example, from Payment - Hibernate automatically retur= ns instances of CreditCardPayment (and its subclasses, s= ince they also implement Payment), CashPayment<= /literal> and ChequePayment but not instances of NonelectronicTransaction." msgstr "" = -#: inheritance_mapping.xml:405(title) = +#. Tag: title +#: inheritance_mapping.xml:273 +#, no-c-format msgid "Limitations" msgstr "" = -#: inheritance_mapping.xml:407(para) = +#. Tag: para +#: inheritance_mapping.xml:275 +#, no-c-format msgid "There are certain limitations to the \"implicit polymorphism\" appr= oach to the table per concrete-class mapping strategy. There are somewhat l= ess restrictive limitations to <union-subclass> ma= ppings." msgstr "" = -#: inheritance_mapping.xml:414(para) = +#. Tag: para +#: inheritance_mapping.xml:282 +#, no-c-format msgid "The following table shows the limitations of table per concrete-cla= ss mappings, and of implicit polymorphism, in Hibernate." msgstr "" = -#: inheritance_mapping.xml:420(title) = +#. Tag: title +#: inheritance_mapping.xml:288 +#, no-c-format msgid "Features of inheritance mappings" msgstr "" = -#: inheritance_mapping.xml:432(entry) = +#. Tag: entry +#: inheritance_mapping.xml:300 +#, no-c-format msgid "Inheritance strategy" msgstr "" = -#: inheritance_mapping.xml:433(entry) = +#. Tag: entry +#: inheritance_mapping.xml:301 +#, no-c-format msgid "Polymorphic many-to-one" msgstr "" = -#: inheritance_mapping.xml:434(entry) = +#. Tag: entry +#: inheritance_mapping.xml:302 +#, no-c-format msgid "Polymorphic one-to-one" msgstr "" = -#: inheritance_mapping.xml:435(entry) = +#. Tag: entry +#: inheritance_mapping.xml:303 +#, no-c-format msgid "Polymorphic one-to-many" msgstr "" = -#: inheritance_mapping.xml:436(entry) = +#. Tag: entry +#: inheritance_mapping.xml:304 +#, no-c-format msgid "Polymorphic many-to-many" msgstr "" = -#: inheritance_mapping.xml:437(literal) = -msgid "load()/get()" +#. Tag: entry +#: inheritance_mapping.xml:305 +#, no-c-format +msgid "Polymorphic load()/get()" msgstr "" = -#: inheritance_mapping.xml:437(entry) = -msgid "Polymorphic " -msgstr "" - -#: inheritance_mapping.xml:438(entry) = +#. Tag: entry +#: inheritance_mapping.xml:306 +#, no-c-format msgid "Polymorphic queries" msgstr "" = -#: inheritance_mapping.xml:439(entry) = +#. Tag: entry +#: inheritance_mapping.xml:307 +#, no-c-format msgid "Polymorphic joins" msgstr "" = -#: inheritance_mapping.xml:440(entry) = +#. Tag: entry +#: inheritance_mapping.xml:308 +#, no-c-format msgid "Outer join fetching" msgstr "" = -#: inheritance_mapping.xml:445(entry) = +#. Tag: entry +#: inheritance_mapping.xml:313 +#, no-c-format msgid "table per class-hierarchy" msgstr "" = -#: inheritance_mapping.xml:446(literal) inheritance_mapping.xml:457(litera= l) inheritance_mapping.xml:468(literal) = +#. Tag: literal +#: inheritance_mapping.xml:314 inheritance_mapping.xml:325 inheritance_map= ping.xml:336 +#, no-c-format msgid "<many-to-one>" msgstr "" = -#: inheritance_mapping.xml:447(literal) inheritance_mapping.xml:458(litera= l) inheritance_mapping.xml:469(literal) = +#. Tag: literal +#: inheritance_mapping.xml:315 inheritance_mapping.xml:326 inheritance_map= ping.xml:337 +#, no-c-format msgid "<one-to-one>" msgstr "" = -#: inheritance_mapping.xml:448(literal) inheritance_mapping.xml:459(litera= l) inheritance_mapping.xml:470(literal) = +#. Tag: literal +#: inheritance_mapping.xml:316 inheritance_mapping.xml:327 +#, no-c-format msgid "<one-to-many>" msgstr "" = -#: inheritance_mapping.xml:449(literal) inheritance_mapping.xml:460(litera= l) inheritance_mapping.xml:471(literal) = +#. Tag: literal +#: inheritance_mapping.xml:317 inheritance_mapping.xml:328 inheritance_map= ping.xml:339 +#, no-c-format msgid "<many-to-many>" msgstr "" = -#: inheritance_mapping.xml:450(literal) inheritance_mapping.xml:461(litera= l) inheritance_mapping.xml:472(literal) = +#. Tag: literal +#: inheritance_mapping.xml:318 inheritance_mapping.xml:329 inheritance_map= ping.xml:340 +#, no-c-format msgid "s.get(Payment.class, id)" msgstr "" = -#: inheritance_mapping.xml:451(literal) inheritance_mapping.xml:462(litera= l) inheritance_mapping.xml:473(literal) inheritance_mapping.xml:484(literal= ) = +#. Tag: literal +#: inheritance_mapping.xml:319 inheritance_mapping.xml:330 inheritance_map= ping.xml:341 inheritance_mapping.xml:352 +#, no-c-format msgid "from Payment p" msgstr "" = -#: inheritance_mapping.xml:452(literal) inheritance_mapping.xml:463(litera= l) inheritance_mapping.xml:474(literal) = +#. Tag: literal +#: inheritance_mapping.xml:320 inheritance_mapping.xml:331 inheritance_map= ping.xml:342 +#, no-c-format msgid "from Order o join o.payment p" msgstr "" = -#: inheritance_mapping.xml:453(emphasis) inheritance_mapping.xml:464(empha= sis) inheritance_mapping.xml:475(emphasis) = +#. Tag: emphasis +#: inheritance_mapping.xml:321 inheritance_mapping.xml:332 inheritance_map= ping.xml:343 +#, no-c-format msgid "supported" msgstr "" = -#: inheritance_mapping.xml:467(entry) = -msgid "table per concrete-class (union-subclass)" +#. Tag: entry +#: inheritance_mapping.xml:324 +#, no-c-format +msgid "table per subclass" msgstr "" = -#: inheritance_mapping.xml:470(literal) = -msgid "inverse=3D\"true\"" +#. Tag: entry +#: inheritance_mapping.xml:335 +#, no-c-format +msgid "table per concrete-class (union-subclass)" msgstr "" = -#: inheritance_mapping.xml:470(entry) = -msgid " (for only)" +#. Tag: entry +#: inheritance_mapping.xml:338 +#, no-c-format +msgid "<one-to-many> (for inverse=3D\"tr= ue\" only)" msgstr "" = -#: inheritance_mapping.xml:478(entry) = +#. Tag: entry +#: inheritance_mapping.xml:346 +#, no-c-format msgid "table per concrete class (implicit polymorphism)" msgstr "" = -#: inheritance_mapping.xml:479(literal) = +#. Tag: literal +#: inheritance_mapping.xml:347 +#, no-c-format msgid "<any>" msgstr "" = -#: inheritance_mapping.xml:480(emphasis) inheritance_mapping.xml:481(empha= sis) inheritance_mapping.xml:485(emphasis) inheritance_mapping.xml:486(emph= asis) = +#. Tag: emphasis +#: inheritance_mapping.xml:348 inheritance_mapping.xml:349 inheritance_map= ping.xml:353 inheritance_mapping.xml:354 +#, no-c-format msgid "not supported" msgstr "" = -#: inheritance_mapping.xml:482(literal) = +#. Tag: literal +#: inheritance_mapping.xml:350 +#, no-c-format msgid "<many-to-any>" msgstr "" = -#: inheritance_mapping.xml:483(literal) = +#. Tag: literal +#: inheritance_mapping.xml:351 +#, no-c-format msgid "s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).unique= Result()" msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: inheritance_mapping.xml:0(None) = -msgid "translator-credits" -msgstr "" - Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/perf= ormance.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/performanc= e.pot 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/performanc= e.pot 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,808 +1,1556 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:32-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: performance.xml:5(title) = +#. Tag: title +#: performance.xml:29 +#, no-c-format msgid "Improving performance" msgstr "" = -#: performance.xml:8(title) = +#. Tag: title +#: performance.xml:32 +#, no-c-format msgid "Fetching strategies" msgstr "" = -#: performance.xml:10(para) = +#. Tag: para +#: performance.xml:34 +#, no-c-format msgid "A fetching strategy is the strategy Hibernate = will use for retrieving associated objects if the application needs to navi= gate the association. Fetch strategies may be declared in the O/R mapping m= etadata, or over-ridden by a particular HQL or Criteria = query." msgstr "" = -#: performance.xml:17(para) = +#. Tag: para +#: performance.xml:41 +#, no-c-format msgid "Hibernate3 defines the following fetching strategies:" msgstr "" = -#: performance.xml:23(para) = +#. Tag: para +#: performance.xml:47 +#, no-c-format msgid "Join fetching - Hibernate retrieves the associ= ated instance or collection in the same SELECT, using an= OUTER JOIN." msgstr "" = -#: performance.xml:30(para) = +#. Tag: para +#: performance.xml:54 +#, no-c-format msgid "Select fetching - a second SELECT is used to retrieve the associated entity or collection. Unless you = explicitly disable lazy fetching by specifying lazy=3D\"false\", this second select will only be executed when you actually access = the association." msgstr "" = -#: performance.xml:39(para) = +#. Tag: para +#: performance.xml:63 +#, no-c-format msgid "Subselect fetching - a second SELECT<= /literal> is used to retrieve the associated collections for all entities r= etrieved in a previous query or fetch. Unless you explicitly disable lazy f= etching by specifying lazy=3D\"false\", this second sele= ct will only be executed when you actually access the association." msgstr "" = -#: performance.xml:48(para) = +#. Tag: para +#: performance.xml:72 +#, no-c-format msgid "Batch fetching - an optimization strategy for = select fetching - Hibernate retrieves a batch of entity instances or collec= tions in a single SELECT, by specifying a list of primar= y keys or foreign keys." msgstr "" = -#: performance.xml:57(para) = +#. Tag: para +#: performance.xml:81 +#, no-c-format msgid "Hibernate also distinguishes between:" msgstr "" = -#: performance.xml:63(para) = +#. Tag: para +#: performance.xml:87 +#, no-c-format msgid "Immediate fetching - an association, collectio= n or attribute is fetched immediately, when the owner is loaded." msgstr "" = -#: performance.xml:69(para) = +#. Tag: para +#: performance.xml:93 +#, no-c-format msgid "Lazy collection fetching - a collection is fet= ched when the application invokes an operation upon that collection. (This = is the default for collections.)" msgstr "" = -#: performance.xml:76(para) = +#. Tag: para +#: performance.xml:100 +#, no-c-format msgid "\"Extra-lazy\" collection fetching - individua= l elements of the collection are accessed from the database as needed. Hibe= rnate tries not to fetch the whole collection into memory unless absolutely= needed (suitable for very large collections)" msgstr "" = -#: performance.xml:84(para) = +#. Tag: para +#: performance.xml:108 +#, no-c-format msgid "Proxy fetching - a single-valued association i= s fetched when a method other than the identifier getter is invoked upon th= e associated object." msgstr "" = -#: performance.xml:91(para) = +#. Tag: para +#: performance.xml:115 +#, no-c-format msgid "\"No-proxy\" fetching - a single-valued associ= ation is fetched when the instance variable is accessed. Compared to proxy = fetching, this approach is less lazy (the association is fetched even when = only the identifier is accessed) but more transparent, since no proxy is vi= sible to the application. This approach requires buildtime bytecode instrum= entation and is rarely necessary." msgstr "" = -#: performance.xml:101(para) = +#. Tag: para +#: performance.xml:125 +#, no-c-format msgid "Lazy attribute fetching - an attribute or sing= le valued association is fetched when the instance variable is accessed. Th= is approach requires buildtime bytecode instrumentation and is rarely neces= sary." msgstr "" = -#: performance.xml:110(para) = +#. Tag: para +#: performance.xml:134 +#, no-c-format msgid "We have two orthogonal notions here: when is t= he association fetched, and how is it fetched (what SQ= L is used). Don't confuse them! We use fetch to tune per= formance. We may use lazy to define a contract for what = data is always available in any detached instance of a particular class." msgstr "" = -#: performance.xml:119(title) = +#. Tag: title +#: performance.xml:143 +#, no-c-format msgid "Working with lazy associations" msgstr "" = -#: performance.xml:121(para) = +#. Tag: para +#: performance.xml:145 +#, no-c-format msgid "By default, Hibernate3 uses lazy select fetching for collections an= d lazy proxy fetching for single-valued associations. These defaults make s= ense for almost all associations in almost all applications." msgstr "" = -#: performance.xml:127(para) = +#. Tag: para +#: performance.xml:151 +#, no-c-format msgid "Note: if you set hibernate.default_ba= tch_fetch_size, Hibernate will use the batch fetch optimization f= or lazy fetching (this optimization may also be enabled at a more granular = level)." msgstr "" = -#: performance.xml:134(para) = +#. Tag: para +#: performance.xml:158 +#, no-c-format msgid "However, lazy fetching poses one problem that you must be aware of.= Access to a lazy association outside of the context of an open Hibernate s= ession will result in an exception. For example:" msgstr "" = -#: performance.xml:152(para) = +#. Tag: programlisting +#: performance.xml:164 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:166 +#, no-c-format msgid "Since the permissions collection was not initialized when the Session was closed, the collection will not be able to load i= ts state. Hibernate does not support lazy initialization for deta= ched objects. The fix is to move the code that reads from the co= llection to just before the transaction is committed." msgstr "" = -#: performance.xml:160(para) = +#. Tag: para +#: performance.xml:174 +#, no-c-format msgid "Alternatively, we could use a non-lazy collection or association, b= y specifying lazy=3D\"false\" for the association mappin= g. However, it is intended that lazy initialization be used for almost all = collections and associations. If you define too many non-lazy associations = in your object model, Hibernate will end up needing to fetch the entire dat= abase into memory in every transaction!" msgstr "" = -#: performance.xml:169(para) = +#. Tag: para +#: performance.xml:183 +#, no-c-format msgid "On the other hand, we often want to choose join fetching (which is = non-lazy by nature) instead of select fetching in a particular transaction.= We'll now see how to customize the fetching strategy. In Hibernate3, the m= echanisms for choosing a fetch strategy are identical for single-valued ass= ociations and collections." msgstr "" = -#: performance.xml:180(title) = +#. Tag: title +#: performance.xml:194 +#, no-c-format msgid "Tuning fetch strategies" msgstr "" = -#: performance.xml:182(para) = +#. Tag: para +#: performance.xml:196 +#, no-c-format msgid "Select fetching (the default) is extremely vulnerable to N+1 select= s problems, so we might want to enable join fetching in the mapping documen= t:" msgstr "" = -#: performance.xml:195(para) = +#. Tag: programlisting +#: performance.xml:201 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "" +msgstr "" + +#. Tag: programlisting +#: performance.xml:203 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: performance.xml:205 +#, no-c-format msgid "The fetch strategy defined in the mapping docume= nt affects:" msgstr "" = -#: performance.xml:201(para) = +#. Tag: para +#: performance.xml:211 +#, no-c-format msgid "retrieval via get() or load()" msgstr "" = -#: performance.xml:206(para) = +#. Tag: para +#: performance.xml:216 +#, no-c-format msgid "retrieval that happens implicitly when an association is navigated" msgstr "" = -#: performance.xml:211(para) = +#. Tag: para +#: performance.xml:221 +#, no-c-format msgid "Criteria queries" msgstr "" = -#: performance.xml:216(para) = +#. Tag: para +#: performance.xml:226 +#, no-c-format msgid "HQL queries if subselect fetching is used" msgstr "" = -#: performance.xml:222(para) = +#. Tag: para +#: performance.xml:232 +#, no-c-format msgid "No matter what fetching strategy you use, the defined non-lazy grap= h is guaranteed to be loaded into memory. Note that this might result in se= veral immediate selects being used to execute a particular HQL query." msgstr "" = -#: performance.xml:228(para) = +#. Tag: para +#: performance.xml:238 +#, no-c-format msgid "Usually, we don't use the mapping document to customize fetching. I= nstead, we keep the default behavior, and override it for a particular tran= saction, using left join fetch in HQL. This tells Hibern= ate to fetch the association eagerly in the first select, using an outer jo= in. In the Criteria query API, you would use se= tFetchMode(FetchMode.JOIN)." msgstr "" = -#: performance.xml:237(para) = +#. Tag: para +#: performance.xml:247 +#, no-c-format msgid "If you ever feel like you wish you could change the fetching strate= gy used by get() or load(), simply us= e a Criteria query, for example:" msgstr "" = -#: performance.xml:248(para) = +#. Tag: programlisting +#: performance.xml:253 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:255 +#, no-c-format msgid "(This is Hibernate's equivalent of what some ORM solutions call a \= "fetch plan\".)" msgstr "" = -#: performance.xml:252(para) = +#. Tag: para +#: performance.xml:259 +#, no-c-format msgid "A completely different way to avoid problems with N+1 selects is to= use the second-level cache." msgstr "" = -#: performance.xml:260(title) = +#. Tag: title +#: performance.xml:267 +#, no-c-format msgid "Single-ended association proxies" msgstr "" = -#: performance.xml:262(para) = +#. Tag: para +#: performance.xml:269 +#, no-c-format msgid "Lazy fetching for collections is implemented using Hibernate's own = implementation of persistent collections. However, a different mechanism is= needed for lazy behavior in single-ended associations. The target entity o= f the association must be proxied. Hibernate implements lazy initializing p= roxies for persistent objects using runtime bytecode enhancement (via the e= xcellent CGLIB library)." msgstr "" = -#: performance.xml:270(para) = +#. Tag: para +#: performance.xml:277 +#, no-c-format msgid "By default, Hibernate3 generates proxies (at startup) for all persi= stent classes and uses them to enable lazy fetching of many-to-one= and one-to-one associations." msgstr "" = -#: performance.xml:276(para) = +#. Tag: para +#: performance.xml:283 +#, no-c-format msgid "The mapping file may declare an interface to use as the proxy inter= face for that class, with the proxy attribute. By defaul= t, Hibernate uses a subclass of the class. Note that the proxied = class must implement a default constructor with at least package visibility= . We recommend this constructor for all persistent classes!" msgstr "" = -#: performance.xml:283(para) = +#. Tag: para +#: performance.xml:290 +#, no-c-format msgid "There are some gotchas to be aware of when extending this approach = to polymorphic classes, eg." msgstr "" = -#: performance.xml:295(para) = +#. Tag: programlisting +#: performance.xml:295 +#, no-c-format +msgid "" + "\n" + " ......\n" + " \n" + " .....\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: performance.xml:297 +#, no-c-format msgid "Firstly, instances of Cat will never be castable= to DomesticCat, even if the underlying instance is an i= nstance of DomesticCat:" msgstr "" = -#: performance.xml:307(para) = +#. Tag: programlisting +#: performance.xml:303 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:305 +#, no-c-format msgid "Secondly, it is possible to break proxy =3D=3D." msgstr "" = -#: performance.xml:316(para) = +#. Tag: programlisting +#: performance.xml:309 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:311 +#, no-c-format msgid "However, the situation is not quite as bad as it looks. Even though= we now have two references to different proxy objects, the underlying inst= ance will still be the same object:" msgstr "" = -#: performance.xml:324(para) = +#. Tag: programlisting +#: performance.xml:316 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:318 +#, no-c-format msgid "Third, you may not use a CGLIB proxy for a final= class or a class with any final methods." msgstr "" = -#: performance.xml:329(para) = +#. Tag: para +#: performance.xml:323 +#, no-c-format msgid "Finally, if your persistent object acquires any resources upon inst= antiation (eg. in initializers or default constructor), then those resource= s will also be acquired by the proxy. The proxy class is an actual subclass= of the persistent class." msgstr "" = -#: performance.xml:335(para) = +#. Tag: para +#: performance.xml:329 +#, no-c-format msgid "These problems are all due to fundamental limitations in Java's sin= gle inheritance model. If you wish to avoid these problems your persistent = classes must each implement an interface that declares its business methods= . You should specify these interfaces in the mapping file. eg." msgstr "" = -#: performance.xml:348(para) = +#. Tag: programlisting +#: performance.xml:335 +#, no-c-format +msgid "" + "\n" + " ......\n" + " \n" + " .....\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: performance.xml:337 +#, no-c-format msgid "where CatImpl implements the interface = Cat and DomesticCatImpl implements the interfa= ce DomesticCat. Then proxies for instances of C= at and DomesticCat may be returned by load() or iterate(). (Note that list= () does not usually return proxies.)" msgstr "" = -#: performance.xml:360(para) = +#. Tag: programlisting +#: performance.xml:345 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:347 +#, no-c-format msgid "Relationships are also lazily initialized. This means you must decl= are any properties to be of type Cat, not CatIm= pl." msgstr "" = -#: performance.xml:365(para) = +#. Tag: para +#: performance.xml:352 +#, no-c-format msgid "Certain operations do not require proxy initia= lization" msgstr "" = -#: performance.xml:371(para) = +#. Tag: para +#: performance.xml:358 +#, no-c-format msgid "equals(), if the persistent class does not overr= ide equals()" msgstr "" = -#: performance.xml:377(para) = +#. Tag: para +#: performance.xml:364 +#, no-c-format msgid "hashCode(), if the persistent class does not ove= rride hashCode()" msgstr "" = -#: performance.xml:383(para) = +#. Tag: para +#: performance.xml:370 +#, no-c-format msgid "The identifier getter method" msgstr "" = -#: performance.xml:389(para) = +#. Tag: para +#: performance.xml:376 +#, no-c-format msgid "Hibernate will detect persistent classes that override equ= als() or hashCode()." msgstr "" = -#: performance.xml:394(para) = +#. Tag: para +#: performance.xml:381 +#, no-c-format msgid "By choosing lazy=3D\"no-proxy\" instead of the d= efault lazy=3D\"proxy\", we can avoid the problems assoc= iated with typecasting. However, we will require buildtime bytecode instrum= entation, and all operations will result in immediate proxy initialization." msgstr "" = -#: performance.xml:404(title) = +#. Tag: title +#: performance.xml:391 +#, no-c-format msgid "Initializing collections and proxies" msgstr "" = -#: performance.xml:406(para) = +#. Tag: para +#: performance.xml:393 +#, no-c-format msgid "A LazyInitializationException will be thrown by = Hibernate if an uninitialized collection or proxy is accessed outside of th= e scope of the Session, ie. when the entity owning the c= ollection or having the reference to the proxy is in the detached state." msgstr "" = -#: performance.xml:412(para) = +#. Tag: para +#: performance.xml:399 +#, no-c-format msgid "Sometimes we need to ensure that a proxy or collection is initializ= ed before closing the Session. Of course, we can alway f= orce initialization by calling cat.getSex() or = cat.getKittens().size(), for example. But that is confusing to re= aders of the code and is not convenient for generic code." msgstr "" = -#: performance.xml:419(para) = +#. Tag: para +#: performance.xml:406 +#, no-c-format msgid "The static methods Hibernate.initialize() and Hibernate.isInitialized() provide the application with a c= onvenient way of working with lazily initialized collections or proxies. Hibernate.initialize(cat) will force the initialization of= a proxy, cat, as long as its Session= is still open. Hibernate.initialize( cat.getKittens() )= has a similar effect for the collection of kittens." msgstr "" = -#: performance.xml:428(para) = +#. Tag: para +#: performance.xml:415 +#, no-c-format msgid "Another option is to keep the Session open until= all needed collections and proxies have been loaded. In some application a= rchitectures, particularly where the code that accesses data using Hibernat= e, and the code that uses it are in different application layers or differe= nt physical processes, it can be a problem to ensure that the Sess= ion is open when a collection is initialized. There are two basic= ways to deal with this issue:" msgstr "" = -#: performance.xml:439(para) = +#. Tag: para +#: performance.xml:426 +#, no-c-format msgid "In a web-based application, a servlet filter can be used to close t= he Session only at the very end of a user request, once = the rendering of the view is complete (the Open Session in View pattern). Of course, this places heavy demands on the correctness= of the exception handling of your application infrastructure. It is vitall= y important that the Session is closed and the transacti= on ended before returning to the user, even when an exception occurs during= rendering of the view. See the Hibernate Wiki for examples of this \"Open = Session in View\" pattern." msgstr "" = -#: performance.xml:452(para) = +#. Tag: para +#: performance.xml:439 +#, no-c-format msgid "In an application with a separate business tier, the business logic= must \"prepare\" all collections that will be needed by the web tier befor= e returning. This means that the business tier should load all the data and= return all the data already initialized to the presentation/web tier that = is required for a particular use case. Usually, the application calls Hibernate.initialize() for each collection that will be neede= d in the web tier (this call must occur before the session is closed) or re= trieves the collection eagerly using a Hibernate query with a FETC= H clause or a FetchMode.JOIN in Crite= ria. This is usually easier if you adopt the Command pattern instead of a Session Facade." msgstr "" = -#: performance.xml:467(para) = +#. Tag: para +#: performance.xml:454 +#, no-c-format msgid "You may also attach a previously loaded object to a new Se= ssion with merge() or lock() before accessing uninitialized collections (or other proxies). No, Hibern= ate does not, and certainly should not do this automat= ically, since it would introduce ad hoc transaction semantics!" msgstr "" = -#: performance.xml:477(para) = +#. Tag: para +#: performance.xml:464 +#, no-c-format msgid "Sometimes you don't want to initialize a large collection, but stil= l need some information about it (like its size) or a subset of the data." msgstr "" = -#: performance.xml:482(para) = +#. Tag: para +#: performance.xml:469 +#, no-c-format msgid "You can use a collection filter to get the size of a collection wit= hout initializing it:" msgstr "" = -#: performance.xml:488(para) = +#. Tag: programlisting +#: performance.xml:473 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: performance.xml:475 +#, no-c-format msgid "The createFilter() method is also used to effici= ently retrieve subsets of a collection without needing to initialize the wh= ole collection:" msgstr "" = -#: performance.xml:498(title) = +#. Tag: programlisting +#: performance.xml:480 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: title +#: performance.xml:485 +#, no-c-format msgid "Using batch fetching" msgstr "" = -#: performance.xml:500(para) = +#. Tag: para +#: performance.xml:487 +#, no-c-format msgid "Hibernate can make efficient use of batch fetching, that is, Hibern= ate can load several uninitialized proxies if one proxy is accessed (or col= lections. Batch fetching is an optimization of the lazy select fetching str= ategy. There are two ways you can tune batch fetching: on the class and the= collection level." msgstr "" = -#: performance.xml:506(para) = +#. Tag: para +#: performance.xml:493 +#, no-c-format msgid "Batch fetching for classes/entities is easier to understand. Imagin= e you have the following situation at runtime: You have 25 Cat instances loaded in a Session, each Cat<= /literal> has a reference to its owner, a Perso= n. The Person class is mapped with a proxy, lazy=3D\"true\". If you now iterate through all cats and c= all getOwner() on each, Hibernate will by default execut= e 25 SELECT statements, to retrieve the proxied owners. = You can tune this behavior by specifying a batch-size in= the mapping of Person:" msgstr "" = -#: performance.xml:518(para) = +#. Tag: programlisting +#: performance.xml:503 +#, no-c-format +msgid "...]]= >" +msgstr "" + +#. Tag: para +#: performance.xml:505 +#, no-c-format msgid "Hibernate will now execute only three queries, the pattern is 10, 1= 0, 5." msgstr "" = -#: performance.xml:522(para) = -msgid "You may also enable batch fetching of collections. For example, if = each Person has a lazy collection of Cats, and 10 persons are currently loaded in the Sesssion, iterating through all persons will generate 10 SELECT= s, one for every call to getCats(). If you enable batch = fetching for the cats collection in the mapping of Person, Hibernate can pre-fetch collections:" +#. Tag: para +#: performance.xml:509 +#, no-c-format +msgid "You may also enable batch fetching of collections. For example, if = each Person has a lazy collection of Cats, and 10 persons are currently loaded in the Session= , iterating through all persons will generate 10 SELECTs= , one for every call to getCats(). If you enable batch f= etching for the cats collection in the mapping of Person, Hibernate can pre-fetch collections:" msgstr "" = -#: performance.xml:537(para) = +#. Tag: programlisting +#: performance.xml:518 +#, no-c-format +msgid "" + "\n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: performance.xml:520 +#, no-c-format msgid "With a batch-size of 3, Hibernate will load 3, 3= , 3, 1 collections in four SELECTs. Again, the value of = the attribute depends on the expected number of uninitialized collections i= n a particular Session." msgstr "" = -#: performance.xml:543(para) = +#. Tag: para +#: performance.xml:526 +#, no-c-format msgid "Batch fetching of collections is particularly useful if you have a = nested tree of items, ie. the typical bill-of-materials pattern. (Although = a nested set or a materialized path might be a better option for read-mostly trees.)" msgstr "" = -#: performance.xml:552(title) = +#. Tag: title +#: performance.xml:535 +#, no-c-format msgid "Using subselect fetching" msgstr "" = -#: performance.xml:554(para) = +#. Tag: para +#: performance.xml:537 +#, no-c-format msgid "If one lazy collection or single-valued proxy has to be fetched, Hi= bernate loads all of them, re-running the original query in a subselect. Th= is works in the same way as batch-fetching, without the piecemeal loading." msgstr "" = -#: performance.xml:565(title) = +#. Tag: title +#: performance.xml:548 +#, no-c-format msgid "Using lazy property fetching" msgstr "" = -#: performance.xml:567(para) = +#. Tag: para +#: performance.xml:550 +#, no-c-format msgid "Hibernate3 supports the lazy fetching of individual properties. Thi= s optimization technique is also known as fetch groups= . Please note that this is mostly a marketing feature, as in practice, opti= mizing row reads is much more important than optimization of column reads. = However, only loading some properties of a class might be useful in extreme= cases, when legacy tables have hundreds of columns and the data model can = not be improved." msgstr "" = -#: performance.xml:576(para) = +#. Tag: para +#: performance.xml:559 +#, no-c-format msgid "To enable lazy property loading, set the lazy at= tribute on your particular property mappings:" msgstr "" = -#: performance.xml:590(para) = +#. Tag: programlisting +#: performance.xml:564 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " = \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: performance.xml:566 +#, no-c-format msgid "Lazy property loading requires buildtime bytecode instrumentation! = If your persistent classes are not enhanced, Hibernate will silently ignore= lazy property settings and fall back to immediate fetching." msgstr "" = -#: performance.xml:596(para) = +#. Tag: para +#: performance.xml:572 +#, no-c-format msgid "For bytecode instrumentation, use the following Ant task:" msgstr "" = -#: performance.xml:614(para) = -msgid "A different (better?) way to avoid unnecessary column reads, at lea= st for read-only transactions is to use the projection features of HQL or C= riteria queries. This avoids the need for buildtime bytecode processing and= is certainly a prefered solution." +#. Tag: programlisting +#: performance.xml:576 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" msgstr "" = -#: performance.xml:621(para) = +#. Tag: para +#: performance.xml:578 +#, no-c-format +msgid "A different (better?) way to avoid unnecessary column reads, at lea= st for read-only transactions is to use the projection features of HQL or C= riteria queries. This avoids the need for buildtime bytecode processing and= is certainly a preferred solution." +msgstr "" + +#. Tag: para +#: performance.xml:585 +#, no-c-format msgid "You may force the usual eager fetching of properties using fetch all properties in HQL." msgstr "" = -#: performance.xml:631(title) = +#. Tag: title +#: performance.xml:595 +#, no-c-format msgid "The Second Level Cache" msgstr "" = -#: performance.xml:633(para) = +#. Tag: para +#: performance.xml:597 +#, no-c-format msgid "A Hibernate Session is a transaction-level cache= of persistent data. It is possible to configure a cluster or JVM-level (SessionFactory-level) cache on a class-by-class and collec= tion-by-collection basis. You may even plug in a clustered cache. Be carefu= l. Caches are never aware of changes made to the persistent store by anothe= r application (though they may be configured to regularly expire cached dat= a)." msgstr "" = -#: performance.xml:641(para) = +#. Tag: para +#: performance.xml:605 +#, no-c-format msgid "You have the option to tell Hibernate which caching implementation = to use by specifying the name of a class that implements org.hiber= nate.cache.CacheProvider using the property hibernate.ca= che.provider_class. Hibernate comes bundled with a number of buil= t-in integrations with open-source cache providers (listed below); addition= ally, you could implement your own and plug it in as outlined above. Note t= hat versions prior to 3.2 defaulted to use EhCache as the default cache pro= vider; that is no longer the case as of 3.2." msgstr "" = -#: performance.xml:652(title) = +#. Tag: title +#: performance.xml:616 +#, no-c-format msgid "Cache Providers" msgstr "" = -#: performance.xml:661(entry) performance.xml:848(entry) = +#. Tag: entry +#: performance.xml:625 performance.xml:813 +#, no-c-format msgid "Cache" msgstr "" = -#: performance.xml:662(entry) = +#. Tag: entry +#: performance.xml:626 +#, no-c-format msgid "Provider class" msgstr "" = -#: performance.xml:663(entry) = +#. Tag: entry +#: performance.xml:627 +#, no-c-format msgid "Type" msgstr "" = -#: performance.xml:664(entry) = +#. Tag: entry +#: performance.xml:628 +#, no-c-format msgid "Cluster Safe" msgstr "" = -#: performance.xml:665(entry) = +#. Tag: entry +#: performance.xml:629 +#, no-c-format msgid "Query Cache Supported" msgstr "" = -#: performance.xml:670(entry) performance.xml:857(entry) = +#. Tag: entry +#: performance.xml:634 performance.xml:822 +#, no-c-format msgid "Hashtable (not intended for production use)" msgstr "" = -#: performance.xml:671(literal) = +#. Tag: literal +#: performance.xml:635 +#, no-c-format msgid "org.hibernate.cache.HashtableCacheProvider" msgstr "" = -#: performance.xml:672(entry) = +#. Tag: entry +#: performance.xml:636 +#, no-c-format msgid "memory" msgstr "" = -#: performance.xml:674(entry) performance.xml:681(entry) performance.xml:6= 88(entry) performance.xml:858(entry) performance.xml:859(entry) performance= .xml:860(entry) performance.xml:865(entry) performance.xml:866(entry) perfo= rmance.xml:867(entry) performance.xml:872(entry) performance.xml:873(entry)= performance.xml:874(entry) performance.xml:879(entry) performance.xml:880(= entry) performance.xml:886(entry) performance.xml:889(entry) = -msgid "yes" +#. Tag: entry +#: performance.xml:638 performance.xml:645 performance.xml:652 performance= .xml:823 performance.xml:824 performance.xml:825 performance.xml:830 perfor= mance.xml:831 performance.xml:832 performance.xml:837 performance.xml:838 p= erformance.xml:839 performance.xml:844 performance.xml:845 performance.xml:= 851 performance.xml:854 performance.xml:858 performance.xml:861 +#, no-c-format +msgid "yes" msgstr "" = -#: performance.xml:677(entry) performance.xml:864(entry) = +#. Tag: entry +#: performance.xml:641 performance.xml:829 +#, no-c-format msgid "EHCache" msgstr "" = -#: performance.xml:678(literal) = +#. Tag: literal +#: performance.xml:642 +#, no-c-format msgid "org.hibernate.cache.EhCacheProvider" msgstr "" = -#: performance.xml:679(entry) performance.xml:686(entry) = +#. Tag: entry +#: performance.xml:643 performance.xml:650 +#, no-c-format msgid "memory, disk" msgstr "" = -#: performance.xml:684(entry) performance.xml:871(entry) = +#. Tag: entry +#: performance.xml:648 performance.xml:836 +#, no-c-format msgid "OSCache" msgstr "" = -#: performance.xml:685(literal) = +#. Tag: literal +#: performance.xml:649 +#, no-c-format msgid "org.hibernate.cache.OSCacheProvider" msgstr "" = -#: performance.xml:691(entry) performance.xml:878(entry) = +#. Tag: entry +#: performance.xml:655 performance.xml:843 +#, no-c-format msgid "SwarmCache" msgstr "" = -#: performance.xml:692(literal) = +#. Tag: literal +#: performance.xml:656 +#, no-c-format msgid "org.hibernate.cache.SwarmCacheProvider" msgstr "" = -#: performance.xml:693(entry) = +#. Tag: entry +#: performance.xml:657 +#, no-c-format msgid "clustered (ip multicast)" msgstr "" = -#: performance.xml:694(entry) = +#. Tag: entry +#: performance.xml:658 +#, no-c-format msgid "yes (clustered invalidation)" msgstr "" = -#: performance.xml:698(entry) performance.xml:885(entry) = -msgid "JBoss TreeCache" +#. Tag: entry +#: performance.xml:662 performance.xml:850 +#, no-c-format +msgid "JBoss Cache 1.x" msgstr "" = -#: performance.xml:699(literal) = +#. Tag: literal +#: performance.xml:663 +#, no-c-format msgid "org.hibernate.cache.TreeCacheProvider" msgstr "" = -#: performance.xml:700(entry) = +#. Tag: entry +#: performance.xml:664 performance.xml:671 +#, no-c-format msgid "clustered (ip multicast), transactional" msgstr "" = -#: performance.xml:701(entry) = +#. Tag: entry +#: performance.xml:665 +#, no-c-format msgid "yes (replication)" msgstr "" = -#: performance.xml:702(entry) = +#. Tag: entry +#: performance.xml:666 performance.xml:673 +#, no-c-format msgid "yes (clock sync req.)" msgstr "" = -#: performance.xml:709(title) = +#. Tag: entry +#: performance.xml:669 performance.xml:857 +#, no-c-format +msgid "JBoss Cache 2" +msgstr "" + +#. Tag: literal +#: performance.xml:670 +#, no-c-format +msgid "org.hibernate.cache.jbc2.JBossCacheRegionFactory" +msgstr "" + +#. Tag: entry +#: performance.xml:672 +#, no-c-format +msgid "yes (replication or invalidation)" +msgstr "" + +#. Tag: title +#: performance.xml:680 +#, no-c-format msgid "Cache mappings" msgstr "" = -#: performance.xml:711(para) = +#. Tag: para +#: performance.xml:682 +#, no-c-format msgid "The <cache> element of a class or collecti= on mapping has the following form:" msgstr "" = -#: performance.xml:729(para) = +#. Tag: programlisting +#: performance.xml:693 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: performance.xml:696 +#, no-c-format msgid "usage (required) specifies the caching strategy:= transactional, read-write, = nonstrict-read-write or read-only" msgstr "" = -#: performance.xml:738(para) = +#. Tag: para +#: performance.xml:705 +#, no-c-format msgid "region (optional, defaults to the class or colle= ction role name) specifies the name of the second level cache region" msgstr "" = -#: performance.xml:745(para) = +#. Tag: para +#: performance.xml:712 +#, no-c-format msgid "include (optional, defaults to all) non-lazy specifies that properties of the entity = mapped with lazy=3D\"true\" may not be cached when attri= bute-level lazy fetching is enabled" msgstr "" = -#: performance.xml:755(para) = -msgid "Alternatively (preferrably?), you may specify <class-ca= che> and <collection-cache> elements = in hibernate.cfg.xml." +#. Tag: para +#: performance.xml:722 +#, no-c-format +msgid "Alternatively (preferably?), you may specify <class-cac= he> and <collection-cache> elements i= n hibernate.cfg.xml." msgstr "" = -#: performance.xml:760(para) = +#. Tag: para +#: performance.xml:727 +#, no-c-format msgid "The usage attribute specifies a cache = concurrency strategy." msgstr "" = -#: performance.xml:767(title) = +#. Tag: title +#: performance.xml:734 +#, no-c-format msgid "Strategy: read only" msgstr "" = -#: performance.xml:769(para) = +#. Tag: para +#: performance.xml:736 +#, no-c-format msgid "If your application needs to read but never modify instances of a p= ersistent class, a read-only cache may be used. This is = the simplest and best performing strategy. It's even perfectly safe for use= in a cluster." msgstr "" = -#: performance.xml:784(title) = +#. Tag: programlisting +#: performance.xml:742 +#, no-c-format +msgid "" + "\n" + " \n" + " ....\n" + "]]>" +msgstr "" + +#. Tag: title +#: performance.xml:748 +#, no-c-format msgid "Strategy: read/write" msgstr "" = -#: performance.xml:786(para) = +#. Tag: para +#: performance.xml:750 +#, no-c-format msgid "If the application needs to update data, a read-write cache might be appropriate. This cache strategy should never be used = if serializable transaction isolation level is required. If the cache is us= ed in a JTA environment, you must specify the property hibernate.t= ransaction.manager_lookup_class, naming a strategy for obtaining = the JTA TransactionManager. In other environments, you s= hould ensure that the transaction is completed when Session.close(= ) or Session.disconnect() is called. If you wi= sh to use this strategy in a cluster, you should ensure that the underlying= cache implementation supports locking. The built-in cache providers do not." msgstr "" = -#: performance.xml:809(title) = +#. Tag: programlisting +#: performance.xml:761 +#, no-c-format +msgid "" + "\n" + " \n" + " ....\n" + " \n" + " \n" + " ....\n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: performance.xml:766 +#, no-c-format msgid "Strategy: nonstrict read/write" msgstr "" = -#: performance.xml:811(para) = +#. Tag: para +#: performance.xml:768 +#, no-c-format msgid "If the application only occasionally needs to update data (ie. if i= t is extremely unlikely that two transactions would try to update the same = item simultaneously) and strict transaction isolation is not required, a nonstrict-read-write cache might be appropriate. If the ca= che is used in a JTA environment, you must specify hibernate.trans= action.manager_lookup_class. In other environments, you should en= sure that the transaction is completed when Session.close() or Session.disconnect() is called." msgstr "" = -#: performance.xml:823(title) = +#. Tag: title +#: performance.xml:780 +#, no-c-format msgid "Strategy: transactional" msgstr "" = -#: performance.xml:825(para) = +#. Tag: para +#: performance.xml:782 +#, no-c-format msgid "The transactional cache strategy provides suppor= t for fully transactional cache providers such as JBoss TreeCache. Such a c= ache may only be used in a JTA environment and you must specify hi= bernate.transaction.manager_lookup_class." msgstr "" = -#: performance.xml:833(para) = -msgid "None of the cache providers support all of the cache concurrency st= rategies. The following table shows which providers are compatible with whi= ch concurrency strategies." +#. Tag: title +#: performance.xml:791 +#, no-c-format +msgid "Cache-provider/concurrency-strategy compatibility" msgstr "" = -#: performance.xml:839(title) = +#. Tag: para +#: performance.xml:794 +#, no-c-format +msgid "None of the cache providers support all of the cache concurrency st= rategies." +msgstr "" + +#. Tag: para +#: performance.xml:799 +#, no-c-format +msgid "The following table shows which providers are compatible with which= concurrency strategies." +msgstr "" + +#. Tag: title +#: performance.xml:804 +#, no-c-format msgid "Cache Concurrency Strategy Support" msgstr "" = -#: performance.xml:849(entry) = +#. Tag: entry +#: performance.xml:814 +#, no-c-format msgid "read-only" msgstr "" = -#: performance.xml:850(entry) = +#. Tag: entry +#: performance.xml:815 +#, no-c-format msgid "nonstrict-read-write" msgstr "" = -#: performance.xml:851(entry) = +#. Tag: entry +#: performance.xml:816 +#, no-c-format msgid "read-write" msgstr "" = -#: performance.xml:852(entry) = +#. Tag: entry +#: performance.xml:817 +#, no-c-format msgid "transactional" msgstr "" = -#: performance.xml:898(title) = +#. Tag: title +#: performance.xml:872 +#, no-c-format msgid "Managing the caches" msgstr "" = -#: performance.xml:900(para) = +#. Tag: para +#: performance.xml:874 +#, no-c-format msgid "Whenever you pass an object to save(), = update() or saveOrUpdate() and whenever you re= trieve an object using load(), get(),= list(), iterate() or scroll= (), that object is added to the internal cache of the Se= ssion." msgstr "" = -#: performance.xml:907(para) = +#. Tag: para +#: performance.xml:881 +#, no-c-format msgid "When flush() is subsequently called, the state o= f that object will be synchronized with the database. If you do not want th= is synchronization to occur or if you are processing a huge number of objec= ts and need to manage memory efficiently, the evict() me= thod may be used to remove the object and its collections from the first-le= vel cache." msgstr "" = -#: performance.xml:922(para) = +#. Tag: programlisting +#: performance.xml:889 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:891 +#, no-c-format msgid "The Session also provides a contains()<= /literal> method to determine if an instance belongs to the session cache." msgstr "" = -#: performance.xml:927(para) = +#. Tag: para +#: performance.xml:896 +#, no-c-format msgid "To completely evict all objects from the session cache, call Session.clear()" msgstr "" = -#: performance.xml:931(para) = +#. Tag: para +#: performance.xml:900 +#, no-c-format msgid "For the second-level cache, there are methods defined on S= essionFactory for evicting the cached state of an instance, entir= e class, collection instance or entire collection role." msgstr "" = -#: performance.xml:942(para) = +#. Tag: programlisting +#: performance.xml:906 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:908 +#, no-c-format msgid "The CacheMode controls how a particular session = interacts with the second-level cache." msgstr "" = -#: performance.xml:949(para) = +#. Tag: para +#: performance.xml:915 +#, no-c-format msgid "CacheMode.NORMAL - read items from and write ite= ms to the second-level cache" msgstr "" = -#: performance.xml:954(para) = +#. Tag: para +#: performance.xml:920 +#, no-c-format msgid "CacheMode.GET - read items from the second-level= cache, but don't write to the second-level cache except when updating data" msgstr "" = -#: performance.xml:960(para) = +#. Tag: para +#: performance.xml:926 +#, no-c-format msgid "CacheMode.PUT - write items to the second-level = cache, but don't read from the second-level cache" msgstr "" = -#: performance.xml:966(para) = +#. Tag: para +#: performance.xml:932 +#, no-c-format msgid "CacheMode.REFRESH - write items to the second-le= vel cache, but don't read from the second-level cache, bypass the effect of= hibernate.cache.use_minimal_puts, forcing a refresh of = the second-level cache for all items read from the database" msgstr "" = -#: performance.xml:974(para) = +#. Tag: para +#: performance.xml:940 +#, no-c-format msgid "To browse the contents of a second-level or query cache region, use= the Statistics API:" msgstr "" = -#: performance.xml:983(para) = +#. Tag: programlisting +#: performance.xml:945 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:947 +#, no-c-format msgid "You'll need to enable statistics, and, optionally, force Hibernate = to keep the cache entries in a more human-understandable format:" msgstr "" = -#: performance.xml:994(title) = +#. Tag: programlisting +#: performance.xml:952 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: performance.xml:957 +#, no-c-format msgid "The Query Cache" msgstr "" = -#: performance.xml:996(para) = +#. Tag: para +#: performance.xml:959 +#, no-c-format msgid "Query result sets may also be cached. This is only useful for queri= es that are run frequently with the same parameters. To use the query cache= you must first enable it:" msgstr "" = -#: performance.xml:1003(para) = +#. Tag: programlisting +#: performance.xml:964 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: performance.xml:966 +#, no-c-format msgid "This setting causes the creation of two new cache regions - one hol= ding cached query result sets (org.hibernate.cache.StandardQueryCa= che), the other holding timestamps of the most recent updates to = queryable tables (org.hibernate.cache.UpdateTimestampsCache). Note that the query cache does not cache the state of the actual enti= ties in the result set; it caches only identifier values and results of val= ue type. So the query cache should always be used in conjunction with the s= econd-level cache." msgstr "" = -#: performance.xml:1013(para) = +#. Tag: para +#: performance.xml:976 +#, no-c-format msgid "Most queries do not benefit from caching, so by default queries are= not cached. To enable caching, call Query.setCacheable(true). This call allows the query to look for existing cache results or add= its results to the cache when it is executed." msgstr "" = -#: performance.xml:1020(para) = +#. Tag: para +#: performance.xml:983 +#, no-c-format msgid "If you require fine-grained control over query cache expiration pol= icies, you may specify a named cache region for a particular query by calli= ng Query.setCacheRegion()." msgstr "" = -#: performance.xml:1033(para) = +#. Tag: programlisting +#: performance.xml:989 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:991 +#, no-c-format msgid "If the query should force a refresh of its query cache region, you = should call Query.setCacheMode(CacheMode.REFRESH). This = is particularly useful in cases where underlying data may have been updated= via a separate process (i.e., not modified through Hibernate) and allows t= he application to selectively refresh particular query result sets. This is= a more efficient alternative to eviction of a query cache region via SessionFactory.evictQueries()." msgstr "" = -#: performance.xml:1045(title) = +#. Tag: title +#: performance.xml:1003 +#, no-c-format msgid "Understanding Collection performance" msgstr "" = -#: performance.xml:1047(para) = +#. Tag: para +#: performance.xml:1005 +#, no-c-format msgid "We've already spent quite some time talking about collections. In t= his section we will highlight a couple more issues about how collections be= have at runtime." msgstr "" = -#: performance.xml:1054(title) = +#. Tag: title +#: performance.xml:1012 +#, no-c-format msgid "Taxonomy" msgstr "" = -#: performance.xml:1056(para) = +#. Tag: para +#: performance.xml:1014 +#, no-c-format msgid "Hibernate defines three basic kinds of collections:" msgstr "" = -#: performance.xml:1060(para) = +#. Tag: para +#: performance.xml:1018 +#, no-c-format msgid "collections of values" msgstr "" = -#: performance.xml:1063(para) = +#. Tag: para +#: performance.xml:1021 +#, no-c-format msgid "one to many associations" msgstr "" = -#: performance.xml:1066(para) = +#. Tag: para +#: performance.xml:1024 +#, no-c-format msgid "many to many associations" msgstr "" = -#: performance.xml:1070(para) = +#. Tag: para +#: performance.xml:1028 +#, no-c-format msgid "This classification distinguishes the various table and foreign key= relationships but does not tell us quite everything we need to know about = the relational model. To fully understand the relational structure and perf= ormance characteristics, we must also consider the structure of the primary= key that is used by Hibernate to update or delete collection rows. This su= ggests the following classification:" msgstr "" = -#: performance.xml:1081(para) = +#. Tag: para +#: performance.xml:1039 +#, no-c-format msgid "indexed collections" msgstr "" = -#: performance.xml:1084(para) = +#. Tag: para +#: performance.xml:1042 +#, no-c-format msgid "sets" msgstr "" = -#: performance.xml:1087(para) = +#. Tag: para +#: performance.xml:1045 +#, no-c-format msgid "bags" msgstr "" = -#: performance.xml:1091(para) = +#. Tag: para +#: performance.xml:1049 +#, no-c-format msgid "All indexed collections (maps, lists, arrays) have a primary key co= nsisting of the <key> and <index> columns. In this case collection updates are usually extremely eff= icient - the primary key may be efficiently indexed and a particular row ma= y be efficiently located when Hibernate tries to update or delete it." msgstr "" = -#: performance.xml:1099(para) = -msgid "Sets have a primary key consisting of <key> and element columns. This may be less efficient for some types of collect= ion element, particularly composite elements or large text or binary fields= ; the database may not be able to index a complex primary key as efficently= . On the other hand, for one to many or many to many associations, particul= arly in the case of synthetic identifiers, it is likely to be just as effic= ient. (Side-note: if you want SchemaExport to actually c= reate the primary key of a <set> for you, you must= declare all columns as not-null=3D\"true\".)" +#. Tag: para +#: performance.xml:1057 +#, no-c-format +msgid "Sets have a primary key consisting of <key> and element columns. This may be less efficient for some types of collect= ion element, particularly composite elements or large text or binary fields= ; the database may not be able to index a complex primary key as efficientl= y. On the other hand, for one to many or many to many associations, particu= larly in the case of synthetic identifiers, it is likely to be just as effi= cient. (Side-note: if you want SchemaExport to actually = create the primary key of a <set> for you, you mus= t declare all columns as not-null=3D\"true\".)" msgstr "" = -#: performance.xml:1110(para) = +#. Tag: para +#: performance.xml:1068 +#, no-c-format msgid "<idbag> mappings define a surrogate key, s= o they are always very efficient to update. In fact, they are the best case= ." msgstr "" = -#: performance.xml:1115(para) = +#. Tag: para +#: performance.xml:1073 +#, no-c-format msgid "Bags are the worst case. Since a bag permits duplicate element valu= es and has no index column, no primary key may be defined. Hibernate has no= way of distinguishing between duplicate rows. Hibernate resolves this prob= lem by completely removing (in a single DELETE) and recr= eating the collection whenever it changes. This might be very inefficient." msgstr "" = -#: performance.xml:1123(para) = +#. Tag: para +#: performance.xml:1081 +#, no-c-format msgid "Note that for a one-to-many association, the \"primary key\" may no= t be the physical primary key of the database table - but even in this case= , the above classification is still useful. (It still reflects how Hibernat= e \"locates\" individual rows of the collection.)" msgstr "" = -#: performance.xml:1133(title) = +#. Tag: title +#: performance.xml:1091 +#, no-c-format msgid "Lists, maps, idbags and sets are the most efficient collections to = update" msgstr "" = -#: performance.xml:1135(para) = +#. Tag: para +#: performance.xml:1093 +#, no-c-format msgid "From the discussion above, it should be clear that indexed collecti= ons and (usually) sets allow the most efficient operation in terms of addin= g, removing and updating elements." msgstr "" = -#: performance.xml:1141(para) = +#. Tag: para +#: performance.xml:1099 +#, no-c-format msgid "There is, arguably, one more advantage that indexed collections hav= e over sets for many to many associations or collections of values. Because= of the structure of a Set, Hibernate doesn't ever UPDATE a row when an element is \"changed\". Changes to a Set always work via INSERT and = DELETE (of individual rows). Once again, this consideration does = not apply to one to many associations." msgstr "" = -#: performance.xml:1150(para) = +#. Tag: para +#: performance.xml:1108 +#, no-c-format msgid "After observing that arrays cannot be lazy, we would conclude that = lists, maps and idbags are the most performant (non-inverse) collection typ= es, with sets not far behind. Sets are expected to be the most common kind = of collection in Hibernate applications. This is because the \"set\" semant= ics are most natural in the relational model." msgstr "" = -#: performance.xml:1158(para) = +#. Tag: para +#: performance.xml:1116 +#, no-c-format msgid "However, in well-designed Hibernate domain models, we usually see t= hat most collections are in fact one-to-many associations with inv= erse=3D\"true\". For these associations, the update is handled by= the many-to-one end of the association, and so considerations of collectio= n update performance simply do not apply." msgstr "" = -#: performance.xml:1168(title) = +#. Tag: title +#: performance.xml:1126 +#, no-c-format msgid "Bags and lists are the most efficient inverse collections" msgstr "" = -#: performance.xml:1170(para) = +#. Tag: para +#: performance.xml:1128 +#, no-c-format msgid "Just before you ditch bags forever, there is a particular case in w= hich bags (and also lists) are much more performant than sets. For a collec= tion with inverse=3D\"true\" (the standard bidirectional= one-to-many relationship idiom, for example) we can add elements to a bag = or list without needing to initialize (fetch) the bag elements! This is bec= ause Collection.add() or Collection.addAll() must always return true for a bag or List (unlik= e a Set). This can make the following common code much f= aster." msgstr "" = -#: performance.xml:1189(title) = +#. Tag: programlisting +#: performance.xml:1138 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: performance.xml:1143 +#, no-c-format msgid "One shot delete" msgstr "" = -#: performance.xml:1191(para) = +#. Tag: para +#: performance.xml:1145 +#, no-c-format msgid "Occasionally, deleting collection elements one by one can be extrem= ely inefficient. Hibernate isn't completely stupid, so it knows not to do t= hat in the case of an newly-empty collection (if you called list.c= lear(), for example). In this case, Hibernate will issue a single= DELETE and we are done!" msgstr "" = -#: performance.xml:1198(para) = +#. Tag: para +#: performance.xml:1152 +#, no-c-format msgid "Suppose we add a single element to a collection of size twenty and = then remove two elements. Hibernate will issue one INSERT statement and two DELETE statements (unless the collec= tion is a bag). This is certainly desirable." msgstr "" = -#: performance.xml:1204(para) = +#. Tag: para +#: performance.xml:1158 +#, no-c-format msgid "However, suppose that we remove eighteen elements, leaving two and = then add thee new elements. There are two possible ways to proceed" msgstr "" = -#: performance.xml:1211(para) = +#. Tag: para +#: performance.xml:1165 +#, no-c-format msgid "delete eighteen rows one by one and then insert three rows" msgstr "" = -#: performance.xml:1214(para) = +#. Tag: para +#: performance.xml:1168 +#, no-c-format msgid "remove the whole collection (in one SQL DELETE) = and insert all five current elements (one by one)" msgstr "" = -#: performance.xml:1219(para) = +#. Tag: para +#: performance.xml:1173 +#, no-c-format msgid "Hibernate isn't smart enough to know that the second option is prob= ably quicker in this case. (And it would probably be undesirable for Hibern= ate to be that smart; such behaviour might confuse database triggers, etc.)" msgstr "" = -#: performance.xml:1225(para) = +#. Tag: para +#: performance.xml:1179 +#, no-c-format msgid "Fortunately, you can force this behaviour (ie. the second strategy)= at any time by discarding (ie. dereferencing) the original collection and = returning a newly instantiated collection with all the current elements. Th= is can be very useful and powerful from time to time." msgstr "" = -#: performance.xml:1231(para) = +#. Tag: para +#: performance.xml:1185 +#, no-c-format msgid "Of course, one-shot-delete does not apply to collections mapped inverse=3D\"true\"." msgstr "" = -#: performance.xml:1240(title) = +#. Tag: title +#: performance.xml:1194 +#, no-c-format msgid "Monitoring performance" msgstr "" = -#: performance.xml:1242(para) = +#. Tag: para +#: performance.xml:1196 +#, no-c-format msgid "Optimization is not much use without monitoring and access to perfo= rmance numbers. Hibernate provides a full range of figures about its intern= al operations. Statistics in Hibernate are available per SessionFa= ctory." msgstr "" = -#: performance.xml:1249(title) = +#. Tag: title +#: performance.xml:1203 +#, no-c-format msgid "Monitoring a SessionFactory" msgstr "" = -#: performance.xml:1251(para) = +#. Tag: para +#: performance.xml:1205 +#, no-c-format msgid "You can access SessionFactory metrics in two way= s. Your first option is to call sessionFactory.getStatistics() and read or display the Statistics yourself." msgstr "" = -#: performance.xml:1257(para) = +#. Tag: para +#: performance.xml:1211 +#, no-c-format msgid "Hibernate can also use JMX to publish metrics if you enable the StatisticsService MBean. You may enable a single MBean for = all your SessionFactory or one per factory. See the foll= owing code for minimalistic configuration examples:" msgstr "" = -#: performance.xml:1284(para) = +#. Tag: programlisting +#: performance.xml:1218 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: performance.xml:1221 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:1223 +#, no-c-format msgid "TODO: This doesn't make sense: In the first case, we retrieve and u= se the MBean directly. In the second one, we must give the JNDI name in whi= ch the session factory is held before using it. Use hibernateStats= Bean.setSessionFactoryJNDIName(\"my/JNDI/Name\")" msgstr "" = -#: performance.xml:1289(para) = +#. Tag: para +#: performance.xml:1228 +#, no-c-format msgid "You can (de)activate the monitoring for a SessionFactory" msgstr "" = -#: performance.xml:1294(para) = +#. Tag: para +#: performance.xml:1233 +#, no-c-format msgid "at configuration time, set hibernate.generate_statistics to false" msgstr "" = -#: performance.xml:1301(para) = +#. Tag: para +#: performance.xml:1240 +#, no-c-format msgid "at runtime: sf.getStatistics().setStatisticsEnabled(true)<= /literal> or hibernateStatsBean.setStatisticsEnabled(true)" msgstr "" = -#: performance.xml:1308(para) = -msgid "Statistics can be reset programatically using the clear()<= /literal> method. A summary can be sent to a logger (info level) using the = logSummary() method." +#. Tag: para +#: performance.xml:1247 +#, no-c-format +msgid "Statistics can be reset programmatically using the clear()= method. A summary can be sent to a logger (info level) using the= logSummary() method." msgstr "" = -#: performance.xml:1317(title) = +#. Tag: title +#: performance.xml:1256 +#, no-c-format msgid "Metrics" msgstr "" = -#: performance.xml:1319(para) = +#. Tag: para +#: performance.xml:1258 +#, no-c-format msgid "Hibernate provides a number of metrics, from very basic to the spec= ialized information only relevant in certain scenarios. All available count= ers are described in the Statistics interface API, in th= ree categories:" msgstr "" = -#: performance.xml:1326(para) = +#. Tag: para +#: performance.xml:1265 +#, no-c-format msgid "Metrics related to the general Session usage, su= ch as number of open sessions, retrieved JDBC connections, etc." msgstr "" = -#: performance.xml:1332(para) = +#. Tag: para +#: performance.xml:1271 +#, no-c-format msgid "Metrics related to he entities, collections, queries, and caches as= a whole (aka global metrics)," msgstr "" = -#: performance.xml:1338(para) = +#. Tag: para +#: performance.xml:1277 +#, no-c-format msgid "Detailed metrics related to a particular entity, collection, query = or cache region." msgstr "" = -#: performance.xml:1345(para) = -msgid "For exampl,e you can check the cache hit, miss, and put ratio of en= tities, collections and queries, and the average time a query needs. Beware= that the number of milliseconds is subject to approximation in Java. Hiber= nate is tied to the JVM precision, on some platforms this might even only b= e accurate to 10 seconds." +#. Tag: para +#: performance.xml:1284 +#, no-c-format +msgid "For example, you can check the cache hit, miss, and put ratio of en= tities, collections and queries, and the average time a query needs. Beware= that the number of milliseconds is subject to approximation in Java. Hiber= nate is tied to the JVM precision, on some platforms this might even only b= e accurate to 10 seconds." msgstr "" = -#: performance.xml:1352(para) = +#. Tag: para +#: performance.xml:1291 +#, no-c-format msgid "Simple getters are used to access the global metrics (i.e. not tied= to a particular entity, collection, cache region, etc.). You can access th= e metrics of a particular entity, collection or cache region through its na= me, and through its HQL or SQL representation for queries. Please refer to = the Statistics, EntityStatistics, CollectionStatistics, SecondLevelCacheStatistics, and QueryStatistics API Javadoc for more infor= mation. The following code shows a simple example:" msgstr "" = -#: performance.xml:1379(para) = -msgid "To work on all entities, collections, queries and region caches, yo= u can retrieve the list of names of entities, collections, queries and regi= on caches with the following methods: getQueries(), getEntityNames(), getCollectionRoleNames(), and getSecondLevelCacheRegionNames()." +#. Tag: programlisting +#: performance.xml:1301 +#, no-c-format +msgid "" + "" msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: performance.xml:0(None) = -msgid "translator-credits" +#. Tag: para +#: performance.xml:1303 +#, no-c-format +msgid "To work on all entities, collections, queries and region caches, yo= u can retrieve the list of names of entities, collections, queries and regi= on caches with the following methods: getQueries(), getEntityNames(), getCollectionRoleNames(), and getSecondLevelCacheRegionNames()." msgstr "" = Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/pers= istent_classes.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/persistent= _classes.pot 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/persistent= _classes.pot 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,208 +1,566 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:33-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: persistent_classes.xml:5(title) = +#. Tag: title +#: persistent_classes.xml:29 +#, no-c-format msgid "Persistent Classes" msgstr "" = -#: persistent_classes.xml:7(para) = +#. Tag: para +#: persistent_classes.xml:31 +#, no-c-format msgid "Persistent classes are classes in an application that implement the= entities of the business problem (e.g. Customer and Order in an E-commerce= application). Not all instances of a persistent class are considered to be= in the persistent state - an instance may instead be transient or detached= ." msgstr "" = -#: persistent_classes.xml:14(para) = +#. Tag: para +#: persistent_classes.xml:38 +#, no-c-format msgid "Hibernate works best if these classes follow some simple rules, als= o known as the Plain Old Java Object (POJO) programming model. However, non= e of these rules are hard requirements. Indeed, Hibernate3 assumes very lit= tle about the nature of your persistent objects. You may express a domain m= odel in other ways: using trees of Map instances, for ex= ample." msgstr "" = -#: persistent_classes.xml:23(title) = +#. Tag: title +#: persistent_classes.xml:47 +#, no-c-format msgid "A simple POJO example" msgstr "" = -#: persistent_classes.xml:25(para) = +#. Tag: para +#: persistent_classes.xml:49 +#, no-c-format msgid "Most Java applications require a persistent class representing feli= nes." msgstr "" = -#: persistent_classes.xml:108(para) = +#. Tag: programlisting +#: persistent_classes.xml:53 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:55 +#, no-c-format msgid "There are four main rules to follow here:" msgstr "" = -#: persistent_classes.xml:114(title) = +#. Tag: title +#: persistent_classes.xml:61 +#, no-c-format msgid "Implement a no-argument constructor" msgstr "" = -#: persistent_classes.xml:116(para) = +#. Tag: para +#: persistent_classes.xml:63 +#, no-c-format msgid "Cat has a no-argument constructor. All persisten= t classes must have a default constructor (which may be non-public) so that= Hibernate can instantiate them using Constructor.newInstance(). We strongly recommend having a default constructor with at least <= emphasis>package visibility for runtime proxy generation in Hibe= rnate." msgstr "" = -#: persistent_classes.xml:126(title) = +#. Tag: title +#: persistent_classes.xml:73 +#, no-c-format msgid "Provide an identifier property (optional)" msgstr "" = -#: persistent_classes.xml:128(para) = +#. Tag: para +#: persistent_classes.xml:75 +#, no-c-format msgid "Cat has a property called id.= This property maps to the primary key column of a database table. The prop= erty might have been called anything, and its type might have been any prim= itive type, any primitive \"wrapper\" type, java.lang.String or java.util.Date. (If your legacy database table h= as composite keys, you can even use a user-defined class with properties of= these types - see the section on composite identifiers later.)" msgstr "" = -#: persistent_classes.xml:137(para) = +#. Tag: para +#: persistent_classes.xml:84 +#, no-c-format msgid "The identifier property is strictly optional. You can leave them of= f and let Hibernate keep track of object identifiers internally. We do not = recommend this, however." msgstr "" = -#: persistent_classes.xml:142(para) = +#. Tag: para +#: persistent_classes.xml:89 +#, no-c-format msgid "In fact, some functionality is available only to classes which decl= are an identifier property:" msgstr "" = -#: persistent_classes.xml:149(para) = -msgid "Transitive reattachment for detached objects (cascade update or cas= cade merge) - see " +#. Tag: para +#: persistent_classes.xml:96 +#, no-c-format +msgid "Transitive reattachment for detached objects (cascade update or cas= cade merge) - see" msgstr "" = -#: persistent_classes.xml:156(literal) = +#. Tag: literal +#: persistent_classes.xml:103 +#, no-c-format msgid "Session.saveOrUpdate()" msgstr "" = -#: persistent_classes.xml:161(literal) = +#. Tag: literal +#: persistent_classes.xml:108 +#, no-c-format msgid "Session.merge()" msgstr "" = -#: persistent_classes.xml:166(para) = +#. Tag: para +#: persistent_classes.xml:113 +#, no-c-format msgid "We recommend you declare consistently-named identifier properties o= n persistent classes. We further recommend that you use a nullable (ie. non= -primitive) type." msgstr "" = -#: persistent_classes.xml:173(title) = +#. Tag: title +#: persistent_classes.xml:120 +#, no-c-format msgid "Prefer non-final classes (optional)" msgstr "" = -#: persistent_classes.xml:174(para) = +#. Tag: para +#: persistent_classes.xml:121 +#, no-c-format msgid "A central feature of Hibernate, proxies, depen= ds upon the persistent class being either non-final, or the implementation = of an interface that declares all public methods." msgstr "" = -#: persistent_classes.xml:179(para) = +#. Tag: para +#: persistent_classes.xml:126 +#, no-c-format msgid "You can persist final classes that do not implem= ent an interface with Hibernate, but you won't be able to use proxies for l= azy association fetching - which will limit your options for performance tu= ning." msgstr "" = -#: persistent_classes.xml:184(para) = +#. Tag: para +#: persistent_classes.xml:131 +#, no-c-format msgid "You should also avoid declaring public final met= hods on the non-final classes. If you want to use a class with a p= ublic final method, you must explicitly disable proxying by setti= ng lazy=3D\"false\"." msgstr "" = -#: persistent_classes.xml:192(title) = +#. Tag: title +#: persistent_classes.xml:139 +#, no-c-format msgid "Declare accessors and mutators for persistent fields (optional)" msgstr "" = -#: persistent_classes.xml:194(para) = +#. Tag: para +#: persistent_classes.xml:141 +#, no-c-format msgid "Cat declares accessor methods for all its persis= tent fields. Many other ORM tools directly persist instance variables. We b= elieve it is better to provide an indirection between the relational schema= and internal data structures of the class. By default, Hibernate persists = JavaBeans style properties, and recognizes method names of the form getFoo, isFoo and setFoo.= You may switch to direct field access for particular properties, if needed= ." msgstr "" = -#: persistent_classes.xml:204(para) = +#. Tag: para +#: persistent_classes.xml:151 +#, no-c-format msgid "Properties need not be declared public - Hiber= nate can persist a property with a default, protected or= private get / set pair." msgstr "" = -#: persistent_classes.xml:215(title) = +#. Tag: title +#: persistent_classes.xml:162 +#, no-c-format msgid "Implementing inheritance" msgstr "" = -#: persistent_classes.xml:217(para) = +#. Tag: para +#: persistent_classes.xml:164 +#, no-c-format msgid "A subclass must also observe the first and second rules. It inherit= s its identifier property from the superclass, Cat." msgstr "" = -#: persistent_classes.xml:237(title) = +#. Tag: programlisting +#: persistent_classes.xml:169 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: persistent_classes.xml:173 +#, no-c-format msgid "Implementing equals() and hashCode()" msgstr "" = -#: persistent_classes.xml:239(para) = +#. Tag: para +#: persistent_classes.xml:175 +#, no-c-format msgid "You have to override the equals() and h= ashCode() methods if you" msgstr "" = -#: persistent_classes.xml:245(para) = +#. Tag: para +#: persistent_classes.xml:181 +#, no-c-format msgid "intend to put instances of persistent classes in a Set (the recommended way to represent many-valued associations) and" msgstr "" = -#: persistent_classes.xml:252(para) = +#. Tag: para +#: persistent_classes.xml:188 +#, no-c-format msgid "intend to use reattachment of detached instances" msgstr "" = -#: persistent_classes.xml:258(para) = +#. Tag: para +#: persistent_classes.xml:194 +#, no-c-format msgid "Hibernate guarantees equivalence of persistent identity (database r= ow) and Java identity only inside a particular session scope. So as soon as= we mix instances retrieved in different sessions, we must implement equals() and hashCode() if we wish to have = meaningful semantics for Sets." msgstr "" = -#: persistent_classes.xml:266(para) = +#. Tag: para +#: persistent_classes.xml:202 +#, no-c-format msgid "The most obvious way is to implement equals()/hashCode() by comparing the identifier value of both objec= ts. If the value is the same, both must be the same database row, they are = therefore equal (if both are added to a Set, we will onl= y have one element in the Set). Unfortunately, we can't = use that approach with generated identifiers! Hibernate will only assign id= entifier values to objects that are persistent, a newly created instance wi= ll not have any identifier value! Furthermore, if an instance is unsaved an= d currently in a Set, saving it will assign an identifie= r value to the object. If equals() and hashCode= () are based on the identifier value, the hash code would change,= breaking the contract of the Set. See the Hibernate web= site for a full discussion of this problem. Note that this is not a Hiberna= te issue, but ! normal Java semantics of object identity and equality." msgstr "" = -#: persistent_classes.xml:280(para) = +#. Tag: para +#: persistent_classes.xml:216 +#, no-c-format msgid "We recommend implementing equals() and = hashCode() using Business key equality. Busi= ness key equality means that the equals() method compare= s only the properties that form the business key, a key that would identify= our instance in the real world (a natural candidate k= ey):" msgstr "" = -#: persistent_classes.xml:312(para) = +#. Tag: programlisting +#: persistent_classes.xml:224 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:226 +#, no-c-format msgid "Note that a business key does not have to be as solid as a database= primary key candidate (see ). Immutable or unique properties are usually good candidates for a busi= ness key." msgstr "" = -#: persistent_classes.xml:322(title) = +#. Tag: title +#: persistent_classes.xml:236 +#, no-c-format msgid "Dynamic models" msgstr "" = -#: persistent_classes.xml:325(emphasis) = +#. Tag: emphasis +#: persistent_classes.xml:239 +#, no-c-format msgid "Note that the following features are currently considered experimen= tal and may change in the near future." msgstr "" = -#: persistent_classes.xml:329(para) = +#. Tag: para +#: persistent_classes.xml:243 +#, no-c-format msgid "Persistent entities don't necessarily have to be represented as POJ= O classes or as JavaBean objects at runtime. Hibernate also supports dynami= c models (using Maps of Maps at runti= me) and the representation of entities as DOM4J trees. With this approach, = you don't write persistent classes, only mapping files." msgstr "" = -#: persistent_classes.xml:337(para) = +#. Tag: para +#: persistent_classes.xml:251 +#, no-c-format msgid "By default, Hibernate works in normal POJO mode. You may set a defa= ult entity representation mode for a particular SessionFactory using the default_entity_mode configuration optio= n (see ." msgstr "" = -#: persistent_classes.xml:344(para) = +#. Tag: para +#: persistent_classes.xml:258 +#, no-c-format msgid "The following examples demonstrates the representation using Maps. First, in the mapping file, an entity-name has to be declared instead of (or in addition to) a class name:" msgstr "" = -#: persistent_classes.xml:384(para) = +#. Tag: programlisting +#: persistent_classes.xml:264 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:266 +#, no-c-format msgid "Note that even though associations are declared using target class = names, the target type of an associations may also be a dynamic entity inst= ead of a POJO." msgstr "" = -#: persistent_classes.xml:391(para) = +#. Tag: para +#: persistent_classes.xml:273 +#, no-c-format msgid "After setting the default entity mode to dynamic-map for the SessionFactory, we can at runtime work with= Maps of Maps:" msgstr "" = -#: persistent_classes.xml:419(para) = +#. Tag: programlisting +#: persistent_classes.xml:279 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:281 +#, no-c-format msgid "The advantages of a dynamic mapping are quick turnaround time for p= rototyping without the need for entity class implementation. However, you l= ose compile-time type checking and will very likely deal with many exceptio= ns at runtime. Thanks to the Hibernate mapping, the database schema can eas= ily be normalized and sound, allowing to add a proper domain model implemen= tation on top later on." msgstr "" = -#: persistent_classes.xml:427(para) = +#. Tag: para +#: persistent_classes.xml:289 +#, no-c-format msgid "Entity representation modes can also be set on a per Sessi= on basis:" msgstr "" = -#: persistent_classes.xml:446(para) = +#. Tag: programlisting +#: persistent_classes.xml:294 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:297 +#, no-c-format msgid "Please note that the call to getSession() using = an EntityMode is on the Session API, = not the SessionFactory. That way, the new Sessi= on shares the underlying JDBC connection, transaction, and other = context information. This means you don't have tocall flush() and close() on the secondary Session, and also leave the transaction and connection handling to the primar= y unit of work." msgstr "" = -#: persistent_classes.xml:456(para) = +#. Tag: para +#: persistent_classes.xml:307 +#, no-c-format msgid "More information about the XML representation capabilities can be f= ound in ." msgstr "" = -#: persistent_classes.xml:464(title) = +#. Tag: title +#: persistent_classes.xml:315 +#, no-c-format msgid "Tuplizers" msgstr "" = -#: persistent_classes.xml:466(para) = +#. Tag: para +#: persistent_classes.xml:317 +#, no-c-format msgid "org.hibernate.tuple.Tuplizer, and its sub-interf= aces, are responsible for managing a particular representation of a piece o= f data, given that representation's org.hibernate.EntityMode. If a given piece of data is thought of as a data structure, then a tu= plizer is the thing which knows how to create such a data structure and how= to extract values from and inject values into such a data structure. For e= xample, for the POJO entity mode, the correpsonding tuplizer knows how crea= te the POJO through its constructor and how to access the POJO properties u= sing the defined property accessors. There are two high-level types of Tupl= izers, represented by the org.hibernate.tuple.entity.EntityTuplize= r and org.hibernate.tuple.component.ComponentTuplizer interfaces. EntityTuplizers are responsible for = managing the above mentioned contracts in regards to entities, while ComponentTu! plizers do the same for components." msgstr "" = -#: persistent_classes.xml:481(para) = +#. Tag: para +#: persistent_classes.xml:332 +#, no-c-format msgid "Users may also plug in their own tuplizers. Perhaps you require tha= t a java.util.Map implementation other than jav= a.util.HashMap be used while in the dynamic-map entity-mode; or p= erhaps you need to define a different proxy generation strategy than the on= e used by default. Both would be achieved by defining a custom tuplizer imp= lementation. Tuplizers definitions are attached to the entity or component = mapping they are meant to manage. Going back to the example of our customer= entity:" msgstr "" = -#: persistent_classes.xml:529(para) = -msgid "TODO: Document user-extension framework in the property and proxy p= ackages" +#. Tag: programlisting +#: persistent_classes.xml:341 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + "\n" + " \n" + " ...\n" + " \n" + "\n" + "\n" + "\n" + "public class CustomMapTuplizerImpl\n" + " extends org.hibernate.tuple.entity.DynamicMapEntityTuplizer= {\n" + " // override the buildInstantiator() method to plug in our custo= m map...\n" + " protected final Instantiator buildInstantiator(\n" + " org.hibernate.mapping.PersistentClass mappingInfo) {\n" + " return new CustomMapInstantiator( mappingInfo );\n" + " }\n" + "\n" + " private static final class CustomMapInstantiator\n" + " extends org.hibernate.tuple.DynamicMapInstantitor {\n" + " // override the generateMap() method to return our custom m= ap...\n" + " protected final Map generateMap() {\n" + " return new CustomMap();\n" + " }\n" + " }\n" + "}]]>" msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: persistent_classes.xml:0(None) = -msgid "translator-credits" +#. Tag: title +#: persistent_classes.xml:347 +#, no-c-format +msgid "Extentsions" msgstr "" = +#. Tag: para +#: persistent_classes.xml:348 +#, no-c-format +msgid "TODO: Document user-extension framework in the property and proxy p= ackages" +msgstr "" + Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/pref= ace.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/preface.po= t 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/preface.po= t 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,72 +1,100 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:33-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: preface.xml:21(title) = +#. Tag: title +#: preface.xml:29 +#, no-c-format msgid "Preface" msgstr "" = -#: preface.xml:23(para) = +#. Tag: para +#: preface.xml:31 +#, no-c-format msgid "Working with object-oriented software and a relational database can= be cumbersome and time consuming in today's enterprise environments. Hiber= nate is an object/relational mapping tool for Java environments. The term o= bject/relational mapping (ORM) refers to the technique of mapping a data re= presentation from an object model to a relational data model with a SQL-bas= ed schema." msgstr "" = -#: preface.xml:31(para) = +#. Tag: para +#: preface.xml:39 +#, no-c-format msgid "Hibernate not only takes care of the mapping from Java classes to d= atabase tables (and from Java data types to SQL data types), but also provi= des data query and retrieval facilities and can significantly reduce develo= pment time otherwise spent with manual data handling in SQL and JDBC." msgstr "" = -#: preface.xml:38(para) = +#. Tag: para +#: preface.xml:46 +#, no-c-format msgid "Hibernates goal is to relieve the developer from 95 percent of comm= on data persistence related programming tasks. Hibernate may not be the bes= t solution for data-centric applications that only use stored-procedures to= implement the business logic in the database, it is most useful with objec= t-oriented domain models and business logic in the Java-based middle-tier. = However, Hibernate can certainly help you to remove or encapsulate vendor-s= pecific SQL code and will help with the common task of result set translati= on from a tabular representation to a graph of objects." msgstr "" = -#: preface.xml:48(para) = +#. Tag: para +#: preface.xml:56 +#, no-c-format msgid "If you are new to Hibernate and Object/Relational Mapping or even J= ava, please follow these steps:" msgstr "" = -#: preface.xml:55(para) = +#. Tag: para +#: preface.xml:63 +#, no-c-format msgid "Read for a tutorial with step-by-ste= p instructions. The source code for the tutorial is included in the distrib= ution in the doc/reference/tutorial/ directory." msgstr "" = -#: preface.xml:63(para) = +#. Tag: para +#: preface.xml:71 +#, no-c-format msgid "Read to understand the environme= nts where Hibernate can be used." msgstr "" = -#: preface.xml:69(para) = +#. Tag: para +#: preface.xml:77 +#, no-c-format msgid "Have a look at the eg/ directory in the Hibernat= e distribution, it contains a simple standalone application. Copy your JDBC= driver to the lib/ directory and edit etc/hibe= rnate.properties, specifying correct values for your database. Fr= om a command prompt in the distribution directory, type ant eg (using Ant), or under Windows, type build eg." msgstr "" = -#: preface.xml:80(para) = +#. Tag: para +#: preface.xml:88 +#, no-c-format msgid "Use this reference documentation as your primary source of informat= ion. Consider reading Java Persistence with Hibernate = (http://www.manning.com/bauer2) if you need more help with application desi= gn or if you prefer a step-by-step tutorial. Also visit http://caveatemptor= .hibernate.org and download the example application for Java Persistence wi= th Hibernate." msgstr "" = -#: preface.xml:90(para) = +#. Tag: para +#: preface.xml:98 +#, no-c-format msgid "FAQs are answered on the Hibernate website." msgstr "" = -#: preface.xml:95(para) = +#. Tag: para +#: preface.xml:103 +#, no-c-format msgid "Third party demos, examples, and tutorials are linked on the Hibern= ate website." msgstr "" = -#: preface.xml:101(para) = +#. Tag: para +#: preface.xml:109 +#, no-c-format msgid "The Community Area on the Hibernate website is a good resource for = design patterns and various integration solutions (Tomcat, JBoss AS, Struts= , EJB, etc.)." msgstr "" = -#: preface.xml:109(para) = +#. Tag: para +#: preface.xml:117 +#, no-c-format msgid "If you have questions, use the user forum linked on the Hibernate w= ebsite. We also provide a JIRA issue trackings system for bug reports and f= eature requests. If you are interested in the development of Hibernate, joi= n the developer mailing list. If you are interested in translating this doc= umentation into your language, contact us on the developer mailing list." msgstr "" = -#: preface.xml:117(para) = +#. Tag: para +#: preface.xml:125 +#, no-c-format msgid "Commercial development support, production support, and training fo= r Hibernate is available through JBoss Inc. (see http://www.hibernate.org/S= upportTraining/). Hibernate is a Professional Open Source project and a cri= tical component of the JBoss Enterprise Middleware System (JEMS) suite of p= roducts." msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: preface.xml:0(None) = -msgid "translator-credits" -msgstr "" - Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/quer= y_criteria.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/query_crit= eria.pot 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/query_crit= eria.pot 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,184 +1,630 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:33-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: query_criteria.xml:5(title) = +#. Tag: title +#: query_criteria.xml:29 +#, no-c-format msgid "Criteria Queries" msgstr "" = -#: query_criteria.xml:7(para) = +#. Tag: para +#: query_criteria.xml:31 +#, no-c-format msgid "Hibernate features an intuitive, extensible criteria query API." msgstr "" = -#: query_criteria.xml:12(title) = +#. Tag: title +#: query_criteria.xml:36 +#, no-c-format msgid "Creating a Criteria instance" msgstr "" = -#: query_criteria.xml:14(para) = +#. Tag: para +#: query_criteria.xml:38 +#, no-c-format msgid "The interface org.hibernate.Criteria represents = a query against a particular persistent class. The Session is a factory for Criteria instances." msgstr "" = -#: query_criteria.xml:27(title) = +#. Tag: programlisting +#: query_criteria.xml:44 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_criteria.xml:49 +#, no-c-format msgid "Narrowing the result set" msgstr "" = -#: query_criteria.xml:29(para) = +#. Tag: para +#: query_criteria.xml:51 +#, no-c-format msgid "An individual query criterion is an instance of the interface org.hibernate.criterion.Criterion. The class org.hib= ernate.criterion.Restrictions defines factory methods for obtaini= ng certain built-in Criterion types." msgstr "" = -#: query_criteria.xml:42(para) = +#. Tag: programlisting +#: query_criteria.xml:59 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:61 +#, no-c-format msgid "Restrictions may be grouped logically." msgstr "" = -#: query_criteria.xml:64(para) = +#. Tag: programlisting +#: query_criteria.xml:65 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:67 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:69 +#, no-c-format msgid "There are quite a range of built-in criterion types (Restr= ictions subclasses), but one that is especially useful lets you s= pecify SQL directly." msgstr "" = -#: query_criteria.xml:73(para) = +#. Tag: programlisting +#: query_criteria.xml:74 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:76 +#, no-c-format msgid "The {alias} placeholder with be replaced by the = row alias of the queried entity." msgstr "" = -#: query_criteria.xml:78(para) = +#. Tag: para +#: query_criteria.xml:81 +#, no-c-format msgid "An alternative approach to obtaining a criterion is to get it from = a Property instance. You can create a Property<= /literal> by calling Property.forName()." msgstr "" = -#: query_criteria.xml:99(title) = +#. Tag: programlisting +#: query_criteria.xml:87 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_criteria.xml:92 +#, no-c-format msgid "Ordering the results" msgstr "" = -#: query_criteria.xml:101(para) = +#. Tag: para +#: query_criteria.xml:94 +#, no-c-format msgid "You may order the results using org.hibernate.criterion.Or= der." msgstr "" = -#: query_criteria.xml:122(title) = +#. Tag: programlisting +#: query_criteria.xml:98 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:100 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_criteria.xml:105 +#, no-c-format msgid "Associations" msgstr "" = -#: query_criteria.xml:124(para) = +#. Tag: para +#: query_criteria.xml:107 +#, no-c-format msgid "You may easily specify constraints upon related entities by navigat= ing associations using createCriteria()." msgstr "" = -#: query_criteria.xml:135(para) = +#. Tag: programlisting +#: query_criteria.xml:112 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:114 +#, no-c-format msgid "note that the second createCriteria() returns a = new instance of Criteria, which refers to the elements o= f the kittens collection." msgstr "" = -#: query_criteria.xml:141(para) = +#. Tag: para +#: query_criteria.xml:120 +#, no-c-format msgid "The following, alternate form is useful in certain circumstances." msgstr "" = -#: query_criteria.xml:151(para) = +#. Tag: programlisting +#: query_criteria.xml:124 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:126 +#, no-c-format msgid "(createAlias() does not create a new instance of= Criteria.)" msgstr "" = -#: query_criteria.xml:156(para) = +#. Tag: para +#: query_criteria.xml:131 +#, no-c-format msgid "Note that the kittens collections held by the Cat instances returned by the previous two queries are not pre-filtered by the criteria! If you wish to retrieve just the kittens t= hat match the criteria, you must use a ResultTransformer= ." msgstr "" = -#: query_criteria.xml:178(title) = +#. Tag: programlisting +#: query_criteria.xml:138 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_criteria.xml:143 +#, no-c-format msgid "Dynamic association fetching" msgstr "" = -#: query_criteria.xml:180(para) = +#. Tag: para +#: query_criteria.xml:145 +#, no-c-format msgid "You may specify association fetching semantics at runtime using setFetchMode()." msgstr "" = -#: query_criteria.xml:191(para) = +#. Tag: programlisting +#: query_criteria.xml:150 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:152 +#, no-c-format msgid "This query will fetch both mate and kit= tens by outer join. See for more information." msgstr "" = -#: query_criteria.xml:199(title) = +#. Tag: title +#: query_criteria.xml:160 +#, no-c-format msgid "Example queries" msgstr "" = -#: query_criteria.xml:201(para) = +#. Tag: para +#: query_criteria.xml:162 +#, no-c-format msgid "The class org.hibernate.criterion.Example allows= you to construct a query criterion from a given instance." msgstr "" = -#: query_criteria.xml:213(para) = +#. Tag: programlisting +#: query_criteria.xml:167 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:169 +#, no-c-format msgid "Version properties, identifiers and associations are ignored. By de= fault, null valued properties are excluded." msgstr "" = -#: query_criteria.xml:218(para) = +#. Tag: para +#: query_criteria.xml:174 +#, no-c-format msgid "You can adjust how the Example is applied." msgstr "" = -#: query_criteria.xml:231(para) = +#. Tag: programlisting +#: query_criteria.xml:178 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:180 +#, no-c-format msgid "You can even use examples to place criteria upon associated objects= ." msgstr "" = -#: query_criteria.xml:244(title) = +#. Tag: programlisting +#: query_criteria.xml:184 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_criteria.xml:189 +#, no-c-format msgid "Projections, aggregation and grouping" msgstr "" = -#: query_criteria.xml:245(para) = +#. Tag: para +#: query_criteria.xml:190 +#, no-c-format msgid "The class org.hibernate.criterion.Projections is= a factory for Projection instances. We apply a projecti= on to a query by calling setProjection()." msgstr "" = -#: query_criteria.xml:265(para) = +#. Tag: programlisting +#: query_criteria.xml:196 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:198 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:200 +#, no-c-format msgid "There is no explicit \"group by\" necessary in a criteria query. Ce= rtain projection types are defined to be grouping projections, which also appear in the SQL group by clause." msgstr "" = -#: query_criteria.xml:271(para) = +#. Tag: para +#: query_criteria.xml:206 +#, no-c-format msgid "An alias may optionally be assigned to a projection, so that the pr= ojected value may be referred to in restrictions or orderings. Here are two= different ways to do this:" msgstr "" = -#: query_criteria.xml:287(para) = +#. Tag: programlisting +#: query_criteria.xml:212 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:214 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:216 +#, no-c-format msgid "The alias() and as() methods = simply wrap a projection instance in another, aliased, instance of Projection. As a shortcut, you can assign an alias when you add = the projection to a projection list:" msgstr "" = -#: query_criteria.xml:315(para) = +#. Tag: programlisting +#: query_criteria.xml:223 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:225 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:227 +#, no-c-format msgid "You can also use Property.forName() to express p= rojections:" msgstr "" = -#: query_criteria.xml:338(title) = +#. Tag: programlisting +#: query_criteria.xml:231 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:233 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_criteria.xml:238 +#, no-c-format msgid "Detached queries and subqueries" msgstr "" = -#: query_criteria.xml:339(para) = +#. Tag: para +#: query_criteria.xml:239 +#, no-c-format msgid "The DetachedCriteria class lets you create a que= ry outside the scope of a session, and then later execute it using some arb= itrary Session." msgstr "" = -#: query_criteria.xml:353(para) = +#. Tag: programlisting +#: query_criteria.xml:244 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:246 +#, no-c-format msgid "A DetachedCriteria may also be used to express a= subquery. Criterion instances involving subqueries may be obtained via Subqueries or Property." msgstr "" = -#: query_criteria.xml:371(para) = +#. Tag: programlisting +#: query_criteria.xml:252 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:254 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:256 +#, no-c-format msgid "Even correlated subqueries are possible:" msgstr "" = -#: query_criteria.xml:389(title) = +#. Tag: programlisting +#: query_criteria.xml:260 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_criteria.xml:269 +#, no-c-format msgid "Queries by natural identifier" msgstr "" = -#: query_criteria.xml:391(para) = +#. Tag: para +#: query_criteria.xml:271 +#, no-c-format msgid "For most queries, including criteria queries, the query cache is no= t very efficient, because query cache invalidation occurs too frequently. H= owever, there is one special kind of query where we can optimize the cache = invalidation algorithm: lookups by a constant natural key. In some applicat= ions, this kind of query occurs frequently. The criteria API provides speci= al provision for this use case." msgstr "" = -#: query_criteria.xml:399(para) = +#. Tag: para +#: query_criteria.xml:279 +#, no-c-format msgid "First, you should map the natural key of your entity using <natural-id>, and enable use of the second-level cache." msgstr "" = -#: query_criteria.xml:416(para) = +#. Tag: programlisting +#: query_criteria.xml:284 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: query_criteria.xml:286 +#, no-c-format msgid "Note that this functionality is not intended for use with entities = with mutable natural keys." msgstr "" = -#: query_criteria.xml:421(para) = +#. Tag: para +#: query_criteria.xml:291 +#, no-c-format msgid "Next, enable the Hibernate query cache." msgstr "" = -#: query_criteria.xml:425(para) = +#. Tag: para +#: query_criteria.xml:295 +#, no-c-format msgid "Now, Restrictions.naturalId() allows us to make = use of the more efficient cache algorithm." msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: query_criteria.xml:0(None) = -msgid "translator-credits" +#. Tag: programlisting +#: query_criteria.xml:300 +#, no-c-format +msgid "" + "" msgstr "" = Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/quer= y_hql.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/query_hql.= pot 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/query_hql.= pot 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,644 +1,1793 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:34-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: query_hql.xml:5(title) = +#. Tag: title +#: query_hql.xml:29 +#, no-c-format msgid "HQL: The Hibernate Query Language" msgstr "" = -#: query_hql.xml:7(para) = +#. Tag: para +#: query_hql.xml:31 +#, no-c-format msgid "Hibernate is equipped with an extremely powerful query language tha= t (quite intentionally) looks very much like SQL. But don't be fooled by th= e syntax; HQL is fully object-oriented, understanding notions like inherite= nce, polymorphism and association." msgstr "" = -#: query_hql.xml:14(title) = +#. Tag: title +#: query_hql.xml:38 +#, no-c-format msgid "Case Sensitivity" msgstr "" = -#: query_hql.xml:16(para) = +#. Tag: para +#: query_hql.xml:40 +#, no-c-format msgid "Queries are case-insensitive, except for names of Java classes and = properties. So SeLeCT is the same as sELEct is the same as SELECT but org.hibernate.= eg.FOO is not org.hibernate.eg.Foo and foo.barSet is not foo.BARSET." msgstr "" = -#: query_hql.xml:27(para) = +#. Tag: para +#: query_hql.xml:51 +#, no-c-format msgid "This manual uses lowercase HQL keywords. Some users find queries wi= th uppercase keywords more readable, but we find this convention ugly when = embedded in Java code." msgstr "" = -#: query_hql.xml:35(title) = +#. Tag: title +#: query_hql.xml:59 +#, no-c-format msgid "The from clause" msgstr "" = -#: query_hql.xml:37(para) = +#. Tag: para +#: query_hql.xml:61 +#, no-c-format msgid "The simplest possible Hibernate query is of the form:" msgstr "" = -#: query_hql.xml:43(para) = +#. Tag: programlisting +#: query_hql.xml:65 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:67 +#, no-c-format msgid "which simply returns all instances of the class eg.Cat. We don't usually need to qualify the class name, since aut= o-import is the default. So we almost always just write:" msgstr "" = -#: query_hql.xml:51(para) = +#. Tag: programlisting +#: query_hql.xml:73 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:75 +#, no-c-format msgid "Most of the time, you will need to assign an alias, since you will want to refer to the Cat in other p= arts of the query." msgstr "" = -#: query_hql.xml:59(para) = +#. Tag: programlisting +#: query_hql.xml:81 query_hql.xml:396 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:83 +#, no-c-format msgid "This query assigns the alias cat to Cat= instances, so we could use that alias later in the query. The as keyword is optional; we could also write:" msgstr "" = -#: query_hql.xml:67(para) = +#. Tag: programlisting +#: query_hql.xml:89 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:91 +#, no-c-format msgid "Multiple classes may appear, resulting in a cartesian product or \"= cross\" join." msgstr "" = -#: query_hql.xml:74(para) = +#. Tag: programlisting +#: query_hql.xml:95 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:96 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:98 +#, no-c-format msgid "It is considered good practice to name query aliases using an initi= al lowercase, consistent with Java naming standards for local variables (eg= . domesticCat)." msgstr "" = -#: query_hql.xml:83(title) = +#. Tag: title +#: query_hql.xml:107 +#, no-c-format msgid "Associations and joins" msgstr "" = -#: query_hql.xml:85(para) = +#. Tag: para +#: query_hql.xml:109 +#, no-c-format msgid "We may also assign aliases to associated entities, or even to eleme= nts of a collection of values, using a join." msgstr "" = -#: query_hql.xml:98(para) = +#. Tag: programlisting +#: query_hql.xml:114 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:116 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:118 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:120 +#, no-c-format msgid "The supported join types are borrowed from ANSI SQL" msgstr "" = -#: query_hql.xml:105(literal) = +#. Tag: literal +#: query_hql.xml:127 +#, no-c-format msgid "inner join" msgstr "" = -#: query_hql.xml:110(literal) = +#. Tag: literal +#: query_hql.xml:132 +#, no-c-format msgid "left outer join" msgstr "" = -#: query_hql.xml:115(literal) = +#. Tag: literal +#: query_hql.xml:137 +#, no-c-format msgid "right outer join" msgstr "" = -#: query_hql.xml:119(para) = +#. Tag: para +#: query_hql.xml:141 +#, no-c-format msgid "full join (not usually useful)" msgstr "" = -#: query_hql.xml:125(para) = +#. Tag: para +#: query_hql.xml:147 +#, no-c-format msgid "The inner join, left outer join and right outer join constructs may be abbreviated." msgstr "" = -#: query_hql.xml:134(para) = +#. Tag: programlisting +#: query_hql.xml:152 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:154 +#, no-c-format msgid "You may supply extra join conditions using the HQL with keyword." msgstr "" = -#: query_hql.xml:143(para) = +#. Tag: programlisting +#: query_hql.xml:159 +#, no-c-format +msgid "" + " 10.0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:161 +#, no-c-format msgid "In addition, a \"fetch\" join allows associations or collections of= values to be initialized along with their parent objects, using a single s= elect. This is particularly useful in the case of a collection. It effectiv= ely overrides the outer join and lazy declarations of the mapping file for = associations and collections. See for more information." msgstr "" = -#: query_hql.xml:155(para) = +#. Tag: programlisting +#: query_hql.xml:169 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:171 +#, no-c-format msgid "A fetch join does not usually need to assign an alias, because the = associated objects should not be used in the where claus= e (or any other clause). Also, the associated objects are not returned dire= ctly in the query results. Instead, they may be accessed via the parent obj= ect. The only reason we might need an alias is if we are recursively join f= etching a further collection:" msgstr "" = -#: query_hql.xml:168(para) = +#. Tag: programlisting +#: query_hql.xml:179 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:181 +#, no-c-format msgid "Note that the fetch construct may not be used in= queries called using iterate() (though scroll(= ) can be used). Nor should fetch be used toget= her with setMaxResults() or setFirstResult() as these operations are based on the result rows, which usually con= tain duplicates for eager collection fetching, hence, the number of rows is= not what you'd expect. Nor may fetch be used together w= ith an ad hoc with condition. It is possible to create a= cartesian product by join fetching more than one collection in a query, so= take care in this case. Join fetching multiple collection roles also somet= imes gives unexpected results for bag mappings, so be careful about how you= formulate your queries in this case. Finally, note that full join= fetch and right join fetch are not meaningful= ." msgstr "" = -#: query_hql.xml:183(para) = +#. Tag: para +#: query_hql.xml:196 +#, no-c-format msgid "If you are using property-level lazy fetching (with bytecode instru= mentation), it is possible to force Hibernate to fetch the lazy properties = immediately (in the first query) using fetch all properties." msgstr "" = -#: query_hql.xml:195(title) = +#. Tag: programlisting +#: query_hql.xml:202 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:203 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: title +#: query_hql.xml:208 +#, no-c-format msgid "Forms of join syntax" msgstr "" = -#: query_hql.xml:197(para) = +#. Tag: para +#: query_hql.xml:210 +#, no-c-format msgid "HQL supports two forms of association joining: implicit and explicit." msgstr "" = -#: query_hql.xml:201(para) = +#. Tag: para +#: query_hql.xml:214 +#, no-c-format msgid "The queries shown in the previous section all use the expl= icit form where the join keyword is explicitly used in the from c= lause. This is the recommended form." msgstr "" = -#: query_hql.xml:206(para) = +#. Tag: para +#: query_hql.xml:219 +#, no-c-format msgid "The implicit form does not use the join keyword.= Instead, the associations are \"dereferenced\" using dot-notation. implicit joins can appear in any of the HQL clauses. i= mplicit join result in inner joins in the resulting SQL statement= ." msgstr "" = -#: query_hql.xml:217(title) = +#. Tag: programlisting +#: query_hql.xml:226 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: title +#: query_hql.xml:230 +#, no-c-format msgid "Refering to identifier property" msgstr "" = -#: query_hql.xml:219(para) = +#. Tag: para +#: query_hql.xml:232 +#, no-c-format msgid "There are, generally speaking, 2 ways to refer to an entity's ident= ifier property:" msgstr "" = -#: query_hql.xml:224(para) = +#. Tag: para +#: query_hql.xml:237 +#, no-c-format msgid "The special property (lowercase) id may be used = to reference the identifier property of an entity provided that e= ntity does not define a non-identifier property named id." msgstr "" = -#: query_hql.xml:231(para) = +#. Tag: para +#: query_hql.xml:244 +#, no-c-format msgid "If the entity defines a named identifier property, you may use that= property name." msgstr "" = -#: query_hql.xml:237(para) = +#. Tag: para +#: query_hql.xml:250 +#, no-c-format msgid "References to composite identifier properties follow the same namin= g rules. If the entity has a non-identifier property named id, the composit= e identifier property can only be referenced by its defined named; otherwis= e, the special id property can be used to rerference the= identifier property." msgstr "" = -#: query_hql.xml:244(para) = -msgid "Note: this has changed significantly starting in version 3.2.2. In = previous versions, idalways referre= d to the identifier property no matter what its actual name. A ramification= of that decision was that non-identifier properties named id could never be referenced in Hibernate queries." +#. Tag: para +#: query_hql.xml:257 +#, no-c-format +msgid "Note: this has changed significantly starting in version 3.2.2. In = previous versions, id always referr= ed to the identifier property no matter what its actual name. A ramificatio= n of that decision was that non-identifier properties named id could never be referenced in Hibernate queries." msgstr "" = -#: query_hql.xml:253(title) = +#. Tag: title +#: query_hql.xml:266 +#, no-c-format msgid "The select clause" msgstr "" = -#: query_hql.xml:255(para) = +#. Tag: para +#: query_hql.xml:268 +#, no-c-format msgid "The select clause picks which objects and proper= ties to return in the query result set. Consider:" msgstr "" = -#: query_hql.xml:264(para) = +#. Tag: programlisting +#: query_hql.xml:273 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:275 +#, no-c-format msgid "The query will select mates of other Ca= ts. Actually, you may express this query more compactly as:" msgstr "" = -#: query_hql.xml:271(para) = +#. Tag: programlisting +#: query_hql.xml:280 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:282 +#, no-c-format msgid "Queries may return properties of any value type including propertie= s of component type:" msgstr "" = -#: query_hql.xml:280(para) = +#. Tag: programlisting +#: query_hql.xml:286 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:288 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:290 +#, no-c-format msgid "Queries may return multiple objects and/or properties as an array o= f type Object[]," msgstr "" = -#: query_hql.xml:290(para) = +#. Tag: programlisting +#: query_hql.xml:295 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:297 +#, no-c-format msgid "or as a List," msgstr "" = -#: query_hql.xml:299(para) = +#. Tag: programlisting +#: query_hql.xml:301 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:303 +#, no-c-format msgid "or as an actual typesafe Java object," msgstr "" = -#: query_hql.xml:308(para) = +#. Tag: programlisting +#: query_hql.xml:307 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:309 +#, no-c-format msgid "assuming that the class Family has an appropriat= e constructor." msgstr "" = -#: query_hql.xml:312(para) = +#. Tag: para +#: query_hql.xml:313 +#, no-c-format msgid "You may assign aliases to selected expressions using as:" msgstr "" = -#: query_hql.xml:319(para) = +#. Tag: programlisting +#: query_hql.xml:317 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:319 +#, no-c-format msgid "This is most useful when used together with select new map= :" msgstr "" = -#: query_hql.xml:326(para) = +#. Tag: programlisting +#: query_hql.xml:323 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:325 +#, no-c-format msgid "This query returns a Map from aliases to selecte= d values." msgstr "" = -#: query_hql.xml:333(title) = +#. Tag: title +#: query_hql.xml:332 +#, no-c-format msgid "Aggregate functions" msgstr "" = -#: query_hql.xml:335(para) = +#. Tag: para +#: query_hql.xml:334 +#, no-c-format msgid "HQL queries may even return the results of aggregate functions on p= roperties:" msgstr "" = -#. NO LONGER SUPPORTED -#. -#. Collections may also appear inside aggregate functions in t= he select -#. clause. -#. -#. = -#. -#: query_hql.xml:352(para) = +#. Tag: programlisting +#: query_hql.xml:338 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:349 +#, no-c-format msgid "The supported aggregate functions are" msgstr "" = -#: query_hql.xml:359(literal) = +#. Tag: literal +#: query_hql.xml:356 +#, no-c-format msgid "avg(...), sum(...), min(...), max(...)" msgstr "" = -#: query_hql.xml:364(literal) = +#. Tag: literal +#: query_hql.xml:361 +#, no-c-format msgid "count(*)" msgstr "" = -#: query_hql.xml:369(literal) = +#. Tag: literal +#: query_hql.xml:366 +#, no-c-format msgid "count(...), count(distinct ...), count(all...)" msgstr "" = -#: query_hql.xml:374(para) = +#. Tag: para +#: query_hql.xml:371 +#, no-c-format msgid "You may use arithmetic operators, concatenation, and recognized SQL= functions in the select clause:" msgstr "" = -#: query_hql.xml:386(para) = +#. Tag: programlisting +#: query_hql.xml:376 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:378 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:380 +#, no-c-format msgid "The distinct and all keywords= may be used and have the same semantics as in SQL." msgstr "" = -#: query_hql.xml:398(title) = +#. Tag: programlisting +#: query_hql.xml:385 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_hql.xml:390 +#, no-c-format msgid "Polymorphic queries" msgstr "" = -#: query_hql.xml:400(para) = +#. Tag: para +#: query_hql.xml:392 +#, no-c-format msgid "A query like:" msgstr "" = -#: query_hql.xml:406(para) = +#. Tag: para +#: query_hql.xml:398 +#, no-c-format msgid "returns instances not only of Cat, but also of s= ubclasses like DomesticCat. Hibernate queries may name <= emphasis>any Java class or interface in the from clause. The query will return instances of all persistent classes that = extend that class or implement the interface. The following query would ret= urn all persistent objects:" msgstr "" = -#: query_hql.xml:416(para) = +#. Tag: programlisting +#: query_hql.xml:406 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:408 +#, no-c-format msgid "The interface Named might be implemented by vari= ous persistent classes:" msgstr "" = -#: query_hql.xml:423(para) = +#. Tag: programlisting +#: query_hql.xml:413 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:415 +#, no-c-format msgid "Note that these last two queries will require more than one SQL SELECT. This means that the order by cla= use does not correctly order the whole result set. (It also means you can't= call these queries using Query.scroll().)" msgstr "" = -#: query_hql.xml:432(title) = +#. Tag: title +#: query_hql.xml:424 +#, no-c-format msgid "The where clause" msgstr "" = -#: query_hql.xml:434(para) = +#. Tag: para +#: query_hql.xml:426 +#, no-c-format msgid "The where clause allows you to narrow the list o= f instances returned. If no alias exists, you may refer to properties by na= me:" msgstr "" = -#: query_hql.xml:441(para) = +#. Tag: programlisting +#: query_hql.xml:431 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:433 +#, no-c-format msgid "If there is an alias, use a qualified property name:" msgstr "" = -#: query_hql.xml:447(para) = +#. Tag: programlisting +#: query_hql.xml:437 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:439 +#, no-c-format msgid "returns instances of Cat named 'Fritz'." msgstr "" = -#: query_hql.xml:455(para) = +#. Tag: programlisting +#: query_hql.xml:443 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:445 +#, no-c-format msgid "will return all instances of Foo for which there= exists an instance of bar with a date property equal to the startDate property of the Foo. Compound path expressions make the where clause extremely powerful. Consider:" msgstr "" = -#: query_hql.xml:466(para) = +#. Tag: programlisting +#: query_hql.xml:454 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:456 +#, no-c-format msgid "This query translates to an SQL query with a table (inner) join. If= you were to write something like" msgstr "" = -#: query_hql.xml:474(para) = +#. Tag: programlisting +#: query_hql.xml:461 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:463 +#, no-c-format msgid "you would end up with a query that would require four table joins i= n SQL." msgstr "" = -#: query_hql.xml:478(para) = +#. Tag: para +#: query_hql.xml:467 +#, no-c-format msgid "The =3D operator may be used to compare not only= properties, but also instances:" msgstr "" = -#: query_hql.xml:489(para) = +#. Tag: programlisting +#: query_hql.xml:472 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:474 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:476 +#, no-c-format msgid "The special property (lowercase) id may be used = to reference the unique identifier of an object. See for more information." msgstr "" = -#: query_hql.xml:499(para) = +#. Tag: programlisting +#: query_hql.xml:482 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:484 +#, no-c-format msgid "The second query is efficient. No table join is required!" msgstr "" = -#: query_hql.xml:503(para) = +#. Tag: para +#: query_hql.xml:488 +#, no-c-format msgid "Properties of composite identifiers may also be used. Suppose Person has a composite identifier consisting of coun= try and medicareNumber. Again, see for more information regarding refe= rencing identifier properties." msgstr "" = -#: query_hql.xml:518(para) = +#. Tag: programlisting +#: query_hql.xml:495 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:497 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:499 +#, no-c-format msgid "Once again, the second query requires no table join." msgstr "" = -#: query_hql.xml:522(para) = +#. Tag: para +#: query_hql.xml:503 +#, no-c-format msgid "Likewise, the special property class accesses th= e discriminator value of an instance in the case of polymorphic persistence= . A Java class name embedded in the where clause will be translated to its = discriminator value." msgstr "" = -#: query_hql.xml:530(para) = -msgid "You may also use components or composite user types, or properties = of said component types. See for= more details." +#. Tag: programlisting +#: query_hql.xml:509 +#, no-c-format +msgid "" msgstr "" = -#: query_hql.xml:535(para) = +#. Tag: para +#: query_hql.xml:511 +#, no-c-format +msgid "You may also use components or composite user types, or properties = of said component types. See for = more details." +msgstr "" + +#. Tag: para +#: query_hql.xml:516 +#, no-c-format msgid "An \"any\" type has the special properties id an= d class, allowing us to express a join in the following = way (where AuditLog.item is a property mapped with <any>)." msgstr "" = -#: query_hql.xml:544(para) = +#. Tag: programlisting +#: query_hql.xml:522 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:524 +#, no-c-format msgid "Notice that log.item.class and payment.= class would refer to the values of completely different database = columns in the above query." msgstr "" = -#: query_hql.xml:552(title) = +#. Tag: title +#: query_hql.xml:532 +#, no-c-format msgid "Expressions" msgstr "" = -#: query_hql.xml:554(para) = +#. Tag: para +#: query_hql.xml:534 +#, no-c-format msgid "Expressions allowed in the where clause include = most of the kind of things you could write in SQL:" msgstr "" = -#: query_hql.xml:561(para) = +#. Tag: para +#: query_hql.xml:541 +#, no-c-format msgid "mathematical operators +, -, *, /" msgstr "" = -#: query_hql.xml:566(para) = +#. Tag: para +#: query_hql.xml:546 +#, no-c-format msgid "binary comparison operators =3D, >=3D, <=3D, <>= ;, !=3D, like" msgstr "" = -#: query_hql.xml:571(para) = +#. Tag: para +#: query_hql.xml:551 +#, no-c-format msgid "logical operations and, or, not" msgstr "" = -#: query_hql.xml:576(para) = +#. Tag: para +#: query_hql.xml:556 +#, no-c-format msgid "Parentheses ( ), indicating grouping" msgstr "" = -#: query_hql.xml:581(para) = +#. Tag: para +#: query_hql.xml:561 +#, no-c-format msgid "in, not in, between<= /literal>, is null, is not null, is empty, is not empty, member o= f and not member of" msgstr "" = -#: query_hql.xml:594(para) = +#. Tag: para +#: query_hql.xml:574 +#, no-c-format msgid "\"Simple\" case, case ... when ... then ... else ... end, and \"searched\" case, case when ... then ... else ... e= nd" msgstr "" = -#: query_hql.xml:600(para) = +#. Tag: para +#: query_hql.xml:580 +#, no-c-format msgid "string concatenation ...||... or concat= (...,...)" msgstr "" = -#: query_hql.xml:605(para) = +#. Tag: para +#: query_hql.xml:585 +#, no-c-format msgid "current_date(), current_time(), current_timestamp()" msgstr "" = -#: query_hql.xml:611(para) = +#. Tag: para +#: query_hql.xml:591 +#, no-c-format msgid "second(...), minute(...), hour(...), day(...), month(...)= , year(...)," msgstr "" = -#: query_hql.xml:618(para) = +#. Tag: para +#: query_hql.xml:598 +#, no-c-format msgid "Any function or operator defined by EJB-QL 3.0: substring(= ), trim(), lower(), upper(), length(), locate(), abs(), sqrt(), bit_length(= ), mod()" msgstr "" = -#: query_hql.xml:624(para) = +#. Tag: para +#: query_hql.xml:604 +#, no-c-format msgid "coalesce() and nullif()" msgstr "" = -#: query_hql.xml:629(para) = +#. Tag: para +#: query_hql.xml:609 +#, no-c-format msgid "str() for converting numeric or temporal values = to a readable string" msgstr "" = -#: query_hql.xml:635(para) = +#. Tag: para +#: query_hql.xml:615 +#, no-c-format msgid "cast(... as ...), where the second argument is t= he name of a Hibernate type, and extract(... from ...) i= f ANSI cast() and extract() is suppor= ted by the underlying database" msgstr "" = -#: query_hql.xml:643(para) = +#. Tag: para +#: query_hql.xml:623 +#, no-c-format msgid "the HQL index() function, that applies to aliase= s of a joined indexed collection" msgstr "" = -#: query_hql.xml:649(para) = +#. Tag: para +#: query_hql.xml:629 +#, no-c-format msgid "HQL functions that take collection-valued path expressions: size(), minelement(), maxelement(), minindex(), maxindex(), alo= ng with the special elements() and indices functions which may be quantified using some, all, exists, a= ny, in." msgstr "" = -#: query_hql.xml:657(para) = +#. Tag: para +#: query_hql.xml:637 +#, no-c-format msgid "Any database-supported SQL scalar function like sign(), trunc(), rtrim(), si= n()" msgstr "" = -#: query_hql.xml:663(para) = +#. Tag: para +#: query_hql.xml:643 +#, no-c-format msgid "JDBC-style positional parameters ?" msgstr "" = -#: query_hql.xml:668(para) = +#. Tag: para +#: query_hql.xml:648 +#, no-c-format msgid "named parameters :name, :start_date, :x1" msgstr "" = -#: query_hql.xml:673(para) = +#. Tag: para +#: query_hql.xml:653 +#, no-c-format msgid "SQL literals 'foo', 69, 6.66E+2, '1970-01-01 10:00:01.0'" msgstr "" = -#: query_hql.xml:679(para) = +#. Tag: para +#: query_hql.xml:659 +#, no-c-format msgid "Java public static final constants eg.C= olor.TABBY" msgstr "" = -#: query_hql.xml:685(para) = +#. Tag: para +#: query_hql.xml:665 +#, no-c-format msgid "in and between may be used as= follows:" msgstr "" = -#: query_hql.xml:693(para) = +#. Tag: programlisting +#: query_hql.xml:669 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:671 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:673 +#, no-c-format msgid "and the negated forms may be written" msgstr "" = -#: query_hql.xml:701(para) = +#. Tag: programlisting +#: query_hql.xml:677 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:679 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:681 +#, no-c-format msgid "Likewise, is null and is not null may be used to test for null values." msgstr "" = -#: query_hql.xml:706(para) = +#. Tag: para +#: query_hql.xml:686 +#, no-c-format msgid "Booleans may be easily used in expressions by declaring HQL query s= ubstitutions in Hibernate configuration:" msgstr "" = -#: query_hql.xml:713(para) = +#. Tag: programlisting +#: query_hql.xml:691 +#, no-c-format +msgid "true 1,= false 0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:693 +#, no-c-format msgid "This will replace the keywords true and false with the literals 1 and 0 in the translated SQL from this HQL:" msgstr "" = -#: query_hql.xml:720(para) = +#. Tag: programlisting +#: query_hql.xml:698 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:700 +#, no-c-format msgid "You may test the size of a collection with the special property size, or the special size() function." msgstr "" = -#: query_hql.xml:729(para) = +#. Tag: programlisting +#: query_hql.xml:705 +#, no-c-format +msgid " 0]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:707 +#, no-c-format +msgid " 0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:709 +#, no-c-format msgid "For indexed collections, you may refer to the minimum and maximum i= ndices using minindex and maxindex fu= nctions. Similarly, you may refer to the minimum and maximum elements of a = collection of basic type using the minelement and maxelement functions." msgstr "" = -#: query_hql.xml:743(para) = +#. Tag: programlisting +#: query_hql.xml:717 +#, no-c-format +msgid " current= _date]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:719 +#, no-c-format +msgid " 100]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:721 +#, no-c-format +msgid " 10000]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:723 +#, no-c-format msgid "The SQL functions any, some, all, exists, in are= supported when passed the element or index set of a collection (e= lements and indices functions) or the result o= f a subquery (see below)." msgstr "" = -#: query_hql.xml:761(para) = +#. Tag: programlisting +#: query_hql.xml:729 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:731 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:733 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:735 +#, no-c-format +msgid " all elements(p.scores)]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:737 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:739 +#, no-c-format msgid "Note that these constructs - size, elem= ents, indices, minindex, maxindex, minelement, maxeleme= nt - may only be used in the where clause in Hibernate3." msgstr "" = -#: query_hql.xml:768(para) = +#. Tag: para +#: query_hql.xml:746 +#, no-c-format msgid "Elements of indexed collections (arrays, lists, maps) may be referr= ed to by index (in a where clause only):" msgstr "" = -#: query_hql.xml:785(para) = +#. Tag: programlisting +#: query_hql.xml:751 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:753 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:755 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:757 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:759 +#, no-c-format msgid "The expression inside [] may even be an arithmet= ic expression." msgstr "" = -#: query_hql.xml:792(para) = +#. Tag: programlisting +#: query_hql.xml:763 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:765 +#, no-c-format msgid "HQL also provides the built-in index() function,= for elements of a one-to-many association or collection of values." msgstr "" = -#: query_hql.xml:801(para) = +#. Tag: programlisting +#: query_hql.xml:770 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:772 +#, no-c-format msgid "Scalar SQL functions supported by the underlying database may be us= ed" msgstr "" = -#: query_hql.xml:807(para) = +#. Tag: programlisting +#: query_hql.xml:776 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:778 +#, no-c-format msgid "If you are not yet convinced by all this, think how much longer and= less readable the following query would be in SQL:" msgstr "" = -#: query_hql.xml:820(para) = +#. Tag: programlisting +#: query_hql.xml:783 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:785 +#, no-c-format msgid "Hint: something like" msgstr "" = -#: query_hql.xml:845(title) = +#. Tag: programlisting +#: query_hql.xml:789 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_hql.xml:794 +#, no-c-format msgid "The order by clause" msgstr "" = -#: query_hql.xml:847(para) = +#. Tag: para +#: query_hql.xml:796 +#, no-c-format msgid "The list returned by a query may be ordered by any property of a re= turned class or components:" msgstr "" = -#: query_hql.xml:854(para) = +#. Tag: programlisting +#: query_hql.xml:800 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:802 +#, no-c-format msgid "The optional asc or desc indi= cate ascending or descending order respectively." msgstr "" = -#: query_hql.xml:861(title) = +#. Tag: title +#: query_hql.xml:809 +#, no-c-format msgid "The group by clause" msgstr "" = -#: query_hql.xml:863(para) = +#. Tag: para +#: query_hql.xml:811 +#, no-c-format msgid "A query that returns aggregate values may be grouped by any propert= y of a returned class or components:" msgstr "" = -#: query_hql.xml:875(para) = +#. Tag: programlisting +#: query_hql.xml:815 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:817 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:819 +#, no-c-format msgid "A having clause is also allowed." msgstr "" = -#: query_hql.xml:884(para) = +#. Tag: programlisting +#: query_hql.xml:823 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:825 +#, no-c-format msgid "SQL functions and aggregate functions are allowed in the h= aving and order by clauses, if supported by th= e underlying database (eg. not in MySQL)." msgstr "" = -#: query_hql.xml:897(para) = +#. Tag: programlisting +#: query_hql.xml:831 +#, no-c-format +msgid "" + " 100\n" + "order by count(kitten) asc, sum(kitten.weight) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:833 +#, no-c-format msgid "Note that neither the group by clause nor the order by clause may contain arithmetic expressions. Also n= ote that Hibernate currently does not expand a grouped entity, so you can't= write group by cat if all properties of cat are non-aggregated. You have to list all non-aggregated properties = explicitly." msgstr "" = -#: query_hql.xml:909(title) = +#. Tag: title +#: query_hql.xml:845 +#, no-c-format msgid "Subqueries" msgstr "" = -#: query_hql.xml:911(para) = +#. Tag: para +#: query_hql.xml:847 +#, no-c-format msgid "For databases that support subselects, Hibernate supports subquerie= s within queries. A subquery must be surrounded by parentheses (often by an= SQL aggregate function call). Even correlated subqueries (subqueries that = refer to an alias in the outer query) are allowed." msgstr "" = -#: query_hql.xml:940(para) = +#. Tag: programlisting +#: query_hql.xml:853 +#, no-c-format +msgid "" + " (\n" + " select avg(cat.weight) from DomesticCat cat\n" + ")]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:855 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:857 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:859 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:861 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:863 +#, no-c-format msgid "Note that HQL subqueries may occur only in the select or where clau= ses." msgstr "" = -#: query_hql.xml:944(para) = +#. Tag: para +#: query_hql.xml:867 +#, no-c-format msgid "Note that subqueries can also utilize row value constructo= r syntax. See for more detai= ls." msgstr "" = -#: query_hql.xml:952(title) = +#. Tag: title +#: query_hql.xml:875 +#, no-c-format msgid "HQL examples" msgstr "" = -#: query_hql.xml:954(para) = +#. Tag: para +#: query_hql.xml:877 +#, no-c-format msgid "Hibernate queries can be quite powerful and complex. In fact, the p= ower of the query language is one of Hibernate's main selling points. Here = are some example queries very similar to queries that I used on a recent pr= oject. Note that most queries you will write are much simpler than these!" msgstr "" = -#: query_hql.xml:960(para) = +#. Tag: para +#: query_hql.xml:883 +#, no-c-format msgid "The following query returns the order id, number of items and total= value of the order for all unpaid orders for a particular customer and giv= en minimum total value, ordering the results by total value. In determining= the prices, it uses the current catalog. The resulting SQL query, against = the ORDER, ORDER_LINE, PRODU= CT, CATALOG and PRICE table= s has four inner joins and an (uncorrelated) subselect." msgstr "" = -#: query_hql.xml:988(para) = +#. Tag: programlisting +#: query_hql.xml:892 +#, no-c-format +msgid "" + "=3D all (\n" + " select cat.effectiveDate\n" + " from Catalog as cat\n" + " where cat.effectiveDate < sysdate\n" + " )\n" + "group by order\n" + "having sum(price.amount) > :minAmount\n" + "order by sum(price.amount) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:894 +#, no-c-format msgid "What a monster! Actually, in real life, I'm not very keen on subque= ries, so my query was really more like this:" msgstr "" = -#: query_hql.xml:1007(para) = +#. Tag: programlisting +#: query_hql.xml:899 +#, no-c-format +msgid "" + " :minAmount\n" + "order by sum(price.amount) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:901 +#, no-c-format msgid "The next query counts the number of payments in each status, exclud= ing all payments in the AWAITING_APPROVAL status where t= he most recent status change was made by the current user. It translates to= an SQL query with two inner joins and a correlated subselect against the <= literal>PAYMENT, PAYMENT_STATUS and P= AYMENT_STATUS_CHANGE tables." msgstr "" = -#: query_hql.xml:1031(para) = +#. Tag: programlisting +#: query_hql.xml:909 +#, no-c-format +msgid "" + " PaymentStatus.AWAITING_APPROVAL\n" + " or (\n" + " statusChange.timeStamp =3D (\n" + " select max(change.timeStamp)\n" + " from PaymentStatusChange change\n" + " where change.payment =3D payment\n" + " )\n" + " and statusChange.user <> :currentUser\n" + " )\n" + "group by status.name, status.sortOrder\n" + "order by status.sortOrder]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:911 +#, no-c-format msgid "If I would have mapped the statusChanges collect= ion as a list, instead of a set, the query would have been much simpler to = write." msgstr "" = -#: query_hql.xml:1044(para) = +#. Tag: programlisting +#: query_hql.xml:916 +#, no-c-format +msgid "" + " PaymentStatus.AWAITING_APPROVAL\n" + " or payment.statusChanges[ maxIndex(payment.statusChanges) ].use= r <> :currentUser\n" + "group by status.name, status.sortOrder\n" + "order by status.sortOrder]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:918 +#, no-c-format msgid "The next query uses the MS SQL Server isNull() f= unction to return all the accounts and unpaid payments for the organization= to which the current user belongs. It translates to an SQL query with thre= e inner joins, an outer join and a subselect against the ACCOUNT, PAYMENT, PAYMENT_STATUS, ACCOUNT_TYPE, ORGANIZATION and ORG_USER tables." msgstr "" = -#: query_hql.xml:1060(para) = +#. Tag: programlisting +#: query_hql.xml:927 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:929 +#, no-c-format msgid "For some databases, we would need to do away with the (correlated) = subselect." msgstr "" = -#: query_hql.xml:1075(title) = +#. Tag: programlisting +#: query_hql.xml:933 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_hql.xml:938 +#, no-c-format msgid "Bulk update and delete" msgstr "" = -#: query_hql.xml:1077(para) = +#. Tag: para +#: query_hql.xml:940 +#, no-c-format msgid "HQL now supports update, delete and insert ... select ... statements. See for details." msgstr "" = -#: query_hql.xml:1085(title) = +#. Tag: title +#: query_hql.xml:948 +#, no-c-format msgid "Tips & Tricks" msgstr "" = -#: query_hql.xml:1087(para) = +#. Tag: para +#: query_hql.xml:950 +#, no-c-format msgid "You can count the number of query results without actually returnin= g them:" msgstr "" = -#: query_hql.xml:1093(para) = +#. Tag: programlisting +#: query_hql.xml:954 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:956 +#, no-c-format msgid "To order a result by the size of a collection, use the following qu= ery:" msgstr "" = -#: query_hql.xml:1103(para) = +#. Tag: programlisting +#: query_hql.xml:960 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:962 +#, no-c-format msgid "If your database supports subselects, you can place a condition upo= n selection size in the where clause of your query:" msgstr "" = -#: query_hql.xml:1110(para) = +#. Tag: programlisting +#: query_hql.xml:967 +#, no-c-format +msgid "=3D 1]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:969 +#, no-c-format msgid "If your database doesn't support subselects, use the following quer= y:" msgstr "" = -#: query_hql.xml:1120(para) = +#. Tag: programlisting +#: query_hql.xml:973 +#, no-c-format +msgid "" + "=3D 1]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:975 +#, no-c-format msgid "As this solution can't return a User with zero m= essages because of the inner join, the following form is also useful:" msgstr "" = -#: query_hql.xml:1131(para) = +#. Tag: programlisting +#: query_hql.xml:980 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:982 +#, no-c-format msgid "Properties of a JavaBean can be bound to named query parameters:" msgstr "" = -#: query_hql.xml:1139(para) = +#. Tag: programlisting +#: query_hql.xml:986 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:988 +#, no-c-format msgid "Collections are pageable by using the Query inte= rface with a filter:" msgstr "" = -#: query_hql.xml:1148(para) = +#. Tag: programlisting +#: query_hql.xml:992 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:994 +#, no-c-format msgid "Collection elements may be ordered or grouped using a query filter:" msgstr "" = -#: query_hql.xml:1155(para) = +#. Tag: programlisting +#: query_hql.xml:998 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1000 +#, no-c-format msgid "You can find the size of a collection without initializing it:" msgstr "" = -#: query_hql.xml:1164(title) = +#. Tag: programlisting +#: query_hql.xml:1004 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: title +#: query_hql.xml:1009 +#, no-c-format msgid "Components" msgstr "" = -#: query_hql.xml:1166(para) = +#. Tag: para +#: query_hql.xml:1011 +#, no-c-format msgid "Components might be used in just about every way that simple value = types can be used in HQL queries. They can appear in the select clause:" msgstr "" = -#: query_hql.xml:1174(para) = +#. Tag: programlisting +#: query_hql.xml:1016 query_hql.xml:1062 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1017 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1019 +#, no-c-format msgid "where the Person's name property is a component. Components can als= o be used in the where clause:" msgstr "" = -#: query_hql.xml:1182(para) = +#. Tag: programlisting +#: query_hql.xml:1024 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1025 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1027 +#, no-c-format msgid "Components can also be used in the order by clau= se:" msgstr "" = -#: query_hql.xml:1189(para) = -msgid "Another common use of components is in row value constructors." +#. Tag: programlisting +#: query_hql.xml:1031 +#, no-c-format +msgid "" msgstr "" = -#: query_hql.xml:1195(title) = +#. Tag: programlisting +#: query_hql.xml:1032 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1034 +#, no-c-format +msgid "Another common use of components is in row value constructors." +msgstr "" + +#. Tag: title +#: query_hql.xml:1040 +#, no-c-format msgid "Row value constructor syntax" msgstr "" = -#: query_hql.xml:1197(para) = +#. Tag: para +#: query_hql.xml:1042 +#, no-c-format msgid "HQL supports the use of ANSI SQL row value constructor syntax (sometimes called tuple syntax), even thou= gh the underlying database may not support that notion. Here we are general= ly referring to multi-valued comparisons, typically associated with compone= nts. Consider an entity Person which defines a name component:" msgstr "" = -#: query_hql.xml:1206(para) = +#. Tag: programlisting +#: query_hql.xml:1049 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1051 +#, no-c-format msgid "That's valid syntax, although a little verbose. It be nice to make = this a bit more concise and use row value constructor sy= ntax:" msgstr "" = -#: query_hql.xml:1213(para) = +#. Tag: programlisting +#: query_hql.xml:1056 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1058 +#, no-c-format msgid "It can also be useful to specify this in the select clause:" msgstr "" = -#: query_hql.xml:1219(para) = +#. Tag: para +#: query_hql.xml:1064 +#, no-c-format msgid "Another time using row value constructor syntax = can be beneficial is when using subqueries needing to compare against multi= ple values:" msgstr "" = -#: query_hql.xml:1229(para) = -msgid "One thing to consider when deciding if you want to use this syntax = is that the query will be dependent upon the ordering of the component sub-= properties in the metadata." +#. Tag: programlisting +#: query_hql.xml:1069 +#, no-c-format +msgid "" + "" msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: query_hql.xml:0(None) = -msgid "translator-credits" +#. Tag: para +#: query_hql.xml:1071 +#, no-c-format +msgid "One thing to consider when deciding if you want to use this syntax = is that the query will be dependent upon the ordering of the component sub-= properties in the metadata." msgstr "" = Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/quer= y_sql.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/query_sql.= pot 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/query_sql.= pot 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,476 +1,1112 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:34-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: query_sql.xml:5(title) = +#. Tag: title +#: query_sql.xml:29 +#, no-c-format msgid "Native SQL" msgstr "" = -#: query_sql.xml:7(para) = +#. Tag: para +#: query_sql.xml:31 +#, no-c-format msgid "You may also express queries in the native SQL dialect of your data= base. This is useful if you want to utilize database specific features such= as query hints or the CONNECT keyword in Oracle. It als= o provides a clean migration path from a direct SQL/JDBC based application = to Hibernate." msgstr "" = -#: query_sql.xml:13(para) = +#. Tag: para +#: query_sql.xml:37 +#, no-c-format msgid "Hibernate3 allows you to specify handwritten SQL (including stored = procedures) for all create, update, delete, and load operations." msgstr "" = -#: query_sql.xml:17(title) = +#. Tag: title +#: query_sql.xml:41 +#, no-c-format msgid "Using a SQLQuery" msgstr "" = -#: query_sql.xml:19(para) = +#. Tag: para +#: query_sql.xml:43 +#, no-c-format msgid "Execution of native SQL queries is controlled via the SQLQ= uery interface, which is obtained by calling Session.cre= ateSQLQuery(). The following describes how to use this API for qu= erying." msgstr "" = -#: query_sql.xml:25(title) = +#. Tag: title +#: query_sql.xml:49 +#, no-c-format msgid "Scalar queries" msgstr "" = -#: query_sql.xml:27(para) = +#. Tag: para +#: query_sql.xml:51 +#, no-c-format msgid "The most basic SQL query is to get a list of scalars (values)." msgstr "" = -#: query_sql.xml:34(para) = +#. Tag: programlisting +#: query_sql.xml:54 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:56 +#, no-c-format msgid "These will both return a List of Object arrays (Object[]) with scal= ar values for each column in the CATS table. Hibernate will use ResultSetMe= tadata to deduce the actual order and types of the returned scalar values." msgstr "" = -#: query_sql.xml:39(para) = +#. Tag: para +#: query_sql.xml:61 +#, no-c-format msgid "To avoid the overhead of using ResultSetMetadata= or simply to be more explicit in what is returned one can use add= Scalar()." msgstr "" = -#: query_sql.xml:49(para) query_sql.xml:101(para) query_sql.xml:195(para) = query_sql.xml:354(para) = +#. Tag: programlisting +#: query_sql.xml:65 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:67 query_sql.xml:113 query_sql.xml:194 query_sql.xml:345 +#, no-c-format msgid "This query specified:" msgstr "" = -#: query_sql.xml:53(para) query_sql.xml:105(para) query_sql.xml:358(para) = +#. Tag: para +#: query_sql.xml:71 query_sql.xml:117 query_sql.xml:349 +#, no-c-format msgid "the SQL query string" msgstr "" = -#: query_sql.xml:57(para) = +#. Tag: para +#: query_sql.xml:75 +#, no-c-format msgid "the columns and types to return" msgstr "" = -#: query_sql.xml:61(para) = -msgid "This will still return Object arrays, but now it will not use ResultSetMetdata but will instead explicitly get the ID, NAME= and BIRTHDATE column as respectively a Long, String and a Short from the u= nderlying resultset. This also means that only these three columns will be = returned, even though the query is using * and could ret= urn more than the three listed columns." +#. Tag: para +#: query_sql.xml:79 +#, no-c-format +msgid "This will still return Object arrays, but now it will not use ResultSetMetadata but will instead explicitly get the ID, NAM= E and BIRTHDATE column as respectively a Long, String and a Short from the = underlying resultset. This also means that only these three columns will be= returned, even though the query is using * and could re= turn more than the three listed columns." msgstr "" = -#: query_sql.xml:69(para) = +#. Tag: para +#: query_sql.xml:87 +#, no-c-format msgid "It is possible to leave out the type information for all or some of= the scalars." msgstr "" = -#: query_sql.xml:78(para) = +#. Tag: programlisting +#: query_sql.xml:90 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:92 +#, no-c-format msgid "This is essentially the same query as before, but now Resu= ltSetMetaData is used to decide the type of NAME and BIRTHDATE wh= ere as the type of ID is explicitly specified." msgstr "" = -#: query_sql.xml:82(para) = +#. Tag: para +#: query_sql.xml:96 +#, no-c-format msgid "How the java.sql.Types returned from ResultSetMetaData is mapped to= Hibernate types is controlled by the Dialect. If a specific type is not ma= pped or does not result in the expected type it is possible to customize it= via calls to registerHibernateType in the Dialect." msgstr "" = -#: query_sql.xml:90(title) = +#. Tag: title +#: query_sql.xml:104 +#, no-c-format msgid "Entity queries" msgstr "" = -#: query_sql.xml:92(para) = +#. Tag: para +#: query_sql.xml:106 +#, no-c-format msgid "The above queries were all about returning scalar values, basically= returning the \"raw\" values from the resultset. The following shows how t= o get entity objects from a native sql query via addEntity()." msgstr "" = -#: query_sql.xml:109(para) = +#. Tag: programlisting +#: query_sql.xml:111 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:121 +#, no-c-format msgid "the entity returned by the query" msgstr "" = -#: query_sql.xml:113(para) = +#. Tag: para +#: query_sql.xml:125 +#, no-c-format msgid "Assuming that Cat is mapped as a class with the columns ID, NAME an= d BIRTHDATE the above queries will both return a List where each element is= a Cat entity." msgstr "" = -#: query_sql.xml:117(para) = +#. Tag: para +#: query_sql.xml:129 +#, no-c-format msgid "If the entity is mapped with a many-to-one to an= other entity it is required to also return this when performing the native = query, otherwise a database specific \"column not found\" error will occur.= The additional columns will automatically be returned when using the * not= ation, but we prefer to be explicit as in the following example for a many-to-one to a Dog:" msgstr "" = -#: query_sql.xml:128(para) = +#. Tag: programlisting +#: query_sql.xml:137 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:139 +#, no-c-format msgid "This will allow cat.getDog() to function properly." msgstr "" = -#: query_sql.xml:132(title) = +#. Tag: title +#: query_sql.xml:143 +#, no-c-format msgid "Handling associations and collections" msgstr "" = -#: query_sql.xml:134(para) = +#. Tag: para +#: query_sql.xml:145 +#, no-c-format msgid "It is possible to eagerly join in the Dog to avo= id the possible extra roundtrip for initializing the proxy. This is done vi= a the addJoin() method, which allows you to join in an a= ssociation or collection." msgstr "" = -#: query_sql.xml:144(para) = +#. Tag: programlisting +#: query_sql.xml:150 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:152 +#, no-c-format msgid "In this example the returned Cat's will have the= ir dog property fully initialized without any extra roun= dtrip to the database. Notice that we added a alias name (\"cat\") to be ab= le to specify the target property path of the join. It is possible to do th= e same eager joining for collections, e.g. if the Cat ha= d a one-to-many to Dog instead." msgstr "" = -#: query_sql.xml:157(p) = +#. Tag: programlisting +#: query_sql.xml:160 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:162 +#, no-c-format msgid "At this stage we are reaching the limits of what is possible with n= ative queries without starting to enhance the sql queries to make them usab= le in Hibernate; the problems starts to arise when returning multiple entit= ies of the same type or when the default alias/column names are not enough." msgstr "" = -#: query_sql.xml:165(title) = +#. Tag: title +#: query_sql.xml:170 +#, no-c-format msgid "Returning multiple entities" msgstr "" = -#: query_sql.xml:167(para) = +#. Tag: para +#: query_sql.xml:172 +#, no-c-format msgid "Until now the result set column names are assumed to be the same as= the column names specified in the mapping document. This can be problemati= c for SQL queries which join multiple tables, since the same column names m= ay appear in more than one table." msgstr "" = -#: query_sql.xml:172(para) = +#. Tag: para +#: query_sql.xml:177 +#, no-c-format msgid "Column alias injection is needed in the following query (which most= likely will fail):" msgstr "" = -#: query_sql.xml:180(para) = -msgid "The intention for this query is to return two Cat instances per row= , a cat and its mother. This will fail since there is a conflict of names s= ince they are mapped to the same column names and on some databases the ret= urned column aliases will most likely be on the form \"c.ID\", \"c.NAME\", = etc. which are not equal to the columns specificed in the mappings (\"ID\" = and \"NAME\")." +#. Tag: programlisting +#: query_sql.xml:180 +#, no-c-format +msgid "" + "" msgstr "" = -#: query_sql.xml:187(para) = +#. Tag: para +#: query_sql.xml:182 +#, no-c-format +msgid "The intention for this query is to return two Cat instances per row= , a cat and its mother. This will fail since there is a conflict of names s= ince they are mapped to the same column names and on some databases the ret= urned column aliases will most likely be on the form \"c.ID\", \"c.NAME\", = etc. which are not equal to the columns specified in the mappings (\"ID\" a= nd \"NAME\")." +msgstr "" + +#. Tag: para +#: query_sql.xml:189 +#, no-c-format msgid "The following form is not vulnerable to column name duplication:" msgstr "" = -#: query_sql.xml:199(para) = +#. Tag: programlisting +#: query_sql.xml:192 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:198 +#, no-c-format msgid "the SQL query string, with placeholders for Hibernate to inject col= umn aliases" msgstr "" = -#: query_sql.xml:204(para) = +#. Tag: para +#: query_sql.xml:203 +#, no-c-format msgid "the entities returned by the query" msgstr "" = -#: query_sql.xml:208(para) = -msgid "The {cat.*} and {mother.*} notation used above is a shorthand for \= "all properties\". Alternatively, you may list the columns explicity, but e= ven in this case we let Hibernate inject the SQL column aliases for each pr= operty. The placeholder for a column alias is just the property name qualif= ied by the table alias. In the following example, we retrieve Cats and thei= r mothers from a different table (cat_log) to the one declared in the mappi= ng metadata. Notice that we may even use the property aliases in the where = clause if we like." +#. Tag: para +#: query_sql.xml:207 +#, no-c-format +msgid "The {cat.*} and {mother.*} notation used above is a shorthand for \= "all properties\". Alternatively, you may list the columns explicitly, but = even in this case we let Hibernate inject the SQL column aliases for each p= roperty. The placeholder for a column alias is just the property name quali= fied by the table alias. In the following example, we retrieve Cats and the= ir mothers from a different table (cat_log) to the one declared in the mapp= ing metadata. Notice that we may even use the property aliases in the where= clause if we like." msgstr "" = -#: query_sql.xml:227(title) = +#. Tag: programlisting +#: query_sql.xml:216 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_sql.xml:219 +#, no-c-format msgid "Alias and property references" msgstr "" = -#: query_sql.xml:229(para) = +#. Tag: para +#: query_sql.xml:221 +#, no-c-format msgid "For most cases the above alias injection is needed, but for queries= relating to more complex mappings like composite properties, inheritance d= iscriminators, collections etc. there are some specific aliases to use to a= llow Hibernate to inject the proper aliases." msgstr "" = -#: query_sql.xml:234(para) = +#. Tag: para +#: query_sql.xml:226 +#, no-c-format msgid "The following table shows the different possibilities of using the = alias injection. Note: the alias names in the result are examples, each ali= as will have a unique and probably different name when used." msgstr "" = -#: query_sql.xml:240(title) = +#. Tag: title +#: query_sql.xml:232 +#, no-c-format msgid "Alias injection names" msgstr "" = -#: query_sql.xml:251(entry) = +#. Tag: entry +#: query_sql.xml:243 +#, no-c-format msgid "Description" msgstr "" = -#: query_sql.xml:253(entry) = +#. Tag: entry +#: query_sql.xml:245 +#, no-c-format msgid "Syntax" msgstr "" = -#: query_sql.xml:255(entry) = +#. Tag: entry +#: query_sql.xml:247 +#, no-c-format msgid "Example" msgstr "" = -#: query_sql.xml:261(entry) = +#. Tag: entry +#: query_sql.xml:253 +#, no-c-format msgid "A simple property" msgstr "" = -#: query_sql.xml:263(literal) = +#. Tag: literal +#: query_sql.xml:255 +#, no-c-format msgid "{[aliasname].[propertyname]" msgstr "" = -#: query_sql.xml:265(literal) = +#. Tag: literal +#: query_sql.xml:257 +#, no-c-format msgid "A_NAME as {item.name}" msgstr "" = -#: query_sql.xml:269(entry) = +#. Tag: entry +#: query_sql.xml:261 +#, no-c-format msgid "A composite property" msgstr "" = -#: query_sql.xml:271(literal) = +#. Tag: literal +#: query_sql.xml:263 +#, no-c-format msgid "{[aliasname].[componentname].[propertyname]}" msgstr "" = -#: query_sql.xml:273(literal) = +#. Tag: literal +#: query_sql.xml:265 +#, no-c-format msgid "CURRENCY as {item.amount.currency}, VALUE as {item.amount.value}" msgstr "" = -#: query_sql.xml:278(entry) = +#. Tag: entry +#: query_sql.xml:270 +#, no-c-format msgid "Discriminator of an entity" msgstr "" = -#: query_sql.xml:280(literal) = +#. Tag: literal +#: query_sql.xml:272 +#, no-c-format msgid "{[aliasname].class}" msgstr "" = -#: query_sql.xml:282(literal) = +#. Tag: literal +#: query_sql.xml:274 +#, no-c-format msgid "DISC as {item.class}" msgstr "" = -#: query_sql.xml:286(entry) = +#. Tag: entry +#: query_sql.xml:278 +#, no-c-format msgid "All properties of an entity" msgstr "" = -#: query_sql.xml:288(literal) query_sql.xml:336(literal) = +#. Tag: literal +#: query_sql.xml:280 query_sql.xml:328 +#, no-c-format msgid "{[aliasname].*}" msgstr "" = -#: query_sql.xml:290(literal) = +#. Tag: literal +#: query_sql.xml:282 +#, no-c-format msgid "{item.*}" msgstr "" = -#: query_sql.xml:294(entry) = +#. Tag: entry +#: query_sql.xml:286 +#, no-c-format msgid "A collection key" msgstr "" = -#: query_sql.xml:296(literal) = +#. Tag: literal +#: query_sql.xml:288 +#, no-c-format msgid "{[aliasname].key}" msgstr "" = -#: query_sql.xml:298(literal) = +#. Tag: literal +#: query_sql.xml:290 +#, no-c-format msgid "ORGID as {coll.key}" msgstr "" = -#: query_sql.xml:302(entry) = +#. Tag: entry +#: query_sql.xml:294 +#, no-c-format msgid "The id of an collection" msgstr "" = -#: query_sql.xml:304(literal) = +#. Tag: literal +#: query_sql.xml:296 +#, no-c-format msgid "{[aliasname].id}" msgstr "" = -#: query_sql.xml:306(literal) = +#. Tag: literal +#: query_sql.xml:298 +#, no-c-format msgid "EMPID as {coll.id}" msgstr "" = -#: query_sql.xml:310(entry) = +#. Tag: entry +#: query_sql.xml:302 +#, no-c-format msgid "The element of an collection" msgstr "" = -#: query_sql.xml:312(literal) = +#. Tag: literal +#: query_sql.xml:304 +#, no-c-format msgid "{[aliasname].element}" msgstr "" = -#: query_sql.xml:314(literal) = +#. Tag: literal +#: query_sql.xml:306 +#, no-c-format msgid "XID as {coll.element}" msgstr "" = -#: query_sql.xml:318(entry) = +#. Tag: entry +#: query_sql.xml:310 +#, no-c-format msgid "roperty of the element in the collection" msgstr "" = -#: query_sql.xml:320(literal) = +#. Tag: literal +#: query_sql.xml:312 +#, no-c-format msgid "{[aliasname].element.[propertyname]}" msgstr "" = -#: query_sql.xml:322(literal) = +#. Tag: literal +#: query_sql.xml:314 +#, no-c-format msgid "NAME as {coll.element.name}" msgstr "" = -#: query_sql.xml:326(entry) = +#. Tag: entry +#: query_sql.xml:318 +#, no-c-format msgid "All properties of the element in the collection" msgstr "" = -#: query_sql.xml:328(literal) = +#. Tag: literal +#: query_sql.xml:320 +#, no-c-format msgid "{[aliasname].element.*}" msgstr "" = -#: query_sql.xml:330(literal) = +#. Tag: literal +#: query_sql.xml:322 +#, no-c-format msgid "{coll.element.*}" msgstr "" = -#: query_sql.xml:334(entry) = +#. Tag: entry +#: query_sql.xml:326 +#, no-c-format msgid "All properties of the the collection" msgstr "" = -#: query_sql.xml:338(literal) = +#. Tag: literal +#: query_sql.xml:330 +#, no-c-format msgid "{coll.*}" msgstr "" = -#: query_sql.xml:347(title) = +#. Tag: title +#: query_sql.xml:339 +#, no-c-format msgid "Returning non-managed entities" msgstr "" = -#: query_sql.xml:349(para) = +#. Tag: para +#: query_sql.xml:341 +#, no-c-format msgid "It is possible to apply a ResultTransformer to native sql queries. = Allowing it to e.g. return non-managed entities." msgstr "" = -#: query_sql.xml:362(para) = +#. Tag: programlisting +#: query_sql.xml:343 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:353 +#, no-c-format msgid "a result transformer" msgstr "" = -#: query_sql.xml:366(para) = +#. Tag: para +#: query_sql.xml:357 +#, no-c-format msgid "The above query will return a list of CatDTO whi= ch has been instantiated and injected the values of NAME and BIRTHNAME into= its corresponding properties or fields." msgstr "" = -#: query_sql.xml:373(title) = +#. Tag: title +#: query_sql.xml:364 +#, no-c-format msgid "Handling inheritance" msgstr "" = -#: query_sql.xml:375(para) = +#. Tag: para +#: query_sql.xml:366 +#, no-c-format msgid "Native sql queries which query for entities that is mapped as part = of an inheritance must include all properties for the baseclass and all it = subclasses." msgstr "" = -#: query_sql.xml:381(title) = +#. Tag: title +#: query_sql.xml:372 +#, no-c-format msgid "Parameters" msgstr "" = -#: query_sql.xml:383(para) = +#. Tag: para +#: query_sql.xml:374 +#, no-c-format msgid "Native sql queries support positional as well as named parameters:" msgstr "" = -#: query_sql.xml:398(title) = +#. Tag: programlisting +#: query_sql.xml:377 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_sql.xml:385 +#, no-c-format msgid "Named SQL queries" msgstr "" = -#: query_sql.xml:400(para) = +#. Tag: para +#: query_sql.xml:387 +#, no-c-format msgid "Named SQL queries may be defined in the mapping document and called= in exactly the same way as a named HQL query. In this case, we do not need to call addEntity()." msgstr "" = -#: query_sql.xml:419(para) = +#. Tag: programlisting +#: query_sql.xml:392 +#, no-c-format +msgid "" + "\n" + " \n" + " SELECT person.NAME AS {person.name},\n" + " person.AGE AS {person.age},\n" + " person.SEX AS {person.sex}\n" + " FROM PERSON person\n" + " WHERE person.NAME LIKE :namePattern\n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:394 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:396 +#, no-c-format msgid "The <return-join> and <load-co= llection> elements are used to join associations and define qu= eries which initialize collections, respectively." msgstr "" = -#: query_sql.xml:440(para) = +#. Tag: programlisting +#: query_sql.xml:401 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " SELECT person.NAME AS {person.name},\n" + " person.AGE AS {person.age},\n" + " person.SEX AS {person.sex},\n" + " address.STREET AS {address.street},\n" + " address.CITY AS {address.city},\n" + " address.STATE AS {address.state},\n" + " address.ZIP AS {address.zip}\n" + " FROM PERSON person\n" + " JOIN ADDRESS address\n" + " ON person.ID =3D address.PERSON_ID AND address.TYPE=3D'MAIL= ING'\n" + " WHERE person.NAME LIKE :namePattern\n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:403 +#, no-c-format msgid "A named SQL query may return a scalar value. You must declare the c= olumn alias and Hibernate type using the <return-scalar> element:" msgstr "" = -#: query_sql.xml:452(para) = -msgid "You can externalize the resultset mapping informations in a <resultset> element to either reuse them accross several = named queries or through the setResultSetMapping() API." +#. Tag: programlisting +#: query_sql.xml:407 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " SELECT p.NAME AS name,\n" + " p.AGE AS age,\n" + " FROM PERSON p WHERE p.NAME LIKE 'Hiber%'\n" + "]]>" msgstr "" = -#: query_sql.xml:476(para) = +#. Tag: para +#: query_sql.xml:409 +#, no-c-format +msgid "You can externalize the resultset mapping informations in a <resultset> element to either reuse them across several n= amed queries or through the setResultSetMapping() API." +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:414 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "\n" + "\n" + "\n" + " SELECT person.NAME AS {person.name},\n" + " person.AGE AS {person.age},\n" + " person.SEX AS {person.sex},\n" + " address.STREET AS {address.street},\n" + " address.CITY AS {address.city},\n" + " address.STATE AS {address.state},\n" + " address.ZIP AS {address.zip}\n" + " FROM PERSON person\n" + " JOIN ADDRESS address\n" + " ON person.ID =3D address.PERSON_ID AND address.TYPE=3D'MAIL= ING'\n" + " WHERE person.NAME LIKE :namePattern\n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:416 +#, no-c-format msgid "You can alternatively use the resultset mapping information in your= hbm files directly in java code." msgstr "" = -#: query_sql.xml:486(title) = +#. Tag: programlisting +#: query_sql.xml:419 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_sql.xml:422 +#, no-c-format msgid "Using return-property to explicitly specify column/alias names" msgstr "" = -#: query_sql.xml:489(para) = +#. Tag: para +#: query_sql.xml:425 +#, no-c-format msgid "With <return-property> you can explicitly = tell Hibernate what column aliases to use, instead of using the {}= -syntax to let Hibernate inject its own aliases." msgstr "" = -#: query_sql.xml:507(para) = +#. Tag: programlisting +#: query_sql.xml:430 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " SELECT person.NAME AS myName,\n" + " person.AGE AS myAge,\n" + " person.SEX AS mySex,\n" + " FROM PERSON person WHERE person.NAME LIKE :name\n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:432 +#, no-c-format msgid "<return-property> also works with multiple= columns. This solves a limitation with the {}-syntax wh= ich can not allow fine grained control of multi-column properties." msgstr "" = -#: query_sql.xml:528(para) = +#. Tag: programlisting +#: query_sql.xml:437 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employe= r},\n" + " STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},\n" + " REGIONCODE as {emp.regionCode}, EID AS {emp.id}, VALUE, CUR= RENCY\n" + " FROM EMPLOYMENT\n" + " WHERE EMPLOYER =3D :id AND ENDDATE IS NULL\n" + " ORDER BY STARTDATE ASC\n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:439 +#, no-c-format msgid "Notice that in this example we used <return-property>= ; in combination with the {}-syntax for inject= ion. Allowing users to choose how they want to refer column and properties." msgstr "" = -#: query_sql.xml:533(para) = +#. Tag: para +#: query_sql.xml:444 +#, no-c-format msgid "If your mapping has a discriminator you must use <retur= n-discriminator> to specify the discriminator column." msgstr "" = -#: query_sql.xml:539(title) = +#. Tag: title +#: query_sql.xml:450 +#, no-c-format msgid "Using stored procedures for querying" msgstr "" = -#: query_sql.xml:541(para) = +#. Tag: para +#: query_sql.xml:452 +#, no-c-format msgid "Hibernate 3 introduces support for queries via stored procedures an= d functions. Most of the following documentation is equivalent for both. Th= e stored procedure/function must return a resultset as the first out-parame= ter to be able to work with Hibernate. An example of such a stored function= in Oracle 9 and higher is as follows:" msgstr "" = -#: query_sql.xml:560(para) = +#. Tag: programlisting +#: query_sql.xml:458 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:460 +#, no-c-format msgid "To use this query in Hibernate you need to map it via a named query= ." msgstr "" = -#: query_sql.xml:579(para) = +#. Tag: programlisting +#: query_sql.xml:463 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \= n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " { ? =3D call selectAllEmployments() }\n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:465 +#, no-c-format msgid "Notice stored procedures currently only return scalars and entities= . <return-join> and <load-collection&g= t; are not supported." msgstr "" = -#: query_sql.xml:584(title) = +#. Tag: title +#: query_sql.xml:470 +#, no-c-format msgid "Rules/limitations for using stored procedures" msgstr "" = -#: query_sql.xml:586(para) = +#. Tag: para +#: query_sql.xml:472 +#, no-c-format msgid "To use stored procedures with Hibernate the procedures/functions ha= ve to follow some rules. If they do not follow those rules they are not usa= ble with Hibernate. If you still want to use these procedures you have to e= xecute them via session.connection(). The rules are diff= erent for each database, since database vendors have different stored proce= dure semantics/syntax." msgstr "" = -#: query_sql.xml:593(para) = +#. Tag: para +#: query_sql.xml:479 +#, no-c-format msgid "Stored procedure queries can't be paged with setFirstResul= t()/setMaxResults()." msgstr "" = -#: query_sql.xml:596(para) = +#. Tag: para +#: query_sql.xml:482 +#, no-c-format msgid "Recommended call form is standard SQL92: { ? =3D call func= tionName(<parameters>) } or { ? =3D call procedure= Name(<parameters>}. Native call syntax is not supported." msgstr "" = -#: query_sql.xml:601(para) = +#. Tag: para +#: query_sql.xml:487 +#, no-c-format msgid "For Oracle the following rules apply:" msgstr "" = -#: query_sql.xml:605(para) = +#. Tag: para +#: query_sql.xml:491 +#, no-c-format msgid "A function must return a result set. The first parameter of a proce= dure must be an OUT that returns a result set. This is d= one by using a SYS_REFCURSOR type in Oracle 9 or 10. In = Oracle you need to define a REF CURSOR type, see Oracle = literature." msgstr "" = -#: query_sql.xml:614(para) = +#. Tag: para +#: query_sql.xml:500 +#, no-c-format msgid "For Sybase or MS SQL server the following rules apply:" msgstr "" = -#: query_sql.xml:618(para) = +#. Tag: para +#: query_sql.xml:504 +#, no-c-format msgid "The procedure must return a result set. Note that since these serve= rs can/will return multiple result sets and update counts, Hibernate will i= terate the results and take the first result that is a result set as its re= turn value. Everything else will be discarded." msgstr "" = -#: query_sql.xml:626(para) = +#. Tag: para +#: query_sql.xml:512 +#, no-c-format msgid "If you can enable SET NOCOUNT ON in your procedu= re it will probably be more efficient, but this is not a requirement." msgstr "" = -#: query_sql.xml:636(title) = +#. Tag: title +#: query_sql.xml:522 +#, no-c-format msgid "Custom SQL for create, update and delete" msgstr "" = -#: query_sql.xml:638(para) = +#. Tag: para +#: query_sql.xml:524 +#, no-c-format msgid "Hibernate3 can use custom SQL statements for create, update, and de= lete operations. The class and collection persisters in Hibernate already c= ontain a set of configuration time generated strings (insertsql, deletesql,= updatesql etc.). The mapping tags <sql-insert>, <= literal><sql-delete>, and <sql-update> override these strings:" msgstr "" = -#: query_sql.xml:656(para) = +#. Tag: programlisting +#: query_sql.xml:532 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " INSERT INTO PERSON (NAME, ID) VALUES ( UPPER(?), ? = )\n" + " UPDATE PERSON SET NAME=3DUPPER(?) WHERE ID=3D?\n" + " DELETE FROM PERSON WHERE ID=3D?\n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:534 +#, no-c-format msgid "The SQL is directly executed in your database, so you are free to u= se any dialect you like. This will of course reduce the portability of your= mapping if you use database specific SQL." msgstr "" = -#: query_sql.xml:660(para) = +#. Tag: para +#: query_sql.xml:538 +#, no-c-format msgid "Stored procedures are supported if the callable = attribute is set:" msgstr "" = -#: query_sql.xml:673(para) = +#. Tag: programlisting +#: query_sql.xml:541 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " {call createPerson (?, ?)}\n" + " {? =3D call deletePerson (?)}\n" + " {? =3D call updatePerson (?, ?)= }\n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:543 +#, no-c-format msgid "The order of the positional parameters are currently vital, as they= must be in the same sequence as Hibernate expects them." msgstr "" = -#: query_sql.xml:676(para) = +#. Tag: para +#: query_sql.xml:546 +#, no-c-format msgid "You can see the expected order by enabling debug logging for the org.hibernate.persister.entity level. With this level enab= led Hibernate will print out the static SQL that is used to create, update,= delete etc. entities. (To see the expected sequence, remember to not inclu= de your custom SQL in the mapping files as that will override the Hibernate= generated static sql.)" msgstr "" = -#: query_sql.xml:683(para) = +#. Tag: para +#: query_sql.xml:553 +#, no-c-format msgid "The stored procedures are in most cases (read: better do it than no= t) required to return the number of rows inserted/updated/deleted, as Hiber= nate has some runtime checks for the success of the statement. Hibernate al= ways registers the first statement parameter as a numeric output parameter = for the CUD operations:" msgstr "" = -#: query_sql.xml:705(title) = +#. Tag: programlisting +#: query_sql.xml:559 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_sql.xml:563 +#, no-c-format msgid "Custom SQL for loading" msgstr "" = -#: query_sql.xml:707(para) = +#. Tag: para +#: query_sql.xml:565 +#, no-c-format msgid "You may also declare your own SQL (or HQL) queries for entity loadi= ng:" msgstr "" = -#: query_sql.xml:718(para) = +#. Tag: programlisting +#: query_sql.xml:568 +#, no-c-format +msgid "" + "\n" + " \n" + " SELECT NAME AS {pers.name}, ID AS {pers.id}\n" + " FROM PERSON\n" + " WHERE ID=3D?\n" + " FOR UPDATE\n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:570 +#, no-c-format msgid "This is just a named query declaration, as discussed earlier. You m= ay reference this named query in a class mapping:" msgstr "" = -#: query_sql.xml:729(para) = +#. Tag: programlisting +#: query_sql.xml:573 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:575 +#, no-c-format msgid "This even works with stored procedures." msgstr "" = -#: query_sql.xml:731(para) = +#. Tag: para +#: query_sql.xml:577 +#, no-c-format msgid "You may even define a query for collection loading:" msgstr "" = -#: query_sql.xml:747(para) = +#. Tag: programlisting +#: query_sql.xml:579 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:581 +#, no-c-format +msgid "" + "\n" + " \n" + " SELECT {emp.*}\n" + " FROM EMPLOYMENT emp\n" + " WHERE EMPLOYER =3D :id\n" + " ORDER BY STARTDATE ASC, EMPLOYEE ASC\n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:583 +#, no-c-format msgid "You could even define an entity loader that loads a collection by j= oin fetching:" msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: query_sql.xml:0(None) = -msgid "translator-credits" +#. Tag: programlisting +#: query_sql.xml:586 +#, no-c-format +msgid "" + "\n" + " \n" + " \= n" + " SELECT NAME AS {pers.*}, {emp.*}\n" + " FROM PERSON pers\n" + " LEFT OUTER JOIN EMPLOYMENT emp\n" + " ON pers.ID =3D emp.PERSON_ID\n" + " WHERE ID=3D?\n" + "]]>" msgstr "" = Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/sess= ion_api.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/session_ap= i.pot 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/session_ap= i.pot 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,636 +1,1354 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:34-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: session_api.xml:5(title) = +#. Tag: title +#: session_api.xml:29 +#, no-c-format msgid "Working with objects" msgstr "" = -#: session_api.xml:7(para) = +#. Tag: para +#: session_api.xml:31 +#, no-c-format msgid "Hibernate is a full object/relational mapping solution that not onl= y shields the developer from the details of the underlying database managem= ent system, but also offers state management of object= s. This is, contrary to the management of SQL statements= in common JDBC/SQL persistence layers, a very natural object-oriented view= of persistence in Java applications." msgstr "" = -#: session_api.xml:16(para) = +#. Tag: para +#: session_api.xml:40 +#, no-c-format msgid "In other words, Hibernate application developers should always thin= k about the state of their objects, and not necessaril= y about the execution of SQL statements. This part is taken care of by Hibe= rnate and is only relevant for the application developer when tuning the pe= rformance of the system." msgstr "" = -#: session_api.xml:24(title) = +#. Tag: title +#: session_api.xml:48 +#, no-c-format msgid "Hibernate object states" msgstr "" = -#: session_api.xml:26(para) = +#. Tag: para +#: session_api.xml:50 +#, no-c-format msgid "Hibernate defines and supports the following object states:" msgstr "" = -#: session_api.xml:32(para) = +#. Tag: para +#: session_api.xml:56 +#, no-c-format msgid "Transient - an object is transient if it has j= ust been instantiated using the new operator, and it is = not associated with a Hibernate Session. It has no persi= stent representation in the database and no identifier value has been assig= ned. Transient instances will be destroyed by the garbage collector if the = application doesn't hold a reference anymore. Use the Hibernate Se= ssion to make an object persistent (and let Hibernate take care o= f the SQL statements that need to be executed for this transition)." msgstr "" = -#: session_api.xml:44(para) = +#. Tag: para +#: session_api.xml:68 +#, no-c-format msgid "Persistent - a persistent instance has a repre= sentation in the database and an identifier value. It might just have been = saved or loaded, however, it is by definition in the scope of a Se= ssion. Hibernate will detect any changes made to an object in per= sistent state and synchronize the state with the database when the unit of = work completes. Developers don't execute manual UPDATE s= tatements, or DELETE statements when an object should be= made transient." msgstr "" = -#: session_api.xml:55(para) = +#. Tag: para +#: session_api.xml:79 +#, no-c-format msgid "Detached - a detached instance is an object th= at has been persistent, but its Session has been closed.= The reference to the object is still valid, of course, and the detached in= stance might even be modified in this state. A detached instance can be rea= ttached to a new Session at a later point in time, makin= g it (and all the modifications) persistent again. This feature enables a p= rogramming model for long running units of work that require user think-tim= e. We call them application transactions, i.e. a unit = of work from the point of view of the user." msgstr "" = -#: session_api.xml:69(para) = +#. Tag: para +#: session_api.xml:93 +#, no-c-format msgid "We'll now discuss the states and state transitions (and the Hiberna= te methods that trigger a transition) in more detail." msgstr "" = -#: session_api.xml:77(title) = +#. Tag: title +#: session_api.xml:101 +#, no-c-format msgid "Making objects persistent" msgstr "" = -#: session_api.xml:79(para) = +#. Tag: para +#: session_api.xml:103 +#, no-c-format msgid "Newly instantiated instances of a a persistent class are considered= transient by Hibernate. We can make a transient insta= nce persistent by associating it with a session:" msgstr "" = -#: session_api.xml:92(para) = +#. Tag: programlisting +#: session_api.xml:110 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:112 +#, no-c-format msgid "If Cat has a generated identifier, the identifie= r is generated and assigned to the cat when sav= e() is called. If Cat has an assigned= identifier, or a composite key, the identifier should be assigne= d to the cat instance before calling save(). You may also use persist() instead of s= ave(), with the semantics defined in the EJB3 early draft." msgstr "" = -#: session_api.xml:104(para) = +#. Tag: para +#: session_api.xml:124 +#, no-c-format msgid "persist() makes a transient instance persistent.= However, it doesn't guarantee that the identifier value will be assigned t= o the persistent instance immediately, the assignment might happen at flush= time. persist() also guarantees that it will not execut= e an INSERT statement if it is called outside of transac= tion boundaries. This is useful in long-running conversations with an exten= ded Session/persistence context." msgstr "" = -#: session_api.xml:115(para) = +#. Tag: para +#: session_api.xml:135 +#, no-c-format msgid "save() does guarantee to return an identifier. I= f an INSERT has to be executed to get the identifier ( e.g. \"identity\" ge= nerator, not \"sequence\"), this INSERT happens immediately, no matter if y= ou are inside or outside of a transaction. This is problematic in a long-ru= nning conversation with an extended Session/persistence context." msgstr "" = -#: session_api.xml:125(para) = +#. Tag: para +#: session_api.xml:145 +#, no-c-format msgid "Alternatively, you may assign the identifier using an overloaded ve= rsion of save()." msgstr "" = -#: session_api.xml:138(para) = +#. Tag: programlisting +#: session_api.xml:150 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:152 +#, no-c-format msgid "If the object you make persistent has associated objects (e.g. the = kittens collection in the previous example), these objec= ts may be made persistent in any order you like unless you have a = NOT NULL constraint upon a foreign key column. There is never a r= isk of violating foreign key constraints. However, you might violate a NOT NULL constraint if you save() the obj= ects in the wrong order." msgstr "" = -#: session_api.xml:148(para) = +#. Tag: para +#: session_api.xml:162 +#, no-c-format msgid "Usually you don't bother with this detail, as you'll very likely us= e Hibernate's transitive persistence feature to save t= he associated objects automatically. Then, even NOT NULL= constraint violations don't occur - Hibernate will take care of everything= . Transitive persistence is discussed later in this chapter." msgstr "" = -#: session_api.xml:159(title) = +#. Tag: title +#: session_api.xml:173 +#, no-c-format msgid "Loading an object" msgstr "" = -#: session_api.xml:161(para) = +#. Tag: para +#: session_api.xml:175 +#, no-c-format msgid "The load() methods of Session= gives you a way to retrieve a persistent instance if you already know its = identifier. load() takes a class object and will load th= e state into a newly instantiated instance of that class, in persistent sta= te." msgstr "" = -#: session_api.xml:174(para) = +#. Tag: programlisting +#: session_api.xml:182 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:184 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:186 +#, no-c-format msgid "Alternatively, you can load state into a given instance:" msgstr "" = -#: session_api.xml:183(para) = +#. Tag: programlisting +#: session_api.xml:190 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:192 +#, no-c-format msgid "Note that load() will throw an unrecoverable exc= eption if there is no matching database row. If the class is mapped with a = proxy, load() just returns an uninitialized proxy and do= es not actually hit the database until you invoke a method of the proxy. Th= is behaviour is very useful if you wish to create an association to an obje= ct without actually loading it from the database. It also allows multiple i= nstances to be loaded as a batch if batch-size is define= d for the class mapping." msgstr "" = -#: session_api.xml:194(para) = +#. Tag: para +#: session_api.xml:203 +#, no-c-format msgid "If you are not certain that a matching row exists, you should use t= he get() method, which hits the database immediately and= returns null if there is no matching row." msgstr "" = -#: session_api.xml:207(para) = +#. Tag: programlisting +#: session_api.xml:209 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:211 +#, no-c-format msgid "You may even load an object using an SQL SELECT ... FOR UP= DATE, using a LockMode. See the API documentat= ion for more information." msgstr "" = -#: session_api.xml:214(para) = +#. Tag: programlisting +#: session_api.xml:216 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: session_api.xml:218 +#, no-c-format msgid "Note that any associated instances or contained collections are not selected FOR UPDATE, unless you de= cide to specify lock or all as a casc= ade style for the association." msgstr "" = -#: session_api.xml:221(para) = +#. Tag: para +#: session_api.xml:225 +#, no-c-format msgid "It is possible to re-load an object and all its collections at any = time, using the refresh() method. This is useful when da= tabase triggers are used to initialize some of the properties of the object= ." msgstr "" = -#: session_api.xml:231(para) = +#. Tag: programlisting +#: session_api.xml:231 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:233 +#, no-c-format msgid "An important question usually appears at this point: How much does = Hibernate load from the database and how many SQL SELECT= s will it use? This depends on the fetching strategy a= nd is explained in ." msgstr "" = -#: session_api.xml:241(title) = +#. Tag: title +#: session_api.xml:243 +#, no-c-format msgid "Querying" msgstr "" = -#: session_api.xml:243(para) = +#. Tag: para +#: session_api.xml:245 +#, no-c-format msgid "If you don't know the identifiers of the objects you are looking fo= r, you need a query. Hibernate supports an easy-to-use but powerful object = oriented query language (HQL). For programmatic query creation, Hibernate s= upports a sophisticated Criteria and Example query feature (QBC and QBE). Y= ou may also express your query in the native SQL of your database, with opt= ional support from Hibernate for result set conversion into objects." msgstr "" = -#: session_api.xml:253(title) = +#. Tag: title +#: session_api.xml:255 +#, no-c-format msgid "Executing queries" msgstr "" = -#: session_api.xml:255(para) = +#. Tag: para +#: session_api.xml:257 +#, no-c-format msgid "HQL and native SQL queries are represented with an instance of org.hibernate.Query. This interface offers methods for param= eter binding, result set handling, and for the execution of the actual quer= y. You always obtain a Query using the current = Session:" msgstr "" = -#: session_api.xml:286(para) = +#. Tag: programlisting +#: session_api.xml:264 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:266 +#, no-c-format msgid "A query is usually executed by invoking list(), = the result of the query will be loaded completely into a collection in memo= ry. Entity instances retrieved by a query are in persistent state. The uniqueResult() method offers a shortcut if you know your que= ry will only return a single object. Note that queries that make use of eag= er fetching of collections usually return duplicates of the root objects (b= ut with their collections initialized). You can filter these duplicates sim= ply through a Set." msgstr "" = -#: session_api.xml:298(title) = +#. Tag: title +#: session_api.xml:278 +#, no-c-format msgid "Iterating results" msgstr "" = -#: session_api.xml:300(para) = +#. Tag: para +#: session_api.xml:280 +#, no-c-format msgid "Occasionally, you might be able to achieve better performance by ex= ecuting the query using the iterate() method. This will = only usually be the case if you expect that the actual entity instances ret= urned by the query will already be in the session or second-level cache. If= they are not already cached, iterate() will be slower t= han list() and might require many database hits for a si= mple query, usually 1 for the initial select which onl= y returns identifiers, and n additional selects to ini= tialize the actual instances." msgstr "" = -#: session_api.xml:327(title) = +#. Tag: programlisting +#: session_api.xml:292 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: session_api.xml:296 +#, no-c-format msgid "Queries that return tuples" msgstr "" = -#: session_api.xml:329(para) = +#. Tag: para +#: session_api.xml:298 +#, no-c-format msgid "Hibernate queries sometimes return tuples of objects, in which case= each tuple is returned as an array:" msgstr "" = -#: session_api.xml:349(title) = +#. Tag: programlisting +#: session_api.xml:303 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: session_api.xml:308 +#, no-c-format msgid "Scalar results" msgstr "" = -#: session_api.xml:351(para) = +#. Tag: para +#: session_api.xml:310 +#, no-c-format msgid "Queries may specify a property of a class in the select clause. They may even call SQL aggregate functions. Properties or a= ggregates are considered \"scalar\" results (and not entities in persistent= state)." msgstr "" = -#: session_api.xml:374(title) = +#. Tag: programlisting +#: session_api.xml:316 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: session_api.xml:321 +#, no-c-format msgid "Bind parameters" msgstr "" = -#: session_api.xml:376(para) = +#. Tag: para +#: session_api.xml:323 +#, no-c-format msgid "Methods on Query are provided for binding values= to named parameters or JDBC-style ? parameters. Contrary to JDBC, Hibernate numbers parameters from zero. Nam= ed parameters are identifiers of the form :name in the q= uery string. The advantages of named parameters are:" msgstr "" = -#: session_api.xml:386(para) = +#. Tag: para +#: session_api.xml:333 +#, no-c-format msgid "named parameters are insensitive to the order they occur in the que= ry string" msgstr "" = -#: session_api.xml:392(para) = +#. Tag: para +#: session_api.xml:339 +#, no-c-format msgid "they may occur multiple times in the same query" msgstr "" = -#: session_api.xml:397(para) = +#. Tag: para +#: session_api.xml:344 +#, no-c-format msgid "they are self-documenting" msgstr "" = -#: session_api.xml:424(title) = +#. Tag: programlisting +#: session_api.xml:350 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:352 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:354 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: session_api.xml:359 +#, no-c-format msgid "Pagination" msgstr "" = -#: session_api.xml:426(para) = +#. Tag: para +#: session_api.xml:361 +#, no-c-format msgid "If you need to specify bounds upon your result set (the maximum num= ber of rows you want to retrieve and / or the first row you want to retriev= e) you should use methods of the Query interface:" msgstr "" = -#: session_api.xml:437(para) = +#. Tag: programlisting +#: session_api.xml:367 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:369 +#, no-c-format msgid "Hibernate knows how to translate this limit query into the native S= QL of your DBMS." msgstr "" = -#: session_api.xml:445(title) = +#. Tag: title +#: session_api.xml:377 +#, no-c-format msgid "Scrollable iteration" msgstr "" = -#: session_api.xml:447(para) = +#. Tag: para +#: session_api.xml:379 +#, no-c-format msgid "If your JDBC driver supports scrollable ResultSets, the Query interface may be used to obtain a ScrollableResults object, which allows flexible navigation of th= e query results." msgstr "" = -#: session_api.xml:476(para) = +#. Tag: programlisting +#: session_api.xml:386 +#, no-c-format +msgid "" + " i++ ) && cats.next() ) pageOfCats.add( cat= s.get(1) );\n" + "\n" + "}\n" + "cats.close()]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:388 +#, no-c-format msgid "Note that an open database connection (and cursor) is required for = this functionality, use setMaxResult()/setFirst= Result() if you need offline pagination functionality." msgstr "" = -#: session_api.xml:485(title) = +#. Tag: title +#: session_api.xml:397 +#, no-c-format msgid "Externalizing named queries" msgstr "" = -#: session_api.xml:487(para) = +#. Tag: para +#: session_api.xml:399 +#, no-c-format msgid "You may also define named queries in the mapping document. (Remembe= r to use a CDATA section if your query contains characte= rs that could be interpreted as markup.)" msgstr "" = -#: session_api.xml:499(para) = +#. Tag: programlisting +#: session_api.xml:405 +#, no-c-format +msgid "" + " ?\n" + "] ]>]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:407 +#, no-c-format msgid "Parameter binding and executing is done programatically:" msgstr "" = -#: session_api.xml:508(para) = +#. Tag: programlisting +#: session_api.xml:411 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:413 +#, no-c-format msgid "Note that the actual program code is independent of the query langu= age that is used, you may also define native SQL queries in metadata, or mi= grate existing queries to Hibernate by placing them in mapping files." msgstr "" = -#: session_api.xml:514(para) = +#. Tag: para +#: session_api.xml:419 +#, no-c-format msgid "Also note that a query declaration inside a <hibernate-= mapping> element requires a global unique name for the query, = while a query declaration inside a <class> element= is made unique automatically by prepending the fully qualified name of the= class, for example eg.Cat.ByNameAndMaximumWeight." msgstr "" = -#: session_api.xml:527(title) = +#. Tag: title +#: session_api.xml:432 +#, no-c-format msgid "Filtering collections" msgstr "" = -#: session_api.xml:528(para) = +#. Tag: para +#: session_api.xml:433 +#, no-c-format msgid "A collection filter is a special type of query= that may be applied to a persistent collection or array. The query string = may refer to this, meaning the current collection elemen= t." msgstr "" = -#: session_api.xml:541(para) = +#. Tag: programlisting +#: session_api.xml:439 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:441 +#, no-c-format msgid "The returned collection is considered a bag, and it's a copy of the= given collection. The original collection is not modified (this is contrar= y to the implication of the name \"filter\", but consistent with expected b= ehavior)." msgstr "" = -#: session_api.xml:547(para) = +#. Tag: para +#: session_api.xml:447 +#, no-c-format msgid "Observe that filters do not require a from claus= e (though they may have one if required). Filters are not limited to return= ing the collection elements themselves." msgstr "" = -#: session_api.xml:557(para) = +#. Tag: programlisting +#: session_api.xml:452 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:454 +#, no-c-format msgid "Even an empty filter query is useful, e.g. to load a subset of elem= ents in a huge collection:" msgstr "" = -#: session_api.xml:570(title) = +#. Tag: programlisting +#: session_api.xml:459 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: session_api.xml:464 +#, no-c-format msgid "Criteria queries" msgstr "" = -#: session_api.xml:572(para) = +#. Tag: para +#: session_api.xml:466 +#, no-c-format msgid "HQL is extremely powerful but some developers prefer to build queri= es dynamically, using an object-oriented API, rather than building query st= rings. Hibernate provides an intuitive Criteria query AP= I for these cases:" msgstr "" = -#: session_api.xml:583(para) = +#. Tag: programlisting +#: session_api.xml:472 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:474 +#, no-c-format msgid "The Criteria and the associated Example= API are discussed in more detail in ." msgstr "" = -#: session_api.xml:591(title) = +#. Tag: title +#: session_api.xml:482 +#, no-c-format msgid "Queries in native SQL" msgstr "" = -#: session_api.xml:593(para) = +#. Tag: para +#: session_api.xml:484 +#, no-c-format msgid "You may express a query in SQL, using createSQLQuery() and let Hibernate take care of the mapping from result sets to objec= ts. Note that you may at any time call session.connection() and use the JDBC Connection directly. If you chose t= o use the Hibernate API, you must enclose SQL aliases in braces:" msgstr "" = -#: session_api.xml:612(para) = -msgid "SQL queries may contain named and positional parameters, just like = Hibernate queries. More information about native SQL queries in Hibernate c= an be found in ." +#. Tag: programlisting +#: session_api.xml:492 +#, no-c-format +msgid "" + "" msgstr "" = -#: session_api.xml:623(title) = -msgid "Modifying persistent objects" +#. Tag: programlisting +#: session_api.xml:494 +#, no-c-format +msgid "" + "" msgstr "" = -#: session_api.xml:625(para) = -msgid "Transactional persistent instances (ie. object= s loaded, saved, created or queried by the Session) may = be manipulated by the application and any changes to persistent state will = be persisted when the Session is flushed (discussed later in this chapter). There is no need to call a particu= lar method (like update(), which has a different purpose= ) to make your modifications persistent. So the most straightforward way to= update the state of an object is to load() it, and then= manipulate it directly, while the Session is open:" +#. Tag: para +#: session_api.xml:496 +#, no-c-format +msgid "SQL queries may contain named and positional parameters, just like = Hibernate queries. More information about native SQL queries in Hibernate c= an be found in ." msgstr "" = -#: session_api.xml:640(para) = -msgid "Sometimes this programming model is inefficient since it would requ= ire both an SQL SELECT (to load an object) and an SQL UPDATE (to persist its updated state) in the same session.= Therefore Hibernate offers an alternate approach, using detached instances= ." +#. Tag: title +#: session_api.xml:507 +#, no-c-format +msgid "Modifying persistent objects" msgstr "" = -#: session_api.xml:649(literal) = -msgid "UPDATE" +#. Tag: para +#: session_api.xml:509 +#, no-c-format +msgid "Transactional persistent instances (ie. object= s loaded, saved, created or queried by the Session) may = be manipulated by the application and any changes to persistent state will = be persisted when the Session is flushed (discussed later in this chapter). There is no need to call a particu= lar method (like update(), which has a different purpose= ) to make your modifications persistent. So the most straightforward way to= update the state of an object is to load() it, and then= manipulate it directly, while the Session is open:" msgstr "" = -#: session_api.xml:649(literal) = -msgid "DELETE" +#. Tag: programlisting +#: session_api.xml:520 +#, no-c-format +msgid "" + "" msgstr "" = -#: session_api.xml:650(emphasis) = -msgid "state management" +#. Tag: para +#: session_api.xml:522 +#, no-c-format +msgid "Sometimes this programming model is inefficient since it would requ= ire both an SQL SELECT (to load an object) and an SQL UPDATE (to persist its updated state) in the same session.= Therefore Hibernate offers an alternate approach, using detached instances= ." msgstr "" = -#: session_api.xml:651(emphasis) = -msgid "statements" +#. Tag: emphasis +#: session_api.xml:530 +#, no-c-format +msgid "Note that Hibernate does not offer its own API for direct execution= of UPDATE or DELETE statements. Hibe= rnate is a state management service, you don't have to= think in statements to use it. JDBC is a perfect API = for executing SQL statements, you can get a JDBC Connection at any time by calling session.connection(). Further= more, the notion of mass operations conflicts with object/relational mappin= g for online transaction processing-oriented applications. Future versions = of Hibernate may however provide special mass operation functions. See for some possible batch operation tricks." msgstr "" = -#: session_api.xml:652(literal) = -msgid "Connection" -msgstr "" - -#: session_api.xml:653(literal) = -msgid "session.connection()" -msgstr "" - -#: session_api.xml:648(emphasis) = -msgid "Note that Hibernate does not offer its own API for direct execution= of or statements. Hibernate is a service, you don't have to think in to use it. J= DBC is a perfect API for executing SQL statements, you can get a JDBC at any time by calling . Furthermore, the notio= n of mass operations conflicts with object/relational mapping for online tr= ansaction processing-oriented applications. Future versions of Hibernate ma= y however provide special mass operation functions. See for some possible batch operation tricks." -msgstr "" - -#: session_api.xml:663(title) = +#. Tag: title +#: session_api.xml:545 +#, no-c-format msgid "Modifying detached objects" msgstr "" = -#: session_api.xml:665(para) = +#. Tag: para +#: session_api.xml:547 +#, no-c-format msgid "Many applications need to retrieve an object in one transaction, se= nd it to the UI layer for manipulation, then save the changes in a new tran= saction. Applications that use this kind of approach in a high-concurrency = environment usually use versioned data to ensure isolation for the \"long\"= unit of work." msgstr "" = -#: session_api.xml:672(para) = +#. Tag: para +#: session_api.xml:554 +#, no-c-format msgid "Hibernate supports this model by providing for reattachment of deta= ched instances using the Session.update() or Se= ssion.merge() methods:" msgstr "" = -#: session_api.xml:690(para) = +#. Tag: programlisting +#: session_api.xml:560 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:562 +#, no-c-format msgid "If the Cat with identifier catId had already been loaded by secondSession when the ap= plication tried to reattach it, an exception would have been thrown." msgstr "" = -#: session_api.xml:696(para) = +#. Tag: para +#: session_api.xml:568 +#, no-c-format msgid "Use update() if you are sure that the session do= es not contain an already persistent instance with the same identifier, and= merge() if you want to merge your modifications at any = time without consideration of the state of the session. In other words, update() is usually the first method you would call in a fr= esh session, ensuring that reattachment of your detached instances is the f= irst operation that is executed." msgstr "" = -#: session_api.xml:705(para) = +#. Tag: para +#: session_api.xml:577 +#, no-c-format msgid "The application should individually update() det= ached instances reachable from the given detached instance if and only if it wants their state also updated. This can be automate= d of course, using transitive persistence, see ." msgstr "" = -#: session_api.xml:712(para) = +#. Tag: para +#: session_api.xml:584 +#, no-c-format msgid "The lock() method also allows an application to = reassociate an object with a new session. However, the detached instance ha= s to be unmodified!" msgstr "" = -#: session_api.xml:724(para) = +#. Tag: programlisting +#: session_api.xml:589 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:591 +#, no-c-format msgid "Note that lock() can be used with various LockModes, see the API documentation and the chapter on transa= ction handling for more information. Reattachment is not the only usecase f= or lock()." msgstr "" = -#: session_api.xml:731(para) = +#. Tag: para +#: session_api.xml:598 +#, no-c-format msgid "Other models for long units of work are discussed in ." msgstr "" = -#: session_api.xml:738(title) = +#. Tag: title +#: session_api.xml:605 +#, no-c-format msgid "Automatic state detection" msgstr "" = -#: session_api.xml:740(para) = +#. Tag: para +#: session_api.xml:607 +#, no-c-format msgid "Hibernate users have requested a general purpose method that either= saves a transient instance by generating a new identifier or updates/reatt= aches the detached instances associated with its current identifier. The saveOrUpdate() method implements this functionality." msgstr "" = -#: session_api.xml:758(para) = +#. Tag: programlisting +#: session_api.xml:614 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:616 +#, no-c-format msgid "The usage and semantics of saveOrUpdate() seems = to be confusing for new users. Firstly, so long as you are not trying to us= e instances from one session in another new session, you should not need to= use update(), saveOrUpdate(), or merge(). Some whole applications will never use either of t= hese methods." msgstr "" = -#: session_api.xml:766(para) = +#. Tag: para +#: session_api.xml:624 +#, no-c-format msgid "Usually update() or saveOrUpdate() are used in the following scenario:" msgstr "" = -#: session_api.xml:773(para) = +#. Tag: para +#: session_api.xml:631 +#, no-c-format msgid "the application loads an object in the first session" msgstr "" = -#: session_api.xml:778(para) = +#. Tag: para +#: session_api.xml:636 +#, no-c-format msgid "the object is passed up to the UI tier" msgstr "" = -#: session_api.xml:783(para) = +#. Tag: para +#: session_api.xml:641 +#, no-c-format msgid "some modifications are made to the object" msgstr "" = -#: session_api.xml:788(para) = +#. Tag: para +#: session_api.xml:646 +#, no-c-format msgid "the object is passed back down to the business logic tier" msgstr "" = -#: session_api.xml:793(para) = +#. Tag: para +#: session_api.xml:651 +#, no-c-format msgid "the application persists these modifications by calling up= date() in a second session" msgstr "" = -#: session_api.xml:800(para) = +#. Tag: para +#: session_api.xml:658 +#, no-c-format msgid "saveOrUpdate() does the following:" msgstr "" = -#: session_api.xml:806(para) = +#. Tag: para +#: session_api.xml:664 +#, no-c-format msgid "if the object is already persistent in this session, do nothing" msgstr "" = -#: session_api.xml:811(para) = +#. Tag: para +#: session_api.xml:669 +#, no-c-format msgid "if another object associated with the session has the same identifi= er, throw an exception" msgstr "" = -#: session_api.xml:817(para) = +#. Tag: para +#: session_api.xml:675 +#, no-c-format msgid "if the object has no identifier property, save()= it" msgstr "" = -#: session_api.xml:822(para) = +#. Tag: para +#: session_api.xml:680 +#, no-c-format msgid "if the object's identifier has the value assigned to a newly instan= tiated object, save() it" msgstr "" = -#: session_api.xml:828(para) = +#. Tag: para +#: session_api.xml:686 +#, no-c-format msgid "if the object is versioned (by a <version>= or <timestamp>), and the version property value i= s the same value assigned to a newly instantiated object, save() it" msgstr "" = -#: session_api.xml:836(para) = +#. Tag: para +#: session_api.xml:694 +#, no-c-format msgid "otherwise update() the object" msgstr "" = -#: session_api.xml:842(para) = +#. Tag: para +#: session_api.xml:700 +#, no-c-format msgid "and merge() is very different:" msgstr "" = -#: session_api.xml:848(para) = +#. Tag: para +#: session_api.xml:706 +#, no-c-format msgid "if there is a persistent instance with the same identifier currentl= y associated with the session, copy the state of the given object onto the = persistent instance" msgstr "" = -#: session_api.xml:855(para) = +#. Tag: para +#: session_api.xml:713 +#, no-c-format msgid "if there is no persistent instance currently associated with the se= ssion, try to load it from the database, or create a new persistent instanc= e" msgstr "" = -#: session_api.xml:861(para) = +#. Tag: para +#: session_api.xml:719 +#, no-c-format msgid "the persistent instance is returned" msgstr "" = -#: session_api.xml:866(para) = +#. Tag: para +#: session_api.xml:724 +#, no-c-format msgid "the given instance does not become associated with the session, it = remains detached" msgstr "" = -#: session_api.xml:876(title) = +#. Tag: title +#: session_api.xml:734 +#, no-c-format msgid "Deleting persistent objects" msgstr "" = -#: session_api.xml:878(para) = +#. Tag: para +#: session_api.xml:736 +#, no-c-format msgid "Session.delete() will remove an object's state f= rom the database. Of course, your application might still hold a reference = to a deleted object. It's best to think of delete() as m= aking a persistent instance transient." msgstr "" = -#: session_api.xml:887(para) = +#. Tag: programlisting +#: session_api.xml:743 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: session_api.xml:745 +#, no-c-format msgid "You may delete objects in any order you like, without risk of forei= gn key constraint violations. It is still possible to violate a NO= T NULL constraint on a foreign key column by deleting objects in = the wrong order, e.g. if you delete the parent, but forget to delete the ch= ildren." msgstr "" = -#: session_api.xml:898(title) = +#. Tag: title +#: session_api.xml:756 +#, no-c-format msgid "Replicating object between two different datastores" msgstr "" = -#: session_api.xml:900(para) = +#. Tag: para +#: session_api.xml:758 +#, no-c-format msgid "It is occasionally useful to be able to take a graph of persistent = instances and make them persistent in a different datastore, without regene= rating identifier values." msgstr "" = -#: session_api.xml:920(para) = +#. Tag: programlisting +#: session_api.xml:764 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:766 +#, no-c-format msgid "The ReplicationMode determines how repl= icate() will deal with conflicts with existing rows in the databa= se." msgstr "" = -#: session_api.xml:927(para) = +#. Tag: para +#: session_api.xml:773 +#, no-c-format msgid "ReplicationMode.IGNORE - ignore the object when = there is an existing database row with the same identifier" msgstr "" = -#: session_api.xml:933(para) = +#. Tag: para +#: session_api.xml:779 +#, no-c-format msgid "ReplicationMode.OVERWRITE - overwrite any existi= ng database row with the same identifier" msgstr "" = -#: session_api.xml:939(para) = +#. Tag: para +#: session_api.xml:785 +#, no-c-format msgid "ReplicationMode.EXCEPTION - throw an exception i= f there is an existing database row with the same identifier" msgstr "" = -#: session_api.xml:945(para) = +#. Tag: para +#: session_api.xml:791 +#, no-c-format msgid "ReplicationMode.LATEST_VERSION - overwrite the r= ow if its version number is earlier than the version number of the object, = or ignore the object otherwise" msgstr "" = -#: session_api.xml:953(para) = +#. Tag: para +#: session_api.xml:799 +#, no-c-format msgid "Usecases for this feature include reconciling data entered into dif= ferent database instances, upgrading system configuration information durin= g product upgrades, rolling back changes made during non-ACID transactions = and more." msgstr "" = -#: session_api.xml:962(title) = +#. Tag: title +#: session_api.xml:808 +#, no-c-format msgid "Flushing the Session" msgstr "" = -#: session_api.xml:964(para) = +#. Tag: para +#: session_api.xml:810 +#, no-c-format msgid "From time to time the Session will execute the S= QL statements needed to synchronize the JDBC connection's state with the st= ate of objects held in memory. This process, flush, oc= curs by default at the following points" msgstr "" = -#: session_api.xml:973(para) = +#. Tag: para +#: session_api.xml:819 +#, no-c-format msgid "before some query executions" msgstr "" = -#: session_api.xml:978(para) = +#. Tag: para +#: session_api.xml:824 +#, no-c-format msgid "from org.hibernate.Transaction.commit()" msgstr "" = -#: session_api.xml:983(para) = +#. Tag: para +#: session_api.xml:829 +#, no-c-format msgid "from Session.flush()" msgstr "" = -#: session_api.xml:989(para) = +#. Tag: para +#: session_api.xml:835 +#, no-c-format msgid "The SQL statements are issued in the following order" msgstr "" = -#: session_api.xml:995(para) = +#. Tag: para +#: session_api.xml:841 +#, no-c-format msgid "all entity insertions, in the same order the corresponding objects = were saved using Session.save()" msgstr "" = -#: session_api.xml:1001(para) = +#. Tag: para +#: session_api.xml:847 +#, no-c-format msgid "all entity updates" msgstr "" = -#: session_api.xml:1006(para) = +#. Tag: para +#: session_api.xml:852 +#, no-c-format msgid "all collection deletions" msgstr "" = -#: session_api.xml:1011(para) = +#. Tag: para +#: session_api.xml:857 +#, no-c-format msgid "all collection element deletions, updates and insertions" msgstr "" = -#: session_api.xml:1016(para) = +#. Tag: para +#: session_api.xml:862 +#, no-c-format msgid "all collection insertions" msgstr "" = -#: session_api.xml:1021(para) = +#. Tag: para +#: session_api.xml:867 +#, no-c-format msgid "all entity deletions, in the same order the corresponding objects w= ere deleted using Session.delete()" msgstr "" = -#: session_api.xml:1028(para) = +#. Tag: para +#: session_api.xml:874 +#, no-c-format msgid "(An exception is that objects using native ID ge= neration are inserted when they are saved.)" msgstr "" = -#: session_api.xml:1033(para) = +#. Tag: para +#: session_api.xml:879 +#, no-c-format msgid "Except when you explicity flush(), there are abs= olutely no guarantees about when the Session<= /literal> executes the JDBC calls, only the order in w= hich they are executed. However, Hibernate does guarantee that the Query.list(..) will never return stale data; nor will they retur= n the wrong data." msgstr "" = -#: session_api.xml:1041(para) = +#. Tag: para +#: session_api.xml:887 +#, no-c-format msgid "It is possible to change the default behavior so that flush occurs = less frequently. The FlushMode class defines three diffe= rent modes: only flush at commit time (and only when the Hibernate Transaction API is used), flush automatically using the explaine= d routine, or never flush unless flush() is called expli= citly. The last mode is useful for long running units of work, where a Session is kept open and disconnected for a long time (see <= xref linkend=3D\"transactions-optimistic-longsession\"/>)." msgstr "" = -#: session_api.xml:1066(para) = +#. Tag: programlisting +#: session_api.xml:897 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:899 +#, no-c-format msgid "During flush, an exception might occur (e.g. if a DML operation vio= lates a constraint). Since handling exceptions involves some understanding = of Hibernate's transactional behavior, we discuss it in ." msgstr "" = -#: session_api.xml:1075(title) = +#. Tag: title +#: session_api.xml:908 +#, no-c-format msgid "Transitive persistence" msgstr "" = -#: session_api.xml:1077(para) = +#. Tag: para +#: session_api.xml:910 +#, no-c-format msgid "It is quite cumbersome to save, delete, or reattach individual obje= cts, especially if you deal with a graph of associated objects. A common ca= se is a parent/child relationship. Consider the following example:" msgstr "" = -#: session_api.xml:1083(para) = +#. Tag: para +#: session_api.xml:916 +#, no-c-format msgid "If the children in a parent/child relationship would be value typed= (e.g. a collection of addresses or strings), their life cycle would depend= on the parent and no further action would be required for convenient \"cas= cading\" of state changes. When the parent is saved, the value-typed child = objects are saved as well, when the parent is deleted, the children will be= deleted, etc. This even works for operations such as the removal of a chil= d from the collection; Hibernate will detect this and, since value-typed ob= jects can't have shared references, delete the child from the database." msgstr "" = -#: session_api.xml:1094(para) = +#. Tag: para +#: session_api.xml:927 +#, no-c-format msgid "Now consider the same scenario with parent and child objects being = entities, not value-types (e.g. categories and items, or parent and child c= ats). Entities have their own life cycle, support shared references (so rem= oving an entity from the collection does not mean it can be deleted), and t= here is by default no cascading of state from one entity to any other assoc= iated entities. Hibernate does not implement persistence by reach= ability by default." msgstr "" = -#: session_api.xml:1103(para) = +#. Tag: para +#: session_api.xml:936 +#, no-c-format msgid "For each basic operation of the Hibernate session - including persist(), merge(), saveOrUpdate(), delete(), lock(), refresh(), evict(= ), replicate() - there is a corresponding cascade style. Respecti= vely, the cascade styles are named create, merge, save-update, del= ete, lock, refresh, evict, replicate. If you want an operation to= be cascaded along an association, you must indicate that in the mapping do= cument. For example:" msgstr "" = -#: session_api.xml:1114(para) = +#. Tag: programlisting +#: session_api.xml:945 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:947 +#, no-c-format msgid "Cascade styles my be combined:" msgstr "" = -#: session_api.xml:1120(para) = +#. Tag: programlisting +#: session_api.xml:951 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:953 +#, no-c-format msgid "You may even use cascade=3D\"all\" to specify th= at all operations should be cascaded along the associa= tion. The default cascade=3D\"none\" specifies that no o= perations are to be cascaded." msgstr "" = -#: session_api.xml:1126(para) = +#. Tag: para +#: session_api.xml:959 +#, no-c-format msgid "A special cascade style, delete-orphan, applies = only to one-to-many associations, and indicates that the delete()<= /literal> operation should be applied to any child object that is removed f= rom the association." msgstr "" = -#: session_api.xml:1133(para) = +#. Tag: para +#: session_api.xml:966 +#, no-c-format msgid "Recommendations:" msgstr "" = -#: session_api.xml:1139(para) = +#. Tag: para +#: session_api.xml:972 +#, no-c-format msgid "It doesn't usually make sense to enable cascade on a <m= any-to-one> or <many-to-many> associa= tion. Cascade is often useful for <one-to-one> and= <one-to-many> associations." msgstr "" = -#: session_api.xml:1147(para) = +#. Tag: para +#: session_api.xml:980 +#, no-c-format msgid "If the child object's lifespan is bounded by the lifespan of the pa= rent object, make it a life cycle object by specifying= cascade=3D\"all,delete-orphan\"." msgstr "" = -#: session_api.xml:1154(para) = +#. Tag: para +#: session_api.xml:987 +#, no-c-format msgid "Otherwise, you might not need cascade at all. But if you think that= you will often be working with the parent and children together in the sam= e transaction, and you want to save yourself some typing, consider using cascade=3D\"persist,merge,save-update\"." msgstr "" = -#: session_api.xml:1162(para) = +#. Tag: para +#: session_api.xml:995 +#, no-c-format msgid "Mapping an association (either a single valued association, or a co= llection) with cascade=3D\"all\" marks the association a= s a parent/child style relationship where save/update/= delete of the parent results in save/update/delete of the child or children= ." msgstr "" = -#: session_api.xml:1168(para) = +#. Tag: para +#: session_api.xml:1001 +#, no-c-format msgid "Futhermore, a mere reference to a child from a persistent parent wi= ll result in save/update of the child. This metaphor is incomplete, however= . A child which becomes unreferenced by its parent is not automatically deleted, except in the case of a <one-to-many= > association mapped with cascade=3D\"delete-orphan\"= . The precise semantics of cascading operations for a parent/chil= d relationship are as follows:" msgstr "" = -#: session_api.xml:1179(para) = +#. Tag: para +#: session_api.xml:1012 +#, no-c-format msgid "If a parent is passed to persist(), all children= are passed to persist()" msgstr "" = -#: session_api.xml:1185(para) = +#. Tag: para +#: session_api.xml:1018 +#, no-c-format msgid "If a parent is passed to merge(), all children a= re passed to merge()" msgstr "" = -#: session_api.xml:1191(para) = +#. Tag: para +#: session_api.xml:1024 +#, no-c-format msgid "If a parent is passed to save(), update= () or saveOrUpdate(), all children are passed = to saveOrUpdate()" msgstr "" = -#: session_api.xml:1197(para) = +#. Tag: para +#: session_api.xml:1030 +#, no-c-format msgid "If a transient or detached child becomes referenced by a persistent= parent, it is passed to saveOrUpdate()" msgstr "" = -#: session_api.xml:1203(para) = +#. Tag: para +#: session_api.xml:1036 +#, no-c-format msgid "If a parent is deleted, all children are passed to delete(= )" msgstr "" = -#: session_api.xml:1208(para) = +#. Tag: para +#: session_api.xml:1041 +#, no-c-format msgid "If a child is dereferenced by a persistent parent, nothin= g special happens - the application should explicitly delete the= child if necessary - unless cascade=3D\"delete-orphan\"= , in which case the \"orphaned\" child is deleted." msgstr "" = -#: session_api.xml:1217(para) = +#. Tag: para +#: session_api.xml:1050 +#, no-c-format msgid "Finally, note that cascading of operations can be applied to an obj= ect graph at call time or at flush time. All operations, if enabled, are cascaded to associated entities rea= chable when the operation is executed. However, save-upate and delete-orphan are transitive for all associated e= ntities reachable during flush of the Session." msgstr "" = -#: session_api.xml:1229(title) = +#. Tag: title +#: session_api.xml:1062 +#, no-c-format msgid "Using metadata" msgstr "" = -#: session_api.xml:1231(para) = +#. Tag: para +#: session_api.xml:1064 +#, no-c-format msgid "Hibernate requires a very rich meta-level model of all entity and v= alue types. From time to time, this model is very useful to the application= itself. For example, the application might use Hibernate's metadata to imp= lement a \"smart\" deep-copy algorithm that understands which objects shoul= d be copied (eg. mutable value types) and which should not (eg. immutable v= alue types and, possibly, associated entities)." msgstr "" = -#: session_api.xml:1238(para) = +#. Tag: para +#: session_api.xml:1071 +#, no-c-format msgid "Hibernate exposes metadata via the ClassMetadata= and CollectionMetadata interfaces and the Type= hierarchy. Instances of the metadata interfaces may be obtained = from the SessionFactory." msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: session_api.xml:0(None) = -msgid "translator-credits" +#. Tag: programlisting +#: session_api.xml:1078 +#, no-c-format +msgid "" + "" msgstr "" = Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/tool= set_guide.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/toolset_gu= ide.pot 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/toolset_gu= ide.pot 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,548 +1,950 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:34-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: toolset_guide.xml:5(title) = +#. Tag: title +#: toolset_guide.xml:29 +#, no-c-format msgid "Toolset Guide" msgstr "" = -#: toolset_guide.xml:7(para) = +#. Tag: para +#: toolset_guide.xml:31 +#, no-c-format msgid "Roundtrip engineering with Hibernate is possible using a set of Ecl= ipse plugins, commandline tools, as well as Ant tasks." msgstr "" = -#: toolset_guide.xml:12(para) = +#. Tag: para +#: toolset_guide.xml:36 +#, no-c-format msgid "The Hibernate Tools currently include plugins = for the Eclipse IDE as well as Ant tasks for reverse engineering of existin= g databases:" msgstr "" = -#: toolset_guide.xml:18(para) = +#. Tag: para +#: toolset_guide.xml:42 +#, no-c-format msgid "Mapping Editor: An editor for Hibernate XML ma= pping files, supporting auto-completion and syntax highlighting. It also su= pports semantic auto-completion for class names and property/field names, m= aking it much more versatile than a normal XML editor." msgstr "" = -#: toolset_guide.xml:23(para) = +#. Tag: para +#: toolset_guide.xml:47 +#, no-c-format msgid "Console: The console is a new view in Eclipse.= In addition to a tree overview of your console configurations, you also ge= t an interactive view of your persistent classes and their relationships. T= he console allows you to execute HQL queries against your database and brow= se the result directly in Eclipse." msgstr "" = -#: toolset_guide.xml:30(para) = +#. Tag: para +#: toolset_guide.xml:54 +#, no-c-format msgid "Development Wizards: Several wizards are provi= ded with the Hibernate Eclipse tools; you can use a wizard to quickly gener= ate Hibernate configuration (cfg.xml) files, or you may even completely rev= erse engineer an existing database schema into POJO source files and Hibern= ate mapping files. The reverse engineering wizard supports customizable tem= plates." msgstr "" = -#: toolset_guide.xml:38(emphasis) = +#. Tag: emphasis +#: toolset_guide.xml:62 +#, no-c-format msgid "Ant Tasks:" msgstr "" = -#: toolset_guide.xml:43(para) = +#. Tag: para +#: toolset_guide.xml:67 +#, no-c-format msgid "Please refer to the Hibernate Tools package an= d it's documentation for more information." msgstr "" = -#: toolset_guide.xml:48(para) = +#. Tag: para +#: toolset_guide.xml:72 +#, no-c-format msgid "However, the Hibernate main package comes bundled with an integrate= d tool (it can even be used from \"inside\" Hibernate on-the-fly): SchemaExport aka hbm2ddl." msgstr "" = -#: toolset_guide.xml:55(title) = +#. Tag: title +#: toolset_guide.xml:79 +#, no-c-format msgid "Automatic schema generation" msgstr "" = -#: toolset_guide.xml:57(para) = +#. Tag: para +#: toolset_guide.xml:81 +#, no-c-format msgid "DDL may be generated from your mapping files by a Hibernate utility= . The generated schema includes referential integrity constraints (primary = and foreign keys) for entity and collection tables. Tables and sequences ar= e also created for mapped identifier generators." msgstr "" = -#: toolset_guide.xml:64(para) = +#. Tag: para +#: toolset_guide.xml:88 +#, no-c-format msgid "You must specify a SQL Dialect via the hibernate.dialect property when using this t= ool, as DDL is highly vendor specific." msgstr "" = -#: toolset_guide.xml:70(para) = +#. Tag: para +#: toolset_guide.xml:94 +#, no-c-format msgid "First, customize your mapping files to improve the generated schema= ." msgstr "" = -#: toolset_guide.xml:75(title) = +#. Tag: title +#: toolset_guide.xml:99 +#, no-c-format msgid "Customizing the schema" msgstr "" = -#: toolset_guide.xml:77(para) = +#. Tag: para +#: toolset_guide.xml:101 +#, no-c-format msgid "Many Hibernate mapping elements define optional attributes named length, precision and scale. You may set the length, precision and scale of a column with this = attribute." msgstr "" = -#: toolset_guide.xml:87(para) = +#. Tag: programlisting +#: toolset_guide.xml:108 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:109 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:111 +#, no-c-format msgid "Some tags also accept a not-null attribute (for = generating a NOT NULL constraint on table columns) and a= unique attribute (for generating UNIQUE constraint on table columns)." msgstr "" = -#: toolset_guide.xml:97(para) = +#. Tag: programlisting +#: toolset_guide.xml:117 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:119 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:121 +#, no-c-format msgid "A unique-key attribute may be used to group colu= mns in a single unique key constraint. Currently, the specified value of th= e unique-key attribute is not used = to name the constraint in the generated DDL, only to group the columns in t= he mapping file." msgstr "" = -#: toolset_guide.xml:108(para) = +#. Tag: programlisting +#: toolset_guide.xml:129 +#, no-c-format +msgid "" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:131 +#, no-c-format msgid "An index attribute specifies the name of an inde= x that will be created using the mapped column or columns. Multiple columns= may be grouped into the same index, simply by specifying the same index na= me." msgstr "" = -#: toolset_guide.xml:117(para) = +#. Tag: programlisting +#: toolset_guide.xml:137 +#, no-c-format +msgid "" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:139 +#, no-c-format msgid "A foreign-key attribute may be used to override = the name of any generated foreign key constraint." msgstr "" = -#: toolset_guide.xml:124(para) = +#. Tag: programlisting +#: toolset_guide.xml:144 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:146 +#, no-c-format msgid "Many mapping elements also accept a child <column> element. This is particularly useful for mapping multi-column type= s:" msgstr "" = -#: toolset_guide.xml:135(para) = +#. Tag: programlisting +#: toolset_guide.xml:151 +#, no-c-format +msgid "" + "= \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:153 +#, no-c-format msgid "The default attribute lets you specify a default= value for a column (you should assign the same value to the mapped propert= y before saving a new instance of the mapped class)." msgstr "" = -#: toolset_guide.xml:149(para) = +#. Tag: programlisting +#: toolset_guide.xml:159 +#, no-c-format +msgid "" + "\n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:161 +#, no-c-format +msgid "" + "\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:163 +#, no-c-format msgid "The sql-type attribute allows the user to overri= de the default mapping of a Hibernate type to SQL datatype." msgstr "" = -#: toolset_guide.xml:158(para) = +#. Tag: programlisting +#: toolset_guide.xml:168 +#, no-c-format +msgid "" + "\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:170 +#, no-c-format msgid "The check attribute allows you to specify a chec= k constraint." msgstr "" = -#: toolset_guide.xml:173(title) = +#. Tag: programlisting +#: toolset_guide.xml:174 +#, no-c-format +msgid "" + "\n" + " 10\"/>\n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:176 +#, no-c-format +msgid "" + "\n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:180 +#, no-c-format msgid "Summary" msgstr "" = -#: toolset_guide.xml:180(entry) = +#. Tag: entry +#: toolset_guide.xml:187 +#, no-c-format msgid "Attribute" msgstr "" = -#: toolset_guide.xml:181(entry) = +#. Tag: entry +#: toolset_guide.xml:188 +#, no-c-format msgid "Values" msgstr "" = -#: toolset_guide.xml:182(entry) = +#. Tag: entry +#: toolset_guide.xml:189 +#, no-c-format msgid "Interpretation" msgstr "" = -#: toolset_guide.xml:187(literal) = +#. Tag: literal +#: toolset_guide.xml:194 +#, no-c-format msgid "length" msgstr "" = -#: toolset_guide.xml:188(entry) toolset_guide.xml:193(entry) toolset_guide= .xml:198(entry) = +#. Tag: entry +#: toolset_guide.xml:195 toolset_guide.xml:200 toolset_guide.xml:205 +#, no-c-format msgid "number" msgstr "" = -#: toolset_guide.xml:189(entry) = +#. Tag: entry +#: toolset_guide.xml:196 +#, no-c-format msgid "column length" msgstr "" = -#: toolset_guide.xml:192(literal) = +#. Tag: literal +#: toolset_guide.xml:199 +#, no-c-format msgid "precision" msgstr "" = -#: toolset_guide.xml:194(entry) = +#. Tag: entry +#: toolset_guide.xml:201 +#, no-c-format msgid "column decimal precision" msgstr "" = -#: toolset_guide.xml:197(literal) = +#. Tag: literal +#: toolset_guide.xml:204 +#, no-c-format msgid "scale" msgstr "" = -#: toolset_guide.xml:199(entry) = +#. Tag: entry +#: toolset_guide.xml:206 +#, no-c-format msgid "column decimal scale" msgstr "" = -#: toolset_guide.xml:202(literal) = +#. Tag: literal +#: toolset_guide.xml:209 +#, no-c-format msgid "not-null" msgstr "" = -#: toolset_guide.xml:203(literal) toolset_guide.xml:208(literal) = +#. Tag: literal +#: toolset_guide.xml:210 toolset_guide.xml:215 +#, no-c-format msgid "true|false" msgstr "" = -#: toolset_guide.xml:204(entry) = +#. Tag: entry +#: toolset_guide.xml:211 +#, no-c-format msgid "specfies that the column should be non-nullable" msgstr "" = -#: toolset_guide.xml:207(literal) = +#. Tag: literal +#: toolset_guide.xml:214 +#, no-c-format msgid "unique" msgstr "" = -#: toolset_guide.xml:209(entry) = +#. Tag: entry +#: toolset_guide.xml:216 +#, no-c-format msgid "specifies that the column should have a unique constraint" msgstr "" = -#: toolset_guide.xml:212(literal) = +#. Tag: literal +#: toolset_guide.xml:219 +#, no-c-format msgid "index" msgstr "" = -#: toolset_guide.xml:213(literal) = +#. Tag: literal +#: toolset_guide.xml:220 +#, no-c-format msgid "index_name" msgstr "" = -#: toolset_guide.xml:214(entry) = +#. Tag: entry +#: toolset_guide.xml:221 +#, no-c-format msgid "specifies the name of a (multi-column) index" msgstr "" = -#: toolset_guide.xml:217(literal) = +#. Tag: literal +#: toolset_guide.xml:224 +#, no-c-format msgid "unique-key" msgstr "" = -#: toolset_guide.xml:218(literal) = +#. Tag: literal +#: toolset_guide.xml:225 +#, no-c-format msgid "unique_key_name" msgstr "" = -#: toolset_guide.xml:219(entry) = +#. Tag: entry +#: toolset_guide.xml:226 +#, no-c-format msgid "specifies the name of a multi-column unique constraint" msgstr "" = -#: toolset_guide.xml:222(literal) = +#. Tag: literal +#: toolset_guide.xml:229 +#, no-c-format msgid "foreign-key" msgstr "" = -#: toolset_guide.xml:223(literal) = +#. Tag: literal +#: toolset_guide.xml:230 +#, no-c-format msgid "foreign_key_name" msgstr "" = -#: toolset_guide.xml:226(literal) = -msgid "<one-to-one>" +#. Tag: entry +#: toolset_guide.xml:231 +#, no-c-format +msgid "specifies the name of the foreign key constraint generated for an a= ssociation, for a <one-to-one>, <many-= to-one>, <key>, or <many-= to-many> mapping element. Note that inverse=3D\"true\= " sides will not be considered by SchemaExport= ." msgstr "" = -#: toolset_guide.xml:227(literal) = -msgid "<many-to-one>" -msgstr "" - -#: toolset_guide.xml:227(literal) = -msgid "<key>" -msgstr "" - -#: toolset_guide.xml:228(literal) = -msgid "<many-to-many>" -msgstr "" - -#: toolset_guide.xml:229(literal) = -msgid "inverse=3D\"true\"" -msgstr "" - -#: toolset_guide.xml:230(literal) = -msgid "SchemaExport" -msgstr "" - -#: toolset_guide.xml:224(entry) = -msgid "specifies the name of the foreign key constraint generated for an a= ssociation, for a , , , or = mapping element. Note that sides will not= be considered by ." -msgstr "" - -#: toolset_guide.xml:234(literal) = +#. Tag: literal +#: toolset_guide.xml:241 +#, no-c-format msgid "sql-type" msgstr "" = -#: toolset_guide.xml:235(literal) = +#. Tag: literal +#: toolset_guide.xml:242 +#, no-c-format msgid "SQL column type" msgstr "" = -#: toolset_guide.xml:238(literal) = -msgid "<column>" +#. Tag: entry +#: toolset_guide.xml:243 +#, no-c-format +msgid "overrides the default column type (attribute of <column= > element only)" msgstr "" = -#: toolset_guide.xml:236(entry) = -msgid "overrides the default column type (attribute of el= ement only)" -msgstr "" - -#: toolset_guide.xml:242(literal) = +#. Tag: literal +#: toolset_guide.xml:249 +#, no-c-format msgid "default" msgstr "" = -#: toolset_guide.xml:243(entry) toolset_guide.xml:250(entry) = +#. Tag: entry +#: toolset_guide.xml:250 toolset_guide.xml:257 +#, no-c-format msgid "SQL expression" msgstr "" = -#: toolset_guide.xml:244(entry) = +#. Tag: entry +#: toolset_guide.xml:251 +#, no-c-format msgid "specify a default value for the column" msgstr "" = -#: toolset_guide.xml:249(literal) = +#. Tag: literal +#: toolset_guide.xml:256 +#, no-c-format msgid "check" msgstr "" = -#: toolset_guide.xml:251(entry) = +#. Tag: entry +#: toolset_guide.xml:258 +#, no-c-format msgid "create an SQL check constraint on either column or table" msgstr "" = -#: toolset_guide.xml:259(para) = +#. Tag: para +#: toolset_guide.xml:266 +#, no-c-format msgid "The <comment> element allows you to specif= y comments for the generated schema." msgstr "" = -#: toolset_guide.xml:275(para) = -msgid "This results in a comment on table or c= omment on column statement in the generated DDL (where supported)= ." +#. Tag: programlisting +#: toolset_guide.xml:271 +#, no-c-format +msgid "" + "\n" + " Current customers only\n" + " ...\n" + "]]>" msgstr "" = -#: toolset_guide.xml:284(title) = -msgid "Running the tool" +#. Tag: programlisting +#: toolset_guide.xml:273 +#, no-c-format +msgid "" + "\n" + " \n" + " Balance in USD\n" + " \n" + "]]>" msgstr "" = -#: toolset_guide.xml:286(para) = -msgid "The SchemaExport tool writes a DDL script to sta= ndard out and/or executes the DDL statements." +#. Tag: para +#: toolset_guide.xml:275 +#, no-c-format +msgid "This results in a comment on table or c= omment on column statement in the generated DDL (where supported)= ." msgstr "" = -#: toolset_guide.xml:292(literal) toolset_guide.xml:459(literal) toolset_g= uide.xml:541(literal) = -msgid "java -cp" +#. Tag: title +#: toolset_guide.xml:284 +#, no-c-format +msgid "Running the tool" msgstr "" = -#: toolset_guide.xml:292(emphasis) toolset_guide.xml:459(emphasis) toolset= _guide.xml:541(emphasis) = -msgid "hibernate_classpaths" +#. Tag: para +#: toolset_guide.xml:286 +#, no-c-format +msgid "The SchemaExport tool writes a DDL script to sta= ndard out and/or executes the DDL statements." msgstr "" = -#: toolset_guide.xml:293(literal) = -msgid "org.hibernate.tool.hbm2ddl.SchemaExport" +#. Tag: para +#: toolset_guide.xml:291 +#, no-c-format +msgid "java -cp hibernate_classpaths org.hibernate.tool.hbm2ddl.SchemaExport opt= ions mapping_files" msgstr "" = -#: toolset_guide.xml:293(emphasis) toolset_guide.xml:460(emphasis) toolset= _guide.xml:542(emphasis) = -msgid "options mapping_files" -msgstr "" - -#: toolset_guide.xml:297(title) = +#. Tag: title +#: toolset_guide.xml:297 +#, no-c-format msgid "SchemaExport Command Line Options" msgstr "" = -#: toolset_guide.xml:303(entry) toolset_guide.xml:470(entry) toolset_guide= .xml:552(entry) = +#. Tag: entry +#: toolset_guide.xml:303 toolset_guide.xml:453 toolset_guide.xml:522 +#, no-c-format msgid "Option" msgstr "" = -#: toolset_guide.xml:304(entry) toolset_guide.xml:392(entry) toolset_guide= .xml:471(entry) toolset_guide.xml:553(entry) = +#. Tag: entry +#: toolset_guide.xml:304 toolset_guide.xml:391 toolset_guide.xml:454 tools= et_guide.xml:523 +#, no-c-format msgid "Description" msgstr "" = -#: toolset_guide.xml:309(literal) toolset_guide.xml:476(literal) = +#. Tag: literal +#: toolset_guide.xml:309 toolset_guide.xml:459 +#, no-c-format msgid "--quiet" msgstr "" = -#: toolset_guide.xml:310(entry) toolset_guide.xml:477(entry) = +#. Tag: entry +#: toolset_guide.xml:310 toolset_guide.xml:460 +#, no-c-format msgid "don't output the script to stdout" msgstr "" = -#: toolset_guide.xml:313(literal) = +#. Tag: literal +#: toolset_guide.xml:313 +#, no-c-format msgid "--drop" msgstr "" = -#: toolset_guide.xml:314(entry) = +#. Tag: entry +#: toolset_guide.xml:314 +#, no-c-format msgid "only drop the tables" msgstr "" = -#: toolset_guide.xml:317(literal) = +#. Tag: literal +#: toolset_guide.xml:317 +#, no-c-format msgid "--create" msgstr "" = -#: toolset_guide.xml:318(entry) = +#. Tag: entry +#: toolset_guide.xml:318 +#, no-c-format msgid "only create the tables" msgstr "" = -#: toolset_guide.xml:321(literal) toolset_guide.xml:480(literal) = +#. Tag: literal +#: toolset_guide.xml:321 toolset_guide.xml:463 +#, no-c-format msgid "--text" msgstr "" = -#: toolset_guide.xml:322(entry) = +#. Tag: entry +#: toolset_guide.xml:322 +#, no-c-format msgid "don't export to the database" msgstr "" = -#: toolset_guide.xml:325(literal) = +#. Tag: literal +#: toolset_guide.xml:325 +#, no-c-format msgid "--output=3Dmy_schema.ddl" msgstr "" = -#: toolset_guide.xml:326(entry) = +#. Tag: entry +#: toolset_guide.xml:326 +#, no-c-format msgid "output the ddl script to a file" msgstr "" = -#: toolset_guide.xml:329(literal) toolset_guide.xml:484(literal) toolset_g= uide.xml:558(literal) = +#. Tag: literal +#: toolset_guide.xml:329 toolset_guide.xml:467 toolset_guide.xml:528 +#, no-c-format msgid "--naming=3Deg.MyNamingStrategy" msgstr "" = -#: toolset_guide.xml:330(literal) toolset_guide.xml:485(literal) toolset_g= uide.xml:559(literal) = -msgid "NamingStrategy" +#. Tag: entry +#: toolset_guide.xml:330 toolset_guide.xml:468 toolset_guide.xml:529 +#, no-c-format +msgid "select a NamingStrategy" msgstr "" = -#: toolset_guide.xml:330(entry) toolset_guide.xml:485(entry) toolset_guide= .xml:559(entry) = -msgid "select a " -msgstr "" - -#: toolset_guide.xml:333(literal) toolset_guide.xml:492(literal) toolset_g= uide.xml:566(literal) = +#. Tag: literal +#: toolset_guide.xml:333 toolset_guide.xml:475 toolset_guide.xml:536 +#, no-c-format msgid "--config=3Dhibernate.cfg.xml" msgstr "" = -#: toolset_guide.xml:334(entry) = +#. Tag: entry +#: toolset_guide.xml:334 +#, no-c-format msgid "read Hibernate configuration from an XML file" msgstr "" = -#: toolset_guide.xml:337(literal) toolset_guide.xml:488(literal) toolset_g= uide.xml:562(literal) = +#. Tag: literal +#: toolset_guide.xml:337 toolset_guide.xml:471 toolset_guide.xml:532 +#, no-c-format msgid "--properties=3Dhibernate.properties" msgstr "" = -#: toolset_guide.xml:338(entry) toolset_guide.xml:489(entry) toolset_guide= .xml:563(entry) = +#. Tag: entry +#: toolset_guide.xml:338 toolset_guide.xml:472 toolset_guide.xml:533 +#, no-c-format msgid "read database properties from a file" msgstr "" = -#: toolset_guide.xml:341(literal) = +#. Tag: literal +#: toolset_guide.xml:341 +#, no-c-format msgid "--format" msgstr "" = -#: toolset_guide.xml:342(entry) = +#. Tag: entry +#: toolset_guide.xml:342 +#, no-c-format msgid "format the generated SQL nicely in the script" msgstr "" = -#: toolset_guide.xml:345(literal) = +#. Tag: literal +#: toolset_guide.xml:345 +#, no-c-format msgid "--delimiter=3D;" msgstr "" = -#: toolset_guide.xml:346(entry) = +#. Tag: entry +#: toolset_guide.xml:346 +#, no-c-format msgid "set an end of line delimiter for the script" msgstr "" = -#: toolset_guide.xml:352(para) = +#. Tag: para +#: toolset_guide.xml:352 +#, no-c-format msgid "You may even embed SchemaExport in your applicat= ion:" msgstr "" = -#: toolset_guide.xml:362(title) = +#. Tag: programlisting +#: toolset_guide.xml:356 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:361 +#, no-c-format msgid "Properties" msgstr "" = -#: toolset_guide.xml:364(para) = +#. Tag: para +#: toolset_guide.xml:363 +#, no-c-format msgid "Database properties may be specified" msgstr "" = -#: toolset_guide.xml:370(para) = +#. Tag: para +#: toolset_guide.xml:369 +#, no-c-format msgid "as system properties with -D<proper= ty>" msgstr "" = -#: toolset_guide.xml:373(para) = +#. Tag: para +#: toolset_guide.xml:372 +#, no-c-format msgid "in hibernate.properties" msgstr "" = -#: toolset_guide.xml:376(para) = +#. Tag: para +#: toolset_guide.xml:375 +#, no-c-format msgid "in a named properties file with --properties" msgstr "" = -#: toolset_guide.xml:380(para) = +#. Tag: para +#: toolset_guide.xml:379 +#, no-c-format msgid "The needed properties are:" msgstr "" = -#: toolset_guide.xml:385(title) = +#. Tag: title +#: toolset_guide.xml:384 +#, no-c-format msgid "SchemaExport Connection Properties" msgstr "" = -#: toolset_guide.xml:391(entry) = +#. Tag: entry +#: toolset_guide.xml:390 +#, no-c-format msgid "Property Name" msgstr "" = -#: toolset_guide.xml:397(literal) = +#. Tag: literal +#: toolset_guide.xml:396 +#, no-c-format msgid "hibernate.connection.driver_class" msgstr "" = -#: toolset_guide.xml:398(entry) = +#. Tag: entry +#: toolset_guide.xml:397 +#, no-c-format msgid "jdbc driver class" msgstr "" = -#: toolset_guide.xml:401(literal) = +#. Tag: literal +#: toolset_guide.xml:400 +#, no-c-format msgid "hibernate.connection.url" msgstr "" = -#: toolset_guide.xml:402(entry) = +#. Tag: entry +#: toolset_guide.xml:401 +#, no-c-format msgid "jdbc url" msgstr "" = -#: toolset_guide.xml:405(literal) = +#. Tag: literal +#: toolset_guide.xml:404 +#, no-c-format msgid "hibernate.connection.username" msgstr "" = -#: toolset_guide.xml:406(entry) = +#. Tag: entry +#: toolset_guide.xml:405 +#, no-c-format msgid "database user" msgstr "" = -#: toolset_guide.xml:409(literal) = +#. Tag: literal +#: toolset_guide.xml:408 +#, no-c-format msgid "hibernate.connection.password" msgstr "" = -#: toolset_guide.xml:410(entry) = +#. Tag: entry +#: toolset_guide.xml:409 +#, no-c-format msgid "user password" msgstr "" = -#: toolset_guide.xml:413(literal) = +#. Tag: literal +#: toolset_guide.xml:412 +#, no-c-format msgid "hibernate.dialect" msgstr "" = -#: toolset_guide.xml:414(entry) = +#. Tag: entry +#: toolset_guide.xml:413 +#, no-c-format msgid "dialect" msgstr "" = -#: toolset_guide.xml:423(title) = +#. Tag: title +#: toolset_guide.xml:422 +#, no-c-format msgid "Using Ant" msgstr "" = -#: toolset_guide.xml:425(para) = +#. Tag: para +#: toolset_guide.xml:424 +#, no-c-format msgid "You can call SchemaExport from your Ant build sc= ript:" msgstr "" = -#: toolset_guide.xml:450(title) = +#. Tag: programlisting +#: toolset_guide.xml:428 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:433 +#, no-c-format msgid "Incremental schema updates" msgstr "" = -#: toolset_guide.xml:452(para) = +#. Tag: para +#: toolset_guide.xml:435 +#, no-c-format msgid "The SchemaUpdate tool will update an existing sc= hema with \"incremental\" changes. Note that SchemaUpdate depends heavily upon the JDBC metadata API, so it will not work with all = JDBC drivers." msgstr "" = -#: toolset_guide.xml:460(literal) = -msgid "org.hibernate.tool.hbm2ddl.SchemaUpdate" +#. Tag: para +#: toolset_guide.xml:441 +#, no-c-format +msgid "java -cp hibernate_classpaths org.hibernate.tool.hbm2ddl.SchemaUpdate opt= ions mapping_files" msgstr "" = -#: toolset_guide.xml:464(title) = +#. Tag: title +#: toolset_guide.xml:447 +#, no-c-format msgid "SchemaUpdate Command Line Options" msgstr "" = -#: toolset_guide.xml:481(entry) = +#. Tag: entry +#: toolset_guide.xml:464 +#, no-c-format msgid "don't export the script to the database" msgstr "" = -#: toolset_guide.xml:493(literal) toolset_guide.xml:567(literal) = -msgid ".cfg.xml" +#. Tag: entry +#: toolset_guide.xml:476 toolset_guide.xml:537 +#, no-c-format +msgid "specify a .cfg.xml file" msgstr "" = -#: toolset_guide.xml:493(entry) toolset_guide.xml:567(entry) = -msgid "specify a file" +#. Tag: para +#: toolset_guide.xml:482 +#, no-c-format +msgid "You may embed SchemaUpdate in your application:" msgstr "" = -#: toolset_guide.xml:499(para) = -msgid "You may embed SchemaUpdate in your application:" +#. Tag: programlisting +#: toolset_guide.xml:486 +#, no-c-format +msgid "" + "" msgstr "" = -#: toolset_guide.xml:509(title) = +#. Tag: title +#: toolset_guide.xml:491 +#, no-c-format msgid "Using Ant for incremental schema updates" msgstr "" = -#: toolset_guide.xml:511(para) = +#. Tag: para +#: toolset_guide.xml:493 +#, no-c-format msgid "You can call SchemaUpdate from the Ant script:" msgstr "" = -#: toolset_guide.xml:532(title) = +#. Tag: programlisting +#: toolset_guide.xml:497 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:502 +#, no-c-format msgid "Schema validation" msgstr "" = -#: toolset_guide.xml:534(para) = +#. Tag: para +#: toolset_guide.xml:504 +#, no-c-format msgid "The SchemaValidator tool will validate that the = existing database schema \"matches\" your mapping documents. Note that SchemaValidator depends heavily upon the JDBC metadata API, = so it will not work with all JDBC drivers. This tool is extremely useful fo= r testing." msgstr "" = -#: toolset_guide.xml:542(literal) = -msgid "org.hibernate.tool.hbm2ddl.SchemaValidator" +#. Tag: para +#: toolset_guide.xml:510 +#, no-c-format +msgid "java -cp hibernate_classpaths org.hibernate.tool.hbm2ddl.SchemaValidator = options mapping_files" msgstr "" = -#: toolset_guide.xml:546(title) = +#. Tag: title +#: toolset_guide.xml:516 +#, no-c-format msgid "SchemaValidator Command Line Options" msgstr "" = -#: toolset_guide.xml:573(para) = +#. Tag: para +#: toolset_guide.xml:543 +#, no-c-format msgid "You may embed SchemaValidator in your applicatio= n:" msgstr "" = -#: toolset_guide.xml:583(title) = +#. Tag: programlisting +#: toolset_guide.xml:547 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:552 +#, no-c-format msgid "Using Ant for schema validation" msgstr "" = -#: toolset_guide.xml:585(para) = +#. Tag: para +#: toolset_guide.xml:554 +#, no-c-format msgid "You can call SchemaValidator from the Ant script= :" msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: toolset_guide.xml:0(None) = -msgid "translator-credits" +#. Tag: programlisting +#: toolset_guide.xml:558 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" msgstr "" = Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/tran= sactions.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/transactio= ns.pot 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/transactio= ns.pot 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,524 +1,949 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:35-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: transactions.xml:5(title) = +#. Tag: title +#: transactions.xml:29 +#, no-c-format msgid "Transactions And Concurrency" msgstr "" = -#: transactions.xml:7(para) = +#. Tag: para +#: transactions.xml:31 +#, no-c-format msgid "The most important point about Hibernate and concurrency control is= that it is very easy to understand. Hibernate directly uses JDBC connectio= ns and JTA resources without adding any additional locking behavior. We hig= hly recommend you spend some time with the JDBC, ANSI, and transaction isol= ation specification of your database management system." msgstr "" = -#: transactions.xml:14(para) = +#. Tag: para +#: transactions.xml:38 +#, no-c-format msgid "Hibernate does not lock objects in memory. Your application can exp= ect the behavior as defined by the isolation level of your database transac= tions. Note that thanks to the Session, which is also a = transaction-scoped cache, Hibernate provides repeatable reads for lookup by= identifier and entity queries (not reporting queries that return scalar va= lues)." msgstr "" = -#: transactions.xml:22(para) = +#. Tag: para +#: transactions.xml:46 +#, no-c-format msgid "In addition to versioning for automatic optimistic concurrency cont= rol, Hibernate also offers a (minor) API for pessimistic locking of rows, u= sing the SELECT FOR UPDATE syntax. Optimistic concurrenc= y control and this API are discussed later in this chapter." msgstr "" = -#: transactions.xml:29(para) = +#. Tag: para +#: transactions.xml:53 +#, no-c-format msgid "We start the discussion of concurrency control in Hibernate with th= e granularity of Configuration, SessionFactory<= /literal>, and Session, as well as database transactions= and long conversations." msgstr "" = -#: transactions.xml:36(title) = +#. Tag: title +#: transactions.xml:60 +#, no-c-format msgid "Session and transaction scopes" msgstr "" = -#: transactions.xml:38(para) = +#. Tag: para +#: transactions.xml:62 +#, no-c-format msgid "A SessionFactory is an expensive-to-create, thre= adsafe object intended to be shared by all application threads. It is creat= ed once, usually on application startup, from a Configuration instance." msgstr "" = -#: transactions.xml:44(para) = +#. Tag: para +#: transactions.xml:68 +#, no-c-format msgid "A Session is an inexpensive, non-threadsafe obje= ct that should be used once, for a single request, a conversation, single u= nit of work, and then discarded. A Session will not obta= in a JDBC Connection (or a Datasource= ) unless it is needed, hence consume no resources until used." msgstr "" = -#: transactions.xml:52(para) = +#. Tag: para +#: transactions.xml:76 +#, no-c-format msgid "To complete this picture you also have to think about database tran= sactions. A database transaction has to be as short as possible, to reduce = lock contention in the database. Long database transactions will prevent yo= ur application from scaling to highly concurrent load. Hence, it is almost = never good design to hold a database transaction open during user think tim= e, until the unit of work is complete." msgstr "" = -#: transactions.xml:61(para) = +#. Tag: para +#: transactions.xml:85 +#, no-c-format msgid "What is the scope of a unit of work? Can a single Hibernate Session span several database transactions or is this a one-to-= one relationship of scopes? When should you open and close a Sessi= on and how do you demarcate the database transaction boundaries?" msgstr "" = -#: transactions.xml:69(title) = +#. Tag: title +#: transactions.xml:93 +#, no-c-format msgid "Unit of work" msgstr "" = -#: transactions.xml:71(para) = +#. Tag: para +#: transactions.xml:95 +#, no-c-format msgid "First, don't use the session-per-operation ant= ipattern, that is, don't open and close a Session for ev= ery simple database call in a single thread! Of course, the same is true fo= r database transactions. Database calls in an application are made using a = planned sequence, they are grouped into atomic units of work. (Note that th= is also means that auto-commit after every single SQL statement is useless = in an application, this mode is intended for ad-hoc SQL console work. Hiber= nate disables, or expects the application server to do so, auto-commit mode= immediately.) Database transactions are never optional, all communication = with a database has to occur inside a transaction, no matter if you read or= write data. As explained, auto-commit behavior for reading data should be = avoided, as many small transactions are unlikely to perform better than one= clearly defined unit of work. The latter is also much more maintainable an= d extensible." msgstr "" = -#: transactions.xml:87(para) = -msgid "The most common pattern in a multi-user client/server application i= s session-per-request. In this model, a request from t= he client is send to the server (where the Hibernate persistence layer runs= ), a new Hibernate Session is opened, and all database o= perations are executed in this unit of work. Once the work has been complet= ed (and the response for the client has been prepared), the session is flus= hed and closed. You would also use a single database transaction to serve t= he clients request, starting and committing it when you open and close the = Session. The relationship between the two is one-to-one = and this model is a perfect fit for many applications." +#. Tag: para +#: transactions.xml:111 +#, no-c-format +msgid "The most common pattern in a multi-user client/server application i= s session-per-request. In this model, a request from t= he client is sent to the server (where the Hibernate persistence layer runs= ), a new Hibernate Session is opened, and all database o= perations are executed in this unit of work. Once the work has been complet= ed (and the response for the client has been prepared), the session is flus= hed and closed. You would also use a single database transaction to serve t= he clients request, starting and committing it when you open and close the = Session. The relationship between the two is one-to-one = and this model is a perfect fit for many applications." msgstr "" = -#: transactions.xml:99(para) = -msgid "The challenge lies in the implementation. Hibernate provides built-= in management of the \"current session\" to simplify this pattern. All you = have to do is start a transaction when a server request has to be processed= , and end the transaction before the response is send to the client. You ca= n do this in any way you like, common solutions are ServletFilter<= /literal>, AOP interceptor with a pointcut on the service methods, or a pro= xy/interception container. An EJB container is a standardized way to implem= ent cross-cutting aspects such as transaction demarcation on EJB session be= ans, declaratively with CMT. If you decide to use programmatic transaction = demarcation, prefer the Hibernate Transaction API shown = later in this chapter, for ease of use and code portability." +#. Tag: para +#: transactions.xml:123 +#, no-c-format +msgid "The challenge lies in the implementation. Hibernate provides built-= in management of the \"current session\" to simplify this pattern. All you = have to do is start a transaction when a server request has to be processed= , and end the transaction before the response is sent to the client. You ca= n do this in any way you like, common solutions are ServletFilter<= /literal>, AOP interceptor with a pointcut on the service methods, or a pro= xy/interception container. An EJB container is a standardized way to implem= ent cross-cutting aspects such as transaction demarcation on EJB session be= ans, declaratively with CMT. If you decide to use programmatic transaction = demarcation, prefer the Hibernate Transaction API shown = later in this chapter, for ease of use and code portability." msgstr "" = -#: transactions.xml:112(para) = +#. Tag: para +#: transactions.xml:136 +#, no-c-format msgid "Your application code can access a \"current session\" to process t= he request by simply calling sessionFactory.getCurrentSession() anywhere and as often as needed. You will always get a Ses= sion scoped to the current database transaction. This has to be c= onfigured for either resource-local or JTA environments, see ." msgstr "" = -#: transactions.xml:120(para) = +#. Tag: para +#: transactions.xml:144 +#, no-c-format msgid "Sometimes it is convenient to extend the scope of a Sessio= n and database transaction until the \"view has been rendered\". = This is especially useful in servlet applications that utilize a separate r= endering phase after the request has been processed. Extending the database= transaction until view rendering is complete is easy to do if you implemen= t your own interceptor. However, it is not easily doable if you rely on EJB= s with container-managed transactions, as a transaction will be completed w= hen an EJB method returns, before rendering of any view can start. See the = Hibernate website and forum for tips and examples around this Ope= n Session in View pattern." msgstr "" = -#: transactions.xml:135(title) = +#. Tag: title +#: transactions.xml:159 +#, no-c-format msgid "Long conversations" msgstr "" = -#: transactions.xml:137(para) = +#. Tag: para +#: transactions.xml:161 +#, no-c-format msgid "The session-per-request pattern is not the only useful concept you = can use to design units of work. Many business processes require a whole se= ries of interactions with the user interleaved with database accesses. In w= eb and enterprise applications it is not acceptable for a database transact= ion to span a user interaction. Consider the following example:" msgstr "" = -#: transactions.xml:147(para) = +#. Tag: para +#: transactions.xml:171 +#, no-c-format msgid "The first screen of a dialog opens, the data seen by the user has b= een loaded in a particular Session and database transact= ion. The user is free to modify the objects." msgstr "" = -#: transactions.xml:154(para) = +#. Tag: para +#: transactions.xml:178 +#, no-c-format msgid "The user clicks \"Save\" after 5 minutes and expects his modificati= ons to be made persistent; he also expects that he was the only person edit= ing this information and that no conflicting modification can occur." msgstr "" = -#: transactions.xml:162(para) = +#. Tag: para +#: transactions.xml:186 +#, no-c-format msgid "We call this unit of work, from the point of view of the user, a lo= ng running conversation (or application tran= saction). There are many ways how you can implement this in your= application." msgstr "" = -#: transactions.xml:168(para) = +#. Tag: para +#: transactions.xml:192 +#, no-c-format msgid "A first naive implementation might keep the Session and database transaction open during user think time, with locks held i= n the database to prevent concurrent modification, and to guarantee isolati= on and atomicity. This is of course an anti-pattern, since lock contention = would not allow the application to scale with the number of concurrent user= s." msgstr "" = -#: transactions.xml:176(para) = -msgid "Clearly, we have to use several database transactions to implement = the converastion. In this case, maintaining isolation of business processes= becomes the partial responsibility of the application tier. A single conve= rsation usually spans several database transactions. It will be atomic if o= nly one of these database transactions (the last one) stores the updated da= ta, all others simply read data (e.g. in a wizard-style dialog spanning sev= eral request/response cycles). This is easier to implement than it might so= und, especially if you use Hibernate's features:" +#. Tag: para +#: transactions.xml:200 +#, no-c-format +msgid "Clearly, we have to use several database transactions to implement = the conversation. In this case, maintaining isolation of business processes= becomes the partial responsibility of the application tier. A single conve= rsation usually spans several database transactions. It will be atomic if o= nly one of these database transactions (the last one) stores the updated da= ta, all others simply read data (e.g. in a wizard-style dialog spanning sev= eral request/response cycles). This is easier to implement than it might so= und, especially if you use Hibernate's features:" msgstr "" = -#: transactions.xml:189(para) = -msgid "Automatic Versioning - Hibernate can do automa= tic optimistic concurrency control for you, it can automatically detect if = a concurrent modification occured during user think time. Usually we only c= heck at the end of the conversation." +#. Tag: para +#: transactions.xml:213 +#, no-c-format +msgid "Automatic Versioning - Hibernate can do automa= tic optimistic concurrency control for you, it can automatically detect if = a concurrent modification occurred during user think time. Usually we only = check at the end of the conversation." msgstr "" = -#: transactions.xml:197(para) = +#. Tag: para +#: transactions.xml:221 +#, no-c-format msgid "Detached Objects - If you decide to use the al= ready discussed session-per-request pattern, all loade= d instances will be in detached state during user think time. Hibernate all= ows you to reattach the objects and persist the modifications, the pattern = is called session-per-request-with-detached-objects. A= utomatic versioning is used to isolate concurrent modifications." msgstr "" = -#: transactions.xml:207(para) = -msgid "Extended (or Long) Session - The Hibernate Session may be disconnected from the underlying JDBC connec= tion after the database transaction has been committed, and reconnected whe= n a new client request occurs. This pattern is known as session-p= er-conversation and makes even reattachment unnecessary. Automat= ic versioning is used to isolate concurrent modifications and the = Session is usually not allowed to be flushed automatically, but e= xplicitely." +#. Tag: para +#: transactions.xml:231 +#, no-c-format +msgid "Extended (or Long) Session - The Hibernate Session may be disconnected from the underlying JDBC connec= tion after the database transaction has been committed, and reconnected whe= n a new client request occurs. This pattern is known as session-p= er-conversation and makes even reattachment unnecessary. Automat= ic versioning is used to isolate concurrent modifications and the = Session is usually not allowed to be flushed automatically, but e= xplicitly." msgstr "" = -#: transactions.xml:220(para) = +#. Tag: para +#: transactions.xml:244 +#, no-c-format msgid "Both session-per-request-with-detached-objects= and session-per-conversation have advantages and disa= dvantages, we discuss them later in this chapter in the context of optimist= ic concurrency control." msgstr "" = -#: transactions.xml:229(title) = +#. Tag: title +#: transactions.xml:253 +#, no-c-format msgid "Considering object identity" msgstr "" = -#: transactions.xml:231(para) = +#. Tag: para +#: transactions.xml:255 +#, no-c-format msgid "An application may concurrently access the same persistent state in= two different Sessions. However, an instance of a persi= stent class is never shared between two Session instance= s. Hence there are two different notions of identity:" msgstr "" = -#: transactions.xml:240(term) = +#. Tag: term +#: transactions.xml:264 +#, no-c-format msgid "Database Identity" msgstr "" = -#: transactions.xml:243(literal) = +#. Tag: literal +#: transactions.xml:267 +#, no-c-format msgid "foo.getId().equals( bar.getId() )" msgstr "" = -#: transactions.xml:248(term) = +#. Tag: term +#: transactions.xml:272 +#, no-c-format msgid "JVM Identity" msgstr "" = -#: transactions.xml:251(literal) = +#. Tag: literal +#: transactions.xml:275 +#, no-c-format msgid "foo=3D=3Dbar" msgstr "" = -#: transactions.xml:257(para) = -msgid "Then for objects attached to a particularSession (i.e. in the scope of a Session) t= he two notions are equivalent, and JVM identity for database identity is gu= aranteed by Hibernate. However, while the application might concurrently ac= cess the \"same\" (persistent identity) business object in two different se= ssions, the two instances will actually be \"different\" (JVM identity). Co= nflicts are resolved using (automatic versioning) at flush/commit time, usi= ng an optimistic approach." +#. Tag: para +#: transactions.xml:281 +#, no-c-format +msgid "Then for objects attached to a particular Session (i.e. in the scope of a Session) = the two notions are equivalent, and JVM identity for database identity is g= uaranteed by Hibernate. However, while the application might concurrently a= ccess the \"same\" (persistent identity) business object in two different s= essions, the two instances will actually be \"different\" (JVM identity). C= onflicts are resolved using (automatic versioning) at flush/commit time, us= ing an optimistic approach." msgstr "" = -#: transactions.xml:266(para) = +#. Tag: para +#: transactions.xml:290 +#, no-c-format msgid "This approach leaves Hibernate and the database to worry about conc= urrency; it also provides the best scalability, since guaranteeing identity= in single-threaded units of work only doesn't need expensive locking or ot= her means of synchronization. The application never needs to synchronize on= any business object, as long as it sticks to a single thread per = Session. Within a Session the application may = safely use =3D=3D to compare objects." msgstr "" = -#: transactions.xml:275(para) = +#. Tag: para +#: transactions.xml:299 +#, no-c-format msgid "However, an application that uses =3D=3D outside= of a Session, might see unexpected results. This might = occur even in some unexpected places, for example, if you put two detached = instances into the same Set. Both might have the same da= tabase identity (i.e. they represent the same row), but JVM identity is by = definition not guaranteed for instances in detached state. The developer ha= s to override the equals() and hashCode() methods in persistent classes and implement his own notion of object e= quality. There is one caveat: Never use the database identifier to implemen= t equality, use a business key, a combination of unique, usually immutable,= attributes. The database identifier will change if a transient object is m= ade persistent. If the transient instance (usually together with detached i= nstances) is held in a Set, changing the hashcode breaks= the contract of t! he Set. Attributes for business keys don't have to be a= s stable as database primary keys, you only have to guarantee stability as = long as the objects are in the same Set. See the Hiberna= te website for a more thorough discussion of this issue. Also note that thi= s is not a Hibernate issue, but simply how Java object identity and equalit= y has to be implemented." msgstr "" = -#: transactions.xml:296(title) = +#. Tag: title +#: transactions.xml:320 +#, no-c-format msgid "Common issues" msgstr "" = -#: transactions.xml:298(para) = +#. Tag: para +#: transactions.xml:322 +#, no-c-format msgid "Never use the anti-patterns session-per-user-session or session-per-application (of course, there ar= e rare exceptions to this rule). Note that some of the following issues mig= ht also appear with the recommended patterns, make sure you understand the = implications before making a design decision:" msgstr "" = -#: transactions.xml:307(para) = +#. Tag: para +#: transactions.xml:331 +#, no-c-format msgid "A Session is not thread-safe. Things which are s= upposed to work concurrently, like HTTP requests, session beans, or Swing w= orkers, will cause race conditions if a Session instance= would be shared. If you keep your Hibernate Session in = your HttpSession (discussed later), you should consider = synchronizing access to your Http session. Otherwise, a user that clicks re= load fast enough may use the same Session in two concurr= ently running threads." msgstr "" = -#: transactions.xml:318(para) = +#. Tag: para +#: transactions.xml:342 +#, no-c-format msgid "An exception thrown by Hibernate means you have to rollback your da= tabase transaction and close the Session immediately (di= scussed later in more detail). If your Session is bound = to the application, you have to stop the application. Rolling back the data= base transaction doesn't put your business objects back into the state they= were at the start of the transaction. This means the database state and th= e business objects do get out of sync. Usually this is not a problem, becau= se exceptions are not recoverable and you have to start over after rollback= anyway." msgstr "" = -#: transactions.xml:330(para) = +#. Tag: para +#: transactions.xml:354 +#, no-c-format msgid "The Session caches every object that is in persi= stent state (watched and checked for dirty state by Hibernate). This means = it grows endlessly until you get an OutOfMemoryException, if you keep it op= en for a long time or simply load too much data. One solution for this is t= o call clear() and evict() to manage = the Session cache, but you most likely should consider a= Stored Procedure if you need mass data operations. Some solutions are show= n in . Keeping a Session open= for the duration of a user session also means a high probability of stale = data." msgstr "" = -#: transactions.xml:348(title) = +#. Tag: title +#: transactions.xml:372 +#, no-c-format msgid "Database transaction demarcation" msgstr "" = -#: transactions.xml:350(para) = -msgid "Datatabase (or system) transaction boundaries are always necessary.= No communication with the database can occur outside of a database transac= tion (this seems to confuse many developers who are used to the auto-commit= mode). Always use clear transaction boundaries, even for read-only operati= ons. Depending on your isolation level and database capabilities this might= not be required but there is no downside if you always demarcate transacti= ons explicitly. Certainly, a single database transaction is going to perfor= m better than many small transactions, even for reading data." +#. Tag: para +#: transactions.xml:374 +#, no-c-format +msgid "Database (or system) transaction boundaries are always necessary. N= o communication with the database can occur outside of a database transacti= on (this seems to confuse many developers who are used to the auto-commit m= ode). Always use clear transaction boundaries, even for read-only operation= s. Depending on your isolation level and database capabilities this might n= ot be required but there is no downside if you always demarcate transaction= s explicitly. Certainly, a single database transaction is going to perform = better than many small transactions, even for reading data." msgstr "" = -#: transactions.xml:360(para) = +#. Tag: para +#: transactions.xml:384 +#, no-c-format msgid "A Hibernate application can run in non-managed (i.e. standalone, si= mple Web- or Swing applications) and managed J2EE environments. In a non-ma= naged environment, Hibernate is usually responsible for its own database co= nnection pool. The application developer has to manually set transaction bo= undaries, in other words, begin, commit, or rollback database transactions = himself. A managed environment usually provides container-managed transacti= ons (CMT), with the transaction assembly defined declaratively in deploymen= t descriptors of EJB session beans, for example. Programmatic transaction d= emarcation is then no longer necessary." msgstr "" = -#: transactions.xml:370(para) = -msgid "However, it is often desirable to keep your persistence layer porta= ble between non-managed resource-local environments, and systems that can r= ely on JTA but use BMT instead of CMT. In both cases you'd use programmatic= transaction demaracation. Hibernate offers a wrapper API called T= ransaction that translates into the native transaction system of = your deployment environment. This API is actually optional, but we strongly= encourage its use unless you are in a CMT session bean." +#. Tag: para +#: transactions.xml:394 +#, no-c-format +msgid "However, it is often desirable to keep your persistence layer porta= ble between non-managed resource-local environments, and systems that can r= ely on JTA but use BMT instead of CMT. In both cases you'd use programmatic= transaction demarcation. Hibernate offers a wrapper API called Tr= ansaction that translates into the native transaction system of y= our deployment environment. This API is actually optional, but we strongly = encourage its use unless you are in a CMT session bean." msgstr "" = -#: transactions.xml:379(para) = +#. Tag: para +#: transactions.xml:403 +#, no-c-format msgid "Usually, ending a Session involves four distinct= phases:" msgstr "" = -#: transactions.xml:385(para) = +#. Tag: para +#: transactions.xml:409 +#, no-c-format msgid "flush the session" msgstr "" = -#: transactions.xml:390(para) = +#. Tag: para +#: transactions.xml:414 +#, no-c-format msgid "commit the transaction" msgstr "" = -#: transactions.xml:395(para) = +#. Tag: para +#: transactions.xml:419 +#, no-c-format msgid "close the session" msgstr "" = -#: transactions.xml:400(para) = +#. Tag: para +#: transactions.xml:424 +#, no-c-format msgid "handle exceptions" msgstr "" = -#: transactions.xml:406(para) = +#. Tag: para +#: transactions.xml:430 +#, no-c-format msgid "Flushing the session has been discussed earlier, we'll now have a c= loser look at transaction demarcation and exception handling in both manage= d- and non-managed environments." msgstr "" = -#: transactions.xml:413(title) = +#. Tag: title +#: transactions.xml:437 +#, no-c-format msgid "Non-managed environment" msgstr "" = -#: transactions.xml:415(para) = +#. Tag: para +#: transactions.xml:439 +#, no-c-format msgid "If a Hibernate persistence layer runs in a non-managed environment,= database connections are usually handled by simple (i.e. non-DataSource) c= onnection pools from which Hibernate obtains connections as needed. The ses= sion/transaction handling idiom looks like this:" msgstr "" = -#: transactions.xml:441(para) = -msgid "You don't have to flush() the Session explicitly - the call to commit() automatically= triggers the synchronization (depending upon the FlushMode for the session. A call to close(= ) marks the end of a session. The main implication of cl= ose() is that the JDBC connection will be relinquished by the ses= sion. This Java code is portable and runs in both non-managed and JTA envir= onments." +#. Tag: programlisting +#: transactions.xml:446 +#, no-c-format +msgid "" + "" msgstr "" = -#: transactions.xml:450(para) = +#. Tag: para +#: transactions.xml:448 +#, no-c-format +msgid "You don't have to flush() the Session explicitly - the call to commit() automatically= triggers the synchronization (depending upon the FlushMode for the session. A call to close(= ) marks the end of a session. The main implication of cl= ose() is that the JDBC connection will be relinquished by the ses= sion. This Java code is portable and runs in both non-managed and JTA envir= onments." +msgstr "" + +#. Tag: para +#: transactions.xml:457 +#, no-c-format msgid "A much more flexible solution is Hibernate's built-in \"current ses= sion\" context management, as described earlier:" msgstr "" = -#: transactions.xml:469(para) = +#. Tag: programlisting +#: transactions.xml:462 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: transactions.xml:464 +#, no-c-format msgid "You will very likely never see these code snippets in a regular app= lication; fatal (system) exceptions should always be caught at the \"top\".= In other words, the code that executes Hibernate calls (in the persistence= layer) and the code that handles RuntimeException (and = usually can only clean up and exit) are in different layers. The current co= ntext management by Hibernate can significantly simplify this design, as al= l you need is access to a SessionFactory. Exception hand= ling is discussed later in this chapter." msgstr "" = -#: transactions.xml:479(para) = +#. Tag: para +#: transactions.xml:474 +#, no-c-format msgid "Note that you should select org.hibernate.transaction.JDBC= TransactionFactory (which is the default), and for the second exa= mple \"thread\" as your hibernate.current_sessi= on_context_class." msgstr "" = -#: transactions.xml:488(title) = +#. Tag: title +#: transactions.xml:483 +#, no-c-format msgid "Using JTA" msgstr "" = -#: transactions.xml:490(para) = +#. Tag: para +#: transactions.xml:485 +#, no-c-format msgid "If your persistence layer runs in an application server (e.g. behin= d EJB session beans), every datasource connection obtained by Hibernate wil= l automatically be part of the global JTA transaction. You can also install= a standalone JTA implementation and use it without EJB. Hibernate offers t= wo strategies for JTA integration." msgstr "" = -#: transactions.xml:497(para) = +#. Tag: para +#: transactions.xml:492 +#, no-c-format msgid "If you use bean-managed transactions (BMT) Hibernate will tell the = application server to start and end a BMT transaction if you use the Transaction API. So, the transaction management code is identi= cal to the non-managed environment." msgstr "" = -#: transactions.xml:522(para) = +#. Tag: programlisting +#: transactions.xml:498 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: transactions.xml:500 +#, no-c-format msgid "If you want to use a transaction-bound Session, = that is, the getCurrentSession() functionality for easy = context propagation, you will have to use the JTA UserTransaction<= /literal> API directly:" msgstr "" = -#: transactions.xml:546(para) = -msgid "With CMT, transaction demarcation is done in session bean deploymen= t descriptors, not programatically, hence, the code is reduced to:" +#. Tag: programlisting +#: transactions.xml:506 +#, no-c-format +msgid "" + "" msgstr "" = -#: transactions.xml:558(para) = +#. Tag: para +#: transactions.xml:508 +#, no-c-format +msgid "With CMT, transaction demarcation is done in session bean deploymen= t descriptors, not programmatically, hence, the code is reduced to:" +msgstr "" + +#. Tag: programlisting +#: transactions.xml:513 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: transactions.xml:515 +#, no-c-format msgid "In a CMT/EJB even rollback happens automatically, since an unhandle= d RuntimeException thrown by a session bean method tells= the container to set the global transaction to rollback. This me= ans you do not need to use the Hibernate Transaction API= at all with BMT or CMT, and you get automatic propagation of the \"current= \" Session bound to the transaction." msgstr "" = -#: transactions.xml:566(para) = -msgid "Note that you should choose org.hibernate.transaction.JTAT= ransactionFactory if you use JTA directly (BMT), and org= .hibernate.transaction.CMTTransactionFactory in a CMT session bea= n, when you configure Hibernate's transaction factory. Remember to also set= hibernate.transaction.manager_lookup_class. Furthermore= , make sure that your hibernate.current_session_context_class is either unset (backwards compatiblity), or set to \"jta\"<= /literal>." +#. Tag: para +#: transactions.xml:523 +#, no-c-format +msgid "Note that you should choose org.hibernate.transaction.JTAT= ransactionFactory if you use JTA directly (BMT), and org= .hibernate.transaction.CMTTransactionFactory in a CMT session bea= n, when you configure Hibernate's transaction factory. Remember to also set= hibernate.transaction.manager_lookup_class. Furthermore= , make sure that your hibernate.current_session_context_class is either unset (backwards compatibility), or set to \"jta\"= ." msgstr "" = -#: transactions.xml:575(para) = -msgid "The getCurrentSession() operation has one downsi= de in a JTA environment. There is one caveat to the use of after_s= tatement connection release mode, which is then used by default. = Due to a silly limitation of the JTA spec, it is not possible for Hibernate= to automatically clean up any unclosed ScrollableResults or Iterator instances returned by scroll() or iterate(). You must rele= ase the underlying database cursor by calling ScrollableResults.cl= ose() or Hibernate.close(Iterator) explicity f= rom a finally block. (Of course, most applications can e= asily avoid using scroll() or iterate() at all from the JTA or CMT code.)" +#. Tag: para +#: transactions.xml:532 +#, no-c-format +msgid "The getCurrentSession() operation has one downsi= de in a JTA environment. There is one caveat to the use of after_s= tatement connection release mode, which is then used by default. = Due to a silly limitation of the JTA spec, it is not possible for Hibernate= to automatically clean up any unclosed ScrollableResults or Iterator instances returned by scroll() or iterate(). You must rele= ase the underlying database cursor by calling ScrollableResults.cl= ose() or Hibernate.close(Iterator) explicitly = from a finally block. (Of course, most applications can = easily avoid using scroll() or iterate() at all from the JTA or CMT code.)" msgstr "" = -#: transactions.xml:591(title) = +#. Tag: title +#: transactions.xml:548 +#, no-c-format msgid "Exception handling" msgstr "" = -#: transactions.xml:593(para) = +#. Tag: para +#: transactions.xml:550 +#, no-c-format msgid "If the Session throws an exception (including an= y SQLException), you should immediately rollback the dat= abase transaction, call Session.close() and discard the = Session instance. Certain methods of Session will not leave the session in a consistent sta= te. No exception thrown by Hibernate can be treated as recoverable. Ensure = that the Session will be closed by calling clos= e() in a finally block." msgstr "" = -#: transactions.xml:604(para) = +#. Tag: para +#: transactions.xml:561 +#, no-c-format msgid "The HibernateException, which wraps most of the = errors that can occur in a Hibernate persistence layer, is an unchecked exc= eption (it wasn't in older versions of Hibernate). In our opinion, we shoul= dn't force the application developer to catch an unrecoverable exception at= a low layer. In most systems, unchecked and fatal exceptions are handled i= n one of the first frames of the method call stack (i.e. in higher layers) = and an error message is presented to the application user (or some other ap= propriate action is taken). Note that Hibernate might also throw other unch= ecked exceptions which are not a HibernateException. The= se are, again, not recoverable and appropriate action should be taken." msgstr "" = -#: transactions.xml:616(para) = -msgid "Hibernate wraps SQLExceptions thrown while inter= acting with the database in a JDBCException. In fact, Hi= bernate will attempt to convert the eexception into a more meningful subcla= ss of JDBCException. The underlying SQLExceptio= n is always available via JDBCException.getCause(). Hibernate converts the SQLException into an approp= riate JDBCException subclass using the SQLExcep= tionConverter attached to the SessionFactory. = By default, the SQLExceptionConverter is defined by the = configured dialect; however, it is also possible to plug in a custom implem= entation (see the javadocs for the SQLExceptionConverterFactory class for details). The standard JDBCException s= ubtypes are:" +#. Tag: para +#: transactions.xml:573 +#, no-c-format +msgid "Hibernate wraps SQLExceptions thrown while inter= acting with the database in a JDBCException. In fact, Hi= bernate will attempt to convert the exception into a more meaningful subcla= ss of JDBCException. The underlying SQLExceptio= n is always available via JDBCException.getCause(). Hibernate converts the SQLException into an approp= riate JDBCException subclass using the SQLExcep= tionConverter attached to the SessionFactory. = By default, the SQLExceptionConverter is defined by the = configured dialect; however, it is also possible to plug in a custom implem= entation (see the javadocs for the SQLExceptionConverterFactory class for details). The standard JDBCException s= ubtypes are:" msgstr "" = -#: transactions.xml:632(para) = +#. Tag: para +#: transactions.xml:589 +#, no-c-format msgid "JDBCConnectionException - indicates an error wit= h the underlying JDBC communication." msgstr "" = -#: transactions.xml:638(para) = +#. Tag: para +#: transactions.xml:595 +#, no-c-format msgid "SQLGrammarException - indicates a grammar or syn= tax problem with the issued SQL." msgstr "" = -#: transactions.xml:644(para) = +#. Tag: para +#: transactions.xml:601 +#, no-c-format msgid "ConstraintViolationException - indicates some fo= rm of integrity constraint violation." msgstr "" = -#: transactions.xml:650(para) = +#. Tag: para +#: transactions.xml:607 +#, no-c-format msgid "LockAcquisitionException - indicates an error ac= quiring a lock level necessary to perform the requested operation." msgstr "" = -#: transactions.xml:656(para) = +#. Tag: para +#: transactions.xml:613 +#, no-c-format msgid "GenericJDBCException - a generic exception which= did not fall into any of the other categories." msgstr "" = -#: transactions.xml:666(title) = +#. Tag: title +#: transactions.xml:623 +#, no-c-format msgid "Transaction timeout" msgstr "" = -#: transactions.xml:668(para) = -msgid "One extremely important feature provided by a managed environment l= ike EJB that is never provided for non-managed code is transaction timeout.= Transaction timeouts ensure that no misbehaving transaction can indefinite= ly tie up resources while returning no response to the user. Outside a mana= ged (JTA) environment, Hibernate cannot fully provide this functionality. H= owever, Hibernate can at least control data access operations, ensuring tha= t database level deadlocks and queries with huge result sets are limited by= a defined timeout. In a managed environment, Hibernate can delegate transa= ction timeout to JTA. This functioanlity is abstracted by the Hibernate Transaction object." +#. Tag: para +#: transactions.xml:625 +#, no-c-format +msgid "One extremely important feature provided by a managed environment l= ike EJB that is never provided for non-managed code is transaction timeout.= Transaction timeouts ensure that no misbehaving transaction can indefinite= ly tie up resources while returning no response to the user. Outside a mana= ged (JTA) environment, Hibernate cannot fully provide this functionality. H= owever, Hibernate can at least control data access operations, ensuring tha= t database level deadlocks and queries with huge result sets are limited by= a defined timeout. In a managed environment, Hibernate can delegate transa= ction timeout to JTA. This functionality is abstracted by the Hibernate Transaction object." msgstr "" = -#: transactions.xml:701(para) = +#. Tag: programlisting +#: transactions.xml:638 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: transactions.xml:640 +#, no-c-format msgid "Note that setTimeout() may not be called in a CM= T bean, where transaction timeouts must be defined declaratively." msgstr "" = -#: transactions.xml:711(title) = +#. Tag: title +#: transactions.xml:650 +#, no-c-format msgid "Optimistic concurrency control" msgstr "" = -#: transactions.xml:713(para) = +#. Tag: para +#: transactions.xml:652 +#, no-c-format msgid "The only approach that is consistent with high concurrency and high= scalability is optimistic concurrency control with versioning. Version che= cking uses version numbers, or timestamps, to detect conflicting updates (a= nd to prevent lost updates). Hibernate provides for three possible approach= es to writing application code that uses optimistic concurrency. The use ca= ses we show are in the context of long conversations, but version checking = also has the benefit of preventing lost updates in single database transact= ions." msgstr "" = -#: transactions.xml:724(title) = +#. Tag: title +#: transactions.xml:663 +#, no-c-format msgid "Application version checking" msgstr "" = -#: transactions.xml:726(para) = +#. Tag: para +#: transactions.xml:665 +#, no-c-format msgid "In an implementation without much help from Hibernate, each interac= tion with the database occurs in a new Session and the d= eveloper is responsible for reloading all persistent instances from the dat= abase before manipulating them. This approach forces the application to car= ry out its own version checking to ensure conversation transaction isolatio= n. This approach is the least efficient in terms of database access. It is = the approach most similar to entity EJBs." msgstr "" = -#: transactions.xml:747(para) = +#. Tag: programlisting +#: transactions.xml:674 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: transactions.xml:676 +#, no-c-format msgid "The version property is mapped using &l= t;version>, and Hibernate will automatically increment it duri= ng flush if the entity is dirty." msgstr "" = -#: transactions.xml:753(para) = +#. Tag: para +#: transactions.xml:682 +#, no-c-format msgid "Of course, if you are operating in a low-data-concurrency environme= nt and don't require version checking, you may use this approach and just s= kip the version check. In that case, last commit wins = will be the default strategy for your long conversations. Keep in mind that= this might confuse the users of the application, as they might experience = lost updates without error messages or a chance to merge conflicting change= s." msgstr "" = -#: transactions.xml:762(para) = -msgid "Clearly, manual version checking is only feasible in very trivial c= ircumstances and not practical for most applications. Often not only single= instances, but complete graphs of modified ojects have to be checked. Hibe= rnate offers automatic version checking with either an extended Se= ssion or detached instances as the design paradigm." +#. Tag: para +#: transactions.xml:691 +#, no-c-format +msgid "Clearly, manual version checking is only feasible in very trivial c= ircumstances and not practical for most applications. Often not only single= instances, but complete graphs of modified objects have to be checked. Hib= ernate offers automatic version checking with either an extended S= ession or detached instances as the design paradigm." msgstr "" = -#: transactions.xml:773(title) = +#. Tag: title +#: transactions.xml:702 +#, no-c-format msgid "Extended session and automatic versioning" msgstr "" = -#: transactions.xml:775(para) = +#. Tag: para +#: transactions.xml:704 +#, no-c-format msgid "A single Session instance and its persistent ins= tances are used for the whole conversation, known as session-per-= conversation. Hibernate checks instance versions at flush time, = throwing an exception if concurrent modification is detected. It's up to th= e developer to catch and handle this exception (common options are the oppo= rtunity for the user to merge changes or to restart the business conversati= on with non-stale data)." msgstr "" = -#: transactions.xml:784(para) = +#. Tag: para +#: transactions.xml:713 +#, no-c-format msgid "The Session is disconnected from any underlying = JDBC connection when waiting for user interaction. This approach is the mos= t efficient in terms of database access. The application need not concern i= tself with version checking or with reattaching detached instances, nor doe= s it have to reload instances in every database transaction." msgstr "" = -#: transactions.xml:800(para) = +#. Tag: programlisting +#: transactions.xml:721 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: transactions.xml:722 +#, no-c-format msgid "The foo object still knows which Sessio= n it was loaded in. Beginning a new database transaction on an ol= d session obtains a new connection and resumes the session. Committing a da= tabase transaction disconnects a session from the JDBC connection and retur= ns the connection to the pool. After reconnection, to force a version check= on data you aren't updating, you may call Session.lock() with LockMode.READ on any objects that might have been= updated by another transaction. You don't need to lock any data that you <= emphasis>are updating. Usually you would set FlushMode.= MANUAL on an extended Session, so that only th= e last database transaction cycle is allowed to actually persist all modifi= cations made in this conversation. Hence, only this last database transacti= on would include the flush() operation, and then also close()! the session to end the conversation." msgstr "" = -#: transactions.xml:815(para) = +#. Tag: para +#: transactions.xml:737 +#, no-c-format msgid "This pattern is problematic if the Session is to= o big to be stored during user think time, e.g. an HttpSession should be kept as small as possible. As the Session is also the (mandatory) first-level cache and contains all loaded object= s, we can probably use this strategy only for a few request/response cycles= . You should use a Session only for a single conversatio= n, as it will soon also have stale data." msgstr "" = -#: transactions.xml:825(para) = +#. Tag: para +#: transactions.xml:747 +#, no-c-format msgid "(Note that earlier Hibernate versions required explicit disconnecti= on and reconnection of a Session. These methods are depr= ecated, as beginning and ending a transaction has the same effect.)" msgstr "" = -#: transactions.xml:831(para) = +#. Tag: para +#: transactions.xml:753 +#, no-c-format msgid "Also note that you should keep the disconnected Session close to the persistence layer. In other words, use an EJB stateful= session bean to hold the Session in a three-tier enviro= nment, and don't transfer it to the web layer (or even serialize it to a se= parate tier) to store it in the HttpSession." msgstr "" = -#: transactions.xml:839(para) = +#. Tag: para +#: transactions.xml:761 +#, no-c-format msgid "The extended session pattern, or session-per-conversation= , is more difficult to implement with automatic current session = context management. You need to supply your own implementation of the CurrentSessionContext for this, see the Hibernate Wiki for ex= amples." msgstr "" = -#: transactions.xml:849(title) = +#. Tag: title +#: transactions.xml:771 +#, no-c-format msgid "Detached objects and automatic versioning" msgstr "" = -#: transactions.xml:851(para) = +#. Tag: para +#: transactions.xml:773 +#, no-c-format msgid "Each interaction with the persistent store occurs in a new Session. However, the same persistent instances are reused for e= ach interaction with the database. The application manipulates the state of= detached instances originally loaded in another Session= and then reattaches them using Session.update(), Session.saveOrUpdate(), or Session.merge()." msgstr "" = -#: transactions.xml:867(para) = -msgid "Again, Hibernate will check instance versions during flush, throwin= g an exception if conflicting updates occured." +#. Tag: programlisting +#: transactions.xml:781 +#, no-c-format +msgid "" + "" msgstr "" = -#: transactions.xml:872(para) = +#. Tag: para +#: transactions.xml:783 +#, no-c-format +msgid "Again, Hibernate will check instance versions during flush, throwin= g an exception if conflicting updates occurred." +msgstr "" + +#. Tag: para +#: transactions.xml:788 +#, no-c-format msgid "You may also call lock() instead of upd= ate() and use LockMode.READ (performing a vers= ion check, bypassing all caches) if you are sure that the object has not be= en modified." msgstr "" = -#: transactions.xml:881(title) = +#. Tag: title +#: transactions.xml:797 +#, no-c-format msgid "Customizing automatic versioning" msgstr "" = -#: transactions.xml:883(para) = +#. Tag: para +#: transactions.xml:799 +#, no-c-format msgid "You may disable Hibernate's automatic version increment for particu= lar properties and collections by setting the optimistic-lock mapping attribute to false. Hibernate will then no= longer increment versions if the property is dirty." msgstr "" = -#: transactions.xml:890(para) = -msgid "Legacy database schemas are often static and can't be modified. Or,= other applications might also access the same database and don't know how = to handle version numbers or even timestamps. In both cases, versioning can= 't rely on a particular column in a table. To force a version check without= a version or timestamp property mapping, with a comparison of the state of= all fields in a row, turn on optimistic-lock=3D\"all\" = in the <class> mapping. Note that this concepetual= ly only works if Hibernate can compare the old and new state, i.e. if you u= se a single long Session and not session-per-request-wit= h-detached-objects." +#. Tag: para +#: transactions.xml:806 +#, no-c-format +msgid "Legacy database schemas are often static and can't be modified. Or,= other applications might also access the same database and don't know how = to handle version numbers or even timestamps. In both cases, versioning can= 't rely on a particular column in a table. To force a version check without= a version or timestamp property mapping, with a comparison of the state of= all fields in a row, turn on optimistic-lock=3D\"all\" = in the <class> mapping. Note that this conceptuall= y only works if Hibernate can compare the old and new state, i.e. if you us= e a single long Session and not session-per-request-with= -detached-objects." msgstr "" = -#: transactions.xml:901(para) = +#. Tag: para +#: transactions.xml:817 +#, no-c-format msgid "Sometimes concurrent modification can be permitted as long as the c= hanges that have been made don't overlap. If you set optimistic-lo= ck=3D\"dirty\" when mapping the <class>,= Hibernate will only compare dirty fields during flush." msgstr "" = -#: transactions.xml:907(para) = -msgid "In both cases, with dedicated version/timestamp columns or with ful= l/dirty field comparison, Hibernate uses a single UPDATE= statement (with an appropriate WHERE clause) per entity= to execute the version check and update the information. If you use transi= tive persistence to cascade reattachment to associated entities, Hibernate = might execute uneccessary updates. This is usually not a problem, but on update triggers in the database might be executed even w= hen no changes have been made to detached instances. You can customize this= behavior by setting select-before-update=3D\"true\" in = the <class> mapping, forcing Hibernate to SELECT the instance to ensure that changes did actually occur, b= efore updating the row." +#. Tag: para +#: transactions.xml:823 +#, no-c-format +msgid "In both cases, with dedicated version/timestamp columns or with ful= l/dirty field comparison, Hibernate uses a single UPDATE= statement (with an appropriate WHERE clause) per entity= to execute the version check and update the information. If you use transi= tive persistence to cascade reattachment to associated entities, Hibernate = might execute unnecessary updates. This is usually not a problem, but on update triggers in the database might be executed even w= hen no changes have been made to detached instances. You can customize this= behavior by setting select-before-update=3D\"true\" in = the <class> mapping, forcing Hibernate to SELECT the instance to ensure that changes did actually occur, b= efore updating the row." msgstr "" = -#: transactions.xml:925(title) = +#. Tag: title +#: transactions.xml:841 +#, no-c-format msgid "Pessimistic Locking" msgstr "" = -#: transactions.xml:927(para) = -msgid "It is not intended that users spend much time worring about locking= strategies. Its usually enough to specify an isolation level for the JDBC = connections and then simply let the database do all the work. However, adva= nced users may sometimes wish to obtain exclusive pessimistic locks, or re-= obtain locks at the start of a new transaction." +#. Tag: para +#: transactions.xml:843 +#, no-c-format +msgid "It is not intended that users spend much time worrying about lockin= g strategies. It's usually enough to specify an isolation level for the JDB= C connections and then simply let the database do all the work. However, ad= vanced users may sometimes wish to obtain exclusive pessimistic locks, or r= e-obtain locks at the start of a new transaction." msgstr "" = -#: transactions.xml:934(para) = +#. Tag: para +#: transactions.xml:850 +#, no-c-format msgid "Hibernate will always use the locking mechanism of the database, ne= ver lock objects in memory!" msgstr "" = -#: transactions.xml:939(para) = +#. Tag: para +#: transactions.xml:855 +#, no-c-format msgid "The LockMode class defines the different lock le= vels that may be acquired by Hibernate. A lock is obtained by the following= mechanisms:" msgstr "" = -#: transactions.xml:946(para) = +#. Tag: para +#: transactions.xml:862 +#, no-c-format msgid "LockMode.WRITE is acquired automatically when Hi= bernate updates or inserts a row." msgstr "" = -#: transactions.xml:952(para) = +#. Tag: para +#: transactions.xml:868 +#, no-c-format msgid "LockMode.UPGRADE may be acquired upon explicit u= ser request using SELECT ... FOR UPDATE on databases whi= ch support that syntax." msgstr "" = -#: transactions.xml:958(para) = +#. Tag: para +#: transactions.xml:874 +#, no-c-format msgid "LockMode.UPGRADE_NOWAIT may be acquired upon exp= licit user request using a SELECT ... FOR UPDATE NOWAIT = under Oracle." msgstr "" = -#: transactions.xml:964(para) = +#. Tag: para +#: transactions.xml:880 +#, no-c-format msgid "LockMode.READ is acquired automatically when Hib= ernate reads data under Repeatable Read or Serializable isolation level. Ma= y be re-acquired by explicit user request." msgstr "" = -#: transactions.xml:971(para) = +#. Tag: para +#: transactions.xml:887 +#, no-c-format msgid "LockMode.NONE represents the absence of a lock. = All objects switch to this lock mode at the end of a Transaction. Objects associated with the session via a call to update= () or saveOrUpdate() also start out in this lo= ck mode." msgstr "" = -#: transactions.xml:980(para) = +#. Tag: para +#: transactions.xml:896 +#, no-c-format msgid "The \"explicit user request\" is expressed in one of the following = ways:" msgstr "" = -#: transactions.xml:986(para) = +#. Tag: para +#: transactions.xml:902 +#, no-c-format msgid "A call to Session.load(), specifying a = LockMode." msgstr "" = -#: transactions.xml:991(para) = +#. Tag: para +#: transactions.xml:907 +#, no-c-format msgid "A call to Session.lock()." msgstr "" = -#: transactions.xml:996(para) = +#. Tag: para +#: transactions.xml:912 +#, no-c-format msgid "A call to Query.setLockMode()." msgstr "" = -#: transactions.xml:1002(para) = +#. Tag: para +#: transactions.xml:918 +#, no-c-format msgid "If Session.load() is called with UPGRAD= E or UPGRADE_NOWAIT, and the requested object = was not yet loaded by the session, the object is loaded using SELE= CT ... FOR UPDATE. If load() is called for an = object that is already loaded with a less restrictive lock than the one req= uested, Hibernate calls lock() for that object." msgstr "" = -#: transactions.xml:1011(para) = +#. Tag: para +#: transactions.xml:927 +#, no-c-format msgid "Session.lock() performs a version number check i= f the specified lock mode is READ, UPGRADE or UPGRADE_NOWAIT. (In the case of UPGRAD= E or UPGRADE_NOWAIT, SELECT ... FOR U= PDATE is used.)" msgstr "" = -#: transactions.xml:1018(para) = +#. Tag: para +#: transactions.xml:934 +#, no-c-format msgid "If the database does not support the requested lock mode, Hibernate= will use an appropriate alternate mode (instead of throwing an exception).= This ensures that applications will be portable." msgstr "" = -#: transactions.xml:1027(title) = +#. Tag: title +#: transactions.xml:943 +#, no-c-format msgid "Connection Release Modes" msgstr "" = -#: transactions.xml:1029(para) = +#. Tag: para +#: transactions.xml:945 +#, no-c-format msgid "The legacy (2.x) behavior of Hibernate in regards to JDBC connectio= n management was that a Session would obtain a connectio= n when it was first needed and then hold unto that connection until the ses= sion was closed. Hibernate 3.x introduced the notion of connection release = modes to tell a session how to handle its JDBC connections. Note that the f= ollowing discussion is pertinent only to connections provided through a con= figured ConnectionProvider; user-supplied connections ar= e outside the breadth of this discussion. The different release modes are i= dentified by the enumerated values of org.hibernate.ConnectionRele= aseMode:" msgstr "" = -#: transactions.xml:1043(para) = -msgid "ON_CLOSE - is essentially the legacy behavior de= scribed above. The Hibernate session obatins a connection when it first nee= ds to perform some JDBC access and holds unto that connection until the ses= sion is closed." +#. Tag: para +#: transactions.xml:959 +#, no-c-format +msgid "ON_CLOSE - is essentially the legacy behavior de= scribed above. The Hibernate session obtains a connection when it first nee= ds to perform some JDBC access and holds unto that connection until the ses= sion is closed." msgstr "" = -#: transactions.xml:1050(para) = +#. Tag: para +#: transactions.xml:966 +#, no-c-format msgid "AFTER_TRANSACTION - says to release connections = after a org.hibernate.Transaction has completed." msgstr "" = -#: transactions.xml:1056(para) = +#. Tag: para +#: transactions.xml:972 +#, no-c-format msgid "AFTER_STATEMENT (also referred to as aggressive = release) - says to release connections after each and every statement execu= tion. This aggressive releasing is skipped if that statement leaves open re= sources associated with the given session; currently the only situation whe= re this occurs is through the use of org.hibernate.ScrollableResul= ts." msgstr "" = -#: transactions.xml:1066(para) = +#. Tag: para +#: transactions.xml:982 +#, no-c-format msgid "The configuration parameter hibernate.connection.release_m= ode is used to specify which release mode to use. The possible va= lues:" msgstr "" = -#: transactions.xml:1073(para) = +#. Tag: para +#: transactions.xml:989 +#, no-c-format msgid "auto (the default) - this choice delegates to th= e release mode returned by the org.hibernate.transaction.Transacti= onFactory.getDefaultReleaseMode() method. For JTATransactionFacto= ry, this returns ConnectionReleaseMode.AFTER_STATEMENT; for JDBCTransaction= Factory, this returns ConnectionReleaseMode.AFTER_TRANSACTION. It is rarely= a good idea to change this default behavior as failures due to the value o= f this setting tend to indicate bugs and/or invalid assumptions in user cod= e." msgstr "" = -#: transactions.xml:1083(para) = +#. Tag: para +#: transactions.xml:999 +#, no-c-format msgid "on_close - says to use ConnectionReleaseMode.ON_= CLOSE. This setting is left for backwards compatibility, but its use is hig= hly discouraged." msgstr "" = -#: transactions.xml:1089(para) = +#. Tag: para +#: transactions.xml:1005 +#, no-c-format msgid "after_transaction - says to use ConnectionReleas= eMode.AFTER_TRANSACTION. This setting should not be used in JTA environment= s. Also note that with ConnectionReleaseMode.AFTER_TRANSACTION, if a sessio= n is considered to be in auto-commit mode connections will be released as i= f the release mode were AFTER_STATEMENT." msgstr "" = -#: transactions.xml:1097(para) = +#. Tag: para +#: transactions.xml:1013 +#, no-c-format msgid "after_statement - says to use ConnectionReleaseM= ode.AFTER_STATEMENT. Additionally, the configured ConnectionProvid= er is consulted to see if it supports this setting (supp= ortsAggressiveRelease()). If not, the release mode is reset to Co= nnectionReleaseMode.AFTER_TRANSACTION. This setting is only safe in environ= ments where we can either re-acquire the same underlying JDBC connection ea= ch time we make a call into ConnectionProvider.getConnection() or in auto-commit environments where it does not matter whether we g= et back the same connection." msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: transactions.xml:0(None) = -msgid "translator-credits" -msgstr "" - Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/tuto= rial.pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/tutorial.p= ot 2008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/tutorial.p= ot 2008-05-07 21:02:35 UTC (rev 14653) @@ -1,568 +1,1681 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:35-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: tutorial.xml:7(title) = +#. Tag: title +#: tutorial.xml:31 +#, no-c-format msgid "Introduction to Hibernate" msgstr "" = -#: tutorial.xml:10(title) = +#. Tag: title +#: tutorial.xml:34 +#, no-c-format msgid "Preface" msgstr "" = -#: tutorial.xml:12(para) = +#. Tag: para +#: tutorial.xml:36 +#, no-c-format msgid "This chapter is an introductory tutorial for new users of Hibernate= . We start with a simple command line application using an in-memory databa= se and develop it in easy to understand steps." msgstr "" = -#: tutorial.xml:18(para) = +#. Tag: para +#: tutorial.xml:42 +#, no-c-format msgid "This tutorial is intended for new users of Hibernate but requires J= ava and SQL knowledge. It is based on a tutorial by Michael Gloegl, the thi= rd-party libraries we name are for JDK 1.4 and 5.0. You might need others f= or JDK 1.3." msgstr "" = -#: tutorial.xml:24(para) = +#. Tag: para +#: tutorial.xml:48 +#, no-c-format msgid "The source code for the tutorial is included in the distribution in= the doc/reference/tutorial/ directory." msgstr "" = -#: tutorial.xml:32(title) = +#. Tag: title +#: tutorial.xml:56 +#, no-c-format msgid "Part 1 - The first Hibernate Application" msgstr "" = -#: tutorial.xml:34(para) = +#. Tag: para +#: tutorial.xml:58 +#, no-c-format msgid "First, we'll create a simple console-based Hibernate application. W= e use an Java database (HSQL DB), so we do not have to install any database= server." msgstr "" = -#: tutorial.xml:39(para) = +#. Tag: para +#: tutorial.xml:63 +#, no-c-format msgid "Let's assume we need a small database application that can store ev= ents we want to attend, and information about the hosts of these events." msgstr "" = -#: tutorial.xml:44(para) = +#. Tag: para +#: tutorial.xml:68 +#, no-c-format msgid "The first thing we do, is set up our development directory and put = all the Java libraries we need into it. Download the Hibernate distribution= from the Hibernate website. Extract the package and place all required lib= raries found in /lib into into the /lib directory of your new development working directory. It should look like= this:" msgstr "" = -#: tutorial.xml:65(para) = +#. Tag: programlisting +#: tutorial.xml:76 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:78 +#, no-c-format msgid "This is the minimum set of required libraries (note that we also co= pied hibernate3.jar, the main archive) for Hibernate at the time = of writing. The Hibernate release you are using might require mo= re or less libraries. See the README.txt file in the lib/ directory of the Hibernate distribution for more infor= mation about required and optional third-party libraries. (Actually, Log4j = is not required but preferred by many developers.)" msgstr "" = -#: tutorial.xml:74(para) = +#. Tag: para +#: tutorial.xml:87 +#, no-c-format msgid "Next we create a class that represents the event we want to store i= n database." msgstr "" = -#: tutorial.xml:79(title) = +#. Tag: title +#: tutorial.xml:92 +#, no-c-format msgid "The first class" msgstr "" = -#: tutorial.xml:81(para) = +#. Tag: para +#: tutorial.xml:94 +#, no-c-format msgid "Our first persistent class is a simple JavaBean class with some pro= perties:" msgstr "" = -#: tutorial.xml:122(para) = +#. Tag: programlisting +#: tutorial.xml:98 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:100 +#, no-c-format msgid "You can see that this class uses standard JavaBean naming conventio= ns for property getter and setter methods, as well as private visibility fo= r the fields. This is a recommended design - but not required. Hibernate ca= n also access fields directly, the benefit of accessor methods is robustnes= s for refactoring. The no-argument constructor is required to instantiate a= n object of this class through reflection." msgstr "" = -#: tutorial.xml:130(para) = +#. Tag: para +#: tutorial.xml:108 +#, no-c-format msgid "The id property holds a unique identifier value = for a particular event. All persistent entity classes (there are less impor= tant dependent classes as well) will need such an identifier property if we= want to use the full feature set of Hibernate. In fact, most applications = (esp. web applications) need to distinguish objects by identifier, so you s= hould consider this a feature rather than a limitation. However, we usually= don't manipulate the identity of an object, hence the setter method should= be private. Only Hibernate will assign identifiers when an object is saved= . You can see that Hibernate can access public, private, and protected acce= ssor methods, as well as (public, private, protected) fields directly. The = choice is up to you and you can match it to fit your application design." msgstr "" = -#: tutorial.xml:142(para) = +#. Tag: para +#: tutorial.xml:120 +#, no-c-format msgid "The no-argument constructor is a requirement for all persistent cla= sses; Hibernate has to create objects for you, using Java Reflection. The c= onstructor can be private, however, package visibility is required for runt= ime proxy generation and efficient data retrieval without bytecode instrume= ntation." msgstr "" = -#: tutorial.xml:149(para) = +#. Tag: para +#: tutorial.xml:127 +#, no-c-format msgid "Place this Java source file in a directory called src in the development folder, and in its correct package. The directory = should now look like this:" msgstr "" = -#: tutorial.xml:161(para) = +#. Tag: programlisting +#: tutorial.xml:132 +#, no-c-format +msgid "" + "\n" + "+src\n" + " +events\n" + " Event.java]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:134 +#, no-c-format msgid "In the next step, we tell Hibernate about this persistent class." msgstr "" = -#: tutorial.xml:168(title) = +#. Tag: title +#: tutorial.xml:141 +#, no-c-format msgid "The mapping file" msgstr "" = -#: tutorial.xml:170(para) = +#. Tag: para +#: tutorial.xml:143 +#, no-c-format msgid "Hibernate needs to know how to load and store objects of the persis= tent class. This is where the Hibernate mapping file comes into play. The m= apping file tells Hibernate what table in the database it has to access, an= d what columns in that table it should use." msgstr "" = -#: tutorial.xml:177(para) = +#. Tag: para +#: tutorial.xml:150 +#, no-c-format msgid "The basic structure of a mapping file looks like this:" msgstr "" = -#: tutorial.xml:190(para) = +#. Tag: programlisting +#: tutorial.xml:154 +#, no-c-format +msgid "" + "\n" + "\n" + "\n" + "\n" + "[...]\n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:156 +#, no-c-format msgid "Note that the Hibernate DTD is very sophisticated. You can use it f= or auto-completion of XML mapping elements and attributes in your editor or= IDE. You also should open up the DTD file in your text editor - it's the e= asiest way to get an overview of all elements and attributes and to see the= defaults, as well as some comments. Note that Hibernate will not load the = DTD file from the web, but first look it up from the classpath of the appli= cation. The DTD file is included in hibernate3.jar as we= ll as in the src/ directory of the Hibernate distributio= n." msgstr "" = -#: tutorial.xml:201(para) = +#. Tag: para +#: tutorial.xml:167 +#, no-c-format msgid "We will omit the DTD declaration in future examples to shorten the = code. It is of course not optional." msgstr "" = -#: tutorial.xml:206(para) = +#. Tag: para +#: tutorial.xml:172 +#, no-c-format msgid "Between the two hibernate-mapping tags, include = a class element. All persistent entity classes (again, t= here might be dependent classes later on, which are not first-class entitie= s) need such a mapping, to a table in the SQL database:" msgstr "" = -#: tutorial.xml:221(para) = +#. Tag: programlisting +#: tutorial.xml:179 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + "\n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:181 +#, no-c-format msgid "So far we told Hibernate how to persist and load object of class Event to the table EVENTS, each instanc= e represented by a row in that table. Now we continue with a mapping of the= unique identifier property to the tables primary key. In addition, as we d= on't want to care about handling this identifier, we configure Hibernate's = identifier generation strategy for a surrogate primary key column:" msgstr "" = -#: tutorial.xml:239(para) = -msgid "The id element is the declaration of the identif= er property, name=3D\"id\" declares the name of the Java= property - Hibernate will use the getter and setter methods to access the = property. The column attribute tells Hibernate which column of the EVENTS table we use for this primary key. The nested ge= nerator element specifies the identifier generation strategy, in = this case we used native, which picks the best strategy = depending on the configured database (dialect). Hibernate supports database= generated, globally unique, as well as application assigned identifiers (o= r any strategy you have written an extension for)." +#. Tag: programlisting +#: tutorial.xml:189 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" msgstr "" = -#: tutorial.xml:252(para) = +#. Tag: para +#: tutorial.xml:191 +#, no-c-format +msgid "The id element is the declaration of the identif= ier property, name=3D\"id\" declares the name of the Jav= a property - Hibernate will use the getter and setter methods to access the= property. The column attribute tells Hibernate which column of the EVENTS table we use for this primary key. The nested g= enerator element specifies the identifier generation strategy, in= this case we used native, which picks the best strategy= depending on the configured database (dialect). Hibernate supports databas= e generated, globally unique, as well as application assigned identifiers (= or any strategy you have written an extension for)." +msgstr "" + +#. Tag: para +#: tutorial.xml:204 +#, no-c-format msgid "Finally we include declarations for the persistent properties of th= e class in the mapping file. By default, no properties of the class are con= sidered persistent:" msgstr "" = -#: tutorial.xml:271(para) = +#. Tag: programlisting +#: tutorial.xml:210 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:212 +#, no-c-format msgid "Just as with the id element, the name attribute of the property element tells Hiberna= te which getter and setter methods to use. So, in this case, Hibernate will= look for getDate()/setDate(), as well as getTi= tle()/setTitle()." msgstr "" = -#: tutorial.xml:278(para) = +#. Tag: para +#: tutorial.xml:219 +#, no-c-format msgid "Why does the date property mapping include the <= literal>column attribute, but the title doesn'= t? Without the column attribute Hibernate by default use= s the property name as the column name. This works fine for title<= /literal>. However, date is a reserved keyword in most d= atabase, so we better map it to a different name." msgstr "" = -#: tutorial.xml:287(para) = +#. Tag: para +#: tutorial.xml:228 +#, no-c-format msgid "The next interesting thing is that the title map= ping also lacks a type attribute. The types we declare a= nd use in the mapping files are not, as you might expect, Java data types. = They are also not SQL database types. These types are so called H= ibernate mapping types, converters which can translate from Java= to SQL data types and vice versa. Again, Hibernate will try to determine t= he correct conversion and mapping type itself if the type attribute is not present in the mapping. In some cases this automatic det= ection (using Reflection on the Java class) might not have the default you = expect or need. This is the case with the date property.= Hibernate can't know if the property (which is of java.util.Date<= /literal>) should map to a SQL date, timestamp<= /literal>, or time column. We preserve full date and tim= e information ! by mapping the property with a timestamp converter." msgstr "" = -#: tutorial.xml:303(para) = +#. Tag: para +#: tutorial.xml:244 +#, no-c-format msgid "This mapping file should be saved as Event.hbm.xml, right in the directory next to the Event Java class = source file. The naming of mapping files can be arbitrary, however the hbm.xml suffix is a convention in the Hibernate developer co= mmunity. The directory structure should now look like this:" msgstr "" = -#: tutorial.xml:319(para) = +#. Tag: programlisting +#: tutorial.xml:252 +#, no-c-format +msgid "" + "\n" + "+src\n" + " +events\n" + " Event.java\n" + " Event.hbm.xml]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:254 +#, no-c-format msgid "We continue with the main configuration of Hibernate." msgstr "" = -#: tutorial.xml:326(title) = +#. Tag: title +#: tutorial.xml:261 +#, no-c-format msgid "Hibernate configuration" msgstr "" = -#: tutorial.xml:328(para) = +#. Tag: para +#: tutorial.xml:263 +#, no-c-format msgid "We now have a persistent class and its mapping file in place. It is= time to configure Hibernate. Before we do this, we will need a database. H= SQL DB, a java-based SQL DBMS, can be downloaded from the HSQL DB website(h= ttp://hsqldb.org/). Actually, you only need the hsqldb.jar from this download. Place this file in the lib/ direc= tory of the development folder." msgstr "" = -#: tutorial.xml:336(para) = +#. Tag: para +#: tutorial.xml:271 +#, no-c-format msgid "Create a directory called data in the root of th= e development directory - this is where HSQL DB will store its data files. = Now start the database by running java -classpath ../lib/hsqldb.ja= r org.hsqldb.Server in this data directory. You can see it start = up and bind to a TCP/IP socket, this is where our application will connect = later. If you want to start with a fresh database during this tutorial, shu= tdown HSQL DB (press CTRL + C in the window), delete all= files in the data/ directory, and start HSQL DB again." msgstr "" = -#: tutorial.xml:346(para) = +#. Tag: para +#: tutorial.xml:281 +#, no-c-format msgid "Hibernate is the layer in your application which connects to this d= atabase, so it needs connection information. The connections are made throu= gh a JDBC connection pool, which we also have to configure. The Hibernate d= istribution contains several open source JDBC connection pooling tools, but= will use the Hibernate built-in connection pool for this tutorial. Note th= at you have to copy the required library into your classpath and use differ= ent connection pooling settings if you want to use a production-quality thi= rd party JDBC pooling software." msgstr "" = -#: tutorial.xml:356(para) = +#. Tag: para +#: tutorial.xml:291 +#, no-c-format msgid "For Hibernate's configuration, we can use a simple hiberna= te.properties file, a slightly more sophisticated hibern= ate.cfg.xml file, or even complete programmatic setup. Most users= prefer the XML configuration file:" msgstr "" = -#: tutorial.xml:401(para) = +#. Tag: programlisting +#: tutorial.xml:297 +#, no-c-format +msgid "" + "\n" + "\n" + "\n" + "\n" + "\n" + " \n" + "\n" + " \n" + " org.hsqldb.jdb= cDriver\n" + " jdbc:hsqldb:hsql://loca= lhost\n" + " sa\n" + " \n" + "\n" + " \n" + " 1\n" + "\n" + " \n" + " org.hibernate.dialect.HSQLDial= ect\n" + "\n" + " \n" + " thread\n" + "\n" + " \n" + " org.hibernate.cac= he.NoCacheProvider\n" + "\n" + " \n" + " true\n" + "\n" + " \= n" + " create\n" + "\n" + " \n" + "\n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:299 +#, no-c-format msgid "Note that this XML configuration uses a different DTD. We configure= Hibernate's SessionFactory - a global factory responsib= le for a particular database. If you have several databases, use several <session-factory> configurations, usually in several= configuration files (for easier startup)." msgstr "" = -#: tutorial.xml:409(para) = +#. Tag: para +#: tutorial.xml:307 +#, no-c-format msgid "The first four property elements contain the nec= essary configuration for the JDBC connection. The dialect property= element specifies the particular SQL variant Hibernate generates= . Hibernate's automatic session management for persistence contexts will co= me in handy as you will soon see. The hbm2ddl.auto optio= n turns on automatic generation of database schemas - directly into the dat= abase. This can of course also be turned off (by removing the config option= ) or redirected to a file with the help of the SchemaExport Ant task. Finally, we add the mapping file(s) for persistent classes to= the configuration." msgstr "" = -#: tutorial.xml:422(para) = +#. Tag: para +#: tutorial.xml:320 +#, no-c-format msgid "Copy this file into the source directory, so it will end up in the = root of the classpath. Hibernate automatically looks for a file called hibernate.cfg.xml in the root of the classpath, on startup." msgstr "" = -#: tutorial.xml:431(title) = +#. Tag: title +#: tutorial.xml:329 +#, no-c-format msgid "Building with Ant" msgstr "" = -#: tutorial.xml:433(para) = +#. Tag: para +#: tutorial.xml:331 +#, no-c-format msgid "We'll now build the tutorial with Ant. You will need to have Ant in= stalled - get it from the Ant download page. How to install Ant will not be covered her= e. Please refer to the Ant manual. After you have installed Ant, we can start to crea= te the buildfile. It will be called build.xml and placed= directly in the development directory." msgstr "" = -#: tutorial.xml:442(para) = +#. Tag: para +#: tutorial.xml:340 +#, no-c-format msgid "A basic build file looks like this:" msgstr "" = -#: tutorial.xml:479(para) = +#. Tag: programlisting +#: tutorial.xml:344 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " = \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:346 +#, no-c-format msgid "This will tell Ant to add all files in the lib directory ending wit= h .jar to the classpath used for compilation. It will al= so copy all non-Java source files to the target directory, e.g. configurati= on and Hibernate mapping files. If you now run Ant, you should get this out= put:" msgstr "" = -#: tutorial.xml:501(title) = +#. Tag: programlisting +#: tutorial.xml:353 +#, no-c-format +msgid "" + "ant\n" + "Buildfile: build.xml\n" + "\n" + "copy-resources:\n" + " [copy] Copying 2 files to C:\\hibernateTutorial\\bin\n" + "\n" + "compile:\n" + " [javac] Compiling 1 source file to C:\\hibernateTutorial\\bin\n" + "\n" + "BUILD SUCCESSFUL\n" + "Total time: 1 second ]]>" +msgstr "" + +#. Tag: title +#: tutorial.xml:358 +#, no-c-format msgid "Startup and helpers" msgstr "" = -#: tutorial.xml:503(para) = +#. Tag: para +#: tutorial.xml:360 +#, no-c-format msgid "It's time to load and store some Event objects, = but first we have to complete the setup with some infrastructure code. We h= ave to startup Hibernate. This startup includes building a global = SessionFactory object and to store it somewhere for easy access i= n application code. A SessionFactory can open up new Session's. A Session represents a single= -threaded unit of work, the SessionFactory is a thread-s= afe global object, instantiated once." msgstr "" = -#: tutorial.xml:513(para) = +#. Tag: para +#: tutorial.xml:370 +#, no-c-format msgid "We'll create a HibernateUtil helper class which = takes care of startup and makes accessing a SessionFactory convenient. Let's have a look at the implementation:" msgstr "" = -#: tutorial.xml:545(para) = +#. Tag: programlisting +#: tutorial.xml:376 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:378 +#, no-c-format msgid "This class does not only produce the global SessionFactory= in its static initializer (called once by the JVM when the class= is loaded), but also hides the fact that it uses a static singleton. It mi= ght as well lookup the SessionFactory from JNDI in an ap= plication server." msgstr "" = -#: tutorial.xml:552(para) = +#. Tag: para +#: tutorial.xml:385 +#, no-c-format msgid "If you give the SessionFactory a name in your co= nfiguration file, Hibernate will in fact try to bind it to JNDI after it ha= s been built. To avoid this code completely you could also use JMX deployme= nt and let the JMX-capable container instantiate and bind a Hibern= ateService to JNDI. These advanced options are discussed in the H= ibernate reference documentation." msgstr "" = -#: tutorial.xml:561(para) = +#. Tag: para +#: tutorial.xml:394 +#, no-c-format msgid "Place HibernateUtil.java in the development sour= ce directory, in a package next to events:" msgstr "" = -#: tutorial.xml:579(para) = +#. Tag: programlisting +#: tutorial.xml:399 +#, no-c-format +msgid "" + "\n" + "+src\n" + " +events\n" + " Event.java\n" + " Event.hbm.xml\n" + " +util\n" + " HibernateUtil.java\n" + " hibernate.cfg.xml\n" + "+data\n" + "build.xml]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:401 +#, no-c-format msgid "This should again compile without problems. We finally need to conf= igure a logging system - Hibernate uses commons logging and leaves you the = choice between Log4j and JDK 1.4 logging. Most developers prefer Log4j: cop= y log4j.properties from the Hibernate distribution (it's= in the etc/ directory) to your src d= irectory, next to hibernate.cfg.xml. Have a look at the = example configuration and change the settings if you like to have more verb= ose output. By default, only Hibernate startup message are shown on stdout." msgstr "" = -#: tutorial.xml:589(para) = +#. Tag: para +#: tutorial.xml:411 +#, no-c-format msgid "The tutorial infrastructure is complete - and we are ready to do so= me real work with Hibernate." msgstr "" = -#: tutorial.xml:597(title) = +#. Tag: title +#: tutorial.xml:419 +#, no-c-format msgid "Loading and storing objects" msgstr "" = -#: tutorial.xml:599(para) = +#. Tag: para +#: tutorial.xml:421 +#, no-c-format msgid "Finally, we can use Hibernate to load and store objects. We write a= n EventManager class with a main() me= thod:" msgstr "" = -#: tutorial.xml:640(para) = +#. Tag: programlisting +#: tutorial.xml:426 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:428 +#, no-c-format msgid "We create a new Event object, and hand it over t= o Hibernate. Hibernate now takes care of the SQL and executes INSE= RTs on the database. Let's have a look at the Session and Transaction-handling code before we run this= ." msgstr "" = -#: tutorial.xml:647(para) = +#. Tag: para +#: tutorial.xml:435 +#, no-c-format msgid "A Session is a single unit of work. For now we'l= l keep things simple and assume a one-to-one granularity between a Hibernat= e Session and a database transaction. To shield our code= from the actual underlying transaction system (in this case plain JDBC, bu= t it could also run with JTA) we use the Transaction API= that is available on the Hibernate Session." msgstr "" = -#: tutorial.xml:655(para) = +#. Tag: para +#: tutorial.xml:443 +#, no-c-format msgid "What does sessionFactory.getCurrentSession() do?= First, you can call it as many times and anywhere you like, once you get h= old of your SessionFactory (easy thanks to Hibe= rnateUtil). The getCurrentSession() method alw= ays returns the \"current\" unit of work. Remember that we switched the con= figuration option for this mechanism to \"thread\" in hibernate.cf= g.xml? Hence, the current unit of work is bound to the current Ja= va thread that executes our application. However, this is not the full pict= ure, you also have to consider scope, when a unit of work begins and when i= t ends." msgstr "" = -#: tutorial.xml:666(para) = +#. Tag: para +#: tutorial.xml:454 +#, no-c-format msgid "A Session begins when it is first needed, when t= he first call to getCurrentSession() is made. It is then= bound by Hibernate to the current thread. When the transaction ends, eithe= r through commit or rollback, Hibernate automatically unbinds the = Session from the thread and closes it for you. If you call getCurrentSession() again, you get a new Session and can start a new unit of work. This thread-bound programming model is the most popular way of using Hibernate, as it all= ows flexible layering of your code (transaction demarcation code can be sep= arated from data access code, we'll do this later in this tutorial)." msgstr "" = -#: tutorial.xml:677(para) = +#. Tag: para +#: tutorial.xml:465 +#, no-c-format msgid "Related to the unit of work scope, should the Hibernate Se= ssion be used to execute one or several database operations? The = above example uses one Session for one operation. This i= s pure coincidence, the example is just not complex enough to show any othe= r approach. The scope of a Hibernate Session is flexible= but you should never design your application to use a new Hibernate Session for every database operation. So = even if you see it a few more times in the following (very trivial) example= s, consider session-per-operation an anti-pattern. A r= eal (web) application is shown later in this tutorial." msgstr "" = -#: tutorial.xml:688(para) = +#. Tag: para +#: tutorial.xml:476 +#, no-c-format msgid "Have a look at for more informat= ion about transaction handling and demarcation. We also skipped any error h= andling and rollback in the previous example." msgstr "" = -#: tutorial.xml:694(para) = +#. Tag: para +#: tutorial.xml:482 +#, no-c-format msgid "To run this first routine we have to add a callable target to the A= nt build file:" msgstr "" = -#: tutorial.xml:705(para) = +#. Tag: programlisting +#: tutorial.xml:486 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:488 +#, no-c-format msgid "The value of the action argument is set on the c= ommand line when calling the target:" msgstr "" = -#: tutorial.xml:712(para) = +#. Tag: programlisting +#: tutorial.xml:493 +#, no-c-format +msgid "ant run -Daction=3Dstore]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:495 +#, no-c-format msgid "You should see, after compilation, Hibernate starting up and, depen= ding on your configuration, lots of log output. At the end you will find th= e following line:" msgstr "" = -#: tutorial.xml:719(para) = +#. Tag: programlisting +#: tutorial.xml:500 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: tutorial.xml:502 +#, no-c-format msgid "This is the INSERT executed by Hibernate, the qu= estion marks represent JDBC bind parameters. To see the values bound as arg= uments, or to reduce the verbosity of the log, check your log4j.pr= operties." msgstr "" = -#: tutorial.xml:725(para) = +#. Tag: para +#: tutorial.xml:508 +#, no-c-format msgid "Now we'd like to list stored events as well, so we add an option to= the main method:" msgstr "" = -#: tutorial.xml:741(para) = +#. Tag: programlisting +#: tutorial.xml:512 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:514 +#, no-c-format msgid "We also add a new listEvents() method:" msgstr "" = -#: tutorial.xml:758(para) = +#. Tag: programlisting +#: tutorial.xml:518 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:520 +#, no-c-format msgid "What we do here is use an HQL (Hibernate Query Language) query to l= oad all existing Event objects from the database. Hibern= ate will generate the appropriate SQL, send it to the database and populate= Event objects with the data. You can create more comple= x queries with HQL, of course." msgstr "" = -#: tutorial.xml:765(para) = +#. Tag: para +#: tutorial.xml:527 +#, no-c-format msgid "Now, to execute and test all of this, follow these steps:" msgstr "" = -#: tutorial.xml:771(para) = +#. Tag: para +#: tutorial.xml:533 +#, no-c-format msgid "Run ant run -Daction=3Dstore to store something = into the database and, of course, to generate the database schema before th= rough hbm2ddl." msgstr "" = -#: tutorial.xml:777(para) = -msgid "Now disable hbm2ddl by commenting out the property in your hibernate.cfg.xml file. Usually you only leave it turned on in c= ontinous unit testing, but another run of hbm2ddl would drop everything you have stored - the create configura= tion setting actually translates into \"drop all tables from the schema, th= en re-create all tables, when the SessionFactory is build\"." +#. Tag: para +#: tutorial.xml:539 +#, no-c-format +msgid "Now disable hbm2ddl by commenting out the property in your hibernate.cfg.xml file. Usually you only leave it turned on in c= ontinuous unit testing, but another run of hbm2ddl would drop everything you have stored - the create configur= ation setting actually translates into \"drop all tables from the schema, t= hen re-create all tables, when the SessionFactory is build\"." msgstr "" = -#: tutorial.xml:787(para) = +#. Tag: para +#: tutorial.xml:549 +#, no-c-format msgid "If you now call Ant with -Daction=3Dlist, you sh= ould see the events you have stored so far. You can of course also call the= store action a few times more." msgstr "" = -#: tutorial.xml:793(para) = +#. Tag: para +#: tutorial.xml:555 +#, no-c-format msgid "Note: Most new Hibernate users fail at this point and we see questi= ons about Table not found error messages regularly. Ho= wever, if you follow the steps outlined above you will not have this proble= m, as hbm2ddl creates the database schema on the first run, and subsequent = application restarts will use this schema. If you change the mapping and/or= database schema, you have to re-enable hbm2ddl once again." msgstr "" = -#: tutorial.xml:806(title) = +#. Tag: title +#: tutorial.xml:568 +#, no-c-format msgid "Part 2 - Mapping associations" msgstr "" = -#: tutorial.xml:808(para) = +#. Tag: para +#: tutorial.xml:570 +#, no-c-format msgid "We mapped a persistent entity class to a table. Let's build on this= and add some class associations. First we'll add people to our application= , and store a list of events they participate in." msgstr "" = -#: tutorial.xml:814(title) = +#. Tag: title +#: tutorial.xml:576 +#, no-c-format msgid "Mapping the Person class" msgstr "" = -#: tutorial.xml:816(para) = +#. Tag: para +#: tutorial.xml:578 +#, no-c-format msgid "The first cut of the Person class is simple:" msgstr "" = -#: tutorial.xml:835(para) = +#. Tag: programlisting +#: tutorial.xml:582 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:584 +#, no-c-format msgid "Create a new mapping file called Person.hbm.xml = (don't forget the DTD reference at the top):" msgstr "" = -#: tutorial.xml:853(para) = +#. Tag: programlisting +#: tutorial.xml:589 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:591 +#, no-c-format msgid "Finally, add the new mapping to Hibernate's configuration:" msgstr "" = -#: tutorial.xml:860(para) = +#. Tag: programlisting +#: tutorial.xml:595 +#, no-c-format +msgid "" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:597 +#, no-c-format msgid "We'll now create an association between these two entities. Obvious= ly, persons can participate in events, and events have participants. The de= sign questions we have to deal with are: directionality, multiplicity, and = collection behavior." msgstr "" = -#: tutorial.xml:870(title) = +#. Tag: title +#: tutorial.xml:607 +#, no-c-format msgid "A unidirectional Set-based association" msgstr "" = -#: tutorial.xml:872(para) = +#. Tag: para +#: tutorial.xml:609 +#, no-c-format msgid "We'll add a collection of events to the Person c= lass. That way we can easily navigate to the events for a particular person= , without executing an explicit query - by calling aPerson.getEven= ts(). We use a Java collection, a Set, because= the collection will not contain duplicate elements and the ordering is not= relevant for us." msgstr "" = -#: tutorial.xml:879(para) = +#. Tag: para +#: tutorial.xml:616 +#, no-c-format msgid "We need a unidirectional, many-valued associations, implemented wit= h a Set. Let's write the code for this in the Java class= es and then map it:" msgstr "" = -#: tutorial.xml:897(para) = +#. Tag: programlisting +#: tutorial.xml:621 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:623 +#, no-c-format msgid "Before we map this association, think about the other side. Clearly= , we could just keep this unidirectional. Or, we could create another colle= ction on the Event, if we want to be able to navigate it= bi-directional, i.e. anEvent.getParticipants(). This is= not necessary, from a functional perspective. You could always execute an = explicit query to retrieve the participants for a particular event. This is= a design choice left to you, but what is clear from this discussion is the= multiplicity of the association: \"many\" valued on both sides, we call th= is a many-to-many association. Hence, we use Hibernate= 's many-to-many mapping:" msgstr "" = -#: tutorial.xml:923(para) = +#. Tag: programlisting +#: tutorial.xml:634 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:636 +#, no-c-format msgid "Hibernate supports all kinds of collection mappings, a <= ;set> being most common. For a many-to-many association (or n:m entity relationship), an association table is needed= . Each row in this table represents a link between a person and an event. T= he table name is configured with the table attribute of = the set element. The identifier column name in the assoc= iation, for the person's side, is defined with the <key> element, the column name for the event's side with the colu= mn attribute of the <many-to-many>. You = also have to tell Hibernate the class of the objects in your collection (co= rrect: the class on the other side of the collection of references)." msgstr "" = -#: tutorial.xml:935(para) = +#. Tag: para +#: tutorial.xml:648 +#, no-c-format msgid "The database schema for this mapping is therefore:" msgstr "" = -#: tutorial.xml:956(title) = +#. Tag: programlisting +#: tutorial.xml:652 +#, no-c-format +msgid "" + " | *EVENT_ID | | |\n" + " | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID |\n" + " | TITLE | |__________________| | AGE |\n" + " |_____________| | FIRSTNAME |\n" + " | LASTNAME |\n" + " |_____________|\n" + " ]]>" +msgstr "" + +#. Tag: title +#: tutorial.xml:657 +#, no-c-format msgid "Working the association" msgstr "" = -#: tutorial.xml:958(para) = +#. Tag: para +#: tutorial.xml:659 +#, no-c-format msgid "Let's bring some people and events together in a new method in EventManager:" msgstr "" = -#: tutorial.xml:975(para) = +#. Tag: programlisting +#: tutorial.xml:663 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:665 +#, no-c-format msgid "After loading a Person and an Event, simply modify the collection using the normal collection methods. A= s you can see, there is no explicit call to update() or = save(), Hibernate automatically detects that the collect= ion has been modified and needs to be updated. This is called aut= omatic dirty checking, and you can also try it by modifying the = name or the date property of any of your objects. As long as they are in persistent state, that is, bound to a particular Hiberna= te Session (i.e. they have been just loaded or saved in = a unit of work), Hibernate monitors any changes and executes SQL in a write= -behind fashion. The process of synchronizing the memory state with the dat= abase, usually only at the end of a unit of work, is called flush= ing. In our code, the unit of work ends with a commit (or rollba= ck) of the dat! abase transaction - as defined by the thread configurat= ion option for the CurrentSessionContext class." msgstr "" = -#: tutorial.xml:990(para) = +#. Tag: para +#: tutorial.xml:680 +#, no-c-format msgid "You might of course load person and event in different units of wor= k. Or you modify an object outside of a Session, when it= is not in persistent state (if it was persistent before, we call this stat= e detached). You can even modify a collection when it = is detached:" msgstr "" = -#: tutorial.xml:1025(para) = +#. Tag: programlisting +#: tutorial.xml:687 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:689 +#, no-c-format msgid "The call to update makes a detached object persi= stent again, you could say it binds it to a new unit of work, so any modifi= cations you made to it while detached can be saved to the database. This in= cludes any modifications (additions/deletions) you made to a collection of = that entity object." msgstr "" = -#: tutorial.xml:1032(para) = +#. Tag: para +#: tutorial.xml:696 +#, no-c-format msgid "Well, this is not much use in our current situation, but it's an im= portant concept you can design into your own application. For now, complete= this exercise by adding a new action to the EventManager's main method and call it from the command line. If you need the identifi= ers of a person and an event - the save() method returns= it (you might have to modify some of the previous methods to return that i= dentifier):" msgstr "" = -#: tutorial.xml:1047(para) = +#. Tag: programlisting +#: tutorial.xml:704 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:706 +#, no-c-format msgid "This was an example of an association between two equally important= classes, two entities. As mentioned earlier, there are other classes and t= ypes in a typical model, usually \"less important\". Some you have already = seen, like an int or a String. We cal= l these classes value types, and their instances depend on a particular entity. Instances of these types don= 't have their own identity, nor are they shared between entities (two perso= ns don't reference the same firstname object, even if th= ey have the same first name). Of course, value types can not only be found = in the JDK (in fact, in a Hibernate application all JDK classes are conside= red value types), but you can also write dependent classes yourself, Address or MonetaryAmount, for example." msgstr "" = -#: tutorial.xml:1060(para) = +#. Tag: para +#: tutorial.xml:719 +#, no-c-format msgid "You can also design a collection of value types. This is conceptual= ly very different from a collection of references to other entities, but lo= oks almost the same in Java." msgstr "" = -#: tutorial.xml:1068(title) = +#. Tag: title +#: tutorial.xml:727 +#, no-c-format msgid "Collection of values" msgstr "" = -#: tutorial.xml:1070(para) = +#. Tag: para +#: tutorial.xml:729 +#, no-c-format msgid "We add a collection of value typed objects to the Person entity. We want to store email addresses, so the type we use is String, and the collection is again a Set:" msgstr "" = -#: tutorial.xml:1085(para) = +#. Tag: programlisting +#: tutorial.xml:734 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:736 +#, no-c-format msgid "The mapping of this Set:" msgstr "" = -#: tutorial.xml:1094(para) = +#. Tag: programlisting +#: tutorial.xml:740 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:742 +#, no-c-format msgid "The difference compared with the earlier mapping is the el= ement part, which tells Hibernate that the collection does not co= ntain references to another entity, but a collection of elements of type String (the lowercase name tells you it's a Hibernate mapp= ing type/converter). Once again, the table attribute of = the set element determines the table name for the collec= tion. The key element defines the foreign-key column nam= e in the collection table. The column attribute in the <= literal>element element defines the column name where the String values will actually be stored." msgstr "" = -#: tutorial.xml:1104(para) = +#. Tag: para +#: tutorial.xml:752 +#, no-c-format msgid "Have a look at the updated schema:" msgstr "" = -#: tutorial.xml:1122(para) = +#. Tag: programlisting +#: tutorial.xml:756 +#, no-c-format +msgid "" + " | *EVENT_ID | | | = |___________________|\n" + " | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID | <--= > | *PERSON_ID |\n" + " | TITLE | |__________________| | AGE | = | *EMAIL_ADDR |\n" + " |_____________| | FIRSTNAME | = |___________________|\n" + " | LASTNAME |\n" + " |_____________|\n" + " ]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:758 +#, no-c-format msgid "You can see that the primary key of the collection table is in fact= a composite key, using both columns. This also implies that there can't be= duplicate email addresses per person, which is exactly the semantics we ne= ed for a set in Java." msgstr "" = -#: tutorial.xml:1128(para) = +#. Tag: para +#: tutorial.xml:764 +#, no-c-format msgid "You can now try and add elements to this collection, just like we d= id before by linking persons and events. It's the same code in Java:" msgstr "" = -#: tutorial.xml:1146(para) = -msgid "This time we didnt' use a fetch query to initi= alize the collection. Hence, the call to its getter method will trigger an = additional select to initialize it, so we can add an element to it. Monitor= the SQL log and try to optimize this with an eager fetch." +#. Tag: programlisting +#: tutorial.xml:769 +#, no-c-format +msgid "" + "" msgstr "" = -#: tutorial.xml:1156(title) = +#. Tag: para +#: tutorial.xml:771 +#, no-c-format +msgid "This time we didn't use a fetch query to initi= alize the collection. Hence, the call to its getter method will trigger an = additional select to initialize it, so we can add an element to it. Monitor= the SQL log and try to optimize this with an eager fetch." +msgstr "" + +#. Tag: title +#: tutorial.xml:781 +#, no-c-format msgid "Bi-directional associations" msgstr "" = -#: tutorial.xml:1158(para) = +#. Tag: para +#: tutorial.xml:783 +#, no-c-format msgid "Next we are going to map a bi-directional association - making the = association between person and event work from both sides in Java. Of cours= e, the database schema doesn't change, we still have many-to-many multiplic= ity. A relational database is more flexible than a network programming lang= uage, so it doesn't need anything like a navigation direction - data can be= viewed and retrieved in any possible way." msgstr "" = -#: tutorial.xml:1166(para) = +#. Tag: para +#: tutorial.xml:791 +#, no-c-format msgid "First, add a collection of participants to the Event Event class:" msgstr "" = -#: tutorial.xml:1180(para) = +#. Tag: programlisting +#: tutorial.xml:795 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:797 +#, no-c-format msgid "Now map this side of the association too, in Event.hbm.xml= ." msgstr "" = -#: tutorial.xml:1189(para) = +#. Tag: programlisting +#: tutorial.xml:801 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:803 +#, no-c-format msgid "As you see, these are normal set mappings in bot= h mapping documents. Notice that the column names in key= and many-to-many are swapped in both mapping documents.= The most important addition here is the inverse=3D\"true\" attribute in the set element of the Event's collection mapping." msgstr "" = -#: tutorial.xml:1197(para) = +#. Tag: para +#: tutorial.xml:811 +#, no-c-format msgid "What this means is that Hibernate should take the other side - the = Person class - when it needs to find out information abo= ut the link between the two. This will be a lot easier to understand once y= ou see how the bi-directional link between our two entities is created ." msgstr "" = -#: tutorial.xml:1206(title) = +#. Tag: title +#: tutorial.xml:820 +#, no-c-format msgid "Working bi-directional links" msgstr "" = -#: tutorial.xml:1208(para) = +#. Tag: para +#: tutorial.xml:822 +#, no-c-format msgid "First, keep in mind that Hibernate does not affect normal Java sema= ntics. How did we create a link between a Person and an = Event in the unidirectional example? We added an instanc= e of Event to the collection of event references, of an = instance of Person. So, obviously, if we want to make th= is link working bi-directional, we have to do the same on the other side - = adding a Person reference to the collection in an Event. This \"setting the link on both sides\" is absolutely n= ecessary and you should never forget doing it." msgstr "" = -#: tutorial.xml:1218(para) = -msgid "Many developers program defensive and create link management method= s to correctly set both sides, e.g. in Person:" +#. Tag: para +#: tutorial.xml:832 +#, no-c-format +msgid "Many developers program defensively and create link management meth= ods to correctly set both sides, e.g. in Person:" msgstr "" = -#: tutorial.xml:1241(para) = +#. Tag: programlisting +#: tutorial.xml:837 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:839 +#, no-c-format msgid "Notice that the get and set methods for the collection are now prot= ected - this allows classes in the same package and subclasses to still acc= ess the methods, but prevents everybody else from messing with the collecti= ons directly (well, almost). You should probably do the same with the colle= ction on the other side." msgstr "" = -#: tutorial.xml:1248(para) = +#. Tag: para +#: tutorial.xml:846 +#, no-c-format msgid "What about the inverse mapping attribute? For yo= u, and for Java, a bi-directional link is simply a matter of setting the re= ferences on both sides correctly. Hibernate however doesn't have enough inf= ormation to correctly arrange SQL INSERT and UP= DATE statements (to avoid constraint violations), and needs some = help to handle bi-directional associations properly. Making one side of the= association inverse tells Hibernate to basically ignore= it, to consider it a mirror of the other side. That's= all that is necessary for Hibernate to work out all of the issues when tra= nsformation a directional navigation model to a SQL database schema. The ru= les you have to remember are straightforward: All bi-directional associatio= ns need one side as inverse. In a one-to-many associatio= n it has to be the many-side, in many-to-many association you can pick eith= er side, there! is no difference." msgstr "" = -#: tutorial.xml:1263(para) = -msgid "Let's turn this into a small web application." +#. Tag: title +#: tutorial.xml:864 +#, no-c-format +msgid "Part 3 - The EventManager web application" msgstr "" = -#: tutorial.xml:1270(title) = -msgid "Part 3 - The EventManager web application" +#. Tag: para +#: tutorial.xml:866 +#, no-c-format +msgid "Let's turn the following discussion into a small web application..." msgstr "" = -#: tutorial.xml:1272(para) = +#. Tag: para +#: tutorial.xml:870 +#, no-c-format msgid "A Hibernate web application uses Session and Transaction almost like a standalone application. However, = some common patterns are useful. We now write an EventManagerServl= et. This servlet can list all events stored in the database, and = it provides an HTML form to enter new events." msgstr "" = -#: tutorial.xml:1280(title) = +#. Tag: title +#: tutorial.xml:878 +#, no-c-format msgid "Writing the basic servlet" msgstr "" = -#: tutorial.xml:1282(para) = +#. Tag: para +#: tutorial.xml:880 +#, no-c-format msgid "Create a new class in your source directory, in the events= package:" msgstr "" = -#: tutorial.xml:1296(para) = +#. Tag: programlisting +#: tutorial.xml:885 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:887 +#, no-c-format msgid "The servlet handles HTTP GET requests only, henc= e, the method we implement is doGet():" msgstr "" = -#: tutorial.xml:1326(para) = -msgid "The pattern we are applying here is called session-per-re= quest. When a request hits the servlet, a new Hibernate Session is opened through the first call to getCurrentS= ession() on the SessionFactory. Then a databas= e transaction is started-all data access as to occur inside a transaction, = no matter if data is read or written (we don't use the auto-commit mode in = applications)." +#. Tag: programlisting +#: tutorial.xml:892 +#, no-c-format +msgid "" + "" msgstr "" = -#: tutorial.xml:1335(para) = +#. Tag: para +#: tutorial.xml:894 +#, no-c-format +msgid "The pattern we are applying here is called session-per-re= quest. When a request hits the servlet, a new Hibernate Session is opened through the first call to getCurrentS= ession() on the SessionFactory. Then a databas= e transaction is started—all data access as to occur inside a transac= tion, no matter if data is read or written (we don't use the auto-commit mo= de in applications)." +msgstr "" + +#. Tag: para +#: tutorial.xml:903 +#, no-c-format msgid "Do not use a new Hibernate Session for every database operation. Use one Hibernate Session that is scoped to the whole request. Use getCurrentSession= (), so that it is automatically bound to the current Java thread." msgstr "" = -#: tutorial.xml:1342(para) = +#. Tag: para +#: tutorial.xml:910 +#, no-c-format msgid "Next, the possible actions of the request are processed and the res= ponse HTML is rendered. We'll get to that part soon." msgstr "" = -#: tutorial.xml:1347(para) = -msgid "Finally, the unit of work ends when processing and rendering is com= plete. If any problem occured during processing or rendering, an exception = will be thrown and the database transaction rolled back. This completes the= session-per-request pattern. Instead of the transaction= demarcation code in every servlet you could also write a servlet filter. S= ee the Hibernate website and Wiki for more information about this pattern, = called Open Session in View-you'll need it as soon as = you consider rendering your view in JSP, not in a servlet." +#. Tag: para +#: tutorial.xml:915 +#, no-c-format +msgid "Finally, the unit of work ends when processing and rendering is com= plete. If any problem occurred during processing or rendering, an exception= will be thrown and the database transaction rolled back. This completes th= e session-per-request pattern. Instead of the transactio= n demarcation code in every servlet you could also write a servlet filter. = See the Hibernate website and Wiki for more information about this pattern,= called Open Session in View—you'll need it as s= oon as you consider rendering your view in JSP, not in a servlet." msgstr "" = -#: tutorial.xml:1361(title) = +#. Tag: title +#: tutorial.xml:929 +#, no-c-format msgid "Processing and rendering" msgstr "" = -#: tutorial.xml:1363(para) = +#. Tag: para +#: tutorial.xml:931 +#, no-c-format msgid "Let's implement the processing of the request and rendering of the = page." msgstr "" = -#: tutorial.xml:1394(para) = -msgid "Granted, this coding style with a mix of Java and HTML would not sc= ale in a more complex application-keep in mind that we are only illustratin= g basic Hibernate concepts in this tutorial. The code prints an HTML header= and a footer. Inside this page, an HTML form for event entry and a list of= all events in the database are printed. The first method is trivial and on= ly outputs HTML:" +#. Tag: programlisting +#: tutorial.xml:935 +#, no-c-format +msgid "" + "Event Manager= \");\n" + "\n" + "// Handle actions\n" + "if ( \"store\".equals(request.getParameter(\"action\")) ) {\n" + "\n" + " String eventTitle =3D request.getParameter(\"eventTitle\");\n" + " String eventDate =3D request.getParameter(\"eventDate\");\n" + "\n" + " if ( \"\".equals(eventTitle) || \"\".equals(eventDate) ) {\n" + " out.println(\"Please enter event title and date.<= /b>\");\n" + " } else {\n" + " createAndStoreEvent(eventTitle, dateFormatter.parse(eventDa= te));\n" + " out.println(\"Added event.\");\n" + " }\n" + "}\n" + "\n" + "// Print page\n" + "printEventForm(out);\n" + "listEvents(out, dateFormatter);\n" + "\n" + "// Write HTML footer\n" + "out.println(\"\");\n" + "out.flush();\n" + "out.close();]]>" msgstr "" = -#: tutorial.xml:1412(para) = +#. Tag: para +#: tutorial.xml:937 +#, no-c-format +msgid "Granted, this coding style with a mix of Java and HTML would not sc= ale in a more complex application—keep in mind that we are only illus= trating basic Hibernate concepts in this tutorial. The code prints an HTML = header and a footer. Inside this page, an HTML form for event entry and a l= ist of all events in the database are printed. The first method is trivial = and only outputs HTML:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:946 +#, no-c-format +msgid "" + "Add new event:\");\n" + " out.println(\"
\");\n" + " out.println(\"Title: =
\");\n" + " out.println(\"Date (e.g. 24.12.2009):
\");\n" + " out.println(\"\");\n" + " out.println(\"
\");\n" + "}]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:948 +#, no-c-format msgid "The listEvents() method uses the Hibernate Session
bound to the current thread to execute a query:" msgstr "" = -#: tutorial.xml:1440(para) = +#. Tag: programlisting +#: tutorial.xml:954 +#, no-c-format +msgid "" + " 0) {\n" + " out.println(\"

Events in database:

\");\n" + " out.println(\"\");\n" + " out.println(\"\");\n" + " out.println(\"\");\n" + " out.println(\"\");\n" + " out.println(\"\");\n" + " for (Iterator it =3D result.iterator(); it.hasNext();) {\n" + " Event event =3D (Event) it.next();\n" + " out.println(\"\");\n" + " out.println(\"\");\n" + " out.println(\"\");\n" + " out.println(\"\");\n" + " }\n" + " out.println(\"
Event titleEvent date
\" + event.getTitle() + \"\" + dateFormatter.format(event.getDa= te()) + \"
\");\n" + " }\n" + "}]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:956 +#, no-c-format msgid "Finally, the store action is dispatched to the <= literal>createAndStoreEvent()
method, which also uses the Session of the current thread:" msgstr "" = -#: tutorial.xml:1455(para) = -msgid "That's it, the servlet is complete. A request to the servlet will b= e processed in a single Session and Transaction= . As earlier in the standalone application, Hibernate can automat= ically bind these ojects to the current thread of execution. This gives you= the freedom to layer your code and access the SessionFactory in any way you like. Usually you'd use a more sophisticated design an= d move the data access code into data access objects (the DAO pattern). See= the Hibernate Wiki for more examples." +#. Tag: programlisting +#: tutorial.xml:962 +#, no-c-format +msgid "" + "" msgstr "" = -#: tutorial.xml:1469(title) = +#. Tag: para +#: tutorial.xml:964 +#, no-c-format +msgid "That's it, the servlet is complete. A request to the servlet will b= e processed in a single Session and Transaction= . As earlier in the standalone application, Hibernate can automat= ically bind these objects to the current thread of execution. This gives yo= u the freedom to layer your code and access the SessionFactory in any way you like. Usually you'd use a more sophisticated design a= nd move the data access code into data access objects (the DAO pattern). Se= e the Hibernate Wiki for more examples." +msgstr "" + +#. Tag: title +#: tutorial.xml:978 +#, no-c-format msgid "Deploying and testing" msgstr "" = -#: tutorial.xml:1471(para) = +#. Tag: para +#: tutorial.xml:980 +#, no-c-format msgid "To deploy this application you have to create a web archive, a WAR.= Add the following Ant target to your build.xml:" msgstr "" = -#: tutorial.xml:1486(para) = +#. Tag: programlisting +#: tutorial.xml:985 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:987 +#, no-c-format msgid "This target creates a file called hibernate-tutorial.war in your project directory. It packages all libraries and the web.xml descriptor, which is expected in the base directory o= f your project:" msgstr "" = -#: tutorial.xml:1509(para) = -msgid "Before you compile and deploy the web application, note that an add= itional library is required: jsdk.jar. This is the Java = servlet development kit, if you don't have this library already, get it fro= m the Sun website and copy it to your library directory. However, it will b= e only used for compliation and excluded from the WAR package." +#. Tag: programlisting +#: tutorial.xml:993 +#, no-c-format +msgid "" + "\n" + "\n" + "\n" + " \n" + " Event Manager\n" + " events.EventManagerServlet\n" + " \n" + "\n" + " \n" + " Event Manager\n" + " /eventmanager\n" + " \n" + "]]>" msgstr "" = -#: tutorial.xml:1517(para) = +#. Tag: para +#: tutorial.xml:995 +#, no-c-format +msgid "Before you compile and deploy the web application, note that an add= itional library is required: jsdk.jar. This is the Java = servlet development kit, if you don't have this library already, get it fro= m the Sun website and copy it to your library directory. However, it will b= e only used for compilation and excluded from the WAR package." +msgstr "" + +#. Tag: para +#: tutorial.xml:1003 +#, no-c-format msgid "To build and deploy call ant war in your project= directory and copy the hibernate-tutorial.war file into= your Tomcat webapp directory. If you don't have Tomcat = installed, download it and follow the installation instructions. You don't = have to change any Tomcat configuration to deploy this application though." msgstr "" = -#: tutorial.xml:1525(para) = +#. Tag: para +#: tutorial.xml:1011 +#, no-c-format msgid "Once deployed and Tomcat is running, access the application at http://localhost:8080/hibernate-tutorial/eventmanager. Make = sure you watch the Tomcat log to see Hibernate initialize when the first re= quest hits your servlet (the static initializer in HibernateUtil is called) and to get the detailed output if any exceptions occurs= ." msgstr "" = -#: tutorial.xml:1538(title) = +#. Tag: title +#: tutorial.xml:1024 +#, no-c-format msgid "Summary" msgstr "" = -#: tutorial.xml:1540(para) = +#. Tag: para +#: tutorial.xml:1026 +#, no-c-format msgid "This tutorial covered the basics of writing a simple standalone Hib= ernate application and a small web application." msgstr "" = -#: tutorial.xml:1545(para) = +#. Tag: para +#: tutorial.xml:1031 +#, no-c-format msgid "If you already feel confident with Hibernate, continue browsing thr= ough the reference documentation table of contents for topics you find inte= resting - most asked are transactional processing (), fetch performance (), or the = usage of the API () and the query features= ()." msgstr "" = -#: tutorial.xml:1553(para) = +#. Tag: para +#: tutorial.xml:1039 +#, no-c-format msgid "Don't forget to check the Hibernate website for more (specialized) = tutorials." msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: tutorial.xml:0(None) = -msgid "translator-credits" -msgstr "" - Modified: core/trunk/documentation/manual/src/main/docbook/pot/content/xml.= pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/content/xml.pot 20= 08-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/content/xml.pot 20= 08-05-07 21:02:35 UTC (rev 14653) @@ -1,120 +1,356 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:35-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: xml.xml:5(title) = +#. Tag: title +#: xml.xml:29 +#, no-c-format msgid "XML Mapping" msgstr "" = -#: xml.xml:7(emphasis) = +#. Tag: emphasis +#: xml.xml:31 +#, no-c-format msgid "Note that this is an experimental feature in Hibernate 3.0 and is u= nder extremely active development." msgstr "" = -#: xml.xml:13(title) = +#. Tag: title +#: xml.xml:37 +#, no-c-format msgid "Working with XML data" msgstr "" = -#: xml.xml:15(para) = +#. Tag: para +#: xml.xml:39 +#, no-c-format msgid "Hibernate lets you work with persistent XML data in much the same w= ay you work with persistent POJOs. A parsed XML tree can be thought of as j= ust another way to represent the relational data at the object level, inste= ad of POJOs." msgstr "" = -#: xml.xml:22(para) = +#. Tag: para +#: xml.xml:46 +#, no-c-format msgid "Hibernate supports dom4j as API for manipulating XML trees. You can= write queries that retrieve dom4j trees from the database and have any mod= ification you make to the tree automatically synchronized to the database. = You can even take an XML document, parse it using dom4j, and write it to th= e database with any of Hibernate's basic operations: persist(), sa= veOrUpdate(), merge(), delete(), replicate() (merging is not yet = supported)." msgstr "" = -#: xml.xml:32(para) = +#. Tag: para +#: xml.xml:56 +#, no-c-format msgid "This feature has many applications including data import/export, ex= ternalization of entity data via JMS or SOAP and XSLT-based reporting." msgstr "" = -#: xml.xml:37(para) = +#. Tag: para +#: xml.xml:61 +#, no-c-format msgid "A single mapping may be used to simultaneously map properties of a = class and nodes of an XML document to the database, or, if there is no clas= s to map, it may be used to map just the XML." msgstr "" = -#: xml.xml:44(title) = +#. Tag: title +#: xml.xml:68 +#, no-c-format msgid "Specifying XML and class mapping together" msgstr "" = -#: xml.xml:46(para) = +#. Tag: para +#: xml.xml:70 +#, no-c-format msgid "Here is an example of mapping a POJO and XML simultaneously:" msgstr "" = -#: xml.xml:73(title) = +#. Tag: programlisting +#: xml.xml:74 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: xml.xml:78 +#, no-c-format msgid "Specifying only an XML mapping" msgstr "" = -#: xml.xml:75(para) = +#. Tag: para +#: xml.xml:80 +#, no-c-format msgid "Here is an example where there is no POJO class:" msgstr "" = -#: xml.xml:103(para) = +#. Tag: programlisting +#: xml.xml:84 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: xml.xml:86 +#, no-c-format msgid "This mapping allows you to access the data as a dom4j tree, or as a= graph of property name/value pairs (java Maps). The pro= perty names are purely logical constructs that may be referred to in HQL qu= eries." msgstr "" = -#: xml.xml:114(title) = +#. Tag: title +#: xml.xml:97 +#, no-c-format msgid "XML mapping metadata" msgstr "" = -#: xml.xml:116(para) = +#. Tag: para +#: xml.xml:99 +#, no-c-format msgid "Many Hibernate mapping elements accept the node = attribute. This let's you specify the name of an XML attribute or element t= hat holds the property or entity data. The format of the node attribute must be one of the following:" msgstr "" = -#: xml.xml:125(para) = +#. Tag: para +#: xml.xml:108 +#, no-c-format msgid "\"element-name\" - map to the named XML element" msgstr "" = -#: xml.xml:128(para) = +#. Tag: para +#: xml.xml:111 +#, no-c-format msgid "\"@attribute-name\" - map to the named XML attri= bute" msgstr "" = -#: xml.xml:131(para) = +#. Tag: para +#: xml.xml:114 +#, no-c-format msgid "\".\" - map to the parent element" msgstr "" = -#: xml.xml:134(para) = +#. Tag: para +#: xml.xml:117 +#, no-c-format msgid "\"element-name/@attribute-name\" - map to the na= med attribute of the named element" msgstr "" = -#: xml.xml:141(para) = +#. Tag: para +#: xml.xml:124 +#, no-c-format msgid "For collections and single valued associations, there is an additio= nal embed-xml attribute. If embed-xml=3D\"true\= ", the default, the XML tree for the associated entity (or collec= tion of value type) will be embedded directly in the XML tree for the entit= y that owns the association. Otherwise, if embed-xml=3D\"false\", then only the referenced identifier value will appear in the XML = for single point associations and collections will simply not appear at all= ." msgstr "" = -#: xml.xml:151(para) = +#. Tag: para +#: xml.xml:134 +#, no-c-format msgid "You should be careful not to leave embed-xml=3D\"true\" for too many associations, since XML does not deal well with circul= arity!" msgstr "" = -#: xml.xml:191(para) = +#. Tag: programlisting +#: xml.xml:139 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: xml.xml:141 +#, no-c-format msgid "in this case, we have decided to embed the collection of account id= s, but not the actual account data. The following HQL query:" msgstr "" = -#: xml.xml:198(para) = +#. Tag: programlisting +#: xml.xml:146 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: xml.xml:148 +#, no-c-format msgid "Would return datasets such as this:" msgstr "" = -#: xml.xml:213(para) = +#. Tag: programlisting +#: xml.xml:152 +#, no-c-format +msgid "" + "\n" + " 987632567\n" + " 985612323\n" + " \n" + " Gavin\n" + " A\n" + " King\n" + " \n" + " ...\n" + "]]>" +msgstr "" + +#. Tag: para +#: xml.xml:154 +#, no-c-format msgid "If you set embed-xml=3D\"true\" on the = <one-to-many> mapping, the data might look more like this:" msgstr "" = -#: xml.xml:239(title) = +#. Tag: programlisting +#: xml.xml:159 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " 100.29\n" + " \n" + " \n" + " \n" + " -2370.34\n" + " \n" + " \n" + " Gavin\n" + " A\n" + " King\n" + " \n" + " ...\n" + "]]>" +msgstr "" + +#. Tag: title +#: xml.xml:165 +#, no-c-format msgid "Manipulating XML data" msgstr "" = -#: xml.xml:241(para) = +#. Tag: para +#: xml.xml:167 +#, no-c-format msgid "Let's rearead and update XML documents in the application. We do th= is by obtaining a dom4j session:" msgstr "" = -#: xml.xml:281(para) = -msgid "It is extremely useful to combine this feature with Hibernate's replicate() operation to implement XML-based data import/ex= port." +#. Tag: programlisting +#: xml.xml:172 +#, no-c-format +msgid "" + "" msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: xml.xml:0(None) = -msgid "translator-credits" +#. Tag: programlisting +#: xml.xml:174 +#, no-c-format +msgid "" + "" msgstr "" = +#. Tag: para +#: xml.xml:176 +#, no-c-format +msgid "It is extremely useful to combine this feature with Hibernate's replicate() operation to implement XML-based data import/ex= port." +msgstr "" + Modified: core/trunk/documentation/manual/src/main/docbook/pot/legal_notice= .pot =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/documentation/manual/src/main/docbook/pot/legal_notice.pot 2= 008-05-07 20:59:35 UTC (rev 14652) +++ core/trunk/documentation/manual/src/main/docbook/pot/legal_notice.pot 2= 008-05-07 21:02:35 UTC (rev 14653) @@ -1,96 +1,58 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2007-10-19 10:26-0500\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=3DUTF-8\n" +"Content-Type: application/x-xml2pot; charset=3DUTF-8\n" "Content-Transfer-Encoding: 8bit\n" = -#: ./legal_notice.xml:20(title) = +#. Tag: title +#: legal_notice.xml:28 +#, no-c-format msgid "Legal Notice" msgstr "" = -#: ./legal_notice.xml:23(street) = -msgid "1801 Varsity Drive" +#. Tag: address +#: legal_notice.xml:30 +#, no-c-format +msgid "1801 Varsity Drive Raleigh, NC= 27606-2072USA Phone:= +1 919 754 3700 Phone: 888 733 4281 Fax: +1 91= 9 754 3701 PO Box 13588Research Triangle Park= , NC27709USA" msgstr "" = -#: ./legal_notice.xml:24(city) = -msgid "Raleigh" +#. Tag: para +#: legal_notice.xml:39 +#, no-c-format +msgid "Copyright 2007 by Red= Hat, Inc. This copyrighted material is made available to anyone wishing to= use, modify, copy, or redistribute it subject to the terms and conditions = of the GNU Lesse= r General Public License, as published by the Free Software Foundat= ion." msgstr "" = -#: ./legal_notice.xml:24(state) ./legal_notice.xml:28(state) = -msgid "NC" -msgstr "" - -#: ./legal_notice.xml:24(postcode) = -msgid "27606-2072" -msgstr "" - -#: ./legal_notice.xml:24(country) ./legal_notice.xml:28(country) = -msgid "USA" -msgstr "" - -#: ./legal_notice.xml:25(phone) = -msgid "Phone: +1 919 754 3700" -msgstr "" - -#: ./legal_notice.xml:26(phone) = -msgid "Phone: 888 733 4281" -msgstr "" - -#: ./legal_notice.xml:27(fax) = -msgid "Fax: +1 919 754 3701" -msgstr "" - -#: ./legal_notice.xml:28(pob) = -msgid "PO Box 13588" -msgstr "" - -#: ./legal_notice.xml:28(city) = -msgid "Research Triangle Park" -msgstr "" - -#: ./legal_notice.xml:28(postcode) = -msgid "27709" -msgstr "" - -#: ./legal_notice.xml:22(address) = -msgid ", <= placeholder-5/>, " -msgstr "" - -#: ./legal_notice.xml:31(para) = -msgid "Copyright 2007 by Red Hat, Inc. = This material may be distributed only subject to the terms and conditions s= et forth in the Open Publication License, V1.0 or later (the latest version= is presently available at http://www.opencontent.org/openpub/)." -msgstr "" - -#: ./legal_notice.xml:34(para) = -msgid "Distribution of substantively modified versions of this document is= prohibited without the explicit permission of the copyright holder." -msgstr "" - -#: ./legal_notice.xml:37(para) = -msgid "Distribution of the work or derivative of the work in any standard = (paper) book form for commercial purposes is prohibited unless prior permis= sion is obtained from the copyright holder." -msgstr "" - -#: ./legal_notice.xml:40(para) = +#. Tag: para +#: legal_notice.xml:45 +#, no-c-format msgid "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademar= ks of Red Hat, Inc. in the United States and other countries." msgstr "" = -#: ./legal_notice.xml:43(para) = +#. Tag: para +#: legal_notice.xml:48 +#, no-c-format msgid "All other trademarks referenced herein are the property of their re= spective owners." msgstr "" = -#: ./legal_notice.xml:46(para) = +#. Tag: para +#: legal_notice.xml:51 +#, no-c-format msgid "The GPG fingerprint of the security(a)redhat.com key is:" msgstr "" = -#: ./legal_notice.xml:49(para) = +#. Tag: para +#: legal_notice.xml:54 +#, no-c-format msgid "CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E" msgstr "" = -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: ./legal_notice.xml:0(None) = -msgid "translator-credits" -msgstr "" - --===============2751703871400288007==-- From hibernate-commits at lists.jboss.org Thu May 8 14:35:31 2008 Content-Type: multipart/mixed; boundary="===============6782857483277230832==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14654 - in search/trunk/src: java/org/hibernate/search/backend/impl and 21 other directories. Date: Thu, 08 May 2008 14:35:30 -0400 Message-ID: --===============6782857483277230832== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-08 14:35:30 -0400 (Thu, 08 May 2008) New Revision: 14654 Modified: search/trunk/src/java/org/hibernate/search/backend/Workspace.java search/trunk/src/java/org/hibernate/search/backend/impl/BatchedQueueingP= rocessor.java search/trunk/src/java/org/hibernate/search/backend/impl/jms/JMSBackendQu= eueProcessorFactory.java search/trunk/src/java/org/hibernate/search/bridge/BridgeFactory.java search/trunk/src/java/org/hibernate/search/bridge/builtin/BooleanBridge.= java search/trunk/src/java/org/hibernate/search/bridge/builtin/DateBridge.java search/trunk/src/java/org/hibernate/search/engine/DocumentBuilder.java search/trunk/src/java/org/hibernate/search/event/FullTextIndexEventListe= ner.java search/trunk/src/java/org/hibernate/search/jpa/impl/FullTextQueryImpl.ja= va search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java search/trunk/src/java/org/hibernate/search/reader/NotSharedReaderProvide= r.java search/trunk/src/java/org/hibernate/search/reader/ReaderProviderHelper.j= ava search/trunk/src/java/org/hibernate/search/reader/SharedReaderProvider.j= ava search/trunk/src/java/org/hibernate/search/store/DirectoryProviderFactor= y.java search/trunk/src/java/org/hibernate/search/store/DirectoryProviderHelper= .java search/trunk/src/test/org/hibernate/search/test/FSDirectoryTest.java search/trunk/src/test/org/hibernate/search/test/bridge/PaddedIntegerBrid= ge.java search/trunk/src/test/org/hibernate/search/test/directoryProvider/FSSlav= eAndMasterDPTest.java search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/Ad= dress.java search/trunk/src/test/org/hibernate/search/test/filter/Driver.java search/trunk/src/test/org/hibernate/search/test/jpa/EntityManagerSeriali= zationTest.java search/trunk/src/test/org/hibernate/search/test/jpa/JPATestCase.java search/trunk/src/test/org/hibernate/search/test/optimizer/OptimizerTestC= ase.java search/trunk/src/test/org/hibernate/search/test/query/LuceneQuerySortTes= t.java search/trunk/src/test/org/hibernate/search/test/reader/ReaderPerfTestCas= e.java search/trunk/src/test/org/hibernate/search/test/session/OptimizeTest.java search/trunk/src/test/org/hibernate/search/test/shards/ShardsTest.java search/trunk/src/test/org/hibernate/search/test/worker/WorkerTestCase.ja= va Log: Fix some things after code inspection Modified: search/trunk/src/java/org/hibernate/search/backend/Workspace.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/backend/Workspace.java 2008-= 05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/java/org/hibernate/search/backend/Workspace.java 2008-= 05-08 18:35:30 UTC (rev 14654) @@ -68,6 +68,7 @@ * retrieve a read write IndexReader * For a given DirectoryProvider, An IndexReader must be used before an I= ndexWriter */ + @SuppressWarnings( { "ThrowableInstanceNeverThrown" } ) public IndexReader getIndexReader(DirectoryProvider provider, Class entit= y) { //one cannot access a reader for update after a writer has been accessed if ( writers.containsKey( provider ) ) @@ -95,6 +96,7 @@ * retrieve a read write IndexWriter * For a given DirectoryProvider, An IndexReader must be used before an I= ndexWriter */ + @SuppressWarnings( { "ThrowableInstanceNeverThrown" } ) public IndexWriter getIndexWriter(DirectoryProvider provider, Class entit= y, boolean modificationOperation) { //one has to close a reader for update before a writer is accessed IndexReader reader =3D readers.get( provider ); Modified: search/trunk/src/java/org/hibernate/search/backend/impl/BatchedQu= eueingProcessor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/backend/impl/BatchedQueueing= Processor.java 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/java/org/hibernate/search/backend/impl/BatchedQueueing= Processor.java 2008-05-08 18:35:30 UTC (rev 14654) @@ -174,9 +174,8 @@ = public boolean isRightLayer(WorkType type) { if (this =3D=3D FIRST && type !=3D WorkType.COLLECTION) return true; - if (this =3D=3D SECOND && type =3D=3D WorkType.COLLECTION) return true; - return false; - } + return this =3D=3D SECOND && type =3D=3D WorkType.COLLECTION; + } } = } Modified: search/trunk/src/java/org/hibernate/search/backend/impl/jms/JMSBa= ckendQueueProcessorFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/backend/impl/jms/JMSBackendQ= ueueProcessorFactory.java 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/java/org/hibernate/search/backend/impl/jms/JMSBackendQ= ueueProcessorFactory.java 2008-05-08 18:35:30 UTC (rev 14654) @@ -87,7 +87,7 @@ } } = - public static Properties getJndiProperties(Properties properties) { + private static Properties getJndiProperties(Properties properties) { = HashSet specialProps =3D new HashSet(); specialProps.add( JNDI_PREFIX + "class" ); Modified: search/trunk/src/java/org/hibernate/search/bridge/BridgeFactory.j= ava =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/bridge/BridgeFactory.java 20= 08-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/java/org/hibernate/search/bridge/BridgeFactory.java 20= 08-05-08 18:35:30 UTC (rev 14654) @@ -150,7 +150,7 @@ } = public static FieldBridge guessType(Field field, XMember member, Reflecti= onManager reflectionManager) { - FieldBridge bridge =3D null; + FieldBridge bridge; org.hibernate.search.annotations.FieldBridge bridgeAnn; //@Field bridge has priority over @FieldBridge if ( field !=3D null && void.class !=3D field.bridge().impl() ) { Modified: search/trunk/src/java/org/hibernate/search/bridge/builtin/Boolean= Bridge.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/bridge/builtin/BooleanBridge= .java 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/java/org/hibernate/search/bridge/builtin/BooleanBridge= .java 2008-05-08 18:35:30 UTC (rev 14654) @@ -20,7 +20,7 @@ public String objectToString(Object object) { return object =3D=3D null ? null : - ( (Boolean) object ).toString(); + object.toString(); } } = Modified: search/trunk/src/java/org/hibernate/search/bridge/builtin/DateBri= dge.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/bridge/builtin/DateBridge.ja= va 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/java/org/hibernate/search/bridge/builtin/DateBridge.ja= va 2008-05-08 18:35:30 UTC (rev 14654) @@ -43,7 +43,7 @@ public static final TwoWayStringBridge DATE_SECOND =3D new DateBridge( Re= solution.SECOND ); public static final TwoWayStringBridge DATE_MILLISECOND =3D new DateBridg= e( Resolution.MILLISECOND ); = - DateTools.Resolution resolution; + private DateTools.Resolution resolution; = public DateBridge() { } Modified: search/trunk/src/java/org/hibernate/search/engine/DocumentBuilder= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/engine/DocumentBuilder.java = 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/java/org/hibernate/search/engine/DocumentBuilder.java = 2008-05-08 18:35:30 UTC (rev 14654) @@ -261,9 +261,8 @@ propertiesMetadata.fieldIndex.add( getIndex( Index.UN_TOKENIZED ) ); propertiesMetadata.fieldTermVectors.add( getTermVector( TermVector.NO = ) ); propertiesMetadata.fieldBridges.add( BridgeFactory.guessType( null, me= mber, reflectionManager ) ); - // Field > property > entity analyzer - Analyzer analyzer =3D null; //no field analyzer - if ( analyzer =3D=3D null ) analyzer =3D getAnalyzer( member, context = ); + // property > entity analyzer (no field analyzer) + Analyzer analyzer =3D getAnalyzer( member, context ); if ( analyzer =3D=3D null ) analyzer =3D propertiesMetadata.analyzer; if ( analyzer =3D=3D null ) throw new AssertionFailure( "Analizer shou= ld not be undefined" ); this.analyzer.addScopedAnalyzer( fieldName, analyzer ); Modified: search/trunk/src/java/org/hibernate/search/event/FullTextIndexEve= ntListener.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/event/FullTextIndexEventList= ener.java 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/java/org/hibernate/search/event/FullTextIndexEventList= ener.java 2008-05-08 18:35:30 UTC (rev 14654) @@ -35,6 +35,7 @@ public class FullTextIndexEventListener implements PostDeleteEventListener= , PostInsertEventListener, PostUpdateEventListener, Initializable { = + @SuppressWarnings( { "WeakerAccess" } ) protected boolean used; protected SearchFactoryImplementor searchFactoryImplementor; = @@ -83,6 +84,7 @@ } } = + @SuppressWarnings( { "WeakerAccess" } ) protected void processWork(Object entity, Serializable id, WorkType workT= ype, AbstractEvent event) { Work work =3D new Work(entity, id, workType); searchFactoryImplementor.getWorker().performWork( work, event.getSession= () ); Modified: search/trunk/src/java/org/hibernate/search/jpa/impl/FullTextQuery= Impl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/jpa/impl/FullTextQueryImpl.j= ava 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/java/org/hibernate/search/jpa/impl/FullTextQueryImpl.j= ava 2008-05-08 18:35:30 UTC (rev 14654) @@ -105,6 +105,7 @@ } = //TODO mutualize this code with the EM this will fix the rollback issues + @SuppressWarnings( { "ThrowableInstanceNeverThrown" } ) private void throwPersistenceException(Exception e) { if ( e instanceof StaleStateException ) { PersistenceException pe =3D wrapStaleStateException( (StaleStateExcepti= on) e ); @@ -135,14 +136,15 @@ } } = - public void throwPersistenceException(PersistenceException e) { + void throwPersistenceException(PersistenceException e) { if ( ! ( e instanceof NoResultException || e instanceof NonUniqueResultE= xception ) ) { //FIXME rollback } throw e; } = - public PersistenceException wrapStaleStateException(StaleStateException e= ) { + @SuppressWarnings( { "ThrowableInstanceNeverThrown" } ) + PersistenceException wrapStaleStateException(StaleStateException e) { PersistenceException pe; if ( e instanceof StaleObjectStateException ) { StaleObjectStateException sose =3D (StaleObjectStateException) e; @@ -167,6 +169,7 @@ return pe; } = + @SuppressWarnings( { "ThrowableInstanceNeverThrown" } ) public Object getSingleResult() { try { List result =3D query.list(); Modified: search/trunk/src/java/org/hibernate/search/query/FullTextQueryImp= l.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java= 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java= 2008-05-08 18:35:30 UTC (rev 14654) @@ -487,7 +487,6 @@ } = private void closeSearcher(Searcher searcher, ReaderProvider readerProvid= er) { - boolean trace =3D log.isTraceEnabled(); Set indexReaders =3D getIndexReaders( searcher ); = for (IndexReader indexReader : indexReaders) { Modified: search/trunk/src/java/org/hibernate/search/reader/NotSharedReader= Provider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/reader/NotSharedReaderProvid= er.java 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/java/org/hibernate/search/reader/NotSharedReaderProvid= er.java 2008-05-08 18:35:30 UTC (rev 14654) @@ -17,6 +17,7 @@ * @author Emmanuel Bernard */ public class NotSharedReaderProvider implements ReaderProvider { + @SuppressWarnings( { "ThrowableInstanceNeverThrown" } ) public IndexReader openReader(DirectoryProvider[] directoryProviders) { final int length =3D directoryProviders.length; IndexReader[] readers =3D new IndexReader[length]; @@ -33,6 +34,7 @@ } = = + @SuppressWarnings( { "ThrowableInstanceNeverThrown" } ) public void closeReader(IndexReader reader) { try { reader.close(); Modified: search/trunk/src/java/org/hibernate/search/reader/ReaderProviderH= elper.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/reader/ReaderProviderHelper.= java 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/java/org/hibernate/search/reader/ReaderProviderHelper.= java 2008-05-08 18:35:30 UTC (rev 14654) @@ -15,6 +15,7 @@ * @author Emmanuel Bernard */ public abstract class ReaderProviderHelper { + @SuppressWarnings( { "ThrowableInstanceNeverThrown" } ) public static IndexReader buildMultiReader(int length, IndexReader[] read= ers) { if ( length =3D=3D 0 ) { return null; Modified: search/trunk/src/java/org/hibernate/search/reader/SharedReaderPro= vider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/reader/SharedReaderProvider.= java 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/java/org/hibernate/search/reader/SharedReaderProvider.= java 2008-05-08 18:35:30 UTC (rev 14654) @@ -121,6 +121,7 @@ return buildMultiReader( length, readers ); } = + @SuppressWarnings( { "ThrowableInstanceNeverThrown" } ) private IndexReader replaceActiveReader(IndexReader outOfDateReader, Lock= directoryProviderLock, DirectoryProvider directoryProvider, IndexReader[] = readers) { boolean trace =3D log.isTraceEnabled(); IndexReader oldReader; Modified: search/trunk/src/java/org/hibernate/search/store/DirectoryProvide= rFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/store/DirectoryProviderFacto= ry.java 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/java/org/hibernate/search/store/DirectoryProviderFacto= ry.java 2008-05-08 18:35:30 UTC (rev 14654) @@ -46,7 +46,7 @@ * @author Hardy Ferentschik */ public class DirectoryProviderFactory { - public List> providers =3D new ArrayList>(); + private List> providers =3D new ArrayList>(); private static String LUCENE_PREFIX =3D "hibernate.search."; private static String LUCENE_DEFAULT =3D LUCENE_PREFIX + "default."; private static String DEFAULT_DIRECTORY_PROVIDER =3D FSDirectoryProvider.= class.getName(); Modified: search/trunk/src/java/org/hibernate/search/store/DirectoryProvide= rHelper.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/store/DirectoryProviderHelpe= r.java 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/java/org/hibernate/search/store/DirectoryProviderHelpe= r.java 2008-05-08 18:35:30 UTC (rev 14654) @@ -38,8 +38,8 @@ File sourceDirectory; if ( log.isTraceEnabled() ) { log.trace( - "Guess source directory from " + ROOTINDEX_PROP_NAME + " " + root != =3D null ? root : "" - + " and " + RELATIVEINDEX_PROP_NAME + " " + relative !=3D null ? re= lative : "" + "Guess source directory from " + ROOTINDEX_PROP_NAME + " " + ( root != =3D null ? root : "" ) + + " and " + RELATIVEINDEX_PROP_NAME + " " + (relative !=3D null ? r= elative : "") ); } if ( relative =3D=3D null ) relative =3D directoryProviderName; Modified: search/trunk/src/test/org/hibernate/search/test/FSDirectoryTest.j= ava =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/test/org/hibernate/search/test/FSDirectoryTest.java 20= 08-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/test/org/hibernate/search/test/FSDirectoryTest.java 20= 08-05-08 18:35:30 UTC (rev 14654) @@ -45,8 +45,7 @@ = private File getBaseIndexDir() { File current =3D new File( "." ); - File sub =3D new File( current, "indextemp" ); - return sub; + return new File( current, "indextemp" ); } = protected void tearDown() throws Exception { Modified: search/trunk/src/test/org/hibernate/search/test/bridge/PaddedInte= gerBridge.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/test/org/hibernate/search/test/bridge/PaddedIntegerBri= dge.java 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/test/org/hibernate/search/test/bridge/PaddedIntegerBri= dge.java 2008-05-08 18:35:30 UTC (rev 14654) @@ -29,7 +29,7 @@ } = public String objectToString(Object object) { - String rawInteger =3D ( (Integer) object ).toString(); + String rawInteger =3D object.toString(); if (rawInteger.length() > padding) throw new IllegalArgumentException( "= Try to pad on a number too big" ); StringBuilder paddedInteger =3D new StringBuilder( ); for ( int padIndex =3D rawInteger.length() ; padIndex < padding ; padInd= ex++ ) { Modified: search/trunk/src/test/org/hibernate/search/test/directoryProvider= /FSSlaveAndMasterDPTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/test/org/hibernate/search/test/directoryProvider/FSSla= veAndMasterDPTest.java 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/test/org/hibernate/search/test/directoryProvider/FSSla= veAndMasterDPTest.java 2008-05-08 18:35:30 UTC (rev 14654) @@ -22,6 +22,7 @@ */ public class FSSlaveAndMasterDPTest extends MultipleSFTestCase { = + @SuppressWarnings( { "PointlessArithmeticExpression" } ) public void testProperCopy() throws Exception { Session s1 =3D getSessionFactories()[0].openSession( ); SnowStorm sn =3D new SnowStorm(); Modified: search/trunk/src/test/org/hibernate/search/test/embedded/doublein= sert/Address.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/A= ddress.java 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/A= ddress.java 2008-05-08 18:35:30 UTC (rev 14654) @@ -196,9 +196,8 @@ if ( ! equals(this.getCounty(), that.getCounty() ) ) return false; if ( ! equals(this.getTown(), that.getTown() ) ) return false; if ( ! equals(this.getPostcode(), that.getPostcode() ) ) return false; - if ( ! equals(this.getContact(), that.getContact() ) ) return false; - return true; -// EqualsBuilder equalsBuilder =3D new EqualsBuilder(); + return equals( this.getContact(), that.getContact() ); + // EqualsBuilder equalsBuilder =3D new EqualsBuilder(); // return equalsBuilder.append(new Object[]{this.getAddress1(), this.getA= ddress2(), this.getCounty(), this.getTown(), this.getPostcode(), this.conta= ct}, new Object[]{address.getAddress1(), address.getAddress2(), address.get= County(), address.getTown(), address.getPostcode(), address.getContact()}).= isEquals(); } = Modified: search/trunk/src/test/org/hibernate/search/test/filter/Driver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/test/org/hibernate/search/test/filter/Driver.java 2008= -05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/test/org/hibernate/search/test/filter/Driver.java 2008= -05-08 18:35:30 UTC (rev 14654) @@ -88,10 +88,9 @@ if ( score !=3D driver.score ) return false; if ( delivery !=3D null ? !delivery.equals( driver.delivery ) : driver.d= elivery !=3D null ) return false; if ( name !=3D null ? !name.equals( driver.name ) : driver.name !=3D nul= l ) return false; - if ( teacher !=3D null ? !teacher.equals( driver.teacher ) : driver.teac= her !=3D null ) return false; + return !( teacher !=3D null ? !teacher.equals( driver.teacher ) : driver= .teacher !=3D null ); = - return true; - } + } = public int hashCode() { int result; Modified: search/trunk/src/test/org/hibernate/search/test/jpa/EntityManager= SerializationTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/test/org/hibernate/search/test/jpa/EntityManagerSerial= izationTest.java 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/test/org/hibernate/search/test/jpa/EntityManagerSerial= izationTest.java 2008-05-08 18:35:30 UTC (rev 14654) @@ -81,7 +81,7 @@ = public Class[] getAnnotatedClasses() { return new Class[] { Bretzel.class }; - }; + } = /** * Helper method for testing the entity manager before and after Modified: search/trunk/src/test/org/hibernate/search/test/jpa/JPATestCase.j= ava =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/test/org/hibernate/search/test/jpa/JPATestCase.java 20= 08-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/test/org/hibernate/search/test/jpa/JPATestCase.java 20= 08-05-08 18:35:30 UTC (rev 14654) @@ -4,7 +4,7 @@ import java.util.Map; import java.util.HashMap; import java.util.Properties; -import java.util.ArrayList; +import java.util.ArrayList;import java.util.Arrays; import java.io.InputStream; import java.io.IOException; import javax.persistence.EntityManagerFactory; @@ -77,9 +77,7 @@ Map config =3D loadProperties(); ArrayList classes =3D new ArrayList(); = - for ( Class clazz : getAnnotatedClasses() ) { - classes.add( clazz ); - } + classes.addAll( Arrays.asList( getAnnotatedClasses() ) ); config.put( HibernatePersistence.LOADED_CLASSES, classes ); for ( Map.Entry entry : getCachedClasses().entrySet() ) { config.put( @@ -95,9 +93,7 @@ } if ( getEjb3DD().length > 0 ) { ArrayList dds =3D new ArrayList(); - for ( String dd : getEjb3DD() ) { - dds.add( dd ); - } + dds.addAll( Arrays.asList( getEjb3DD() ) ); config.put( HibernatePersistence.XML_FILE_NAMES, dds ); } = Modified: search/trunk/src/test/org/hibernate/search/test/optimizer/Optimiz= erTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/test/org/hibernate/search/test/optimizer/OptimizerTest= Case.java 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/test/org/hibernate/search/test/optimizer/OptimizerTest= Case.java 2008-05-08 18:35:30 UTC (rev 14654) @@ -37,6 +37,7 @@ buildSessionFactory( getMappings(), getAnnotatedPackages(), getXmlFiles(= ) ); } = + @SuppressWarnings( { "UnnecessaryLocalVariable" } ) private File getBaseIndexDir() { File current =3D new File( "." ); File sub =3D new File( current, "indextemp" ); Modified: search/trunk/src/test/org/hibernate/search/test/query/LuceneQuery= SortTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/test/org/hibernate/search/test/query/LuceneQuerySortTe= st.java 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/test/org/hibernate/search/test/query/LuceneQuerySortTe= st.java 2008-05-08 18:35:30 UTC (rev 14654) @@ -116,7 +116,7 @@ private void createTestBooks(FullTextSession s) { Transaction tx =3D s.beginTransaction(); Calendar cal =3D Calendar.getInstance( ); - cal.set( 2007, 07, 25, 11, 20, 30); + cal.set( 2007, 7, 25, 11, 20, 30); Book book =3D new Book(1, "Hibernate & Lucene", "This is a test book."); book.setPublicationDate( cal.getTime() ); s.save(book); Modified: search/trunk/src/test/org/hibernate/search/test/reader/ReaderPerf= TestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/test/org/hibernate/search/test/reader/ReaderPerfTestCa= se.java 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/test/org/hibernate/search/test/reader/ReaderPerfTestCa= se.java 2008-05-08 18:35:30 UTC (rev 14654) @@ -52,8 +52,7 @@ = private File getBaseIndexDir() { File current =3D new File( "." ); - File sub =3D new File( current, "indextemp" ); - return sub; + return new File( current, "indextemp" ); } = protected void tearDown() throws Exception { Modified: search/trunk/src/test/org/hibernate/search/test/session/OptimizeT= est.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/test/org/hibernate/search/test/session/OptimizeTest.ja= va 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/test/org/hibernate/search/test/session/OptimizeTest.ja= va 2008-05-08 18:35:30 UTC (rev 14654) @@ -76,8 +76,7 @@ = private File getBaseIndexDir() { File current =3D new File( "." ); - File sub =3D new File( current, "indextemp" ); - return sub; + return new File( current, "indextemp" ); } = protected void tearDown() throws Exception { Modified: search/trunk/src/test/org/hibernate/search/test/shards/ShardsTest= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/test/org/hibernate/search/test/shards/ShardsTest.java = 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/test/org/hibernate/search/test/shards/ShardsTest.java = 2008-05-08 18:35:30 UTC (rev 14654) @@ -167,8 +167,7 @@ = private File getBaseIndexDir() { File current =3D new File( "." ); - File sub =3D new File( current, "indextemp" ); - return sub; + return new File( current, "indextemp" ); } = protected void tearDown() throws Exception { Modified: search/trunk/src/test/org/hibernate/search/test/worker/WorkerTest= Case.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/test/org/hibernate/search/test/worker/WorkerTestCase.j= ava 2008-05-07 21:02:35 UTC (rev 14653) +++ search/trunk/src/test/org/hibernate/search/test/worker/WorkerTestCase.j= ava 2008-05-08 18:35:30 UTC (rev 14654) @@ -42,8 +42,7 @@ = private File getBaseIndexDir() { File current =3D new File( "." ); - File sub =3D new File( current, "indextemp" ); - return sub; + return new File( current, "indextemp" ); } = protected void tearDown() throws Exception { --===============6782857483277230832==-- From hibernate-commits at lists.jboss.org Fri May 9 13:07:32 2008 Content-Type: multipart/mixed; boundary="===============2091326874681622064==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14655 - core/branches/Branch_3_2_4_SP1_CP. Date: Fri, 09 May 2008 13:07:31 -0400 Message-ID: --===============2091326874681622064== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: gbadner Date: 2008-05-09 13:07:31 -0400 (Fri, 09 May 2008) New Revision: 14655 Modified: core/branches/Branch_3_2_4_SP1_CP/build.xml Log: change Javadoc source and link arguments to be consistent with javac (-sour= ce=3D1.4) Modified: core/branches/Branch_3_2_4_SP1_CP/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_2_4_SP1_CP/build.xml 2008-05-08 18:35:30 UTC (re= v 14654) +++ core/branches/Branch_3_2_4_SP1_CP/build.xml 2008-05-09 17:07:31 UTC (re= v 14655) @@ -59,7 +59,7 @@ = - + @@ -778,6 +778,7 @@ windowtitle=3D"${Name} API Documentation" Overview=3D"${dir.doc.api}/package.html" stylesheetfile=3D"${dir.doc.api}/jdstyle.css" + source=3D"${javac.source}" link=3D"${javadoc.url.jse}"> --===============2091326874681622064==-- From hibernate-commits at lists.jboss.org Fri May 9 19:23:30 2008 Content-Type: multipart/mixed; boundary="===============6381258290745872795==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14656 - in core/trunk: core/src/main/java/org/hibernate/type and 1 other directories. Date: Fri, 09 May 2008 19:23:30 -0400 Message-ID: --===============6381258290745872795== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: gbadner Date: 2008-05-09 19:23:29 -0400 (Fri, 09 May 2008) New Revision: 14656 Added: core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/A.java core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/G.java core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/H.java core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/MultiPathC= ascade.hbm.xml core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/MultiPathC= ascadeTest.java Modified: core/trunk/core/src/main/java/org/hibernate/event/def/DefaultMergeEventL= istener.java core/trunk/core/src/main/java/org/hibernate/type/EntityType.java core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/CascadeSui= te.java Log: HHH-3229 : Cascade merge transient entities regardless of property traversa= l order Modified: core/trunk/core/src/main/java/org/hibernate/event/def/DefaultMerg= eEventListener.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/core/src/main/java/org/hibernate/event/def/DefaultMergeEvent= Listener.java 2008-05-09 17:07:31 UTC (rev 14655) +++ core/trunk/core/src/main/java/org/hibernate/event/def/DefaultMergeEvent= Listener.java 2008-05-09 23:23:29 UTC (rev 14656) @@ -1,24 +1,28 @@ -//$Id: DefaultMergeEventListener.java 10784 2006-11-11 05:13:01Z steve.ebe= rsole(a)jboss.com $ +//$Id: DefaultMergeEventListener.java 14513 2008-04-17 23:05:11Z gbadner $ package org.hibernate.event.def; = import java.io.Serializable; +import java.util.Iterator; import java.util.Map; = import org.slf4j.Logger; import org.slf4j.LoggerFactory; + import org.hibernate.AssertionFailure; import org.hibernate.HibernateException; import org.hibernate.ObjectDeletedException; import org.hibernate.StaleObjectStateException; +import org.hibernate.TransientObjectException; import org.hibernate.WrongClassException; import org.hibernate.engine.Cascade; import org.hibernate.engine.CascadingAction; +import org.hibernate.engine.EntityEntry; +import org.hibernate.engine.EntityKey; +import org.hibernate.engine.SessionImplementor; +import org.hibernate.engine.Status; import org.hibernate.event.EventSource; import org.hibernate.event.MergeEvent; import org.hibernate.event.MergeEventListener; -import org.hibernate.engine.SessionImplementor; -import org.hibernate.engine.EntityEntry; -import org.hibernate.engine.EntityKey; import org.hibernate.intercept.FieldInterceptionHelper; import org.hibernate.intercept.FieldInterceptor; import org.hibernate.persister.entity.EntityPersister; @@ -43,14 +47,33 @@ return IdentityMap.invert( (Map) anything ); } = - /** = + /** * Handle the given merge event. * * @param event The merge event to be handled. * @throws HibernateException */ public void onMerge(MergeEvent event) throws HibernateException { - onMerge( event, IdentityMap.instantiate(10) ); + Map copyCache =3D IdentityMap.instantiate(10); + onMerge( event, copyCache ); + for ( Iterator it=3DcopyCache.values().iterator(); it.hasNext(); ) { + Object entity =3D it.next(); + if ( entity instanceof HibernateProxy ) { + entity =3D ( (HibernateProxy) entity ).getHibernateLazyInitializer().g= etImplementation(); + } + EntityEntry entry =3D event.getSession().getPersistenceContext().getEnt= ry( entity ); + if ( entry =3D=3D null ) { + throw new TransientObjectException( + "object references an unsaved transient instance - save the transien= t instance before merging: " + + event.getSession().guessEntityName( entity ) + ); + // TODO: cache the entity name somewhere so that it is available to th= is exception + // entity name will not be available for non-POJO entities + } + if ( entry.getStatus() !=3D Status.MANAGED ) { + throw new AssertionFailure( "Merged entity does not have status set to= MANAGED; "+entry+" status=3D"+entry.getStatus() ); + } + } } = /** = @@ -82,14 +105,13 @@ entity =3D original; } = - if ( copyCache.containsKey(entity) ) { + if ( copyCache.containsKey(entity) && + source.getContextEntityIdentifier( copyCache.get( entity ) ) !=3D nul= l ) { log.trace("already merged"); event.setResult(entity); } else { - event.setEntity( entity ); - int entityState =3D -1; = // Check the persistence context for an entry relating to this @@ -116,7 +138,7 @@ if ( entityState =3D=3D -1 ) { entityState =3D getEntityState( entity, event.getEntityName(), entry,= source ); } - + = switch (entityState) { case DETACHED: entityIsDetached(event, copyCache); @@ -128,7 +150,7 @@ entityIsPersistent(event, copyCache); break; default: //DELETED - throw new ObjectDeletedException( = + throw new ObjectDeletedException( "deleted instance passed to merge", = null, = getLoggableName( event.getEntityName(), entity ) @@ -170,11 +192,16 @@ final Serializable id =3D persister.hasIdentifierProperty() ? persister.getIdentifier( entity, source.getEntityMode() ) : null; + if ( copyCache.containsKey( entity ) ) { + persister.setIdentifier( copyCache.get( entity ), id, source.getEntityM= ode() ); + } + else { + copyCache.put(entity, persister.instantiate( id, source.getEntityMode()= ) ); //before cascade! + //TODO: should this be Session.instantiate(Persister, ...)? + } + final Object copy =3D copyCache.get( entity ); = - final Object copy =3D persister.instantiate( id, source.getEntityMode() = ); //TODO: should this be Session.instantiate(Persister, ...)? - copyCache.put(entity, copy); //before cascade! - = - // cascade first, so that all unsaved objects get their = + // cascade first, so that all unsaved objects get their // copy created before we actually copy //cascadeOnMerge(event, persister, entity, copyCache, Cascades.CASCADE_B= EFORE_MERGE); super.cascadeBeforeSave(source, persister, entity, copyCache); @@ -330,7 +357,7 @@ return entry.isExistsInDatabase(); } } - + = protected void copyValues( final EntityPersister persister, = final Object entity, = @@ -353,8 +380,8 @@ = protected void copyValues( final EntityPersister persister, - final Object entity, - final Object target, + final Object entity, = + final Object target, = final SessionImplementor source, final Map copyCache, final ForeignKeyDirection foreignKeyDirection) { Modified: core/trunk/core/src/main/java/org/hibernate/type/EntityType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/core/src/main/java/org/hibernate/type/EntityType.java 2008-0= 5-09 17:07:31 UTC (rev 14655) +++ core/trunk/core/src/main/java/org/hibernate/type/EntityType.java 2008-0= 5-09 23:23:29 UTC (rev 14656) @@ -1,4 +1,4 @@ -//$Id: EntityType.java 10777 2006-11-08 22:02:28Z steve.ebersole(a)jboss.c= om $ +//$Id: EntityType.java 14513 2008-04-17 23:05:11Z gbadner $ package org.hibernate.type; = import java.io.Serializable; @@ -250,13 +250,23 @@ if ( original =3D=3D target ) { return target; } - Object id =3D getIdentifier( original, session ); - if ( id =3D=3D null ) { - throw new AssertionFailure("cannot copy a reference to an object with = a null id"); + if ( session.getContextEntityIdentifier( original ) =3D=3D null && + ForeignKeys.isTransient( associatedEntityName, original, Boolean.FALS= E, session ) ) { + final Object copy =3D session.getFactory().getEntityPersister( associa= tedEntityName ) + .instantiate( null, session.getEntityMode() ); + //TODO: should this be Session.instantiate(Persister, ...)? + copyCache.put( original, copy ); + return copy; } - id =3D getIdentifierOrUniqueKeyType( session.getFactory() ) - .replace(id, null, session, owner, copyCache); - return resolve( id, session, owner ); + else { + Object id =3D getIdentifier( original, session ); + if ( id =3D=3D null ) { + throw new AssertionFailure("non-transient entity has a null id"); + } + id =3D getIdentifierOrUniqueKeyType( session.getFactory() ) + .replace(id, null, session, owner, copyCache); + return resolve( id, session, owner ); + } } } = @@ -451,7 +461,7 @@ if ( value =3D=3D null ) { return "null"; } - + = EntityPersister persister =3D factory.getEntityPersister( associatedEnti= tyName ); StringBuffer result =3D new StringBuffer().append( associatedEntityName = ); = @@ -467,11 +477,11 @@ else { id =3D getIdentifier( value, persister, entityMode ); } - + = result.append( '#' ) .append( persister.getIdentifierType().toLoggableString( id, factory )= ); } - + = return result.toString(); } = @@ -537,7 +547,7 @@ return uniqueKeyPropertyName; } } - + = protected abstract boolean isNullable(); = /** @@ -584,9 +594,9 @@ * @throws HibernateException generally indicates problems performing the= load. */ public Object loadByUniqueKey( - String entityName, - String uniqueKeyPropertyName, - Object key, + String entityName, = + String uniqueKeyPropertyName, = + Object key, = SessionImplementor session) throws HibernateException { final SessionFactoryImplementor factory =3D session.getFactory(); UniqueKeyLoadable persister =3D ( UniqueKeyLoadable ) factory.getEntityP= ersister( entityName ); @@ -594,11 +604,11 @@ //TODO: implement caching?! proxies?! = EntityUniqueKey euk =3D new EntityUniqueKey( - entityName, - uniqueKeyPropertyName, - key, + entityName, = + uniqueKeyPropertyName, = + key, = getIdentifierOrUniqueKeyType( factory ), - session.getEntityMode(), + session.getEntityMode(), = session.getFactory() ); = Added: core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/A.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/A.java = (rev 0) +++ core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/A.java 20= 08-05-09 23:23:29 UTC (rev 14656) @@ -0,0 +1,106 @@ +// $Id$ + +package org.hibernate.test.cascade; + +import java.util.Set; +import java.util.HashSet; + +/** + * @author Ovidiu Feodorov + * + * Copyright 2008 Ovidiu Feodorov + * + */ +public class A +{ + // Constants ---------------------------------------------------------= -------------------------- + + // Static ------------------------------------------------------------= -------------------------- + + // Attributes --------------------------------------------------------= -------------------------- + + private long id; + + private String data; + + // A 1 - * H + private Set hs; + + // A 1 - 1 G + private G g; + + + // Constructors ------------------------------------------------------= -------------------------- + + public A() + { + hs =3D new HashSet(); + } + + public A(String data) + { + this(); + this.data =3D data; + } + + // Public ------------------------------------------------------------= -------------------------- + + public long getId() + { + return id; + } + + public void setId(long id) + { + this.id =3D id; + } + + public void setData(String data) + { + this.data =3D data; + } + + public String getData() + { + return data; + } + + public void setHs(Set hs) + { + this.hs =3D hs; + } + + public Set getHs() + { + return hs; + } + + public void setG(G g) + { + this.g =3D g; + } + + public G getG() + { + return g; + } + + public void addH(H h) + { + hs.add(h); + h.setA(this); + } + + public String toString() + { + return "A[" + id + ", " + data + "]"; + } + + // Package protected -------------------------------------------------= -------------------------- + + // Protected ---------------------------------------------------------= -------------------------- + + // Private -----------------------------------------------------------= -------------------------- + + // Inner classes -----------------------------------------------------= -------------------------- +} Property changes on: core/trunk/testsuite/src/test/java/org/hibernate/test/= cascade/A.java ___________________________________________________________________ Name: svn:executable + * Modified: core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/Cas= cadeSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/CascadeSu= ite.java 2008-05-09 17:07:31 UTC (rev 14655) +++ core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/CascadeSu= ite.java 2008-05-09 23:23:29 UTC (rev 14656) @@ -12,6 +12,7 @@ TestSuite suite =3D new TestSuite( "Cascade tests" ); suite.addTest( BidirectionalOneToManyCascadeTest.suite() ); suite.addTest( RefreshTest.suite() ); + suite.addTest( MultiPathCascadeTest.suite() ); return suite; } } Added: core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/G.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/G.java = (rev 0) +++ core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/G.java 20= 08-05-09 23:23:29 UTC (rev 14656) @@ -0,0 +1,95 @@ +package org.hibernate.test.cascade; + +import java.util.Set; +import java.util.HashSet; + +/** + * @author Ovidiu Feodorov + * + * Copyright 2008 Ovidiu Feodorov + * + * @version $Revision$ + * + * $Id$ + */ +public class G +{ + // Constants ---------------------------------------------------------= -------------------------- + + // Static ------------------------------------------------------------= -------------------------- + + // Attributes --------------------------------------------------------= -------------------------- + + private long id; + + private String data; + + // A 1 <-> 1 G + private A a; + + // G * <-> * H + private Set hs; + + // Constructors ------------------------------------------------------= -------------------------- + + public G() + { + this(null); + } + + public G(String data) + { + this.data =3D data; + hs =3D new HashSet(); + } + + // Public ------------------------------------------------------------= -------------------------- + + public String getData() + { + return data; + } + + public void setData(String data) + { + this.data =3D data; + } + + public A getA() + { + return a; + } + + public void setA(A a) + { + this.a =3D a; + } + + public Set getHs() + { + return hs; + } + + public void setHs(Set s) + { + hs =3D s; + } + + // Package protected -------------------------------------------------= -------------------------- + + long getId() + { + return id; + } + + // Protected ---------------------------------------------------------= -------------------------- + + // Private -----------------------------------------------------------= -------------------------- + + private void setId(long id) + { + this.id =3D id; + } + + // Inner classes -----------------------------------------------------= -------------------------- +} Property changes on: core/trunk/testsuite/src/test/java/org/hibernate/test/= cascade/G.java ___________________________________________________________________ Name: svn:executable + * Added: core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/H.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/H.java = (rev 0) +++ core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/H.java 20= 08-05-09 23:23:29 UTC (rev 14656) @@ -0,0 +1,94 @@ +// $Id$ + + +package org.hibernate.test.cascade; + +import java.util.Set; +import java.util.HashSet; + +/** + * @author Ovidiu Feodorov + * + * Copyright 2008 Ovidiu Feodorov + * + */ +public class H +{ + // Constants ---------------------------------------------------------= -------------------------- + + // Static ------------------------------------------------------------= -------------------------- + + // Attributes --------------------------------------------------------= -------------------------- + + private long id; + + private String data; + + private A a; + + // G * <-> * H + private Set gs; + + // Constructors ------------------------------------------------------= -------------------------- + + public H() + { + this(null); + } + + public H(String data) + { + this.data =3D data; + gs =3D new HashSet(); + } + + // Public ------------------------------------------------------------= -------------------------- + + public long getId() + { + return id; + } + + public String getData() + { + return data; + } + + public void setData(String data) + { + this.data =3D data; + } + + public A getA() + { + return a; + } + + public void setA(A a) + { + this.a =3D a; + } + + public Set getGs() + { + return gs; + } + + public void setGs(Set gs) + { + this.gs =3D gs; + } + + // Package protected -------------------------------------------------= -------------------------- + + // Protected ---------------------------------------------------------= -------------------------- + + // Private -----------------------------------------------------------= -------------------------- + + private void setId(long id) + { + this.id =3D id; + } + + // Inner classes -----------------------------------------------------= -------------------------- +} Property changes on: core/trunk/testsuite/src/test/java/org/hibernate/test/= cascade/H.java ___________________________________________________________________ Name: svn:executable + * Added: core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/MultiP= athCascade.hbm.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/MultiPath= Cascade.hbm.xml (rev 0) +++ core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/MultiPath= Cascade.hbm.xml 2008-05-09 23:23:29 UTC (rev 14656) @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Added: core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/MultiP= athCascadeTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/MultiPath= CascadeTest.java (rev 0) +++ core/trunk/testsuite/src/test/java/org/hibernate/test/cascade/MultiPath= CascadeTest.java 2008-05-09 23:23:29 UTC (rev 14656) @@ -0,0 +1,337 @@ +//$Id: $ + +package org.hibernate.test.cascade; + +import junit.framework.Test; + +import org.hibernate.Session; +import org.hibernate.TransientObjectException; +import org.hibernate.junit.functional.FunctionalTestCase; +import org.hibernate.junit.functional.FunctionalTestClassTestSuite; +import org.hibernate.proxy.HibernateProxy; + +/** + * @author Ovidiu Feodorov + * @author Gail Badner + * + */ + +public class MultiPathCascadeTest extends FunctionalTestCase { + + public MultiPathCascadeTest(String name) { + super( name ); + } + + public String[] getMappings() { + return new String[] { + "cascade/MultiPathCascade.hbm.xml" + }; + } + + public static Test suite() { + return new FunctionalTestClassTestSuite( MultiPathCascadeTest.class ); + } + + protected void cleanupTest() { + Session s =3D openSession(); + s.beginTransaction(); + s.createQuery( "delete from A" ); + s.createQuery( "delete from G" ); + s.createQuery( "delete from H" ); + } + + public void testMultiPathMergeModifiedDetached() throws Exception + { + // persist a simple A in the database + + Session s =3D openSession(); + s.beginTransaction(); + A a =3D new A(); + a.setData( "Anna" ); + s.save( a ); + s.getTransaction().commit(); + s.close(); + + // modify detached entity + modifyEntity( a ); + + s =3D openSession(); + s.beginTransaction(); + a =3D ( A ) s.merge( a ); + s.getTransaction().commit(); + s.close(); + + verifyModifications( a.getId() ); + } + + public void testMultiPathMergeModifiedDetachedIntoProxy() throws Exception + { + // persist a simple A in the database + + Session s =3D openSession(); + s.beginTransaction(); + A a =3D new A(); + a.setData( "Anna" ); + s.save( a ); + s.getTransaction().commit(); + s.close(); + + // modify detached entity + modifyEntity( a ); + + s =3D openSession(); + s.beginTransaction(); + A aLoaded =3D ( A ) s.load( A.class, new Long( a.getId() ) ); + assertTrue( aLoaded instanceof HibernateProxy ); + assertSame( aLoaded, s.merge( a ) ); + s.getTransaction().commit(); + s.close(); + + verifyModifications( a.getId() ); + } + + public void testMultiPathUpdateModifiedDetached() throws Exception + { + // persist a simple A in the database + + Session s =3D openSession(); + s.beginTransaction(); + A a =3D new A(); + a.setData( "Anna" ); + s.save( a ); + s.getTransaction().commit(); + s.close(); + + // modify detached entity + modifyEntity( a ); + + s =3D openSession(); + s.beginTransaction(); + s.update( a ); + s.getTransaction().commit(); + s.close(); + + verifyModifications( a.getId() ); + } + + public void testMultiPathGetAndModify() throws Exception + { + // persist a simple A in the database + + Session s =3D openSession(); + s.beginTransaction(); + A a =3D new A(); + a.setData( "Anna" ); + s.save( a ); + s.getTransaction().commit(); + s.close(); + + s =3D openSession(); + s.beginTransaction(); + // retrieve the previously saved instance from the database, and update = it + a =3D ( A ) s.get( A.class, new Long( a.getId() ) ); + modifyEntity( a ); + s.getTransaction().commit(); + s.close(); + + verifyModifications( a.getId() ); + } + + public void testMultiPathMergeNonCascadedTransientEntityInCollection() th= rows Exception + { + // persist a simple A in the database + + Session s =3D openSession(); + s.beginTransaction(); + A a =3D new A(); + a.setData( "Anna" ); + s.save( a ); + s.getTransaction().commit(); + s.close(); + + // modify detached entity + modifyEntity( a ); + + s =3D openSession(); + s.beginTransaction(); + a =3D ( A ) s.merge( a ); + s.getTransaction().commit(); + s.close(); + + verifyModifications( a.getId() ); + + // add a new (transient) G to collection in h + // there is no cascade from H to the collection, so this should fail whe= n merged + assertEquals( 1, a.getHs().size() ); + H h =3D ( H ) a.getHs().iterator().next(); + G gNew =3D new G(); + gNew.setData( "Gail" ); + gNew.getHs().add( h ); + h.getGs().add( gNew ); + + s =3D openSession(); + s.beginTransaction(); + try { + s.merge( a ); + s.merge( h ); + fail( "should have thrown TransientObjectException" ); + } + catch ( TransientObjectException ex ) { + // expected + } + finally { + s.getTransaction().rollback(); + } + s.close(); + } + + public void testMultiPathMergeNonCascadedTransientEntityInOneToOne() thro= ws Exception + { + // persist a simple A in the database + + Session s =3D openSession(); + s.beginTransaction(); + A a =3D new A(); + a.setData( "Anna" ); + s.save( a ); + s.getTransaction().commit(); + s.close(); + + // modify detached entity + modifyEntity( a ); + + s =3D openSession(); + s.beginTransaction(); + a =3D ( A ) s.merge( a ); + s.getTransaction().commit(); + s.close(); + + verifyModifications( a.getId() ); + + // change the one-to-one association from g to be a new (transient) A + // there is no cascade from G to A, so this should fail when merged + G g =3D a.getG(); + a.setG( null ); + A aNew =3D new A(); + aNew.setData( "Alice" ); + g.setA( aNew ); + aNew.setG( g ); + + s =3D openSession(); + s.beginTransaction(); + try { + s.merge( a ); + s.merge( g ); + fail( "should have thrown TransientObjectException" ); + } + catch ( TransientObjectException ex ) { + // expected + } + finally { + s.getTransaction().rollback(); + } + s.close(); + } + + public void testMultiPathMergeNonCascadedTransientEntityInManyToOne() thr= ows Exception + { + // persist a simple A in the database + + Session s =3D openSession(); + s.beginTransaction(); + A a =3D new A(); + a.setData( "Anna" ); + s.save( a ); + s.getTransaction().commit(); + s.close(); + + // modify detached entity + modifyEntity( a ); + + s =3D openSession(); + s.beginTransaction(); + a =3D ( A ) s.merge( a ); + s.getTransaction().commit(); + s.close(); + + verifyModifications( a.getId() ); + + // change the many-to-one association from h to be a new (transient) A + // there is no cascade from H to A, so this should fail when merged + assertEquals( 1, a.getHs().size() ); + H h =3D ( H ) a.getHs().iterator().next(); + a.getHs().remove( h ); + A aNew =3D new A(); + aNew.setData( "Alice" ); + aNew.addH( h ); + + s =3D openSession(); + s.beginTransaction(); + try { + s.merge( a ); + s.merge( h ); + fail( "should have thrown TransientObjectException" ); + } + catch ( TransientObjectException ex ) { + // expected + } + finally { + s.getTransaction().rollback(); + } + s.close(); + } + + private void modifyEntity(A a) { + // create a *circular* graph in detached entity + a.setData("Anthony"); + + G g =3D new G(); + g.setData( "Giovanni" ); + + H h =3D new H(); + h.setData( "Hellen" ); + + a.setG( g ); + g.setA( a ); + + a.getHs().add( h ); + h.setA( a ); + + g.getHs().add( h ); + h.getGs().add( g ); + } + + private void verifyModifications(long aId) { + Session s =3D openSession(); + s.beginTransaction(); + + // retrieve the A object and check it + A a =3D ( A ) s.get( A.class, new Long( aId ) ); + assertEquals( aId, a.getId() ); + assertEquals( "Anthony", a.getData() ); + assertNotNull( a.getG() ); + assertNotNull( a.getHs() ); + assertEquals( 1, a.getHs().size() ); + + G gFromA =3D a.getG(); + H hFromA =3D ( H ) a.getHs().iterator().next(); + + // check the G object + assertEquals( "Giovanni", gFromA.getData() ); + assertSame( a, gFromA.getA() ); + assertNotNull( gFromA.getHs() ); + assertEquals( a.getHs(), gFromA.getHs() ); + assertSame( hFromA, gFromA.getHs().iterator().next() ); + + // check the H object + assertEquals( "Hellen", hFromA.getData() ); + assertSame( a, hFromA.getA() ); + assertNotNull( hFromA.getGs() ); + assertEquals( 1, hFromA.getGs().size() ); + assertSame( gFromA, hFromA.getGs().iterator().next() ); + + s.getTransaction().commit(); + s.close(); + } + +} --===============6381258290745872795==-- From hibernate-commits at lists.jboss.org Sat May 10 18:58:25 2008 Content-Type: multipart/mixed; boundary="===============2846438587696263577==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14657 - core/trunk/core/src/main/java/org/hibernate/jdbc/util. Date: Sat, 10 May 2008 18:58:25 -0400 Message-ID: --===============2846438587696263577== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: d.plentz Date: 2008-05-10 18:58:25 -0400 (Sat, 10 May 2008) New Revision: 14657 Modified: core/trunk/core/src/main/java/org/hibernate/jdbc/util/BasicFormatterImpl= .java Log: [HHH-3272] using of Integer.valueOf(int), which is not available in JDK 1.4 Modified: core/trunk/core/src/main/java/org/hibernate/jdbc/util/BasicFormat= terImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/core/src/main/java/org/hibernate/jdbc/util/BasicFormatterImp= l.java 2008-05-09 23:23:29 UTC (rev 14656) +++ core/trunk/core/src/main/java/org/hibernate/jdbc/util/BasicFormatterImp= l.java 2008-05-10 22:58:25 UTC (rev 14657) @@ -268,7 +268,7 @@ out(); indent++; newline(); - parenCounts.addLast( Integer.valueOf( parensSinceSelect ) ); + parenCounts.addLast( new Integer( parensSinceSelect ) ); afterByOrFromOrSelects.addLast( Boolean.valueOf( afterByOrSetOrFromOrSe= lect ) ); parensSinceSelect =3D 0; afterByOrSetOrFromOrSelect =3D true; --===============2846438587696263577==-- From hibernate-commits at lists.jboss.org Mon May 12 16:14:57 2008 Content-Type: multipart/mixed; boundary="===============4666267670949239427==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14658 - core/branches/Branch_3_2_4_SP1_CP/doc/release_notes/src/main/docbook/en-US. Date: Mon, 12 May 2008 16:14:57 -0400 Message-ID: --===============4666267670949239427== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bsatguna Date: 2008-05-12 16:14:57 -0400 (Mon, 12 May 2008) New Revision: 14658 Added: core/branches/Branch_3_2_4_SP1_CP/doc/release_notes/src/main/docbook/en-= US/Release_Notes.ent Removed: core/branches/Branch_3_2_4_SP1_CP/doc/release_notes/src/main/docbook/en-= US/Book_Info.xml Modified: core/branches/Branch_3_2_4_SP1_CP/doc/release_notes/src/main/docbook/en-= US/Article_Info.xml core/branches/Branch_3_2_4_SP1_CP/doc/release_notes/src/main/docbook/en-= US/Release_Notes.xml Log: updated content to reflect latest changes in redhat svn: release notes for = 3.2.4.sp01.cp03 Modified: core/branches/Branch_3_2_4_SP1_CP/doc/release_notes/src/main/docb= ook/en-US/Article_Info.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_2_4_SP1_CP/doc/release_notes/src/main/docbook/en= -US/Article_Info.xml 2008-05-10 22:58:25 UTC (rev 14657) +++ core/branches/Branch_3_2_4_SP1_CP/doc/release_notes/src/main/docbook/en= -US/Article_Info.xml 2008-05-12 20:14:57 UTC (rev 14658) @@ -2,12 +2,12 @@ = - - Enterprise Hibernate x.y.z Release Notes + + Hibernate Release Notes - 0.1 - 0 - This document outlines information necessary for installa= tion, migration and bug fixes. + 3.2.4 + 0.1 + This document contains release notes for new and existing= users of Hibernate regarding Hibernate &VERSION; release. It provides inst= allation and migration notes, document sources and bug fixes for this relea= se. Deleted: core/branches/Branch_3_2_4_SP1_CP/doc/release_notes/src/main/docbo= ok/en-US/Book_Info.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_2_4_SP1_CP/doc/release_notes/src/main/docbook/en= -US/Book_Info.xml 2008-05-10 22:58:25 UTC (rev 14657) +++ core/branches/Branch_3_2_4_SP1_CP/doc/release_notes/src/main/docbook/en= -US/Book_Info.xml 2008-05-12 20:14:57 UTC (rev 14658) @@ -1,27 +0,0 @@ - - - - - Product Name and Version - Release Notes - 0.1 - 0 - This book is about... (Be brief; this para is used for th= e RPM spec - file) - - - - - - - - &YEAR; - &HOLDER; - - - - - - - Added: core/branches/Branch_3_2_4_SP1_CP/doc/release_notes/src/main/docbook= /en-US/Release_Notes.ent =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_2_4_SP1_CP/doc/release_notes/src/main/docbook/en= -US/Release_Notes.ent (rev 0) +++ core/branches/Branch_3_2_4_SP1_CP/doc/release_notes/src/main/docbook/en= -US/Release_Notes.ent 2008-05-12 20:14:57 UTC (rev 14658) @@ -0,0 +1,4 @@ + + + + Modified: core/branches/Branch_3_2_4_SP1_CP/doc/release_notes/src/main/docb= ook/en-US/Release_Notes.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_2_4_SP1_CP/doc/release_notes/src/main/docbook/en= -US/Release_Notes.xml 2008-05-10 22:58:25 UTC (rev 14657) +++ core/branches/Branch_3_2_4_SP1_CP/doc/release_notes/src/main/docbook/en= -US/Release_Notes.xml 2008-05-12 20:14:57 UTC (rev 14658) @@ -8,63 +8,396 @@ Overview - These release notes contain important information regarding Hibernate &= VERSION;. This document covers installation and migration notes, new featur= es and bug fixes. = + These release notes contain important information regarding Hibernate &= VERSION; release. This document lists the necessary software that must be i= nstalled before using Hibernate. Users of previous versions of Hibernate ma= y refer to to find the latest JIRA issue f= ixes. In addition, the latest , product su= pport and license links are also provided. = =
Background - Hibernate is a powerful object/relational mapping tool for building Ja= va applications. It significantly reduces repetitive persistence related pr= ogramming tasks by mapping the object model's data representation to a rela= tional data model. Hibernate offers a sophisticated object-oriented HQL (Hi= bernate query language) allowing the programmer to make use of polymorphic = queries. Queries can be expressed in native SQL or using Criteria and examp= le queries. A full feature datasheet is available here for download = + Hibernate is a powerful object/relational mapping tool and a query ser= vice for building Java applications. Hibernate offers a sophisticated objec= t-oriented HQL (Hibernate query language) allowing the programmer to make u= se of polymorphic queries. Queries can be expressed in native SQL or using = Java-based Criteria and Example queries. A full feature datasheet is availa= ble h= ere for download. + + Hibernate can be integrated with any Java EE middleware platform. This= release is also embedded in JBoss Enterprise Application platform versions= 4.2 CP 03 and 4.3 CP 01 releases. Hence, the jar file= s remain the same as the ones distributed with JBoss Enterprise Application= Platform 4.2 CP 03 and 4.3 CP 01 releases. = + + + This Hibernate version is available through subscriptions which offers= certified software, industry-leading support, updates and patches, documen= tation, and multi-year maintenance policies. +
Installation And Migration Guide - This section contains all information related to installing hibernate, = testing the installation and running some examples. + This section lists the software that must be installed on your local ma= chine before beginning to use Hibernate. Migration notes are also listed in= this section for users who will be using existing databases along with Hib= ernate. + = +
+ Prerequisites + + The software required for setting up Hibernate for use will depend on = whether you would also like to build and test the Hibernate source files or= use the jar files directly. = + = +
+ Using Hibernate + JDK 1.5 + + To build Java applications with Hibernate you must have = JDK 1.5 version installed. While this version is compatible w= ith Hibernate, version 1.4 is no longer supported. You must ensure that aft= er installation, the environment variables are set for use. = + + = +
+ = +
+ Testing Hibernate and Running the demo + + To test Hibernate and run the demo, you will need Apache= Ant 1.7.0 and JUnit 3.8.1. = + + = + = + + Apache Ant 1.7.0 + Apache Ant can be downloaded from this link. You must set the ANT_HOME = environment variable to point to the Apache Ant install location. You may r= efer to the manual available on their website for installing and setting up= Apache Ant for use. + + + JUnit 3.8.1 + + To run JUnit tests, you may use JUnit 3.8.1 version which can be do= wnloaded from here. After inst= allation, copy junit.jar to $ANT_HOME/lib directory. Documentation to help you get started on running sample t= est cases are available on their website. provides further notes on running JUnit tests. = + + = + = + + = + = +
= +
+ =
Installation Notes - We advise users to ensure that adequate disk space is available for th= e installation of Hibernate, JDK 1.4 (or above) and the database. = - + Extract files from the Hibernate ZIP file to the de= sired location. Open the directory where you have extracted these files. To= use Hibernate, you must configure the project's classpath settings to poin= t to the jar files. Settings for individual IDEs diffe= r, but normally you would add the jar files as externa= l library files. = +
+ Hibernate Dependencies + + The lib directory contains all the dependencies required to use Hiber= nate in a supported fashion. Certain dependencies from the community build= s (such as connection pool integration and second-level cache providers oth= er than the JBoss Cache provider) are not included as they are not supporte= d. + +
+ =
-
- Migration Guide - - Information regarding upgrades = - +
+ Migration Notes +
+ Configuring your database + + To use your database with Hibernate, copy your JDBC driver into the lib directory. Then edit the hibernate.properties file in the etc directo= ry. Additional configuration notes are available in Hibernate Reference Guide, chapter 3: Configuration. The H= ibernate supported databases are: Oracle9i, Oracle10g, MS SQL 2005, Postgre= SQL and MySQL. + +
+ Oracle users + + OracleDialect and Oracle9Dialect have been deprecated. Oracle8iDiale= ct, Oracle9iDialect, or Oracle10gDialect should be used instead. = + +
+
-
- New features and bug fixes + = +
+ Certified Configurations = - All new features and bug fixes mentioned in these release notes are app= licable to VERSION;. = + Certified Configurations are a defined set of validated, tested, and re= commended Operating Systems, chip architectures, JVM, and database combinat= ions. These configurations have been tested and validated against the Hiber= nate &VERSION; release. -
- New Features + + Compatible Operating systems, chip architecture and JVMs. + + + + Operating System + Chip Architecture + Java Virtual Machine(s) + + + + + Red Hat Enterprise Linux v5 + x86, x86_64 + Sun JDK 1.5.0_11, BEA JRockit JDK 1.5.0_08 + = + + + Red Hat Enterprise Linux v4.5 + x86, x86_64 + Sun JDK 1.5.0_11, BEA JRockit JDK 1.5.0_08, Azul JDK 1.5.0_11= + = + = + + + Microsoft Windows 2003 + x86 + Sun JDK 1.5.0_11, BEA JRockit JDK 1.5.0_10 + = + + + Microsoft Windows 2003 + x86_64 + Sun JDK 1.5.0_11, BEA JRockit JDK 1.5.0_08 + = + + + Solaris 10 + x86, SPARC + Sun JDK 1.5.0_11 + + + Solaris 9 + SPARC + Sun JDK 1.5.0_11 + + + HP-UX i2 + RISC, ia64 = + HP-UX JDK 1.5.0.06 + + + +
+ = + The following databases and database drivers were validated and ce= rtified as part of the Hibernate &VERSION; release process: + + Compatible databases and database drivers + + + + Database + Database Driver + = + + + + Oracle 10g R2 + Oracle JDBC driver v10.2.0.1, Oracle JDBC driver v10.2.0.2 + + + Oracle 9i + Oracle JDBC driver v10.2.0.1, Oracle JDBC driver v10.2.0.2 + + + Microsoft SQL Server 2005 + Microsoft SQL Server 2005 driver, v1.1.1501.101 + + + MySQL v5.0 + mysql-connector-java v5.0.4 + + + PostgreSQL v8.1 + PostgreSQL v8.2 JDBC3 with SSL (build 504) + + + +
+
+ = +
+ Running JUnit Tests + = - Provide a summary of new features applicable to this release. = + It is recommended that the Hibernate unit tests be executed using the = same dialect and version of JDBC that will be used in production, to ensure= that the configuration setting, hibernate.jdbc.batch_versioned_d= ata, is set properly. The value for hibernate.jdbc.ba= tch_versioned_data determines if Hibernate will use batches for = updating versioned data (an optimization). = -
-
- Bug Fixes - The following bugs have been addressed and resolved in this release. = + Optimistic locking relies on the ability to obtain the number of rows = updated. If the JDBC driver does not return update counts for each command = in a batch, then hibernate.jdbc.batch_versioned_data s= hould be set to "false". = + + The unit tests use the settings in etc/hibernate.properties<= /filename>. The value for hibernate.jdbc.batch_versioned_data is set to true in that file. If the unit tes= ts involving optimistic locking fail, then the appropriate value for this f= lag is false. Some versions of Oracle JDBC do not s= upport returning update counts for each command in a batch, so it is partic= ularly important to test using the same version of JDBC as will be used in = production. + + = +
+ Expected failures and tests + + The following unit tests are expected to fail: + + = + = + + Ehcache tests (Ehcache is not provided in this distribution): + + + org.hibernate.test.cache.ehcache.EhCacheTest.testQueryCacheInvalidat= ion + org.hibernate.test.cache.ehcache.EhCacheTest.testEmptySecondLevelCac= heEntry + org.hibernate.test.cache.ehcache.EhCacheTest.testStaleWritesLeaveCac= heConsistent + + + + Expected unit test failure against MS SQL 2005 + + org.hibernate.test.legacy.MasterDetailTest.testCachedCollectionRefre= sh + + + + + "FailureExpected" tests (known issues to be addressed in the future)= : = + + + org.hibernate.test.hql.ASTParserLoadingTest.testParameterTypeMismatc= hFailureExpected + org.hibernate.test.hql.CriteriaHQLAlignmentTest.testCriteriaAggregat= ionReturnTypeFailureExpected + org.hibernate.test.hql.HQLTest.testEmptyInListFailureExpected = + org.hibernate.test.hql.HQLTest.testMaxindexHqlFuncttestMultipleEleme= ntAccessorOperatorsFailureExpectedionInElementAccessorFailureExpected + org.hibernate.test.hql.HQLTest.testMultipleElementAccessorOperatorsF= ailureExpected + org.hibernate.test.hql.HQLTest.testKeyManyToOneJoinFailureExpected + org.hibernate.test.hql.HQLTest.testDuplicateExplicitJoinFailureExpec= ted + org.hibernate.test.keymanytoone.bidir.component.EagerKeyManyToOneTes= t.testLoadEntityWithEagerFetchingToKeyManyToOneReferenceBackToSelfFailureEx= pected + org.hibernate.test.legacy.SQLLoaderTest.testReturnPropertyComponentR= enameFailureExpected + org.hibernate.test.readonly.ReadOnlyTest.testReadOnlyOnProxiesFailur= eExpected + org.hibernate.test.sql.hand.query.NativeSQLQueriesTest.testComposite= IdJoinsFailureExpected = + + =
-
+
+ Fixed Issues + + + <ulink url=3D"http://jira.jboss.org/jira/browse/HIBERNATE-92">HIBERNAT= E-92</ulink> - Update dependencies to be consistent with EAP 4.2 CP03 + + + This release bundle has been made consistent with the Hibernate releas= e embedded in JBoss EAP version 4.2 CP03. = + + + + + <ulink url=3D"http://jira.jboss.org/jira/browse/JBPAPP-357">JBPAPP-357= / HHH-2542</ulink> - <parameter>NullPointerException</parameter> in <prope= rty>TypeFactory.replaceAssociations</property> for <property>ComponentType<= /property> = + + + This bug which arises when a NULL value has been pa= ssed into ComponentType object has been fixed. + + + + + <ulink url=3D"http://opensource.atlassian.com/projects/hibernate/brows= e/HHH-1569">JBPAPP-740 / HHH-1569</ulink> - Immutable Natural Id can fail w= ith ArrayIndexOutOfBounds in some cases + + + When the natural-id has been set with = mutable as false, then it may cause ArrayIndexOutOfBounds errors in some cases. This issue h= as been resolved. + + + + + <ulink url=3D"http://opensource.atlassian.com/projects/hibernate/brows= e/HHH-2631">JBPAPP-742 / HHH-2631</ulink> - Leaking <property>PreparedState= ment</property> and <parameter>ResultSet</parameter> via <property>Collecti= onLoadContext</property> instances maintained in Map <property>collectionLo= adContexts</property> in <property>LoadContexts</property> + + + The number of PreparedStatement and Re= sultSet instances had increased causing memory consumption in o= ne instance. The JIRA issue contains the full details. + + + + + <ulink url=3D"http://opensource.atlassian.com/projects/hibernate/brows= e/HHH-2662">JBPAPP-741 / HHH-2662</ulink> - Workarounds for <application>Po= stgreSQL</application> issues arising from test suite + + + Few issues that arose from test suite with PostgreSQL has been resolved. + + + + + <ulink url=3D"http://jira.jboss.org/jira/browse/JBPAPP-743">JBPAPP-743= / HHH-2663</ulink> - Map <property>java.sql.Types.REAL</property> to Hiber= nate <property>FloatType</property> = + + + This is an added functionality to allow the use of REAL type. + + + + + <ulink url=3D"http://jira.jboss.org/jira/browse/JBPAPP-744">JBPAPP-744= / HHH-2665</ulink> - Split <property>Oracle9Dialect</property> into <prope= rty>Oracle9iDialect</property> and <property>Oracle10gDialect</property> + + + Hibernate now checks Oracle database dialec= ts for versions 9i and 10g. = + + + + + <ulink url=3D"http://jira.jboss.org/jira/browse/JBPAPP-188">JBPAPP-18= 8 / HHH-2630</ulink> - Hibernate Dialect is not auto-detected for <applicat= ion>Sybase ASE</application> and <application>DB2</application> = + + + Auto detection of these two dialects are now enabled in this release. + + + = +
+
Documentation - - List all the documentation links here and where to find them. = - = + + + + The Hibernate reference guide= is a comprehensive source of material for learning about Hibernate. It kic= ks off with an example to get you started with Hibernate, lists the major f= unctionality of Hibernate, offers design solutions and suggests best practi= ses. = + = + + + + The Hibernate Core API Reference guide will be helpful during application development. + + +
- Product Support - - List all the links here. = - = + Product Support and License Website Links + + Support Processes + + http://www.redha= t.com/support/process/ + + + = + + + Production Support Scope of Coverage + + + htt= p://www.redhat.com/support/policy/soc/production + + + = + + + Production Support Service Level Agreement + + = + + ht= tp://www.redhat.com/support/policy/sla/production/ + + + = + + + Developer Support Scope of Coverage + + = + + htt= p://www.redhat.com/support/policy/soc/developer/ + + + = + + + Developer Support Service Level Agreement + + = + + htt= p://www.redhat.com/support/policy/sla/developer/ + + + = + + + Product Update and Support Policy by Product + + = + + htt= p://www.redhat.com/security/updates/jboss_notes/ + + + = + + + JBoss End User License Agreement + + = + + http://w= ww.redhat.com/licenses/jboss_eula.html + +
--===============4666267670949239427==-- From hibernate-commits at lists.jboss.org Mon May 12 17:50:17 2008 Content-Type: multipart/mixed; boundary="===============8796634469431946458==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14659 - core/branches. Date: Mon, 12 May 2008 17:50:15 -0400 Message-ID: --===============8796634469431946458== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: gbadner Date: 2008-05-12 17:50:14 -0400 (Mon, 12 May 2008) New Revision: 14659 Removed: core/branches/BRANCH_3_2_4_SP1_CP01_STANDALONE/ Log: Removing Hibernate standalone tag corresponding to EAP 4.2 CP01 since it is= obsolete --===============8796634469431946458==-- From hibernate-commits at lists.jboss.org Wed May 14 10:06:48 2008 Content-Type: multipart/mixed; boundary="===============3945111454878836414==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14660 - core/branches/Branch_3_2/src/org/hibernate/dialect. Date: Wed, 14 May 2008 10:06:47 -0400 Message-ID: --===============3945111454878836414== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: steve.ebersole(a)jboss.com Date: 2008-05-14 10:06:47 -0400 (Wed, 14 May 2008) New Revision: 14660 Modified: core/branches/Branch_3_2/src/org/hibernate/dialect/DB2Dialect.java Log: HHH-3282 : DB2Dialect#supportsLobValueChangePropogation =3D=3D false Modified: core/branches/Branch_3_2/src/org/hibernate/dialect/DB2Dialect.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_2/src/org/hibernate/dialect/DB2Dialect.java 2008= -05-12 21:50:14 UTC (rev 14659) +++ core/branches/Branch_3_2/src/org/hibernate/dialect/DB2Dialect.java 2008= -05-14 14:06:47 UTC (rev 14660) @@ -362,4 +362,8 @@ public boolean supportsEmptyInList() { return false; } + + public boolean supportsLobValueChangePropogation() { + return false; + } } --===============3945111454878836414==-- From hibernate-commits at lists.jboss.org Wed May 14 10:08:23 2008 Content-Type: multipart/mixed; boundary="===============6635122365634557436==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14661 - core/trunk/core/src/main/java/org/hibernate/dialect. Date: Wed, 14 May 2008 10:08:23 -0400 Message-ID: --===============6635122365634557436== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: steve.ebersole(a)jboss.com Date: 2008-05-14 10:08:23 -0400 (Wed, 14 May 2008) New Revision: 14661 Modified: core/trunk/core/src/main/java/org/hibernate/dialect/DB2Dialect.java Log: HHH-3282 : DB2Dialect#supportsLobValueChangePropogation =3D=3D false Modified: core/trunk/core/src/main/java/org/hibernate/dialect/DB2Dialect.ja= va =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/core/src/main/java/org/hibernate/dialect/DB2Dialect.java 200= 8-05-14 14:06:47 UTC (rev 14660) +++ core/trunk/core/src/main/java/org/hibernate/dialect/DB2Dialect.java 200= 8-05-14 14:08:23 UTC (rev 14661) @@ -362,4 +362,8 @@ public boolean supportsEmptyInList() { return false; } + + public boolean supportsLobValueChangePropogation() { + return false; + } } --===============6635122365634557436==-- From hibernate-commits at lists.jboss.org Wed May 14 10:48:07 2008 Content-Type: multipart/mixed; boundary="===============7281836561734013600==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14662 - core/trunk/testsuite/src/test/java/org/hibernate/test/hql. Date: Wed, 14 May 2008 10:48:07 -0400 Message-ID: --===============7281836561734013600== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: steve.ebersole(a)jboss.com Date: 2008-05-14 10:48:07 -0400 (Wed, 14 May 2008) New Revision: 14662 Modified: core/trunk/testsuite/src/test/java/org/hibernate/test/hql/BulkManipulati= onTest.java Log: HHH-3283 : protection on vm-based timestamps where dialect does not support= params in INSERT ... SELECT Modified: core/trunk/testsuite/src/test/java/org/hibernate/test/hql/BulkMan= ipulationTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/testsuite/src/test/java/org/hibernate/test/hql/BulkManipulat= ionTest.java 2008-05-14 14:08:23 UTC (rev 14661) +++ core/trunk/testsuite/src/test/java/org/hibernate/test/hql/BulkManipulat= ionTest.java 2008-05-14 14:48:07 UTC (rev 14662) @@ -318,11 +318,16 @@ data.cleanup(); } = + protected boolean supportsBulkInsertIdGeneration(Class entityClass) { + EntityPersister persister =3D sfi().getEntityPersister( entityClass.getN= ame() ); + IdentifierGenerator generator =3D persister.getIdentifierGenerator(); + return HqlSqlWalker.supportsIdGenWithBulkInsertion( generator ); + } + public void testInsertWithGeneratedId() { // Make sure the env supports bulk inserts with generated ids... - EntityPersister persister =3D sfi().getEntityPersister( PettingZoo.class= .getName() ); - IdentifierGenerator generator =3D persister.getIdentifierGenerator(); - if ( !HqlSqlWalker.supportsIdGenWithBulkInsertion( generator ) ) { + if ( !supportsBulkInsertIdGeneration( PettingZoo.class ) ) { + reportSkip( "bulk id generation not supported", "test bulk inserts with= generated id and generated timestamp"); return; } = @@ -351,7 +356,7 @@ s.close(); = assertEquals( zoo.getName(), pz.getName() ); - assertTrue( zoo.getId() !=3D pz.getId() ); + assertTrue( !zoo.getId().equals( pz.getId() ) ); = s =3D openSession(); t =3D s.beginTransaction(); @@ -362,9 +367,8 @@ = public void testInsertWithGeneratedVersionAndId() { // Make sure the env supports bulk inserts with generated ids... - EntityPersister persister =3D sfi().getEntityPersister( IntegerVersioned= .class.getName() ); - IdentifierGenerator generator =3D persister.getIdentifierGenerator(); - if ( !HqlSqlWalker.supportsIdGenWithBulkInsertion( generator ) ) { + if ( !supportsBulkInsertIdGeneration( IntegerVersioned.class ) ) { + reportSkip( "bulk id generation not supported", "test bulk inserts with= generated id and generated timestamp"); return; } = @@ -407,11 +411,17 @@ = public void testInsertWithGeneratedTimestampVersion() { // Make sure the env supports bulk inserts with generated ids... - EntityPersister persister =3D sfi().getEntityPersister( TimestampVersion= ed.class.getName() ); - IdentifierGenerator generator =3D persister.getIdentifierGenerator(); - if ( !HqlSqlWalker.supportsIdGenWithBulkInsertion( generator ) ) { + if ( !supportsBulkInsertIdGeneration( TimestampVersioned.class ) ) { + reportSkip( "bulk id generation not supported", "test bulk inserts with= generated id and generated timestamp"); return; } + // dialects which do not allow a parameter in the select portion of an I= NSERT ... SELECT statement + // will also be problematic for this test because the timestamp here is = vm-based as opposed to + // db-based. + if ( !getDialect().supportsParametersInInsertSelect() ) { + reportSkip( "dialect does not support parameter in INSERT ... SELECT", = "test bulk inserts with generated id and generated timestamp"); + return; + } = Session s =3D openSession(); Transaction t =3D s.beginTransaction(); --===============7281836561734013600==-- From hibernate-commits at lists.jboss.org Wed May 14 10:48:25 2008 Content-Type: multipart/mixed; boundary="===============5161107014040102299==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14663 - core/branches/Branch_3_2/test/org/hibernate/test/hql. Date: Wed, 14 May 2008 10:48:25 -0400 Message-ID: --===============5161107014040102299== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: steve.ebersole(a)jboss.com Date: 2008-05-14 10:48:24 -0400 (Wed, 14 May 2008) New Revision: 14663 Modified: core/branches/Branch_3_2/test/org/hibernate/test/hql/BulkManipulationTes= t.java Log: HHH-3283 : protection on vm-based timestamps where dialect does not support= params in INSERT ... SELECT Modified: core/branches/Branch_3_2/test/org/hibernate/test/hql/BulkManipula= tionTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_2/test/org/hibernate/test/hql/BulkManipulationTe= st.java 2008-05-14 14:48:07 UTC (rev 14662) +++ core/branches/Branch_3_2/test/org/hibernate/test/hql/BulkManipulationTe= st.java 2008-05-14 14:48:24 UTC (rev 14663) @@ -318,11 +318,16 @@ data.cleanup(); } = + protected boolean supportsBulkInsertIdGeneration(Class entityClass) { + EntityPersister persister =3D sfi().getEntityPersister( entityClass.getN= ame() ); + IdentifierGenerator generator =3D persister.getIdentifierGenerator(); + return HqlSqlWalker.supportsIdGenWithBulkInsertion( generator ); + } + public void testInsertWithGeneratedId() { // Make sure the env supports bulk inserts with generated ids... - EntityPersister persister =3D sfi().getEntityPersister( PettingZoo.class= .getName() ); - IdentifierGenerator generator =3D persister.getIdentifierGenerator(); - if ( !HqlSqlWalker.supportsIdGenWithBulkInsertion( generator ) ) { + if ( !supportsBulkInsertIdGeneration( PettingZoo.class ) ) { + reportSkip( "bulk id generation not supported", "test bulk inserts with= generated id and generated timestamp"); return; } = @@ -351,7 +356,7 @@ s.close(); = assertEquals( zoo.getName(), pz.getName() ); - assertTrue( zoo.getId() !=3D pz.getId() ); + assertTrue( !zoo.getId().equals( pz.getId() ) ); = s =3D openSession(); t =3D s.beginTransaction(); @@ -362,9 +367,8 @@ = public void testInsertWithGeneratedVersionAndId() { // Make sure the env supports bulk inserts with generated ids... - EntityPersister persister =3D sfi().getEntityPersister( IntegerVersioned= .class.getName() ); - IdentifierGenerator generator =3D persister.getIdentifierGenerator(); - if ( !HqlSqlWalker.supportsIdGenWithBulkInsertion( generator ) ) { + if ( !supportsBulkInsertIdGeneration( IntegerVersioned.class ) ) { + reportSkip( "bulk id generation not supported", "test bulk inserts with= generated id and generated timestamp"); return; } = @@ -407,11 +411,17 @@ = public void testInsertWithGeneratedTimestampVersion() { // Make sure the env supports bulk inserts with generated ids... - EntityPersister persister =3D sfi().getEntityPersister( TimestampVersion= ed.class.getName() ); - IdentifierGenerator generator =3D persister.getIdentifierGenerator(); - if ( !HqlSqlWalker.supportsIdGenWithBulkInsertion( generator ) ) { + if ( !supportsBulkInsertIdGeneration( TimestampVersioned.class ) ) { + reportSkip( "bulk id generation not supported", "test bulk inserts with= generated id and generated timestamp"); return; } + // dialects which do not allow a parameter in the select portion of an I= NSERT ... SELECT statement + // will also be problematic for this test because the timestamp here is = vm-based as opposed to + // db-based. + if ( !getDialect().supportsParametersInInsertSelect() ) { + reportSkip( "dialect does not support parameter in INSERT ... SELECT", = "test bulk inserts with generated id and generated timestamp"); + return; + } = Session s =3D openSession(); Transaction t =3D s.beginTransaction(); --===============5161107014040102299==-- From hibernate-commits at lists.jboss.org Thu May 15 14:10:32 2008 Content-Type: multipart/mixed; boundary="===============7333567077836709492==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14664 - core/branches/Branch_3_2_4_SP1_CP. Date: Thu, 15 May 2008 14:10:32 -0400 Message-ID: --===============7333567077836709492== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: gbadner Date: 2008-05-15 14:10:32 -0400 (Thu, 15 May 2008) New Revision: 14664 Removed: core/branches/Branch_3_2_4_SP1_CP/doc/ Log: Removed doc; it is maintained by content services --===============7333567077836709492==-- From hibernate-commits at lists.jboss.org Thu May 15 16:04:42 2008 Content-Type: multipart/mixed; boundary="===============6213018707873996604==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14665 - in core/branches/Branch_3_2_4_SP1_CP: test/org/hibernate/test/legacy and 1 other directory. Date: Thu, 15 May 2008 16:04:42 -0400 Message-ID: --===============6213018707873996604== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: gbadner Date: 2008-05-15 16:04:42 -0400 (Thu, 15 May 2008) New Revision: 14665 Modified: core/branches/Branch_3_2_4_SP1_CP/build.xml core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/legacy/Configu= rationPerformanceTest.java Log: HIBERNATE-96 : Split distribution into separate source and binary distribut= ions Modified: core/branches/Branch_3_2_4_SP1_CP/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_2_4_SP1_CP/build.xml 2008-05-15 18:10:32 UTC (re= v 14664) +++ core/branches/Branch_3_2_4_SP1_CP/build.xml 2008-05-15 20:04:42 UTC (re= v 14665) @@ -176,10 +176,7 @@ = - - - - + @@ -223,7 +220,7 @@ = = - + @@ -246,7 +243,7 @@ = - + @@ -295,8 +292,19 @@ = - - + + + + + + + = @@ -515,7 +523,7 @@ = = - + @@ -523,28 +531,35 @@ = - - - - - = - + + + + + - - - - - + + + + + = + + + + + + @@ -553,27 +568,10 @@ = - - - - - - - - - - - - - - - + + + + @@ -581,7 +579,6 @@ = - = @@ -672,11 +669,11 @@ = - - + + = - + @@ -687,70 +684,45 @@ = - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + = - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + = - - - + + = Modified: core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/legacy/= ConfigurationPerformanceTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/legacy/Config= urationPerformanceTest.java 2008-05-15 18:10:32 UTC (rev 14664) +++ core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/legacy/Config= urationPerformanceTest.java 2008-05-15 20:04:42 UTC (rev 14665) @@ -83,7 +83,7 @@ = public void testLoadingAndSerializationOfConfiguration() throws Hibernate= Exception, FileNotFoundException, IOException, ClassNotFoundException { = - String prefix =3D "./test/org/hibernate/test/"; + String prefix =3D "./build/testclasses/org/hibernate/test/"; try { // first time System.err.println("###FIRST SAVELOAD###"); --===============6213018707873996604==-- From hibernate-commits at lists.jboss.org Thu May 15 16:49:07 2008 Content-Type: multipart/mixed; boundary="===============4407198364955982969==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14666 - core/tags. Date: Thu, 15 May 2008 16:49:07 -0400 Message-ID: --===============4407198364955982969== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: gbadner Date: 2008-05-15 16:49:07 -0400 (Thu, 15 May 2008) New Revision: 14666 Added: core/tags/JBOSS_EAP_3_2_4_SP1_CP03_STANDALONE/ Log: HIBERNATE-84 : tag for Hibernate 3.2.4.sp1.cp03 standalone Copied: core/tags/JBOSS_EAP_3_2_4_SP1_CP03_STANDALONE (from rev 14665, core= /branches/Branch_3_2_4_SP1_CP) --===============4407198364955982969==-- From hibernate-commits at lists.jboss.org Fri May 16 11:55:53 2008 Content-Type: multipart/mixed; boundary="===============0541606823937442940==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14667 - in core/branches/Branch_3_2_4_SP1_CP: doc and 1 other directories. Date: Fri, 16 May 2008 11:55:53 -0400 Message-ID: --===============0541606823937442940== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: gbadner Date: 2008-05-16 11:55:53 -0400 (Fri, 16 May 2008) New Revision: 14667 Added: core/branches/Branch_3_2_4_SP1_CP/doc/ core/branches/Branch_3_2_4_SP1_CP/doc/api/ core/branches/Branch_3_2_4_SP1_CP/doc/api/jdstyle.css core/branches/Branch_3_2_4_SP1_CP/doc/api/package.html Log: Adding doc/api back in Added: core/branches/Branch_3_2_4_SP1_CP/doc/api/jdstyle.css =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_2_4_SP1_CP/doc/api/jdstyle.css = (rev 0) +++ core/branches/Branch_3_2_4_SP1_CP/doc/api/jdstyle.css 2008-05-16 15:55:= 53 UTC (rev 14667) @@ -0,0 +1,117 @@ +/* Javadoc style sheet */ + +/* Define colors, fonts and other style attributes here to override the de= faults */ + +/* Page background color */ +body { font-family: Arial; + background-color: white; + font-size: 10pt; + } +td { font-family: Arial; + font-size: 10pt; + } +/* Table colors */ +.TableHeadingColor { background: #F4F4F4 } +.TableSubHeadingColor { background: #F4F4F4 } +.TableRowColor { background: #FFFFFF } + +/* Font used in left-hand frame lists */ +.FrameTitleFont { font-size: normal; font-family: Arial } +.FrameHeadingFont { font-size: normal; font-family: Arial } +.FrameItemFont { font-size: normal; font-family: Arial } + +/* Example of smaller, sans-serif font in frames */ +/* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-= serif } */ + +/* Navigation bar fonts and colors */ +.NavBarCell1 { background-color:#F4F4F4;} +.NavBarCell1Rev { background-color:silver;} + +.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000= ;} +.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF= ;} + +.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-co= lor:#FFFFFF;} +.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-co= lor:#FFFFFF;} + +A { + color: #003399; +} + +A:active { + color: #003399; +} + +A:visited { + color: #888888; +} + +P, OL, UL, LI, DL, DT, DD, BLOCKQUOTE { + color: #000000; +} + +TD, TH, SPAN { + color: #000000; +} + +BLOCKQUOTE { + margin-right: 0px; +} + + +/*H1, H2, H3, H4, H5, H6 { + color: #000000; + font-weight:500; + margin-top:10px; + padding-top:15px; +} + +H1 { font-size: 150%; } +H2 { font-size: 140%; } +H3 { font-size: 110%; font-weight: bold; } +H4 { font-size: 110%; font-weight: bold;} +H5 { font-size: 100%; font-style: italic; } +H6 { font-size: 100%; font-style: italic; }*/ + +TT { +font-size: 90%; + font-family: "Courier New", Courier, monospace; + color: #000000; +} + +PRE { +font-size: 90%; + padding: 5px; + border-style: solid; + border-width: 1px; + border-color: #CCCCCC; + background-color: #F4F4F4; +} + +UL, OL, LI { + list-style: disc; +} + +HR { + width: 100%; + height: 1px; + background-color: #CCCCCC; + border-width: 0px; + padding: 0px; + color: #CCCCCC; +} + +.variablelist { = + padding-top: 10; = + padding-bottom:10; = + margin:0; +} + +.itemizedlist, UL { = + padding-top: 0; = + padding-bottom:0; = + margin:0; = +} + +.term { = + font-weight:bold; +} Added: core/branches/Branch_3_2_4_SP1_CP/doc/api/package.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_2_4_SP1_CP/doc/api/package.html = (rev 0) +++ core/branches/Branch_3_2_4_SP1_CP/doc/api/package.html 2008-05-16 15:55= :53 UTC (rev 14667) @@ -0,0 +1,39 @@ + + +

Hibernate API

+ +This documentation concentrates upon the following Core API interfa= ces: +
  • org.hibernate.Hibernate
  • +
  • org.hibernate.Session
  • +
  • org.hibernate.SessionFactory
  • +
  • org.hibernate.Transaction
  • +
  • org.hibernate.Query
  • +
  • org.hibernate.Criteria
  • +
  • org.hibernate.ScrollableResults
  • +
  • org.hibernate.cfg.Configuration
  • +
  • org.hibernate.expression.Expression
  • +
  • org.hibernate.expression.Order
  • +
  • org.hibernate.expression.Example
  • +These interfaces are fully intended to be exposed to application code.
    +
    +The Extension API is intended to be used by application programmers +to extend Hibernate functionality. None of these interfaces are intended +to be called by the application - they are called internally by Hibernate. +This API is less stable than the Core API. The safest way to extend +functionality is to contribute extensions back to the project; that way +extensions will be updated when the Extension API changes.
    +
    +Full Hibernate documentation may be found at +hibernate.org. +(a)see org.hibernate.Hibernate +(a)see org.hibernate.Session +(a)see org.hibernate.SessionFactory +(a)see org.hibernate.Transaction +(a)see org.hibernate.Query +(a)see org.hibernate.Criteria +(a)see org.hibernate.ScrollableResults +(a)see org.hibernate.cfg.Configuration +(a)see org.hibernate.expression.Expression +(a)see org.hibernate.expression.Order +(a)see org.hibernate.expression.Example + --===============0541606823937442940==-- From hibernate-commits at lists.jboss.org Fri May 16 11:59:01 2008 Content-Type: multipart/mixed; boundary="===============5925443505699639843==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14668 - core/tags. Date: Fri, 16 May 2008 11:59:01 -0400 Message-ID: --===============5925443505699639843== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: gbadner Date: 2008-05-16 11:59:01 -0400 (Fri, 16 May 2008) New Revision: 14668 Removed: core/tags/JBOSS_EAP_3_2_4_SP1_CP03_STANDALONE/ Log: Removing the tag; it will be recreated with API dependencies --===============5925443505699639843==-- From hibernate-commits at lists.jboss.org Fri May 16 12:27:59 2008 Content-Type: multipart/mixed; boundary="===============6879694800978211361==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14669 - core/tags. Date: Fri, 16 May 2008 12:27:59 -0400 Message-ID: --===============6879694800978211361== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: gbadner Date: 2008-05-16 12:27:59 -0400 (Fri, 16 May 2008) New Revision: 14669 Added: core/tags/JBOSS_EAP_3_2_4_SP1_CP03_STANDALONE/ Log: Retagging with dependencies for building javadoc Copied: core/tags/JBOSS_EAP_3_2_4_SP1_CP03_STANDALONE (from rev 14668, core= /branches/Branch_3_2_4_SP1_CP) --===============6879694800978211361==-- From hibernate-commits at lists.jboss.org Sat May 17 08:47:33 2008 Content-Type: multipart/mixed; boundary="===============0858559869409147982==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14670 - in commons-annotations/trunk: src/java/org/hibernate/annotations/common and 1 other directory. Date: Sat, 17 May 2008 08:47:33 -0400 Message-ID: --===============0858559869409147982== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-17 08:47:32 -0400 (Sat, 17 May 2008) New Revision: 14670 Modified: commons-annotations/trunk/ivy.xml commons-annotations/trunk/pom.xml commons-annotations/trunk/src/java/org/hibernate/annotations/common/Asse= rtionFailure.java Log: HCANN-1 move to slf4j Modified: commons-annotations/trunk/ivy.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- commons-annotations/trunk/ivy.xml 2008-05-16 16:27:59 UTC (rev 14669) +++ commons-annotations/trunk/ivy.xml 2008-05-17 12:47:32 UTC (rev 14670) @@ -13,11 +13,8 @@ - default"/> + default"/> = - - default"/> - default"/> default"/> Modified: commons-annotations/trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- commons-annotations/trunk/pom.xml 2008-05-16 16:27:59 UTC (rev 14669) +++ commons-annotations/trunk/pom.xml 2008-05-17 12:47:32 UTC (rev 14670) @@ -20,9 +20,9 @@ - commons-logging - commons-logging - 1.0.4 - + org.slf4j + slf4j-api + 1.4.2 + \ No newline at end of file Modified: commons-annotations/trunk/src/java/org/hibernate/annotations/comm= on/AssertionFailure.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- commons-annotations/trunk/src/java/org/hibernate/annotations/common/Ass= ertionFailure.java 2008-05-16 16:27:59 UTC (rev 14669) +++ commons-annotations/trunk/src/java/org/hibernate/annotations/common/Ass= ertionFailure.java 2008-05-17 12:47:32 UTC (rev 14670) @@ -1,9 +1,10 @@ //$Id: $ package org.hibernate.annotations.common; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; = + /** * Indicates failure of an assertion: a possible bug in Hibernate. * @@ -13,7 +14,7 @@ //TODO Copy from Hibernate Core, do some mutualization here? public class AssertionFailure extends RuntimeException { = - private static final Log log =3D LogFactory.getLog(AssertionFailure.class= ); + private static final Logger log =3D LoggerFactory.getLogger(AssertionFail= ure.class); = private static final String MESSAGE =3D "an assertion failure occured (th= is may indicate a bug in Hibernate)"; = --===============0858559869409147982==-- From hibernate-commits at lists.jboss.org Sat May 17 08:49:38 2008 Content-Type: multipart/mixed; boundary="===============8221554846171933715==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14671 - in annotations/trunk: src/java/org/hibernate/cfg and 5 other directories. Date: Sat, 17 May 2008 08:49:38 -0400 Message-ID: --===============8221554846171933715== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-17 08:49:38 -0400 (Sat, 17 May 2008) New Revision: 14671 Modified: annotations/trunk/ivy.xml annotations/trunk/pom.xml annotations/trunk/src/java/org/hibernate/cfg/AnnotationBinder.java annotations/trunk/src/java/org/hibernate/cfg/AnnotationConfiguration.java annotations/trunk/src/java/org/hibernate/cfg/BinderHelper.java annotations/trunk/src/java/org/hibernate/cfg/EJB3DTDEntityResolver.java annotations/trunk/src/java/org/hibernate/cfg/Ejb3Column.java annotations/trunk/src/java/org/hibernate/cfg/ExtendedMappings.java annotations/trunk/src/java/org/hibernate/cfg/annotations/CollectionBinde= r.java annotations/trunk/src/java/org/hibernate/cfg/annotations/EntityBinder.ja= va annotations/trunk/src/java/org/hibernate/cfg/annotations/ListBinder.java annotations/trunk/src/java/org/hibernate/cfg/annotations/PropertyBinder.= java annotations/trunk/src/java/org/hibernate/cfg/annotations/QueryBinder.java annotations/trunk/src/java/org/hibernate/cfg/annotations/ResultsetMappin= gSecondPass.java annotations/trunk/src/java/org/hibernate/cfg/annotations/SetBinder.java annotations/trunk/src/java/org/hibernate/cfg/annotations/SimpleValueBind= er.java annotations/trunk/src/java/org/hibernate/cfg/annotations/TableBinder.java annotations/trunk/src/java/org/hibernate/cfg/annotations/Version.java annotations/trunk/src/java/org/hibernate/cfg/annotations/reflection/EJB3= OverridenAnnotationReader.java annotations/trunk/src/java/org/hibernate/cfg/annotations/reflection/XMLC= ontext.java annotations/trunk/src/java/org/hibernate/cfg/search/SearchConfiguration.= java annotations/trunk/src/java/org/hibernate/type/EnumType.java annotations/trunk/src/test/org/hibernate/test/annotations/reflection/Log= Listener.java annotations/trunk/src/test/org/hibernate/test/annotations/reflection/Oth= erLogListener.java Log: ANN-741 move to slf4j Modified: annotations/trunk/ivy.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/ivy.xml 2008-05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/ivy.xml 2008-05-17 12:49:38 UTC (rev 14671) @@ -16,11 +16,11 @@ default"/> default"/> default"/> - default"/> default"/> + default"/> = + - default"/> default"/> default"/> = Modified: annotations/trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/pom.xml 2008-05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/pom.xml 2008-05-17 12:49:38 UTC (rev 14671) @@ -38,10 +38,10 @@ 3.3.0.CR1 - commons-logging - commons-logging - 1.0.4 - + org.slf4j + slf4j-api + 1.4.2 + dom4j dom4j Modified: annotations/trunk/src/java/org/hibernate/cfg/AnnotationBinder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/cfg/AnnotationBinder.java 2008= -05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/cfg/AnnotationBinder.java 2008= -05-17 12:49:38 UTC (rev 14671) @@ -49,8 +49,6 @@ import javax.persistence.Transient; import javax.persistence.Version; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.AnnotationException; import org.hibernate.AssertionFailure; import org.hibernate.EntityMode; @@ -135,6 +133,8 @@ import org.hibernate.persister.entity.UnionSubclassEntityPersister; import org.hibernate.type.TypeFactory; import org.hibernate.util.StringHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * JSR 175 annotation binder @@ -165,7 +165,7 @@ private AnnotationBinder() { } = - private static final Log log =3D LogFactory.getLog( AnnotationBinder.clas= s ); + private static final Logger log =3D LoggerFactory.getLogger( AnnotationBi= nder.class ); = public static void bindDefaults(ExtendedMappings mappings) { Map defaults =3D mappings.getReflectionManager().getDefaults(); @@ -219,14 +219,14 @@ pckg =3D mappings.getReflectionManager().packageForName( packageName ); } catch (ClassNotFoundException cnf) { - log.warn( "Package not found or wo package-info.java: " + packageName ); + log.warn( "Package not found or wo package-info.java: {}", packageName = ); return; } if ( pckg.isAnnotationPresent( SequenceGenerator.class ) ) { SequenceGenerator ann =3D pckg.getAnnotation( SequenceGenerator.class ); IdGenerator idGen =3D buildIdGenerator( ann, mappings ); mappings.addGenerator( idGen ); - log.debug( "Add sequence generator with name: " + idGen.getName() ); + log.debug( "Add sequence generator with name: {}", idGen.getName() ); } if ( pckg.isAnnotationPresent( TableGenerator.class ) ) { TableGenerator ann =3D pckg.getAnnotation( TableGenerator.class ); @@ -351,7 +351,7 @@ idGen.addParam( MultipleHiLoPerTableGenerator.PK_VALUE_NAME, tabGen.pk= ColumnValue() ); } idGen.addParam( TableHiLoGenerator.MAX_LO, String.valueOf( tabGen.alloc= ationSize() - 1 ) ); - log.debug( "Add table generator with name: " + idGen.getName() ); + log.debug( "Add table generator with name: {}", idGen.getName() ); } else if ( ann instanceof SequenceGenerator ) { SequenceGenerator seqGen =3D (SequenceGenerator) ann; @@ -368,7 +368,7 @@ ); } idGen.addParam( SequenceHiLoGenerator.MAX_LO, String.valueOf( seqGen.al= locationSize() - 1 ) ); - log.debug( "Add sequence generator with name: " + idGen.getName() ); + log.debug( "Add sequence generator with name: {}", idGen.getName() ); } else if ( ann instanceof GenericGenerator ) { GenericGenerator genGen =3D (GenericGenerator) ann; @@ -378,7 +378,7 @@ for (Parameter parameter : params) { idGen.addParam( parameter.name(), parameter.value() ); } - log.debug( "Add generic generator with name: " + idGen.getName() ); + log.debug( "Add generic generator with name: {}", idGen.getName() ); } else { throw new AssertionFailure( "Unknown Generator annotation: " + ann ); @@ -403,7 +403,7 @@ if ( AnnotatedClassType.NONE.equals( classType ) && clazzToProcess.isAnnotationPresent( org.hibernate.annotations.Enti= ty.class ) ) { log.warn( "Class annotated @org.hibernate.annotations.Entity but not j= avax.persistence.Entity " - + "(most likely a user error): " + clazzToProcess.getName() ); + + "(most likely a user error): {}", clazzToProcess.getName() ); } return; } @@ -415,7 +415,7 @@ ); } XAnnotatedElement annotatedClass =3D clazzToProcess; - if ( log.isInfoEnabled() ) log.info( "Binding entity from annotated clas= s: " + clazzToProcess.getName() ); + log.info( "Binding entity from annotated class: {}", clazzToProcess.getN= ame() ); InheritanceState superEntityState =3D InheritanceState.getSuperEntityInheritanceState( clazzToProcess, inheritanceStatePerClass, mappings.getReflectionMana= ger() @@ -507,8 +507,8 @@ } if ( discAnn !=3D null && inheritanceState.hasParents ) { log.warn( - "Discriminator column has to be defined in the root entity, it will = be ignored in subclass: " - + clazzToProcess.getName() + "Discriminator column has to be defined in the root entity, it will = be ignored in subclass: {}", + clazzToProcess.getName() ); } discrimValue =3D annotatedClass.isAnnotationPresent( DiscriminatorValue= .class ) ? @@ -655,7 +655,7 @@ } if ( onDeleteAnn !=3D null && !onDeleteAppropriate ) { log.warn( - "Inapropriate use of @OnDelete on entity, annotation ignored: " + pro= pertyHolder.getEntityName() + "Inapropriate use of @OnDelete on entity, annotation ignored: {}", pr= opertyHolder.getEntityName() ); } = @@ -944,7 +944,7 @@ params.put( param.name(), TypeFactory.heuristicType( param.type() ) ); } FilterDefinition def =3D new FilterDefinition( defAnn.name(), defAnn.def= aultCondition(), params ); - if ( log.isInfoEnabled() ) log.info( "Binding filter definition: " + def= .getFilterName() ); + log.info( "Binding filter definition: {}", def.getFilterName() ); mappings.addFilterDefinition( def ); } = @@ -966,7 +966,7 @@ for (Parameter param : defAnn.parameters()) { params.setProperty( param.name(), param.value() ); } - if ( log.isInfoEnabled() ) log.info( "Binding type definition: " + defAn= n.name() ); + log.info( "Binding type definition: {}", defAnn.name() ); mappings.addTypeDef( defAnn.name(), defAnn.typeClass().getName(), params= ); } = @@ -986,7 +986,7 @@ discriminatorColumn.linkWithValue( discrim ); discrim.setTypeName( discriminatorColumn.getDiscriminatorTypeName() ); rootClass.setPolymorphic( true ); - log.debug( "Setting discriminator for entity " + rootClass.getEntityNam= e() ); + log.debug( "Setting discriminator for entity {}", rootClass.getEntityNa= me() ); } } = @@ -1019,7 +1019,7 @@ } } = - log.debug( "Processing " + propertyHolder.getEntityName() + " " + access= Type + " annotation" ); + log.debug( "Processing {} {} annotation", propertyHolder.getEntityName()= , accessType ); List properties =3D annotatedClass.getDeclaredProperties( acc= essType ); //order so that property are used in the same order when binding native = query Collections.sort( properties, new Comparator() { @@ -1130,11 +1130,9 @@ */ Ejb3Column[] columns =3D null; Ejb3JoinColumn[] joinColumns =3D null; - if ( log.isDebugEnabled() ) { - log.debug( - "Processing annotations of " + propertyHolder.getEntityName() + "." += inferredData.getPropertyName() - ); - } + log.debug( + "Processing annotations of {}.{}", propertyHolder.getEntityName(), inf= erredData.getPropertyName() + ); = if ( property.isAnnotationPresent( Parent.class ) ) { if ( propertyHolder.isComponent() ) { @@ -1256,7 +1254,7 @@ "@IdClass class should not have @Id nor @EmbeddedId properties" ); } - log.debug( inferredData.getPropertyName() + " is an id" ); + log.debug( "{} is an id", inferredData.getPropertyName() ); //clone classGenerator and override with local values HashMap localGenerators =3D (HashMap) classGenerators.clone(); localGenerators.putAll( buildLocalGenerators( property, mappings ) ); @@ -1292,13 +1290,9 @@ false, isIdentifierMapper, mappings ); - if ( log.isDebugEnabled() ) { - log.debug( - "Bind " + ( isComponent ? - "@EmbeddedId" : - "@Id" ) + " on " + inferredData.getPropertyName() - ); - } + log.debug( + "Bind {} on {}", ( isComponent ? "@EmbeddedId" : "@Id" ), inferredDat= a.getPropertyName() + ); } else if ( property.isAnnotationPresent( Version.class ) ) { if ( isIdentifierMapper ) { @@ -1318,7 +1312,7 @@ + propertyHolder.getEntityName() ); } - log.debug( inferredData.getPropertyName() + " is a version property" ); + log.debug( "{} is a version property", inferredData.getPropertyName() ); RootClass rootClass =3D (RootClass) propertyHolder.getPersistentClass(); PropertyBinder propBinder =3D new PropertyBinder(); propBinder.setName( inferredData.getPropertyName() ); @@ -1338,9 +1332,8 @@ simpleValue.setNullValue( "undefined" ); rootClass.setOptimisticLockMode( Versioning.OPTIMISTIC_LOCK_VERSION ); log.debug( - "Version name: " + rootClass.getVersion().getName() + ", unsavedValue= : " + ( (SimpleValue) rootClass - .getVersion() - .getValue() ).getNullValue() + "Version name: {}, unsavedValue: {}", rootClass.getVersion().getName(= ), + ( (SimpleValue) rootClass.getVersion().getValue() ).getNullValue() ); } else if ( property.isAnnotationPresent( ManyToOne.class ) ) { @@ -1812,7 +1805,7 @@ } comp.setNodeName( inferredData.getPropertyName() ); String subpath =3D StringHelper.qualify( propertyHolder.getPath(), infer= redData.getPropertyName() ); - log.debug( "Binding component with path: " + subpath ); + log.debug( "Binding component with path: {}", subpath ); PropertyHolder subHolder =3D PropertyHolderBuilder.buildPropertyHolder( comp, subpath, inferredData, propertyHolder, mappings @@ -2066,7 +2059,7 @@ ) { //column.getTable() =3D> persistentClass.getTable() final String propertyName =3D inferredData.getPropertyName(); - log.debug( "Fetching " + propertyName + " with " + fetchMode ); + log.debug( "Fetching {} with {}", propertyName, fetchMode ); boolean mapToPK =3D true; if ( !trueOneToOne ) { //try to find a hidden true one to one (FK =3D=3D PK columns) @@ -2313,8 +2306,8 @@ final boolean mixingStrategy =3D state.type !=3D null && !state.type.= equals( superclassState.type ); if ( nonDefault && mixingStrategy ) { log.warn( - "Mixing inheritance strategy in a entity hierarchy is not allowed,= ignoring sub strategy in: " + clazz - .getName() + "Mixing inheritance strategy in a entity hierarchy is not allowed,= ignoring sub strategy in: {}", + clazz.getName() ); } state.type =3D superclassState.type; Modified: annotations/trunk/src/java/org/hibernate/cfg/AnnotationConfigurat= ion.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/cfg/AnnotationConfiguration.ja= va 2008-05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/cfg/AnnotationConfiguration.ja= va 2008-05-17 12:49:38 UTC (rev 14671) @@ -6,6 +6,7 @@ import java.io.InputStream; import java.lang.reflect.Constructor; import java.lang.reflect.Method; +import java.net.URL; import java.util.ArrayList; import java.util.Collection; import java.util.Comparator; @@ -20,13 +21,9 @@ import java.util.SortedSet; import java.util.StringTokenizer; import java.util.TreeSet; -import java.net.URL; - import javax.persistence.Entity; import javax.persistence.MappedSuperclass; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.dom4j.Attribute; import org.dom4j.Document; import org.dom4j.DocumentException; @@ -34,21 +31,17 @@ import org.dom4j.io.SAXReader; import org.hibernate.AnnotationException; import org.hibernate.HibernateException; +import org.hibernate.Interceptor; import org.hibernate.MappingException; import org.hibernate.SessionFactory; -import org.hibernate.Interceptor; import org.hibernate.annotations.AnyMetaDef; import org.hibernate.annotations.common.reflection.ReflectionManager; import org.hibernate.annotations.common.reflection.XClass; import org.hibernate.cfg.annotations.Version; import org.hibernate.cfg.annotations.reflection.EJB3ReflectionManager; import org.hibernate.cfg.search.SearchConfiguration; -import org.hibernate.event.PostDeleteEventListener; -import org.hibernate.event.PostInsertEventListener; -import org.hibernate.event.PostUpdateEventListener; import org.hibernate.event.PreInsertEventListener; import org.hibernate.event.PreUpdateEventListener; -import org.hibernate.event.EventListeners; import org.hibernate.mapping.Column; import org.hibernate.mapping.Join; import org.hibernate.mapping.PersistentClass; @@ -59,6 +52,8 @@ import org.hibernate.util.StringHelper; import org.xml.sax.InputSource; import org.xml.sax.SAXException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Similar to the {@link Configuration} object but handles EJB3 and Hibern= ate @@ -67,7 +62,7 @@ * @author Emmanuel Bernard */ public class AnnotationConfiguration extends Configuration { - private static Log log =3D LogFactory.getLog( AnnotationConfiguration.cla= ss ); + private Logger log =3D LoggerFactory.getLogger( AnnotationConfiguration.c= lass ); = static { Version.touch(); //touch version @@ -167,7 +162,7 @@ * @return the configuration object */ public AnnotationConfiguration addPackage(String packageName) throws Mapp= ingException { - log.info( "Mapping package " + packageName ); + log.info( "Mapping package {}", packageName ); try { AnnotationBinder.bindPackage( packageName, createExtendedMappings() ); return this; @@ -537,7 +532,7 @@ annotatedClassEntities.clear(); } else { - log.warn( "Unknown artifact: " + artifact ); + log.warn( "Unknown artifact: {}", artifact ); } } = @@ -613,24 +608,24 @@ Attribute pckg =3D subelement.attribute( "package" ); Attribute clazz =3D subelement.attribute( "class" ); if ( rsrc !=3D null ) { - log.debug( name + "<-" + rsrc ); + log.debug( "{} <- {}", name, rsrc ); addResource( rsrc.getValue() ); } else if ( jar !=3D null ) { - log.debug( name + "<-" + jar ); + log.debug( "{} <- {}", name, jar ); addJar( new File( jar.getValue() ) ); } else if ( file !=3D null ) { - log.debug( name + "<-" + file ); + log.debug( "{} <- {}", name, file ); addFile( file.getValue() ); } else if ( pckg !=3D null ) { - log.debug( name + "<-" + pckg ); + log.debug( "{} <- {}", name, pckg ); addPackage( pckg.getValue() ); } else if ( clazz !=3D null ) { - log.debug( name + "<-" + clazz ); - Class loadedClass =3D null; + log.debug( "{} <- {}", name, clazz ); + Class loadedClass; try { loadedClass =3D ReflectHelper.classForName( clazz.getValue() ); } Modified: annotations/trunk/src/java/org/hibernate/cfg/BinderHelper.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/cfg/BinderHelper.java 2008-05-= 17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/cfg/BinderHelper.java 2008-05-= 17 12:49:38 UTC (rev 14671) @@ -12,8 +12,6 @@ import java.util.Set; import java.util.StringTokenizer; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.AnnotationException; import org.hibernate.AssertionFailure; import org.hibernate.MappingException; @@ -42,6 +40,8 @@ import org.hibernate.mapping.Value; import org.hibernate.type.TypeFactory; import org.hibernate.util.StringHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * @author Emmanuel Bernard @@ -49,7 +49,7 @@ public class BinderHelper { = public static final String ANNOTATION_STRING_DEFAULT =3D ""; - private static Log log =3D LogFactory.getLog( BinderHelper.class ); + private static Logger log =3D LoggerFactory.getLogger( BinderHelper.class= ); = private BinderHelper() { } @@ -550,7 +550,7 @@ = private static void bindAnyMetaDef(AnyMetaDef defAnn, ExtendedMappings ma= ppings) { if ( isDefault( defAnn.name() ) ) return; //don't map not named definiti= ons - if ( log.isInfoEnabled() ) log.info( "Binding Any Meta definition: " + d= efAnn.name() ); + log.info( "Binding Any Meta definition: {}", defAnn.name() ); mappings.addAnyMetaDef( defAnn ); } } Modified: annotations/trunk/src/java/org/hibernate/cfg/EJB3DTDEntityResolve= r.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/cfg/EJB3DTDEntityResolver.java= 2008-05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/cfg/EJB3DTDEntityResolver.java= 2008-05-17 12:49:38 UTC (rev 14671) @@ -3,11 +3,11 @@ = import java.io.InputStream; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.util.DTDEntityResolver; import org.xml.sax.EntityResolver; import org.xml.sax.InputSource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * @author Emmanuel Bernard @@ -15,7 +15,7 @@ public class EJB3DTDEntityResolver extends DTDEntityResolver { public static final EntityResolver INSTANCE =3D new EJB3DTDEntityResolver= (); = - private static final Log log =3D LogFactory.getLog( EJB3DTDEntityResolver= .class ); + private final Logger log =3D LoggerFactory.getLogger( EJB3DTDEntityResolv= er.class ); = boolean resolved =3D false; = @@ -34,10 +34,10 @@ String path =3D "org/hibernate/ejb/" + "orm_1_0.xsd"; InputStream dtdStream =3D resolveInHibernateNamespace( path ); if ( dtdStream =3D=3D null ) { - log.debug( "unable to locate [" + systemId + "] on classpath" ); + log.debug( "unable to locate [{}] on classpath", systemId ); } else { - log.debug( "located [" + systemId + "] in classpath" ); + log.debug( "located [{}] in classpath", systemId ); InputSource source =3D new InputSource( dtdStream ); source.setPublicId( publicId ); source.setSystemId( systemId ); @@ -52,10 +52,10 @@ String path =3D "org/hibernate/ejb/" + "persistence_1_0.xsd"; InputStream dtdStream =3D resolveInHibernateNamespace( path ); if ( dtdStream =3D=3D null ) { - log.debug( "unable to locate [" + systemId + "] on classpath" ); + log.debug( "unable to locate [{}] on classpath", systemId ); } else { - log.debug( "located [" + systemId + "] in classpath" ); + log.debug( "located [{}] in classpath", systemId ); InputSource source =3D new InputSource( dtdStream ); source.setPublicId( publicId ); source.setSystemId( systemId ); Modified: annotations/trunk/src/java/org/hibernate/cfg/Ejb3Column.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/cfg/Ejb3Column.java 2008-05-17= 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/cfg/Ejb3Column.java 2008-05-17= 12:49:38 UTC (rev 14671) @@ -3,8 +3,6 @@ = import java.util.Map; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.AnnotationException; import org.hibernate.AssertionFailure; import org.hibernate.annotations.Index; @@ -15,6 +13,8 @@ import org.hibernate.mapping.SimpleValue; import org.hibernate.mapping.Table; import org.hibernate.util.StringHelper; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; = /** * Wrap state of an EJB3 @Column annotation @@ -23,7 +23,7 @@ * @author Emmanuel Bernard */ public class Ejb3Column { - private static final Log log =3D LogFactory.getLog( Ejb3Column.class ); + private static final Logger log =3D LoggerFactory.getLogger( Ejb3Column.c= lass ); private Column mappingColumn; private boolean insertable =3D true; private boolean updatable =3D true; @@ -150,7 +150,7 @@ = public void bind() { if ( StringHelper.isNotEmpty( formulaString ) ) { - log.debug( "binding formula " + formulaString ); + log.debug( "binding formula {}", formulaString ); formula =3D new Formula(); formula.setFormula( formulaString ); } @@ -158,7 +158,7 @@ initMappingColumn( logicalColumnName, propertyName, length, precision, scale, nullable, = sqlType, unique, true ); - log.debug( "Binding column " + mappingColumn.getName() + " unique " + u= nique ); + log.debug( "Binding column {}. Unique {}", mappingColumn.getName(), uni= que ); } } = @@ -336,7 +336,7 @@ throw new AnnotationException( "AttributeOverride.column() should ove= rride all columns for now" ); } actualCols =3D overriddenCols.length =3D=3D 0 ? null : overriddenCols; - log.debug( "Column(s) overridden for property " + inferredData.getProp= ertyName() ); + log.debug( "Column(s) overridden for property {}", inferredData.getPro= pertyName() ); } if ( actualCols =3D=3D null ) { columns =3D buildImplicitColumn( inferredData, secondaryTables, proper= tyHolder, nullability, mappings ); Modified: annotations/trunk/src/java/org/hibernate/cfg/ExtendedMappings.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/cfg/ExtendedMappings.java 2008= -05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/cfg/ExtendedMappings.java 2008= -05-17 12:49:38 UTC (rev 14671) @@ -10,8 +10,6 @@ import javax.persistence.Entity; import javax.persistence.MappedSuperclass; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.AnnotationException; import org.hibernate.MappingException; import org.hibernate.annotations.AnyMetaDef; @@ -24,6 +22,8 @@ import org.hibernate.mapping.Join; import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.Table; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; = /** * Allow annotation related mappings @@ -34,7 +34,7 @@ */ public class ExtendedMappings extends Mappings { = - private static final Log log =3D LogFactory.getLog( ExtendedMappings.clas= s ); + private final Logger log =3D LoggerFactory.getLogger( ExtendedMappings.cl= ass ); = private final Map namedGenerators; private final Map> joins; @@ -102,13 +102,13 @@ public void addGenerator(IdGenerator generator) throws MappingException { if ( !defaultNamedGenerators.contains( generator.getName() ) ) { Object old =3D namedGenerators.put( generator.getName(), generator ); - if ( old !=3D null ) log.warn( "duplicate generator name: " + generator= .getName() ); + if ( old !=3D null ) log.warn( "duplicate generator name: {}", generato= r.getName() ); } } = public void addJoins(PersistentClass persistentClass, Map j= oins) throws MappingException { Object old =3D this.joins.put( persistentClass.getEntityName(), joins ); - if ( old !=3D null ) log.warn( "duplicate joins for class: " + persisten= tClass.getEntityName() ); + if ( old !=3D null ) log.warn( "duplicate joins for class: {}", persiste= ntClass.getEntityName() ); } = public AnnotatedClassType addClassType(XClass clazz) { @@ -169,7 +169,7 @@ = public void addGeneratorTable(String name, Properties params) { Object old =3D generatorTables.put( name, params ); - if ( old !=3D null ) log.warn( "duplicate generator table: " + name ); + if ( old !=3D null ) log.warn( "duplicate generator table: {}", name ); } = public Properties getGeneratorTableProperties(String name, Map localGeneratorTables) { Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/Collecti= onBinder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/cfg/annotations/CollectionBind= er.java 2008-05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/cfg/annotations/CollectionBind= er.java 2008-05-17 12:49:38 UTC (rev 14671) @@ -16,8 +16,6 @@ import javax.persistence.MapKey; import javax.persistence.OneToMany; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.AnnotationException; import org.hibernate.AssertionFailure; import org.hibernate.FetchMode; @@ -81,6 +79,8 @@ import org.hibernate.mapping.SimpleValue; import org.hibernate.mapping.Table; import org.hibernate.util.StringHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Collection binder @@ -90,7 +90,7 @@ */ public abstract class CollectionBinder { = - private static final Log log =3D LogFactory.getLog( CollectionBinder.clas= s ); + private Logger log =3D LoggerFactory.getLogger( CollectionBinder.class ); = protected Collection collection; protected String propertyName; @@ -307,7 +307,7 @@ = public void bind() { this.collection =3D createCollection( propertyHolder.getPersistentClass(= ) ); - log.debug( "Collection role: " + StringHelper.qualify( propertyHolder.ge= tPath(), propertyName ) ); + log.debug( "Collection role: {}", StringHelper.qualify( propertyHolder.g= etPath(), propertyName ) ); collection.setRole( StringHelper.qualify( propertyHolder.getPath(), prop= ertyName ) ); collection.setNodeName( propertyName ); = @@ -617,11 +617,8 @@ XClass collectionType, boolean cascadeDeleteEnabled, boolean ignoreNotFound, String hqlOrderBy= , ExtendedMappings extendedMappings ) { - if ( log.isDebugEnabled() ) { - log.debug( - "Binding a OneToMany: " + propertyHolder.getEntityName() + "." + prop= ertyName + " through a foreign key" - ); - } + + log.debug("Binding a OneToMany: {}.{} through a foreign key", propertyHo= lder.getEntityName(), propertyName); org.hibernate.mapping.OneToMany oneToMany =3D new org.hibernate.mapping.= OneToMany( collection.getOwner() ); collection.setElement( oneToMany ); oneToMany.setReferencedEntityName( collectionType.getName() ); @@ -1049,16 +1046,16 @@ if ( log.isDebugEnabled() ) { String path =3D collValue.getOwnerEntityName() + "." + joinColumns[0].g= etPropertyName(); if ( isCollectionOfEntities && unique ) { - log.debug( "Binding a OneToMany: " + path + " through an association t= able" ); + log.debug( "Binding a OneToMany: {} through an association table", pat= h ); } else if ( isCollectionOfEntities ) { - log.debug( "Binding as ManyToMany: " + path ); + log.debug( "Binding as ManyToMany: {}", path ); } else if ( anyAnn !=3D null ) { - log.debug( "Binding a ManyToAny: " + path ); + log.debug( "Binding a ManyToAny: {}", path ); } else { - log.debug( "Binding a collection of element: " + path ); + log.debug( "Binding a collection of element: {}", path ); } } //check for user error Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/EntityBi= nder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/cfg/annotations/EntityBinder.j= ava 2008-05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/cfg/annotations/EntityBinder.j= ava 2008-05-17 12:49:38 UTC (rev 14671) @@ -14,8 +14,6 @@ import javax.persistence.SecondaryTables; import javax.persistence.UniqueConstraint; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.AnnotationException; import org.hibernate.AssertionFailure; import org.hibernate.EntityMode; @@ -61,6 +59,8 @@ import org.hibernate.mapping.Value; import org.hibernate.util.ReflectHelper; import org.hibernate.util.StringHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Stateful holder and processor for binding Entity information @@ -72,7 +72,7 @@ private XClass annotatedClass; private PersistentClass persistentClass; private ExtendedMappings mappings; - private static Log log =3D LogFactory.getLog( EntityBinder.class ); + private Logger log =3D LoggerFactory.getLogger( EntityBinder.class ); private String discriminatorValue =3D ""; private boolean isPropertyAnnotated =3D false; private boolean dynamicInsert; @@ -192,12 +192,12 @@ } else { if ( explicitHibernateEntityAnnotation ) { - log.warn( "@org.hibernate.annotations.Entity used on a non root entity= : ignored for " - + annotatedClass.getName() ); + log.warn( "@org.hibernate.annotations.Entity used on a non root entity= : ignored for {}", + annotatedClass.getName() ); } if ( annotatedClass.isAnnotationPresent( Immutable.class ) ) { - log.warn( "@Immutable used on a non root entity: ignored for " - + annotatedClass.getName() ); + log.warn( "@Immutable used on a non root entity: ignored for {}", + annotatedClass.getName() ); } } persistentClass.setOptimisticLockMode( getVersioning( optimisticLockType= ) ); @@ -289,10 +289,10 @@ } else { if ( filters.size() > 0 ) { - log.warn( "@Filter not allowed on subclasses (ignored): " + persistent= Class.getEntityName() ); + log.warn( "@Filter not allowed on subclasses (ignored): {}", persisten= tClass.getEntityName() ); } } - log.debug( "Import with entity name=3D" + name ); + log.debug( "Import with entity name {}", name ); try { mappings.addImport( persistentClass.getEntityName(), name ); String entityName =3D persistentClass.getEntityName(); @@ -419,9 +419,7 @@ ); = if ( persistentClass instanceof TableOwner ) { - if ( log.isInfoEnabled() ) { - log.info( "Bind entity " + persistentClass.getEntityName() + " on tabl= e " + table.getName() ); - } + log.info( "Bind entity {} on table {}", persistentClass.getEntityName()= , table.getName() ); ( (TableOwner) persistentClass ).setTable( table ); } else { @@ -630,12 +628,9 @@ else if ( joinTable !=3D null ) { joinColumns =3D joinTable.joinColumns(); } - if ( log.isInfoEnabled() ) { - log.info( - "Adding secondary table to entity " + persistentClass.getEntityName()= + " -> " + join.getTable() - .getName() - ); - } + log.info( + "Adding secondary table to entity {} -> {}", persistentClass.getEntity= Name(), join.getTable().getName() + ); = org.hibernate.annotations.Table matchingTable =3D findMatchingCompliment= TableAnnotation( join ); if ( matchingTable !=3D null ) { Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/ListBind= er.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/cfg/annotations/ListBinder.jav= a 2008-05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/cfg/annotations/ListBinder.jav= a 2008-05-17 12:49:38 UTC (rev 14671) @@ -2,8 +2,6 @@ = import java.util.Map; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.AnnotationException; import org.hibernate.MappingException; import org.hibernate.annotations.OrderBy; @@ -24,6 +22,8 @@ import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.SimpleValue; import org.hibernate.util.StringHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Bind a list @@ -32,7 +32,7 @@ * @author Emmanuel Bernard */ public class ListBinder extends CollectionBinder { - private static Log log =3D LogFactory.getLog( ListBinder.class ); + private Logger log =3D LoggerFactory.getLogger( ListBinder.class ); = public ListBinder() { } Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/Property= Binder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/cfg/annotations/PropertyBinder= .java 2008-05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/cfg/annotations/PropertyBinder= .java 2008-05-17 12:49:38 UTC (rev 14671) @@ -4,8 +4,6 @@ import javax.persistence.EmbeddedId; import javax.persistence.Id; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.AnnotationException; import org.hibernate.annotations.Generated; import org.hibernate.annotations.GenerationTime; @@ -21,12 +19,14 @@ import org.hibernate.mapping.SimpleValue; import org.hibernate.mapping.Value; import org.hibernate.util.StringHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * @author Emmanuel Bernard */ public class PropertyBinder { - private static Log log =3D LogFactory.getLog( PropertyBinder.class ); + private Logger log =3D LoggerFactory.getLogger( PropertyBinder.class ); private String name; private String returnedClassName; private boolean lazy; @@ -103,9 +103,7 @@ = public Property bind() { validateBind(); - if ( log.isDebugEnabled() ) { - log.debug( "binding property " + name + " with lazy=3D" + lazy ); - } + log.debug( "binding property {} with lazy=3D{}", name, lazy ); String containerClassName =3D holder =3D=3D null ? null : holder.getClassName(); Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/QueryBin= der.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/cfg/annotations/QueryBinder.ja= va 2008-05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/cfg/annotations/QueryBinder.ja= va 2008-05-17 12:49:38 UTC (rev 14671) @@ -10,8 +10,6 @@ import javax.persistence.SqlResultSetMapping; import javax.persistence.SqlResultSetMappings; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.AnnotationException; import org.hibernate.AssertionFailure; import org.hibernate.CacheMode; @@ -26,6 +24,8 @@ import org.hibernate.engine.NamedSQLQueryDefinition; import org.hibernate.engine.query.sql.NativeSQLQueryReturn; import org.hibernate.engine.query.sql.NativeSQLQueryRootReturn; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Query binder @@ -33,7 +33,7 @@ * @author Emmanuel Bernard */ public abstract class QueryBinder { - private static Log log =3D LogFactory.getLog( QueryBinder.class ); + private static final Logger log =3D LoggerFactory.getLogger( QueryBinder.= class ); = public static void bindQuery(NamedQuery queryAnn, ExtendedMappings mappin= gs, boolean isDefault) { if ( queryAnn =3D=3D null ) return; @@ -61,7 +61,7 @@ else { mappings.addQuery( queryAnn.name(), query ); } - if ( log.isInfoEnabled() ) log.info( "Binding Named query: " + queryAnn.= name() + " =3D> " + queryAnn.query() ); + log.info( "Binding Named query: {} =3D> {}", queryAnn.name(), queryAnn.q= uery() ); } = = @@ -123,9 +123,7 @@ else { mappings.addSQLQuery( queryAnn.name(), query ); } - if ( log.isInfoEnabled() ) { - log.info( "Binding named native query: " + queryAnn.name() + " =3D> " += queryAnn.query() ); - } + log.info( "Binding named native query: {} =3D> {}", queryAnn.name(), que= ryAnn.query() ); } = public static void bindNativeQuery(org.hibernate.annotations.NamedNativeQ= uery queryAnn, ExtendedMappings mappings) { @@ -179,9 +177,7 @@ throw new NotYetImplementedException( "Pure native scalar queries are n= ot yet supported" ); } mappings.addSQLQuery( queryAnn.name(), query ); - if ( log.isInfoEnabled() ) { - log.info( "Binding named native query: " + queryAnn.name() + " =3D> " += queryAnn.query() ); - } + log.info( "Binding named native query: {} =3D> {}", queryAnn.name(), que= ryAnn.query() ); } = public static void bindQueries(NamedQueries queriesAnn, ExtendedMappings = mappings, boolean isDefault) { Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/Resultse= tMappingSecondPass.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/cfg/annotations/ResultsetMappi= ngSecondPass.java 2008-05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/cfg/annotations/ResultsetMappi= ngSecondPass.java 2008-05-17 12:49:38 UTC (rev 14671) @@ -13,8 +13,6 @@ import javax.persistence.FieldResult; import javax.persistence.SqlResultSetMapping; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.LockMode; import org.hibernate.MappingException; import org.hibernate.cfg.BinderHelper; @@ -30,12 +28,14 @@ import org.hibernate.mapping.Value; import org.hibernate.util.CollectionHelper; import org.hibernate.util.StringHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * @author Emmanuel Bernard */ public class ResultsetMappingSecondPass implements QuerySecondPass { - private static Log log =3D LogFactory.getLog( ResultsetMappingSecondPass.= class ); + private Logger log =3D LoggerFactory.getLogger( ResultsetMappingSecondPas= s.class ); private SqlResultSetMapping ann; private ExtendedMappings mappings; private boolean isDefault; @@ -50,7 +50,7 @@ //TODO add parameters checkings if ( ann =3D=3D null ) return; ResultSetMappingDefinition definition =3D new ResultSetMappingDefinition= ( ann.name() ); - if ( log.isInfoEnabled() ) log.info( "Binding resultset mapping: " + def= inition.getName() ); + log.info( "Binding resultset mapping: {}", definition.getName() ); = int entityAliasIndex =3D 0; = Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/SetBinde= r.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/cfg/annotations/SetBinder.java= 2008-05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/cfg/annotations/SetBinder.java= 2008-05-17 12:49:38 UTC (rev 14671) @@ -1,11 +1,11 @@ package org.hibernate.cfg.annotations; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.annotations.OrderBy; import org.hibernate.cfg.Environment; import org.hibernate.mapping.Collection; import org.hibernate.mapping.PersistentClass; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Bind a set. @@ -13,7 +13,7 @@ * @author Matthew Inger */ public class SetBinder extends CollectionBinder { - private static Log log =3D LogFactory.getLog( SetBinder.class ); + private final Logger log =3D LoggerFactory.getLogger( SetBinder.class ); = public SetBinder() { } Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/SimpleVa= lueBinder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/cfg/annotations/SimpleValueBin= der.java 2008-05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/cfg/annotations/SimpleValueBin= der.java 2008-05-17 12:49:38 UTC (rev 14671) @@ -10,8 +10,6 @@ import javax.persistence.Lob; import javax.persistence.Temporal; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.AnnotationException; import org.hibernate.AssertionFailure; import org.hibernate.annotations.Parameter; @@ -32,12 +30,14 @@ import org.hibernate.type.SerializableToBlobType; import org.hibernate.type.StringClobType; import org.hibernate.util.StringHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * @author Emmanuel Bernard */ public class SimpleValueBinder { - private static Log log =3D LogFactory.getLog( SimpleValueBinder.class ); + private Logger log =3D LoggerFactory.getLogger( SimpleValueBinder.class ); private String propertyName; private String returnedClassName; private Ejb3Column[] columns; @@ -217,7 +217,7 @@ = public SimpleValue make() { validate(); - log.debug( "building SimpleValue for " + propertyName ); + log.debug( "building SimpleValue for {}", propertyName ); if ( table =3D=3D null ) { table =3D columns[0].getTable(); } Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/TableBin= der.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/cfg/annotations/TableBinder.ja= va 2008-05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/cfg/annotations/TableBinder.ja= va 2008-05-17 12:49:38 UTC (rev 14671) @@ -6,8 +6,6 @@ import java.util.List; import javax.persistence.UniqueConstraint; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.AnnotationException; import org.hibernate.AssertionFailure; import org.hibernate.annotations.Index; @@ -26,6 +24,8 @@ import org.hibernate.mapping.Table; import org.hibernate.mapping.ToOne; import org.hibernate.mapping.Value; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Table related operations @@ -34,7 +34,7 @@ */ public class TableBinder { //TODO move it to a getter/setter strategy - private static Log log =3D LogFactory.getLog( TableBinder.class ); + private static Logger log =3D LoggerFactory.getLogger( TableBinder.class = ); private String schema; private String catalog; private String name; @@ -181,11 +181,7 @@ * Get the columns of the mapped-by property * copy them and link the copy to the actual value */ - if ( log.isDebugEnabled() ) { - log.debug( - "Retrieving property " + associatedClass.getEntityName() + "." + map= pedByProperty - ); - } + log.debug("Retrieving property {}.{}", associatedClass.getEntityName(),= mappedByProperty); = final Property property =3D associatedClass.getRecursiveProperty( colum= ns[0].getMappedBy() ); Iterator mappedByColumns; Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/Version.= java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/cfg/annotations/Version.java 2= 008-05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/cfg/annotations/Version.java 2= 008-05-17 12:49:38 UTC (rev 14671) @@ -1,18 +1,18 @@ //$Id: $ package org.hibernate.cfg.annotations; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * @author Emmanuel Bernard */ public class Version { public static final String VERSION =3D "3.3.1.GA"; - private static Log log =3D LogFactory.getLog( Version.class ); + private static Logger log =3D LoggerFactory.getLogger( Version.class ); = static { - log.info( "Hibernate Annotations " + VERSION ); + log.info( "Hibernate Annotations {}", VERSION ); } = public static void touch() { Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/reflecti= on/EJB3OverridenAnnotationReader.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/cfg/annotations/reflection/EJB= 3OverridenAnnotationReader.java 2008-05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/cfg/annotations/reflection/EJB= 3OverridenAnnotationReader.java 2008-05-17 12:49:38 UTC (rev 14671) @@ -80,8 +80,6 @@ import javax.persistence.UniqueConstraint; import javax.persistence.Version; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.dom4j.Attribute; import org.dom4j.Element; import org.hibernate.AnnotationException; @@ -95,6 +93,8 @@ import org.hibernate.annotations.common.reflection.ReflectionUtil; import org.hibernate.util.ReflectHelper; import org.hibernate.util.StringHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Encapsulates the overriding of Java annotations from an EJB 3.0 descrip= tor. @@ -104,7 +104,7 @@ * @author Emmanuel Bernard */ public class EJB3OverridenAnnotationReader implements AnnotationReader { - private static Log log =3D LogFactory.getLog( EJB3OverridenAnnotationRead= er.class ); + private Logger log =3D LoggerFactory.getLogger( EJB3OverridenAnnotationRe= ader.class ); private static final Map annotationToXml; private static final String SCHEMA_VALIDATION =3D "Activate schema valida= tion for more informations"; private static final Filter FILTER =3D new Filter() { @@ -391,8 +391,9 @@ for (Element subelement : (List) element.elements()) { String propertyName =3D subelement.attributeValue( "name" ); if ( !properties.contains( propertyName ) ) { - log.warn( "Property " + StringHelper.qualify( className, propertyName= ) + " not found in class" - + " but described in (possible typo error)" ); + log.warn( "Property {} not found in class" + + " but described in (possible typo error)", + StringHelper.qualify( className, propertyName ) ); } } } Modified: annotations/trunk/src/java/org/hibernate/cfg/annotations/reflecti= on/XMLContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/cfg/annotations/reflection/XML= Context.java 2008-05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/cfg/annotations/reflection/XML= Context.java 2008-05-17 12:49:38 UTC (rev 14671) @@ -6,17 +6,17 @@ import java.util.List; import java.util.Map; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.dom4j.Document; import org.dom4j.Element; import org.hibernate.util.StringHelper; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; = /** * @author Emmanuel Bernard */ public class XMLContext { - private static Log log =3D LogFactory.getLog( XMLContext.class ); + private Logger log =3D LoggerFactory.getLogger( XMLContext.class ); private Default globalDefaults; private Map classOverriding =3D new HashMap(); private Map defaultsOverriding =3D new HashMap(); @@ -102,7 +102,7 @@ if ( access !=3D null ) localDefault.setAccess( access ); defaultsOverriding.put( className, localDefault ); = - log.debug( "Adding XML overriding information for " + className ); + log.debug( "Adding XML overriding information for {}", className ); addEntityListenerClasses( element, packageName, addedClasses ); } } @@ -118,8 +118,8 @@ //maybe switch it to warn? if ( "entity-listener".equals( classOverriding.get( listenerClassName= ).getName() ) ) { log.info( - "entity-listener duplication, first event definition will be used:= " - + listenerClassName + "entity-listener duplication, first event definition will be used:= {}", + listenerClassName ); continue; } @@ -131,7 +131,7 @@ classOverriding.put( listenerClassName, listener ); } } - log.debug( "Adding XML overriding information for listener: " + listener= s ); + log.debug( "Adding XML overriding information for listener: {}", listene= rs ); addedClasses.addAll( localAddedClasses ); return localAddedClasses; } Modified: annotations/trunk/src/java/org/hibernate/cfg/search/SearchConfigu= ration.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/cfg/search/SearchConfiguration= .java 2008-05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/cfg/search/SearchConfiguration= .java 2008-05-17 12:49:38 UTC (rev 14671) @@ -10,8 +10,8 @@ import org.hibernate.event.PostUpdateEventListener; import org.hibernate.event.PostDeleteEventListener; import org.hibernate.event.EventListeners; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; = /** * Helper methods initializing Hibernate Search event listeners @@ -19,7 +19,7 @@ * @author Emmanuel Bernard */ public class SearchConfiguration { - private static Log log =3D LogFactory.getLog( SearchConfiguration.class ); + private static final Logger log =3D LoggerFactory.getLogger( SearchConfig= uration.class ); = public static void enableHibernateSearch(EventListeners eventListeners, P= roperties properties) { //add search events if the jar is available Modified: annotations/trunk/src/java/org/hibernate/type/EnumType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/java/org/hibernate/type/EnumType.java 2008-05-17 = 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/java/org/hibernate/type/EnumType.java 2008-05-17 = 12:49:38 UTC (rev 14671) @@ -13,14 +13,14 @@ import java.util.Map; import java.util.Properties; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.AssertionFailure; import org.hibernate.HibernateException; +import org.hibernate.annotations.common.util.StringHelper; import org.hibernate.usertype.EnhancedUserType; import org.hibernate.usertype.ParameterizedType; import org.hibernate.util.ReflectHelper; -import org.hibernate.util.StringHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Enum type mapper @@ -30,12 +30,22 @@ */ //TODO implements readobject/writeobject to recalculate the enumclasses public class EnumType implements EnhancedUserType, ParameterizedType, Seri= alizable { - private static Log log =3D LogFactory.getLog( EnumType.class ); - private static final boolean IS_TRACE_ENABLED; + /** + * This is the old scheme where logging of parameter bindings and value e= xtractions + * was controlled by the trace level enablement on the 'org.hibernate.typ= e' package... + *

    + * Originally was cached such because of performance of looking up the lo= gger each time + * in order to check the trace-enablement. Driving this via a central Lo= g-specific class + * would alleviate that performance hit, and yet still allow more "normal= " logging usage/config. + */ + private static final boolean IS_VALUE_TRACING_ENABLED =3D LoggerFactory.g= etLogger( StringHelper.qualifier( Type.class.getName() ) ).isTraceEnabled(); + private transient Logger log; = - static { - //cache this, because it was a significant performance cost - IS_TRACE_ENABLED =3D LogFactory.getLog( StringHelper.qualifier( Type.cla= ss.getName() ) ).isTraceEnabled(); + private Logger log() { + if ( log =3D=3D null ) { + log =3D LoggerFactory.getLogger( getClass() ); + } + return log; } = public static final String ENUM =3D "enumClass"; @@ -74,8 +84,8 @@ public Object nullSafeGet(ResultSet rs, String[] names, Object owner) thr= ows HibernateException, SQLException { Object object =3D rs.getObject( names[0] ); if ( rs.wasNull() ) { - if ( IS_TRACE_ENABLED ) { - log.debug( "Returning null as column " + names[0] ); + if ( IS_VALUE_TRACING_ENABLED ) { + log().debug( "Returning null as column {}", names[0] ); } return null; } @@ -86,15 +96,15 @@ if ( ordinal < 0 || ordinal >=3D values.length ) { throw new IllegalArgumentException( "Unknown ordinal value for enum " = + enumClass + ": " + ordinal ); } - if ( IS_TRACE_ENABLED ) { - log.debug( "Returning '" + ordinal + "' as column " + names[0] ); + if ( IS_VALUE_TRACING_ENABLED ) { + log().debug( "Returning '{}' as column {}", ordinal, names[0] ); } return values[ordinal]; } else { String name =3D (String) object; - if ( IS_TRACE_ENABLED ) { - log.debug( "Returning '" + name + "' as column " + names[0] ); + if ( IS_VALUE_TRACING_ENABLED ) { + log().debug( "Returning '{}' as column {}", name, names[0] ); } try { return Enum.valueOf( enumClass, name ); @@ -108,22 +118,22 @@ public void nullSafeSet(PreparedStatement st, Object value, int index) th= rows HibernateException, SQLException { //if (!guessed) guessType( st, index ); if ( value =3D=3D null ) { - if ( IS_TRACE_ENABLED ) log.debug( "Binding null to parameter: " + inde= x ); + if ( IS_VALUE_TRACING_ENABLED ) log().debug( "Binding null to parameter= : {}", index ); st.setNull( index, sqlType ); } else { boolean isOrdinal =3D isOrdinal( sqlType ); if ( isOrdinal ) { int ordinal =3D ( (Enum) value ).ordinal(); - if ( IS_TRACE_ENABLED ) { - log.debug( "Binding '" + ordinal + "' to parameter: " + index ); + if ( IS_VALUE_TRACING_ENABLED ) { + log().debug( "Binding '{}' to parameter: {}", ordinal, index ); } st.setObject( index, Integer.valueOf( ordinal ), sqlType ); } else { String enumString =3D ( (Enum) value ).name(); - if ( IS_TRACE_ENABLED ) { - log.debug( "Binding '" + enumString + "' to parameter: " + index ); + if ( IS_VALUE_TRACING_ENABLED ) { + log().debug( "Binding '{}' to parameter: {}", enumString, index ); } st.setObject( index, enumString, sqlType ); } Modified: annotations/trunk/src/test/org/hibernate/test/annotations/reflect= ion/LogListener.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/test/org/hibernate/test/annotations/reflection/Lo= gListener.java 2008-05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/test/org/hibernate/test/annotations/reflection/Lo= gListener.java 2008-05-17 12:49:38 UTC (rev 14671) @@ -4,23 +4,24 @@ import javax.persistence.PrePersist; import javax.persistence.PostPersist; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = + /** * @author Emmanuel Bernard */ public class LogListener { - Log log =3D LogFactory.getLog( LogListener.class ); + private final Logger log =3D LoggerFactory.getLogger( LogListener.class ); = @PrePersist @PostPersist public void log(Object entity) { - log.debug( "Logging entity " + entity.getClass().getName() + " with has= hCode: " + entity.hashCode() ); + log.debug( "Logging entity {} with hashCode: {}", entity.getClass().getN= ame(), entity.hashCode() ); } = = public void noLog(Object entity) { - log.debug( "NoLogging entity " + entity.getClass().getName() + " with h= ashCode: " + entity.hashCode() ); + log.debug( "NoLogging entity {} with hashCode: {}", entity.getClass().ge= tName(), entity.hashCode() ); } } Modified: annotations/trunk/src/test/org/hibernate/test/annotations/reflect= ion/OtherLogListener.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- annotations/trunk/src/test/org/hibernate/test/annotations/reflection/Ot= herLogListener.java 2008-05-17 12:47:32 UTC (rev 14670) +++ annotations/trunk/src/test/org/hibernate/test/annotations/reflection/Ot= herLogListener.java 2008-05-17 12:49:38 UTC (rev 14671) @@ -4,23 +4,24 @@ import javax.persistence.PrePersist; import javax.persistence.PostPersist; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = + /** * @author Emmanuel Bernard */ public class OtherLogListener { - Log log =3D LogFactory.getLog( OtherLogListener.class ); + private final Logger log =3D LoggerFactory.getLogger( OtherLogListener.cl= ass ); = @PrePersist @PostPersist public void log(Object entity) { - log.debug( "Logging entity " + entity.getClass().getName() + " with has= hCode: " + entity.hashCode() ); + log.debug( "Logging entity {} with hashCode: {}", entity.getClass().getN= ame(), entity.hashCode() ); } = = public void noLog(Object entity) { - log.debug( "NoLogging entity " + entity.getClass().getName() + " with h= ashCode: " + entity.hashCode() ); + log.debug( "NoLogging entity {} with hashCode: {}", entity.getClass().ge= tName(), entity.hashCode() ); } } --===============8221554846171933715==-- From hibernate-commits at lists.jboss.org Sat May 17 08:50:58 2008 Content-Type: multipart/mixed; boundary="===============2370340026303148050==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14672 - in entitymanager/trunk: src/java/org/hibernate/ejb and 5 other directories. Date: Sat, 17 May 2008 08:50:58 -0400 Message-ID: --===============2370340026303148050== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-17 08:50:57 -0400 (Sat, 17 May 2008) New Revision: 14672 Modified: entitymanager/trunk/ivy.xml entitymanager/trunk/pom.xml entitymanager/trunk/src/java/org/hibernate/ejb/AbstractEntityManagerImpl= .java entitymanager/trunk/src/java/org/hibernate/ejb/Ejb3Configuration.java entitymanager/trunk/src/java/org/hibernate/ejb/EntityManagerImpl.java entitymanager/trunk/src/java/org/hibernate/ejb/Version.java entitymanager/trunk/src/java/org/hibernate/ejb/connection/InjectedDataSo= urceConnectionProvider.java entitymanager/trunk/src/java/org/hibernate/ejb/event/EJB3PersistEventLis= tener.java entitymanager/trunk/src/java/org/hibernate/ejb/packaging/AbstractJarVisi= tor.java entitymanager/trunk/src/java/org/hibernate/ejb/packaging/ExplodedJarVisi= tor.java entitymanager/trunk/src/java/org/hibernate/ejb/packaging/FileZippedJarVi= sitor.java entitymanager/trunk/src/java/org/hibernate/ejb/packaging/InputStreamZipp= edJarVisitor.java entitymanager/trunk/src/java/org/hibernate/ejb/packaging/JarVisitorFacto= ry.java entitymanager/trunk/src/java/org/hibernate/ejb/packaging/PersistenceXmlL= oader.java entitymanager/trunk/src/java/org/hibernate/ejb/util/NamingHelper.java entitymanager/trunk/src/java/org/hibernate/engine/EJB3CascadingAction.ja= va Log: EJB-359 move to slf4j Modified: entitymanager/trunk/ivy.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- entitymanager/trunk/ivy.xml 2008-05-17 12:49:38 UTC (rev 14671) +++ entitymanager/trunk/ivy.xml 2008-05-17 12:50:57 UTC (rev 14672) @@ -9,7 +9,7 @@ - + @@ -17,13 +17,13 @@ default"/> d= efault"/> default"/> - default"/> default"/> default"/> default"/> + default"/> = + - default"/> default"/> default"/> = Modified: entitymanager/trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- entitymanager/trunk/pom.xml 2008-05-17 12:49:38 UTC (rev 14671) +++ entitymanager/trunk/pom.xml 2008-05-17 12:50:57 UTC (rev 14672) @@ -42,10 +42,10 @@ 3.3.0.CR1 - commons-logging - commons-logging - 1.0.4 - + org.slf4j + slf4j-api + 1.4.2 + dom4j dom4j Modified: entitymanager/trunk/src/java/org/hibernate/ejb/AbstractEntityMana= gerImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- entitymanager/trunk/src/java/org/hibernate/ejb/AbstractEntityManagerImp= l.java 2008-05-17 12:49:38 UTC (rev 14671) +++ entitymanager/trunk/src/java/org/hibernate/ejb/AbstractEntityManagerImp= l.java 2008-05-17 12:50:57 UTC (rev 14672) @@ -27,8 +27,6 @@ import javax.transaction.SystemException; import javax.transaction.TransactionManager; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.AssertionFailure; import org.hibernate.FlushMode; import org.hibernate.HibernateException; @@ -56,13 +54,15 @@ import org.hibernate.transaction.TransactionFactory; import org.hibernate.util.JTAHelper; import org.hibernate.util.CollectionHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * @author Gavin King * @author Emmanuel Bernard */ public abstract class AbstractEntityManagerImpl implements HibernateEntity= ManagerImplementor, Serializable { - private static Log log =3D LogFactory.getLog( AbstractEntityManagerImpl.c= lass ); + private static final Logger log =3D LoggerFactory.getLogger( AbstractEnti= tyManagerImpl.class ); = protected transient TransactionImpl tx =3D new TransactionImpl( this ); protected PersistenceContextType persistenceContextType; @@ -408,7 +408,7 @@ boolean isTransactionActive =3D isTransactionInProgress(); = if ( isTransactionActive && session.getFlushMode() =3D=3D FlushMode.MANU= AL ) { - log.debug( "Transaction activated, move to FlushMode " + flushModeType = ); + log.debug( "Transaction activated, move to FlushMode {}", flushModeType= ); setFlushMode( flushModeType ); } else if ( ! isTransactionActive && session.getFlushMode() !=3D FlushMode= .MANUAL ) { @@ -559,7 +559,7 @@ ); } else { - log.warn( "Cannot join transaction: do not override " + Environment.T= RANSACTION_STRATEGY ); + log.warn( "Cannot join transaction: do not override {}", Environment.= TRANSACTION_STRATEGY ); } } catch (HibernateException he) { Modified: entitymanager/trunk/src/java/org/hibernate/ejb/Ejb3Configuration.= java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- entitymanager/trunk/src/java/org/hibernate/ejb/Ejb3Configuration.java 2= 008-05-17 12:49:38 UTC (rev 14671) +++ entitymanager/trunk/src/java/org/hibernate/ejb/Ejb3Configuration.java 2= 008-05-17 12:50:57 UTC (rev 14672) @@ -35,8 +35,6 @@ import javax.persistence.spi.PersistenceUnitTransactionType; import javax.sql.DataSource; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.dom4j.DocumentException; import org.dom4j.Element; import org.dom4j.io.SAXReader; @@ -81,6 +79,8 @@ import org.hibernate.util.XMLHelper; import org.xml.sax.EntityResolver; import org.xml.sax.SAXException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Allow a fine tuned configuration of an EJB 3.0 EntityManagerFactory @@ -102,7 +102,7 @@ public class Ejb3Configuration implements Serializable, Referenceable { private static final String IMPLEMENTATION_NAME =3D HibernatePersistence.= class.getName(); private static final String META_INF_ORM_XML =3D "META-INF/orm.xml"; - private static Log log =3D LogFactory.getLog( Ejb3Configuration.class ); + private final Logger log =3D LoggerFactory.getLogger( Ejb3Configuration.c= lass ); private static EntityNotFoundDelegate ejb3EntityNotFoundDelegate =3D new = Ejb3EntityNotFoundDelegate(); private static Configuration DEFAULT_CONFIGURATION =3D new AnnotationConf= iguration(); private String persistenceUnitName; @@ -155,7 +155,7 @@ * Especially the scanning of classes and additional jars is done already= at this point. */ private Ejb3Configuration configure(PersistenceMetadata metadata, Map ove= rrides) { - log.debug( "Creating Factory: " + metadata.getName() ); + log.debug( "Creating Factory: {}", metadata.getName() ); = Map workingVars =3D new HashMap(); workingVars.put( HibernatePersistence.PERSISTENCE_UNIT_NAME, metadata.ge= tName() ); @@ -206,7 +206,7 @@ */ public Ejb3Configuration configure(String persistenceUnitName, Map integr= ation) { try { - log.debug( "Look up for persistence unit: " + persistenceUnitName ); + log.debug( "Look up for persistence unit: {}", persistenceUnitName ); integration =3D integration =3D=3D null ? CollectionHelper.EMPTY_MAP : Collections.unmodifiableMap( integration ); @@ -218,14 +218,14 @@ } while ( xmls.hasMoreElements() ) { URL url =3D xmls.nextElement(); - log.trace( "Analysing persistence.xml: " + url ); + log.trace( "Analysing persistence.xml: {}", url ); List metadataFiles =3D PersistenceXmlLoader.deplo= y( url, integration, cfg.getEntityResolver(), PersistenceUnitTransactionType.RESOURCE_LOCAL ); for ( PersistenceMetadata metadata : metadataFiles ) { - log.trace( metadata.toString() ); + log.trace( "{}", metadata ); = if ( metadata.getProvider() =3D=3D null || IMPLEMENTATION_NAME.equals= IgnoreCase( metadata.getProvider() @@ -309,17 +309,17 @@ */ public Ejb3Configuration configure(PersistenceUnitInfo info, Map integrat= ion) { if ( log.isDebugEnabled() ) { - log.debug( "Processing " + LogHelper.logPersistenceUnitInfo( info ) ); + log.debug( "Processing {}", LogHelper.logPersistenceUnitInfo( info ) ); } else { - log.info( "Processing PersistenceUnitInfo [\n\tname: " + info.getPersis= tenceUnitName() + "\n\t...]" ); + log.info( "Processing PersistenceUnitInfo [\n\tname: {}\n\t...]", info.= getPersistenceUnitName() ); } = integration =3D integration !=3D null ? Collections.unmodifiableMap( int= egration ) : CollectionHelper.EMPTY_MAP; String provider =3D (String) integration.get( HibernatePersistence.PROVI= DER ); if ( provider =3D=3D null ) provider =3D info.getPersistenceProviderClas= sName(); if ( provider !=3D null && ! provider.trim().startsWith( IMPLEMENTATION_= NAME ) ) { - log.info( "Required a different provider: " + provider ); + log.info( "Required a different provider: {}", provider ); return null; } if ( info.getClassLoader() =3D=3D null ) { @@ -559,7 +559,7 @@ if ( "class".equalsIgnoreCase( element ) ) result[0] =3D true; if ( "hbm".equalsIgnoreCase( element ) ) result[1] =3D true; } - log.debug( "Detect class: " + result[0] + "; detect hbm: " + result[1] ); + log.debug( "Detect class: {}; detect hbm: {}", result[0], result[1] ); return result; } = @@ -856,7 +856,7 @@ //some spec compliance checking //TODO centralize that? if ( ! "true".equalsIgnoreCase( cfg.getProperty( Environment.AUTOCOMMIT = ) ) ) { - log.warn( Environment.AUTOCOMMIT + " =3D false break the EJB3 specifica= tion" ); + log.warn( "{} =3D false break the EJB3 specification", Environment.AUTO= COMMIT ); } discardOnClose =3D preparedProperties.getProperty( HibernatePersistence.= DISCARD_PC_ON_CLOSE ) .equals( "true" ); @@ -911,10 +911,10 @@ } if ( log.isInfoEnabled() ) { if ( Boolean.TRUE.equals( useMetaInf ) ) { - log.info( getExceptionHeader() + META_INF_ORM_XML + " found"); + log.info( "{} {} found", getExceptionHeader(), META_INF_ORM_XML); } else if (Boolean.FALSE.equals( useMetaInf ) ) { - log.info( getExceptionHeader() + "no " + META_INF_ORM_XML + " found"= ); + log.info( "{} No {} found", getExceptionHeader(), META_INF_ORM_XML); } } } @@ -994,12 +994,13 @@ } if ( hasTxStrategy ) { log.warn( - "Overriding " + Environment.TRANSACTION_STRATEGY + " is dangerous, th= is might break the EJB3 specification implementation" + "Overriding {} is dangerous, this might break the EJB3 specification = implementation", + Environment.TRANSACTION_STRATEGY ); } if ( preparedProperties.getProperty( Environment.FLUSH_BEFORE_COMPLETION= ).equals( "true" ) ) { preparedProperties.setProperty( Environment.FLUSH_BEFORE_COMPLETION, "f= alse" ); - log.warn( "Defining " + Environment.FLUSH_BEFORE_COMPLETION + "=3Dtrue = ignored in HEM" ); + log.warn( "Defining {}=3Dtrue ignored in HEM", Environment.FLUSH_BEFORE= _COMPLETION ); } return preparedProperties; } Modified: entitymanager/trunk/src/java/org/hibernate/ejb/EntityManagerImpl.= java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- entitymanager/trunk/src/java/org/hibernate/ejb/EntityManagerImpl.java 2= 008-05-17 12:49:38 UTC (rev 14671) +++ entitymanager/trunk/src/java/org/hibernate/ejb/EntityManagerImpl.java 2= 008-05-17 12:50:57 UTC (rev 14672) @@ -7,8 +7,6 @@ import javax.persistence.spi.PersistenceUnitTransactionType; import javax.transaction.Synchronization; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.SessionFactory; @@ -16,13 +14,15 @@ import org.hibernate.annotations.common.util.ReflectHelper; import org.hibernate.cfg.Environment; import org.hibernate.engine.SessionImplementor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * @author Gavin King */ public class EntityManagerImpl extends AbstractEntityManagerImpl { = - private static Log log =3D LogFactory.getLog( EntityManagerImpl.class ); + private static final Logger log =3D LoggerFactory.getLogger( EntityManage= rImpl.class ); protected Session session; protected SessionFactory sessionFactory; protected boolean open; @@ -110,9 +110,8 @@ session.close(); } else { - log.warn( "Entity Manager closed by someone else (" - + Environment.AUTO_CLOSE_SESSION - + " must not be used)"); + log.warn( "Entity Manager closed by someone else ({} must not be = used)", + Environment.AUTO_CLOSE_SESSION); } } //TODO session =3D=3D null should not happen Modified: entitymanager/trunk/src/java/org/hibernate/ejb/Version.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- entitymanager/trunk/src/java/org/hibernate/ejb/Version.java 2008-05-17 = 12:49:38 UTC (rev 14671) +++ entitymanager/trunk/src/java/org/hibernate/ejb/Version.java 2008-05-17 = 12:50:57 UTC (rev 14672) @@ -1,18 +1,19 @@ //$Id: $ package org.hibernate.ejb; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = + /** * @author Emmanuel Bernard */ public class Version { public static final String VERSION =3D "3.3.2.GA"; - private static Log log =3D LogFactory.getLog( Version.class ); + private static final Logger log =3D LoggerFactory.getLogger( Version.clas= s ); = static { - log.info( "Hibernate EntityManager " + VERSION ); + log.info( "Hibernate EntityManager {}", VERSION ); } = public static void touch() { Modified: entitymanager/trunk/src/java/org/hibernate/ejb/connection/Injecte= dDataSourceConnectionProvider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- entitymanager/trunk/src/java/org/hibernate/ejb/connection/InjectedDataS= ourceConnectionProvider.java 2008-05-17 12:49:38 UTC (rev 14671) +++ entitymanager/trunk/src/java/org/hibernate/ejb/connection/InjectedDataS= ourceConnectionProvider.java 2008-05-17 12:50:57 UTC (rev 14672) @@ -6,11 +6,11 @@ import java.sql.SQLException; import javax.sql.DataSource; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.HibernateException; import org.hibernate.cfg.Environment; import org.hibernate.connection.DatasourceConnectionProvider; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; = /** * A connection provider that uses an injected DataSource. @@ -20,11 +20,10 @@ * @see org.hibernate.connection.ConnectionProvider */ public class InjectedDataSourceConnectionProvider extends DatasourceConnec= tionProvider { - //TODO make datasource connection provider properties protected in 3.3 private String user; private String pass; = - private static final Log log =3D LogFactory.getLog( InjectedDataSourceCon= nectionProvider.class ); + private final Logger log =3D LoggerFactory.getLogger( InjectedDataSourceC= onnectionProvider.class ); = public void setDataSource(DataSource ds) { super.setDataSource( ds ); Modified: entitymanager/trunk/src/java/org/hibernate/ejb/event/EJB3PersistE= ventListener.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- entitymanager/trunk/src/java/org/hibernate/ejb/event/EJB3PersistEventLi= stener.java 2008-05-17 12:49:38 UTC (rev 14671) +++ entitymanager/trunk/src/java/org/hibernate/ejb/event/EJB3PersistEventLi= stener.java 2008-05-17 12:50:57 UTC (rev 14672) @@ -16,7 +16,7 @@ */ public class EJB3PersistEventListener extends DefaultPersistEventListener = implements CallbackHandlerConsumer { static { - EJB3CascadeStyle.PERSIST_EJB3.hasOrphanDelete(); //triggers class loading + EJB3CascadeStyle.PERSIST_EJB3.hasOrphanDelete(); //triggers class loadin= g to override persist with PERSIST_EJB3 } = private EntityCallbackHandler callbackHandler; Modified: entitymanager/trunk/src/java/org/hibernate/ejb/packaging/Abstract= JarVisitor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- entitymanager/trunk/src/java/org/hibernate/ejb/packaging/AbstractJarVis= itor.java 2008-05-17 12:49:38 UTC (rev 14671) +++ entitymanager/trunk/src/java/org/hibernate/ejb/packaging/AbstractJarVis= itor.java 2008-05-17 12:50:57 UTC (rev 14672) @@ -12,8 +12,8 @@ = import javassist.bytecode.AnnotationsAttribute; import javassist.bytecode.ClassFile; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Parse a JAR of any form (zip file, exploded directory, ...) @@ -25,7 +25,7 @@ */ //TODO shortcut when filters are null or empty public abstract class AbstractJarVisitor implements JarVisitor { - private static Log log =3D LogFactory.getLog( AbstractJarVisitor.class ); + private final Logger log =3D LoggerFactory.getLogger( AbstractJarVisitor.= class ); protected String unqualifiedJarName; protected URL jarUrl; protected boolean done =3D false; @@ -113,7 +113,7 @@ fileName =3D fileName.substring( 0, fileName.length() - 4 ); } unqualifiedJarName =3D fileName; - log.debug( "Searching mapped entities in jar/par: " + jarUrl ); + log.debug( "Searching mapped entities in jar/par: {}", jarUrl ); } = /** @@ -159,7 +159,7 @@ } else if ( entryName.endsWith( ".class" ) ) { String name =3D entryName.substring( 0, entryNameLength - ".class".leng= th() ).replace( '/', '.' ); - log.debug( "Filtering: " + name ); + log.debug( "Filtering: {}", name ); executeJavaElementFilter( name, classFilters, is, secondIs ); } else { @@ -177,7 +177,7 @@ secondIs.close(); } is.close(); - log.debug( "File Filter matched for " + name ); + log.debug( "File Filter matched for {}", name ); Entry entry =3D new Entry( name, localIs ); int index =3D this.filters.indexOf( filter ); this.entries[index].add( entry ); @@ -210,7 +210,7 @@ localIs =3D null; secondIs.close(); } - log.debug( "Java element filter matched for " + name ); + log.debug( "Java element filter matched for {}", name ); Entry entry =3D new Entry( name, localIs ); int index =3D this.filters.indexOf( filter ); this.entries[index].add( entry ); Modified: entitymanager/trunk/src/java/org/hibernate/ejb/packaging/Exploded= JarVisitor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- entitymanager/trunk/src/java/org/hibernate/ejb/packaging/ExplodedJarVis= itor.java 2008-05-17 12:49:38 UTC (rev 14671) +++ entitymanager/trunk/src/java/org/hibernate/ejb/packaging/ExplodedJarVis= itor.java 2008-05-17 12:50:57 UTC (rev 14672) @@ -5,23 +5,21 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; -import java.io.InputStream; -import java.io.ByteArrayInputStream; -import java.net.URL; import java.net.URISyntaxException; -import java.util.zip.ZipEntry; +import java.net.URL; import java.util.Enumeration; -import java.util.jar.JarInputStream; import java.util.jar.JarFile; +import java.util.zip.ZipEntry; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; = + /** * @author Emmanuel Bernard */ public class ExplodedJarVisitor extends AbstractJarVisitor { - private static Log log =3D LogFactory.getLog( ExplodedJarVisitor.class ); + private final Logger log =3D LoggerFactory.getLogger( ExplodedJarVisitor.= class ); private String entry; = public ExplodedJarVisitor(URL url, Filter[] filters, String entry) { @@ -51,11 +49,11 @@ } = if ( !jarFile.exists() ) { - log.warn( "Exploded jar does not exists (ignored): " + jarUrl ); + log.warn( "Exploded jar does not exists (ignored): {}", jarUrl ); return; } if ( !jarFile.isDirectory() ) { - log.warn( "Exploded jar file not a directory (ignored): " + jarUrl ); + log.warn( "Exploded jar file not a directory (ignored): {}", jarUrl ); return; } File rootFile; Modified: entitymanager/trunk/src/java/org/hibernate/ejb/packaging/FileZipp= edJarVisitor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- entitymanager/trunk/src/java/org/hibernate/ejb/packaging/FileZippedJarV= isitor.java 2008-05-17 12:49:38 UTC (rev 14671) +++ entitymanager/trunk/src/java/org/hibernate/ejb/packaging/FileZippedJarV= isitor.java 2008-05-17 12:50:57 UTC (rev 14672) @@ -13,8 +13,8 @@ import java.util.jar.JarInputStream; import java.util.zip.ZipEntry; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Work on a JAR that can be accessed through a File @@ -22,7 +22,7 @@ * @author Emmanuel Bernard */ public class FileZippedJarVisitor extends AbstractJarVisitor { - private static Log log =3D LogFactory.getLog( FileZippedJarVisitor.class = ); + private final Logger log =3D LoggerFactory.getLogger( FileZippedJarVisito= r.class ); private String entry; = public FileZippedJarVisitor(String fileName, Filter[] filters) { Modified: entitymanager/trunk/src/java/org/hibernate/ejb/packaging/InputStr= eamZippedJarVisitor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- entitymanager/trunk/src/java/org/hibernate/ejb/packaging/InputStreamZip= pedJarVisitor.java 2008-05-17 12:49:38 UTC (rev 14671) +++ entitymanager/trunk/src/java/org/hibernate/ejb/packaging/InputStreamZip= pedJarVisitor.java 2008-05-17 12:50:57 UTC (rev 14672) @@ -3,16 +3,15 @@ = import java.io.ByteArrayInputStream; import java.io.IOException; -import java.io.InputStream; -import java.io.BufferedInputStream; import java.net.URL; import java.util.jar.JarEntry; import java.util.jar.JarInputStream; import java.util.zip.ZipEntry; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = + /** * Work on a JAR that can only be accessed through a inputstream * This is less efficient than the {@link FileZippedJarVisitor} @@ -20,7 +19,7 @@ * @author Emmanuel Bernard */ public class InputStreamZippedJarVisitor extends AbstractJarVisitor { - private static Log log =3D LogFactory.getLog( InputStreamZippedJarVisitor= .class ); + private final Logger log =3D LoggerFactory.getLogger( InputStreamZippedJa= rVisitor.class ); private String entry; = public InputStreamZippedJarVisitor(URL url, Filter[] filters, String entr= y) { Modified: entitymanager/trunk/src/java/org/hibernate/ejb/packaging/JarVisit= orFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- entitymanager/trunk/src/java/org/hibernate/ejb/packaging/JarVisitorFact= ory.java 2008-05-17 12:49:38 UTC (rev 14671) +++ entitymanager/trunk/src/java/org/hibernate/ejb/packaging/JarVisitorFact= ory.java 2008-05-17 12:50:57 UTC (rev 14672) @@ -8,15 +8,15 @@ import java.net.URISyntaxException; import java.net.URL; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.util.StringHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * @author Emmanuel Bernard */ public class JarVisitorFactory { - private static Log log =3D LogFactory.getLog( JarVisitorFactory.class ); + private static final Logger log =3D LoggerFactory.getLogger( JarVisitorFa= ctory.class ); = /** * Get the JAR URL of the JAR containing the given entry @@ -70,7 +70,7 @@ "Unable to determine JAR Url from " + url + ". Cause: " + e.getMessag= e() ); } - log.trace("JAR URL from URL Entry: " + url + " >> " + jarUrl); + log.trace("JAR URL from URL Entry: {} >> {}", url, jarUrl); return jarUrl; } = Modified: entitymanager/trunk/src/java/org/hibernate/ejb/packaging/Persiste= nceXmlLoader.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- entitymanager/trunk/src/java/org/hibernate/ejb/packaging/PersistenceXml= Loader.java 2008-05-17 12:49:38 UTC (rev 14671) +++ entitymanager/trunk/src/java/org/hibernate/ejb/packaging/PersistenceXml= Loader.java 2008-05-17 12:50:57 UTC (rev 14672) @@ -13,8 +13,6 @@ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.cfg.EJB3DTDEntityResolver; import org.hibernate.ejb.HibernatePersistence; import org.hibernate.ejb.util.ConfigurationHelper; @@ -27,6 +25,8 @@ import org.xml.sax.ErrorHandler; import org.xml.sax.InputSource; import org.xml.sax.SAXParseException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Persistence.xml handler @@ -35,7 +35,7 @@ * @author Emmanuel Bernard */ public final class PersistenceXmlLoader { - private static Log log =3D LogFactory.getLog( PersistenceXmlLoader.class = ); + private static final Logger log =3D LoggerFactory.getLogger( PersistenceX= mlLoader.class ); = private PersistenceXmlLoader() { } @@ -153,7 +153,7 @@ PersistenceMetadata metadata =3D new PersistenceMetadata(); String puName =3D top.getAttribute( "name" ); if ( StringHelper.isNotEmpty( puName ) ) { - log.trace( "Persistent Unit name from persistence.xml: " + puName ); + log.trace( "Persistent Unit name from persistence.xml: {}", puName ); metadata.setName( puName ); } NodeList children =3D top.getChildNodes(); @@ -243,17 +243,17 @@ if ( resolver instanceof EJB3DTDEntityResolver ) { if ( ( (EJB3DTDEntityResolver) resolver ).isResolved() =3D=3D false ) = return; } - log.error( "Error parsing XML: " + file + '(' + error.getLineNumber() += ") " + error.getMessage() ); + log.error( "Error parsing XML: {}({}) {}", new Object[] { file, error.g= etLineNumber(), error.getMessage() } ); errors.add( error ); } = public void fatalError(SAXParseException error) { - log.error( "Error parsing XML: " + file + '(' + error.getLineNumber() += ") " + error.getMessage() ); + log.error( "Error parsing XML: {}({}) {}", new Object[] { file, error.g= etLineNumber(), error.getMessage() } ); errors.add( error ); } = public void warning(SAXParseException warn) { - log.warn( "Warning parsing XML: " + file + '(' + warn.getLineNumber() += ") " + warn.getMessage() ); + log.warn( "Warning parsing XML: {}({}) {}", new Object[] { file, warn.g= etLineNumber(), warn.getMessage() } ); } } = Modified: entitymanager/trunk/src/java/org/hibernate/ejb/util/NamingHelper.= java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- entitymanager/trunk/src/java/org/hibernate/ejb/util/NamingHelper.java 2= 008-05-17 12:49:38 UTC (rev 14671) +++ entitymanager/trunk/src/java/org/hibernate/ejb/util/NamingHelper.java 2= 008-05-17 12:50:57 UTC (rev 14672) @@ -10,18 +10,18 @@ import javax.naming.event.NamingExceptionEvent; import javax.naming.event.NamingListener; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.ejb.Ejb3Configuration; import org.hibernate.ejb.HibernatePersistence; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * @author Emmanuel Bernard */ public class NamingHelper { - private NamingHelper() {}; + private NamingHelper() {} = - private static Log log =3D LogFactory.getLog( NamingHelper.class ); + private static final Logger log =3D LoggerFactory.getLogger( NamingHelper= .class ); = /** bind the configuration to the JNDI */ public static void bind(Ejb3Configuration cfg) { @@ -30,12 +30,12 @@ log.debug( "No JNDI name configured for binding Ejb3Configuration" ); } else { - log.info( "Ejb3Configuration name: " + name ); + log.info( "Ejb3Configuration name: {}", name ); = try { Context ctx =3D org.hibernate.util.NamingHelper.getInitialContext( cfg= .getProperties() ); org.hibernate.util.NamingHelper.bind( ctx, name, cfg ); - log.info( "Bound Ejb3Configuration to JNDI name: " + name ); + log.info( "Bound Ejb3Configuration to JNDI name: {}", name ); ( (EventContext) ctx ).addNamingListener( name, EventContext.OBJECT_SC= OPE, LISTENER ); } catch (InvalidNameException ine) { @@ -52,21 +52,21 @@ = private static final NamingListener LISTENER =3D new NamespaceChangeListe= ner() { public void objectAdded(NamingEvent evt) { - log.debug( "An Ejb3Configuration was successfully bound to name: " + ev= t.getNewBinding().getName() ); + log.debug( "An Ejb3Configuration was successfully bound to name: {}", e= vt.getNewBinding().getName() ); } = public void objectRemoved(NamingEvent evt) { String name =3D evt.getOldBinding().getName(); - log.info( "An Ejb3Configuration was unbound from name: " + name ); + log.info( "An Ejb3Configuration was unbound from name: {}", name ); } = public void objectRenamed(NamingEvent evt) { String name =3D evt.getOldBinding().getName(); - log.info( "An Ejb3Configuration was renamed from name: " + name ); + log.info( "An Ejb3Configuration was renamed from name: {}", name ); } = public void namingExceptionThrown(NamingExceptionEvent evt) { - log.warn( "Naming exception occurred accessing Ejb3Configuration: " + e= vt.getException() ); + log.warn( "Naming exception occurred accessing Ejb3Configuration", evt.= getException() ); } }; = Modified: entitymanager/trunk/src/java/org/hibernate/engine/EJB3CascadingAc= tion.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- entitymanager/trunk/src/java/org/hibernate/engine/EJB3CascadingAction.j= ava 2008-05-17 12:49:38 UTC (rev 14671) +++ entitymanager/trunk/src/java/org/hibernate/engine/EJB3CascadingAction.j= ava 2008-05-17 12:50:57 UTC (rev 14672) @@ -7,8 +7,8 @@ import org.hibernate.event.EventSource; import org.hibernate.HibernateException; import org.hibernate.type.CollectionType; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; = /** * Because of CascadingAction constructor visibility @@ -17,16 +17,14 @@ * @author Emmanuel Bernard */ public abstract class EJB3CascadingAction extends CascadingAction { - private static Log log =3D LogFactory.getLog( CascadingAction.class ); + private static Logger log =3D LoggerFactory.getLogger( CascadingAction.cl= ass ); /** * @see org.hibernate.Session#persist(Object) */ public static final CascadingAction PERSIST_SKIPLAZY =3D new CascadingAct= ion() { public void cascade(EventSource session, Object child, String entityName= , Object anything, boolean isCascadeDeleteEnabled) throws HibernateException { - if ( log.isTraceEnabled() ) { - log.trace( "cascading to persist: " + entityName ); - } + log.trace( "cascading to persist: {}", entityName ); session.persist( entityName, child, (Map) anything ); } public Iterator getCascadableChildrenIterator(EventSource session, Colle= ctionType collectionType, Object collection) { --===============2370340026303148050==-- From hibernate-commits at lists.jboss.org Sat May 17 08:52:14 2008 Content-Type: multipart/mixed; boundary="===============2129700905670541276==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14673 - in validator/trunk: src/java/org/hibernate/validator and 1 other directories. Date: Sat, 17 May 2008 08:52:14 -0400 Message-ID: --===============2129700905670541276== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-17 08:52:14 -0400 (Sat, 17 May 2008) New Revision: 14673 Modified: validator/trunk/ivy.xml validator/trunk/pom.xml validator/trunk/src/java/org/hibernate/validator/ClassValidator.java validator/trunk/src/java/org/hibernate/validator/Version.java validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMes= sageInterpolator.java Log: HV-57 move to slf4j Modified: validator/trunk/ivy.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- validator/trunk/ivy.xml 2008-05-17 12:50:57 UTC (rev 14672) +++ validator/trunk/ivy.xml 2008-05-17 12:52:14 UTC (rev 14673) @@ -9,17 +9,16 @@ - + default"/> default"/> default"/> - default"/> + default"/> = - default"/> default"/> default"/> default"/> Modified: validator/trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- validator/trunk/pom.xml 2008-05-17 12:50:57 UTC (rev 14672) +++ validator/trunk/pom.xml 2008-05-17 12:52:14 UTC (rev 14673) @@ -30,9 +30,9 @@ 3.1.0.CR1 - commons-logging - commons-logging - 1.0.4 + org.slf4j + slf4j-api + 1.4.2 = Modified: validator/trunk/src/java/org/hibernate/validator/ClassValidator.j= ava =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- validator/trunk/src/java/org/hibernate/validator/ClassValidator.java 20= 08-05-17 12:50:57 UTC (rev 14672) +++ validator/trunk/src/java/org/hibernate/validator/ClassValidator.java 20= 08-05-17 12:52:14 UTC (rev 14673) @@ -23,8 +23,6 @@ import java.util.Set; import java.util.StringTokenizer; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.AssertionFailure; import org.hibernate.Hibernate; import org.hibernate.MappingException; @@ -40,6 +38,8 @@ import org.hibernate.annotations.common.reflection.java.JavaReflectionMana= ger; import org.hibernate.util.IdentitySet; import org.hibernate.validator.interpolator.DefaultMessageInterpolatorAggr= egator; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = = /** @@ -50,7 +50,7 @@ */ public class ClassValidator implements Serializable { //TODO Define magic number - private static Log log =3D LogFactory.getLog( ClassValidator.class ); + private static final Logger log =3D LoggerFactory.getLogger( ClassValidat= or.class ); private static final InvalidValue[] EMPTY_INVALID_VALUE_ARRAY =3D new Inv= alidValue[]{}; private static final String DEFAULT_VALIDATOR_MESSAGE =3D "org.hibernate.= validator.resources.DefaultValidatorMessages"; private static final String VALIDATOR_MESSAGE =3D "ValidatorMessages"; @@ -164,7 +164,7 @@ ); } catch (MissingResourceException e) { - log.trace( "ResourceBundle " + VALIDATOR_MESSAGE + " not found in threa= d context classloader" ); + log.trace( "ResourceBundle {} not found in thread context classloader",= VALIDATOR_MESSAGE ); //then use the Validator Framework classloader try { rb =3D ResourceBundle.getBundle( @@ -175,7 +175,8 @@ } catch (MissingResourceException ee) { log.debug( - "ResourceBundle ValidatorMessages not found in Validator classloader= . Delegate to " + DEFAULT_VALIDATOR_MESSAGE + "ResourceBundle ValidatorMessages not found in Validator classloader= . Delegate to {}", + DEFAULT_VALIDATOR_MESSAGE ); //the user did not override the default ValidatorMessages rb =3D null; @@ -312,7 +313,7 @@ validatorPresent =3D validatorPresent || agrValidPresent; } if ( validatorPresent && !member.isTypeResolved() ) { - log.warn( "Original type of property " + member + " is unbound and has = been approximated." ); + log.warn( "Original type of property {} is unbound and has been approxi= mated.", member ); } } = Modified: validator/trunk/src/java/org/hibernate/validator/Version.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- validator/trunk/src/java/org/hibernate/validator/Version.java 2008-05-1= 7 12:50:57 UTC (rev 14672) +++ validator/trunk/src/java/org/hibernate/validator/Version.java 2008-05-1= 7 12:52:14 UTC (rev 14673) @@ -1,8 +1,8 @@ //$Id: $ package org.hibernate.validator; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Hibernate Vaildator version @@ -11,10 +11,10 @@ */ public class Version { public static final String VERSION =3D "3.0.0.GA"; - private static Log log =3D LogFactory.getLog( Version.class ); + private static Logger log =3D LoggerFactory.getLogger( Version.class ); = static { - log.info( "Hibernate Validator " + VERSION ); + log.info( "Hibernate Validator {}", VERSION ); } = public static void touch() { Modified: validator/trunk/src/java/org/hibernate/validator/interpolator/Def= aultMessageInterpolator.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMe= ssageInterpolator.java 2008-05-17 12:50:57 UTC (rev 14672) +++ validator/trunk/src/java/org/hibernate/validator/interpolator/DefaultMe= ssageInterpolator.java 2008-05-17 12:52:14 UTC (rev 14673) @@ -12,11 +12,11 @@ import java.util.ResourceBundle; import java.util.StringTokenizer; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.util.StringHelper; import org.hibernate.validator.MessageInterpolator; import org.hibernate.validator.Validator; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Resource bundle based interpolator @@ -25,7 +25,7 @@ * @author Emmanuel Bernard */ public class DefaultMessageInterpolator implements MessageInterpolator, Se= rializable { - private static Log log =3D LogFactory.getLog( DefaultMessageInterpolator.= class ); + private static final Logger log =3D LoggerFactory.getLogger( DefaultMessa= geInterpolator.class ); private Map annotationParameters =3D new HashMap(); private transient ResourceBundle messageBundle; private transient ResourceBundle defaultMessageBundle; @@ -52,11 +52,11 @@ } catch (IllegalAccessException e) { //really should not happen, but we degrade nicely - log.warn( "Unable to access " + StringHelper.qualify( clazz.toString()= , method.getName() ) ); + log.warn( "Unable to access {}", StringHelper.qualify( clazz.toString(= ), method.getName() ) ); } catch (InvocationTargetException e) { //really should not happen, but we degrade nicely - log.warn( "Unable to access " + StringHelper.qualify( clazz.toString()= , method.getName() ) ); + log.warn( "Unable to access {}", StringHelper.qualify( clazz.toString(= ), method.getName() ) ); } } annotationMessage =3D (String) annotationParameters.get( "message" ); --===============2129700905670541276==-- From hibernate-commits at lists.jboss.org Sat May 17 08:54:07 2008 Content-Type: multipart/mixed; boundary="===============3159337642337367567==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14674 - in search/trunk: src/java/org/hibernate/search and 11 other directories. Date: Sat, 17 May 2008 08:54:07 -0400 Message-ID: --===============3159337642337367567== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: epbernard Date: 2008-05-17 08:54:06 -0400 (Sat, 17 May 2008) New Revision: 14674 Modified: search/trunk/ivy.xml search/trunk/pom.xml search/trunk/src/java/org/hibernate/search/Version.java search/trunk/src/java/org/hibernate/search/backend/LuceneIndexingParamet= ers.java search/trunk/src/java/org/hibernate/search/backend/Workspace.java search/trunk/src/java/org/hibernate/search/backend/impl/jms/AbstractJMSH= ibernateSearchController.java search/trunk/src/java/org/hibernate/search/backend/impl/lucene/LuceneBac= kendQueueProcessor.java search/trunk/src/java/org/hibernate/search/backend/impl/lucene/LuceneWor= ker.java search/trunk/src/java/org/hibernate/search/engine/DocumentBuilder.java search/trunk/src/java/org/hibernate/search/engine/ObjectLoader.java search/trunk/src/java/org/hibernate/search/engine/QueryLoader.java search/trunk/src/java/org/hibernate/search/event/FullTextIndexCollection= EventListener.java search/trunk/src/java/org/hibernate/search/event/FullTextIndexEventListe= ner.java search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java search/trunk/src/java/org/hibernate/search/query/ScrollableResultsImpl.j= ava search/trunk/src/java/org/hibernate/search/reader/SharedReaderProvider.j= ava search/trunk/src/java/org/hibernate/search/store/DirectoryProviderHelper= .java search/trunk/src/java/org/hibernate/search/store/FSMasterDirectoryProvid= er.java search/trunk/src/java/org/hibernate/search/store/FSSlaveDirectoryProvide= r.java search/trunk/src/java/org/hibernate/search/store/optimization/Incrementa= lOptimizerStrategy.java search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/Co= ntact.java search/trunk/src/test/org/hibernate/search/test/query/LuceneQuerySortTes= t.java search/trunk/src/test/org/hibernate/search/test/query/TermVectorTest.java Log: HSEARCH-197 move to slf4j Modified: search/trunk/ivy.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/ivy.xml 2008-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/ivy.xml 2008-05-17 12:54:06 UTC (rev 14674) @@ -16,8 +16,8 @@ default"/> default"/> + default"/> = default"/> - default"/> default"/> default"/> default"/> @@ -25,7 +25,6 @@ default"/> = - default"/> default"/> default"/> default"/> Modified: search/trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/pom.xml 2008-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/pom.xml 2008-05-17 12:54:06 UTC (rev 14674) @@ -28,10 +28,10 @@ 2.3.1 - commons-logging - commons-logging - 1.0.4 - + org.slf4j + slf4j-api + 1.4.2 + javax.transaction jta Modified: search/trunk/src/java/org/hibernate/search/Version.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/Version.java 2008-05-17 12:5= 2:14 UTC (rev 14673) +++ search/trunk/src/java/org/hibernate/search/Version.java 2008-05-17 12:5= 4:06 UTC (rev 14674) @@ -3,18 +3,19 @@ = import java.util.Date; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = + /** * @author Emmanuel Bernard */ public class Version { public static final String VERSION =3D "3.1.x." + new Date(); - private static Log log =3D LogFactory.getLog( Version.class ); + private static Logger log =3D LoggerFactory.getLogger( Version.class ); = static { - log.info( "Hibernate Search " + VERSION ); + log.info( "Hibernate Search {}", VERSION ); } = public static void touch() { Modified: search/trunk/src/java/org/hibernate/search/backend/LuceneIndexing= Parameters.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/backend/LuceneIndexingParame= ters.java 2008-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/java/org/hibernate/search/backend/LuceneIndexingParame= ters.java 2008-05-17 12:54:06 UTC (rev 14674) @@ -6,11 +6,11 @@ import java.util.Map; import java.util.Properties; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.lucene.index.IndexWriter; import org.hibernate.search.SearchException; import org.hibernate.search.backend.configuration.IndexWriterSetting; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Wrapper class around the Lucene indexing parameters mergeFactor,= maxMergeDocs, @@ -24,8 +24,6 @@ */ public class LuceneIndexingParameters implements Serializable { = - private static final Log log =3D LogFactory.getLog( LuceneIndexingParamet= ers.class ); - // value keyword public static final String EXPLICIT_DEFAULT_VALUE =3D "default"; = // property path keywords Modified: search/trunk/src/java/org/hibernate/search/backend/Workspace.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/backend/Workspace.java 2008-= 05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/java/org/hibernate/search/backend/Workspace.java 2008-= 05-17 12:54:06 UTC (rev 14674) @@ -8,8 +8,6 @@ import java.util.Map; import java.util.concurrent.locks.ReentrantLock; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.SimpleAnalyzer; import org.apache.lucene.index.IndexReader; @@ -20,6 +18,8 @@ import org.hibernate.search.engine.SearchFactoryImplementor; import org.hibernate.search.store.DirectoryProvider; import org.hibernate.search.store.optimization.OptimizerStrategy; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; = /** * Lucene workspace. @@ -43,7 +43,7 @@ */ //TODO introduce the notion of read only IndexReader? We cannot enforce it= because Lucene use abstract classes, not interfaces public class Workspace { - private static Log log =3D LogFactory.getLog( Workspace.class ); + private final Logger log =3D LoggerFactory.getLogger( Workspace.class ); private Map readers =3D new HashMap(); private Map writers =3D new HashMap(); private List lockedProviders =3D new ArrayList(); Modified: search/trunk/src/java/org/hibernate/search/backend/impl/jms/Abstr= actJMSHibernateSearchController.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/backend/impl/jms/AbstractJMS= HibernateSearchController.java 2008-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/java/org/hibernate/search/backend/impl/jms/AbstractJMS= HibernateSearchController.java 2008-05-17 12:54:06 UTC (rev 14674) @@ -9,12 +9,12 @@ import javax.jms.MessageListener; import javax.jms.ObjectMessage; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.Session; import org.hibernate.search.backend.LuceneWork; import org.hibernate.search.util.ContextHelper; import org.hibernate.search.engine.SearchFactoryImplementor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Implement the Hibernate Search controller responsible for processing the @@ -26,7 +26,7 @@ * @author Emmanuel Bernard */ public abstract class AbstractJMSHibernateSearchController implements Mess= ageListener { - private static Log log =3D LogFactory.getLog( AbstractJMSHibernateSearchC= ontroller.class ); + private static Logger log =3D LoggerFactory.getLogger( AbstractJMSHiberna= teSearchController.class ); = /** * return the current or give a new session @@ -62,7 +62,7 @@ */ public void onMessage(Message message) { if ( !( message instanceof ObjectMessage ) ) { - log.error( "Incorrect message type: " + message.getClass() ); + log.error( "Incorrect message type: {}", message.getClass() ); return; } ObjectMessage objectMessage =3D (ObjectMessage) message; Modified: search/trunk/src/java/org/hibernate/search/backend/impl/lucene/Lu= ceneBackendQueueProcessor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/backend/impl/lucene/LuceneBa= ckendQueueProcessor.java 2008-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/java/org/hibernate/search/backend/impl/lucene/LuceneBa= ckendQueueProcessor.java 2008-05-17 12:54:06 UTC (rev 14674) @@ -6,8 +6,6 @@ import java.util.List; import java.util.ArrayList; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.search.backend.AddLuceneWork; import org.hibernate.search.backend.LuceneWork; import org.hibernate.search.backend.Workspace; @@ -19,6 +17,8 @@ import org.hibernate.search.store.DirectoryProvider; import org.hibernate.search.store.IndexShardingStrategy; import org.hibernate.annotations.common.AssertionFailure; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Apply the operations to Lucene directories avoiding deadlocks. @@ -32,7 +32,7 @@ /** * Class logger. */ - private static Log log =3D LogFactory.getLog( LuceneBackendQueueProcessor= .class ); + private static Logger log =3D LoggerFactory.getLogger( LuceneBackendQueue= Processor.class ); = private List queue; private SearchFactoryImplementor searchFactoryImplementor; Modified: search/trunk/src/java/org/hibernate/search/backend/impl/lucene/Lu= ceneWorker.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/backend/impl/lucene/LuceneWo= rker.java 2008-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/java/org/hibernate/search/backend/impl/lucene/LuceneWo= rker.java 2008-05-17 12:54:06 UTC (rev 14674) @@ -4,8 +4,6 @@ import java.io.IOException; import java.io.Serializable; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.lucene.document.Document; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; @@ -21,6 +19,8 @@ import org.hibernate.search.backend.PurgeAllLuceneWork; import org.hibernate.search.engine.DocumentBuilder; import org.hibernate.search.store.DirectoryProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Stateless implementation that performs a unit of work. @@ -31,7 +31,7 @@ */ public class LuceneWorker { private Workspace workspace; - private static Log log =3D LogFactory.getLog( LuceneWorker.class ); + private static final Logger log =3D LoggerFactory.getLogger( LuceneWorker= .class ); = public LuceneWorker(Workspace workspace) { this.workspace =3D workspace; @@ -63,8 +63,7 @@ } = private void add(Class entity, Serializable id, Document document, Direct= oryProvider provider) { - if ( log.isTraceEnabled() ) - log.trace( "add to Lucene index: " + entity + "#" + id + ": " + documen= t ); + log.trace( "add to Lucene index: {}#{}:{}", new Object[] { entity, id, d= ocument } ); IndexWriter writer =3D workspace.getIndexWriter( provider, entity, true = ); try { writer.addDocument( document ); @@ -86,7 +85,7 @@ * We can only delete by term, and the index doesn't have a termt that * uniquely identify the entry. See logic below */ - log.trace( "remove from Lucene index: " + entity + "#" + id ); + log.trace( "remove from Lucene index: {}#{}", entity, id ); DocumentBuilder builder =3D workspace.getDocumentBuilder( entity ); Term term =3D builder.getTerm( id ); IndexReader reader =3D workspace.getIndexReader( provider, entity ); @@ -121,8 +120,7 @@ = public void performWork(OptimizeLuceneWork work, DirectoryProvider provid= er) { Class entity =3D work.getEntityClass(); - if ( log.isTraceEnabled() ) - log.trace( "optimize Lucene index: " + entity ); + log.trace( "optimize Lucene index: {}", entity ); IndexWriter writer =3D workspace.getIndexWriter( provider, entity, false= ); try { writer.optimize(); @@ -135,8 +133,7 @@ = public void performWork(PurgeAllLuceneWork work, DirectoryProvider provid= er) { Class entity =3D work.getEntityClass(); - if ( log.isTraceEnabled() ) - log.trace( "purgeAll Lucene index: " + entity ); + log.trace( "purgeAll Lucene index: {}", entity ); IndexReader reader =3D workspace.getIndexReader( provider, entity ); try { Term term =3D new Term( DocumentBuilder.CLASS_FIELDNAME, entity.getName= () ); Modified: search/trunk/src/java/org/hibernate/search/engine/DocumentBuilder= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/engine/DocumentBuilder.java = 2008-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/java/org/hibernate/search/engine/DocumentBuilder.java = 2008-05-17 12:54:06 UTC (rev 14674) @@ -11,8 +11,6 @@ import java.util.Map; import java.util.Set; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; @@ -53,6 +51,8 @@ import org.hibernate.search.store.IndexShardingStrategy; import org.hibernate.search.util.BinderHelper; import org.hibernate.search.util.ScopedAnalyzer; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Set up and provide a manager for indexes classes @@ -64,7 +64,7 @@ * @author Hardy Ferentschik */ public class DocumentBuilder { - private static final Log log =3D LogFactory.getLog( DocumentBuilder.class= ); + private static final Logger log =3D LoggerFactory.getLogger( DocumentBuil= der.class ); = private final PropertiesMetadata rootPropertiesMetadata; private final XClass beanClass; @@ -203,8 +203,8 @@ similarity =3D (Similarity) similarityClass.newInstance(); } catch (Exception e) { - log.error( "Exception attempting to instantiate Similarity '" + simila= rityClass.getName() - + "' set for " + beanClass.getName() ); + log.error( "Exception attempting to instantiate Similarity '{}' set fo= r {}", + similarityClass.getName(), beanClass.getName() ); } } } @@ -348,7 +348,7 @@ } else if ( log.isTraceEnabled() ) { String localPrefix =3D buildEmbeddedPrefix( prefix, embeddedAnn, membe= r ); - log.trace( "depth reached, ignoring " + localPrefix ); + log.trace( "depth reached, ignoring {}", localPrefix ); } = level--; @@ -760,7 +760,7 @@ if ( store !=3D Field.Store.NO && TwoWayFieldBridge.class.isAssignableF= rom( fieldBridge.getClass() ) ) { result[matchingPosition] =3D ( (TwoWayFieldBridge) fieldBridge ).get( = fieldName, document ); if ( log.isTraceEnabled() ) { - log.trace( "Field " + fieldName + " projected as " + result[matchingP= osition] ); + log.trace( "Field {} projected as {}", fieldName, result[matchingPosi= tion] ); } } else { Modified: search/trunk/src/java/org/hibernate/search/engine/ObjectLoader.ja= va =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/engine/ObjectLoader.java 200= 8-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/java/org/hibernate/search/engine/ObjectLoader.java 200= 8-05-17 12:54:06 UTC (rev 14674) @@ -4,16 +4,16 @@ import java.util.ArrayList; import java.util.List; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.Hibernate; import org.hibernate.Session; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * @author Emmanuel Bernard */ public class ObjectLoader implements Loader { - private static final Log log =3D LogFactory.getLog( ObjectLoader.class ); + private static final Logger log =3D LoggerFactory.getLogger( ObjectLoader= .class ); private Session session; = public void init(Session session, SearchFactoryImplementor searchFactoryI= mplementor) { @@ -28,8 +28,8 @@ } catch (RuntimeException e) { if ( LoaderHelper.isObjectNotFoundException( e ) ) { - log.debug( "Object found in Search index but not in database: " - + entityInfo.clazz + " wih id " + entityInfo.id ); + log.debug( "Object found in Search index but not in database: {} with = id {}", + entityInfo.clazz, entityInfo.id ); maybeProxy =3D null; } else { @@ -54,8 +54,8 @@ } catch (RuntimeException e) { if ( LoaderHelper.isObjectNotFoundException( e ) ) { - log.debug( "Object found in Search index but not in database: " - + entityInfo.clazz + " wih id " + entityInfo.id ); + log.debug( "Object found in Search index but not in database: {} with= id {}", + entityInfo.clazz, entityInfo.id ); } else { throw e; Modified: search/trunk/src/java/org/hibernate/search/engine/QueryLoader.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/engine/QueryLoader.java 2008= -05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/java/org/hibernate/search/engine/QueryLoader.java 2008= -05-17 12:54:06 UTC (rev 14674) @@ -4,14 +4,14 @@ import java.util.ArrayList; import java.util.List; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.Criteria; import org.hibernate.Hibernate; import org.hibernate.Session; import org.hibernate.annotations.common.AssertionFailure; import org.hibernate.criterion.Disjunction; import org.hibernate.criterion.Restrictions; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * @author Emmanuel Bernard @@ -19,7 +19,7 @@ public class QueryLoader implements Loader { private static final int MAX_IN_CLAUSE =3D 500; private static final List EMPTY_LIST =3D new ArrayList( 0 ); - private static Log log =3D LogFactory.getLog( QueryLoader.class ); + private final Logger log =3D LoggerFactory.getLogger( QueryLoader.class ); = private Session session; private Class entityType; @@ -44,8 +44,8 @@ } catch (RuntimeException e) { if ( LoaderHelper.isObjectNotFoundException( e ) ) { - log.debug( "Object found in Search index but not in database: " - + entityInfo.clazz + " wih id " + entityInfo.id ); + log.debug( "Object found in Search index but not in database: {} with = id {}", + entityInfo.clazz, entityInfo.id ); maybeProxy =3D null; } else { @@ -91,8 +91,8 @@ } else { if ( log.isDebugEnabled() ) { - log.debug( "Object found in Search index but not in database: " - + entityInfo.clazz + " wih id " + entityInfo.id ); + log.debug( "Object found in Search index but not in database: {} with= {}", + entityInfo.clazz, entityInfo.id ); } } } Modified: search/trunk/src/java/org/hibernate/search/event/FullTextIndexCol= lectionEventListener.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/event/FullTextIndexCollectio= nEventListener.java 2008-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/java/org/hibernate/search/event/FullTextIndexCollectio= nEventListener.java 2008-05-17 12:54:06 UTC (rev 14674) @@ -9,12 +9,11 @@ import org.hibernate.event.PostCollectionRecreateEvent; import org.hibernate.event.PostCollectionRemoveEvent; import org.hibernate.event.PostCollectionUpdateEvent; -import org.hibernate.event.AbstractEvent; import org.hibernate.event.AbstractCollectionEvent; import org.hibernate.search.backend.WorkType; import org.hibernate.engine.EntityEntry; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Support collection event listening (starts from hibernate core 3.2.6) @@ -26,7 +25,7 @@ implements PostCollectionRecreateEventListener, PostCollectionRemoveEventListener, PostCollectionUpdateEventListener { - private static Log log =3D LogFactory.getLog( FullTextIndexCollectionEven= tListener.class ); + private final Logger log =3D LoggerFactory.getLogger( FullTextIndexCollec= tionEventListener.class ); = public void onPostRecreateCollection(PostCollectionRecreateEvent event) { processCollectionEvent( event ); @@ -43,7 +42,10 @@ if ( used && searchFactoryImplementor.getDocumentBuilders().containsKey(= entity.getClass() ) ) { Serializable id =3D getId( entity, event ); if (id =3D=3D null) { - log.warn( "Unable to reindex entity on collection change, id cannot be= extracted: " + event.getAffectedOwnerEntityName() ); + log.warn( + "Unable to reindex entity on collection change, id cannot be extract= ed: {}", + event.getAffectedOwnerEntityName() + ); return; } processWork( entity, id, WorkType.COLLECTION, event ); Modified: search/trunk/src/java/org/hibernate/search/event/FullTextIndexEve= ntListener.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/event/FullTextIndexEventList= ener.java 2008-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/java/org/hibernate/search/event/FullTextIndexEventList= ener.java 2008-05-17 12:54:06 UTC (rev 14674) @@ -3,8 +3,6 @@ = import java.io.Serializable; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.cfg.Configuration; import org.hibernate.event.AbstractEvent; import org.hibernate.event.Initializable; Modified: search/trunk/src/java/org/hibernate/search/query/FullTextQueryImp= l.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java= 2008-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java= 2008-05-17 12:54:06 UTC (rev 14674) @@ -12,8 +12,6 @@ import java.util.Map; import java.util.Set; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.Term; import org.apache.lucene.search.BooleanClause; @@ -56,6 +54,8 @@ import org.hibernate.search.store.DirectoryProvider; import org.hibernate.search.util.ContextHelper; import org.hibernate.transform.ResultTransformer; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Implementation of {@link org.hibernate.search.FullTextQuery} @@ -65,7 +65,7 @@ */ //TODO implements setParameter() public class FullTextQueryImpl extends AbstractQueryImpl implements FullTe= xtQuery { - private static final Log log =3D LogFactory.getLog( FullTextQueryImpl.cla= ss ); + private final Logger log =3D LoggerFactory.getLogger( FullTextQueryImpl.c= lass ); private org.apache.lucene.search.Query luceneQuery; private Class[] classes; private Set classesAndSubclasses; Modified: search/trunk/src/java/org/hibernate/search/query/ScrollableResult= sImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/query/ScrollableResultsImpl.= java 2008-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/java/org/hibernate/search/query/ScrollableResultsImpl.= java 2008-05-17 12:54:06 UTC (rev 14674) @@ -15,8 +15,6 @@ import java.util.Map; import java.util.TimeZone; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.lucene.search.Hits; import org.apache.lucene.search.IndexSearcher; import org.hibernate.HibernateException; @@ -27,6 +25,8 @@ import org.hibernate.search.engine.EntityInfo; import org.hibernate.search.engine.Loader; import org.hibernate.type.Type; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Implements scollable and paginated resultsets. @@ -50,7 +50,7 @@ * @author John Griffin */ public class ScrollableResultsImpl implements ScrollableResults { - private static Log log =3D LogFactory.getLog( ScrollableResultsImpl.class= ); + private static Logger log =3D LoggerFactory.getLogger( ScrollableResultsI= mpl.class ); private final IndexSearcher searcher; private final SearchFactory searchFactory; private final Hits hits; Modified: search/trunk/src/java/org/hibernate/search/reader/SharedReaderPro= vider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/reader/SharedReaderProvider.= java 2008-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/java/org/hibernate/search/reader/SharedReaderProvider.= java 2008-05-17 12:54:06 UTC (rev 14674) @@ -11,8 +11,6 @@ import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.MultiReader; import org.hibernate.annotations.common.AssertionFailure; @@ -21,6 +19,8 @@ import static org.hibernate.search.reader.ReaderProviderHelper.buildMultiR= eader; import static org.hibernate.search.reader.ReaderProviderHelper.clean; import org.hibernate.search.store.DirectoryProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Share readers per SearchFactory, reusing them iff they are still valid. @@ -29,7 +29,7 @@ */ public class SharedReaderProvider implements ReaderProvider { private static Field subReadersField; - private static Log log =3D LogFactory.getLog( SharedReaderProvider.class = ); + private final Logger log =3D LoggerFactory.getLogger ( SharedReaderProvid= er.class ); /** * nonfair lock. Need to be acquired on indexReader acquisition or releas= e (semaphore) */ @@ -58,13 +58,13 @@ boolean trace =3D log.isTraceEnabled(); int length =3D directoryProviders.length; IndexReader[] readers =3D new IndexReader[length]; - if ( trace ) log.trace( "Opening IndexReader for directoryProviders: " += length ); + if ( trace ) log.trace( "Opening IndexReader for directoryProviders: {}"= , length ); = for (int index =3D 0; index < length; index++) { DirectoryProvider directoryProvider =3D directoryProviders[index]; IndexReader reader; Lock directoryProviderLock =3D perDirectoryProviderManipulationLocks.ge= t( directoryProvider ); - if ( trace ) log.trace( "Opening IndexReader from " + directoryProvider= .getDirectory().toString() ); + if ( trace ) log.trace( "Opening IndexReader from {}", directoryProvide= r.getDirectory() ); directoryProviderLock.lock(); //needed for same problem as the double-c= hecked locking try { reader =3D activeSearchIndexReaders.get( directoryProvider ); @@ -74,7 +74,7 @@ } if ( reader =3D=3D null ) { if ( trace ) - log.trace( "No shared IndexReader, opening a new one: " + directoryPr= ovider.getDirectory().toString() ); + log.trace( "No shared IndexReader, opening a new one: {}", directoryP= rovider.getDirectory() ); reader =3D replaceActiveReader( null, directoryProviderLock, directory= Provider, readers ); } else { @@ -86,14 +86,16 @@ throw new SearchException( "Unable to read current status of Lucene I= ndexReader", e ); } if ( !isCurrent ) { - if ( trace ) - log.trace( "Out of date shared IndexReader found, opening a new one:= " + directoryProvider.getDirectory().toString() ); + if ( trace ) { + log.trace( "Out of date shared IndexReader found, opening a new one:= {}", + directoryProvider.getDirectory() ); + } IndexReader outOfDateReader =3D reader; reader =3D replaceActiveReader( outOfDateReader, directoryProviderLoc= k, directoryProvider, readers ); } else { if ( trace ) - log.trace( "Valid shared IndexReader: " + directoryProvider.getDirec= tory().toString() ); + log.trace( "Valid shared IndexReader: {}" + directoryProvider.getDir= ectory() ); directoryProviderLock.lock(); try { //read the latest active one, the current one could be out of date a= nd closed already @@ -105,7 +107,7 @@ //TODO if readerData is null???? readerData.semaphore++; searchIndexReaderSemaphores.put( reader, readerData ); //not necess= ary - if ( trace ) log.trace( "Semaphore increased: " + readerData.semaph= ore + " for " + reader ); + if ( trace ) log.trace( "Semaphore increased: {} for {}", readerDat= a.semaphore, reader ); } finally { semaphoreIndexReaderLock.unlock(); @@ -145,7 +147,7 @@ semaphoreIndexReaderLock.lock(); try { searchIndexReaderSemaphores.put( reader, new ReaderData( 1, directoryP= rovider ) ); - if ( trace ) log.trace( "Semaphore: 1 for " + reader ); + if ( trace ) log.trace( "Semaphore: 1 for {}", reader ); if ( outOfDateReader !=3D null ) { ReaderData readerData =3D searchIndexReaderSemaphores.get( outOfDateR= eader ); if ( readerData =3D=3D null ) { @@ -183,7 +185,7 @@ directoryProviderLock.unlock(); } if ( closeOutOfDateReader ) { - if ( trace ) log.trace( "Closing out of date IndexReader " + outOfDateR= eader ); + if ( trace ) log.trace( "Closing out of date IndexReader {}", outOfDate= Reader ); try { outOfDateReader.close(); } @@ -192,7 +194,7 @@ } } if ( closeOldReader ) { - if ( trace ) log.trace( "Closing old IndexReader " + oldReader ); + if ( trace ) log.trace( "Closing old IndexReader {}", oldReader ); try { oldReader.close(); } @@ -215,7 +217,7 @@ catch (IllegalAccessException e) { throw new SearchException( "Incompatible version of Lucene: MultiReade= r.subReaders not accessible", e ); } - if ( trace ) log.trace( "Closing MultiReader: " + reader ); + if ( trace ) log.trace( "Closing MultiReader: {}", reader ); } else { throw new AssertionFailure( "Everything should be wrapped in a MultiRea= der" ); @@ -233,7 +235,7 @@ } = if ( readerData =3D=3D null ) { - log.error( "Trying to close a Lucene IndexReader not present: " + subR= eader.directory().toString() ); + log.error( "Trying to close a Lucene IndexReader not present: {}", sub= Reader.directory() ); //TODO should we try to close? continue; } @@ -245,19 +247,19 @@ try { boolean isActive; isActive =3D activeSearchIndexReaders.get( readerData.provider ) =3D= =3D subReader; - if ( trace ) log.trace( "Indexreader not active: " + subReader ); + if ( trace ) log.trace( "Indexreader not active: {}", subReader ); semaphoreIndexReaderLock.lock(); try { readerData =3D searchIndexReaderSemaphores.get( subReader ); if ( readerData =3D=3D null ) { - log.error( "Trying to close a Lucene IndexReader not present: " + su= bReader.directory().toString() ); + log.error( "Trying to close a Lucene IndexReader not present: {}" + = subReader.directory() ); //TODO should we try to close? continue; } readerData.semaphore--; - if ( trace ) log.trace( "Semaphore decreased to: " + readerData.semap= hore + " for " + subReader ); + if ( trace ) log.trace( "Semaphore decreased to: {} for {}", readerDa= ta.semaphore, subReader ); if ( readerData.semaphore < 0 ) - log.error( "Semaphore negative: " + subReader.directory().toString()= ); + log.error( "Semaphore negative: {}", subReader.directory() ); if ( ( !isActive ) && readerData.semaphore =3D=3D 0 ) { searchIndexReaderSemaphores.remove( subReader ); closeReader =3D true; @@ -275,7 +277,7 @@ } = if ( closeReader ) { - if ( trace ) log.trace( "Closing IndexReader: " + subReader ); + if ( trace ) log.trace( "Closing IndexReader: {}", subReader ); try { subReader.close(); } Modified: search/trunk/src/java/org/hibernate/search/store/DirectoryProvide= rHelper.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/store/DirectoryProviderHelpe= r.java 2008-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/java/org/hibernate/search/store/DirectoryProviderHelpe= r.java 2008-05-17 12:54:06 UTC (rev 14674) @@ -7,12 +7,12 @@ = import org.hibernate.search.SearchException; import org.hibernate.annotations.common.util.StringHelper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.store.FSDirectory; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; = /** * @author Emmanuel Bernard @@ -20,7 +20,7 @@ */ public class DirectoryProviderHelper { = - private static final Log log =3D LogFactory.getLog( DirectoryProviderHelp= er.class ); + private static final Logger log =3D LoggerFactory.getLogger( DirectoryPro= viderHelper.class ); private static final String ROOTINDEX_PROP_NAME =3D "sourceBase"; private static final String RELATIVEINDEX_PROP_NAME =3D "source"; = @@ -38,8 +38,11 @@ File sourceDirectory; if ( log.isTraceEnabled() ) { log.trace( - "Guess source directory from " + ROOTINDEX_PROP_NAME + " " + ( root != =3D null ? root : "" ) - + " and " + RELATIVEINDEX_PROP_NAME + " " + (relative !=3D null ? r= elative : "") + "Guess source directory from {} {} and {} {}", new Object[] { + ROOTINDEX_PROP_NAME, + ( root !=3D null ? root : "" ), + RELATIVEINDEX_PROP_NAME, + (relative !=3D null ? relative : "") } ); } if ( relative =3D=3D null ) relative =3D directoryProviderName; @@ -70,7 +73,7 @@ public static FSDirectory createFSIndex(File indexDir) throws IOException= { FSDirectory fsDirectory =3D FSDirectory.getDirectory( indexDir ); if ( ! IndexReader.indexExists( fsDirectory ) ) { - log.debug( "Initialize index: '" + indexDir.getAbsolutePath() + "'" ); + log.debug( "Initialize index: '{}'", indexDir.getAbsolutePath() ); IndexWriter iw =3D new IndexWriter( fsDirectory, new StandardAnalyzer()= , true ); iw.close(); } @@ -136,7 +139,7 @@ } catch (NumberFormatException nfe) { throw new SearchException( "Unable to initialize index: " + directoryPr= oviderName +"; refresh period is not numeric.", nfe ); } - log.debug( "Refresh period " + period + " seconds" ); + log.debug( "Refresh period: {} seconds", period ); return period * 1000; //per second } = Modified: search/trunk/src/java/org/hibernate/search/store/FSMasterDirector= yProvider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/store/FSMasterDirectoryProvi= der.java 2008-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/java/org/hibernate/search/store/FSMasterDirectoryProvi= der.java 2008-05-17 12:54:06 UTC (rev 14674) @@ -11,11 +11,11 @@ import java.io.IOException; = import org.apache.lucene.store.FSDirectory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.search.SearchException; import org.hibernate.search.util.FileHelper; import org.hibernate.search.engine.SearchFactoryImplementor; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; = /** * File based DirectoryProvider that takes care of index copy @@ -31,7 +31,7 @@ //TODO rename copy? public class FSMasterDirectoryProvider implements DirectoryProvider { = - private static Log log =3D LogFactory.getLog( FSMasterDirectoryProvider.c= lass ); + private final Logger log =3D LoggerFactory.getLogger( FSMasterDirectoryPr= ovider.class ); = private FSDirectory directory; private int current; @@ -50,9 +50,9 @@ this.directoryProviderName =3D directoryProviderName; //source guessing sourceDir =3D DirectoryProviderHelper.getSourceDirectory( directoryProvi= derName, properties, true ); - log.debug( "Source directory: " + sourceDir.getPath() ); + log.debug( "Source directory: {}", sourceDir.getPath() ); indexDir =3D DirectoryProviderHelper.getVerifiedIndexDir( directoryProvi= derName, properties, true ); - log.debug( "Index directory: " + indexDir.getPath() ); + log.debug( "Index directory: {}", indexDir.getPath() ); try { indexName =3D indexDir.getCanonicalPath(); directory =3D DirectoryProviderHelper.createFSIndex( indexDir ); @@ -74,7 +74,7 @@ current =3D 1; } else { - log.debug( "Source directory for '" + indexName + "' will be initializ= ed"); + log.debug( "Source directory for '{}' will be initialized", indexName); current =3D 1; } String currentString =3D Integer.valueOf( current ).toString(); @@ -84,7 +84,7 @@ new File( sourceDir, "current2" ).delete(); //TODO small hole, no file can be found here new File( sourceDir, "current" + currentString ).createNewFile(); - log.debug( "Current directory: " + current ); + log.debug( "Current directory: {}", current ); } catch (IOException e) { throw new SearchException( "Unable to initialize index: " + directoryPr= oviderName, e ); @@ -132,7 +132,7 @@ executor.execute( copyTask ); } else { - log.info( "Skipping directory synchronization, previous work still in = progress: " + indexName ); + log.info( "Skipping directory synchronization, previous work still in = progress: {}", indexName ); } } } @@ -167,7 +167,7 @@ File destinationFile =3D new File(destination, Integer.valueOf(index).= toString() ); //TODO make smart a parameter try { - log.trace( "Copying " + source + " into " + destinationFile ); + log.trace( "Copying {} into {}", source, destinationFile ); FileHelper.synchronize( source, destinationFile, true ); current =3D index; } @@ -178,7 +178,7 @@ return; } if ( ! new File( destination, "current" + oldIndex ).delete() ) { - log.warn( "Unable to remove previous marker file from source of " + i= ndexName ); + log.warn( "Unable to remove previous marker file from source of {}", = indexName ); } try { new File( destination, "current" + index ).createNewFile(); @@ -191,7 +191,7 @@ directoryProviderLock.unlock(); inProgress =3D false; } - log.trace( "Copy for " + indexName + " took " + (System.currentTimeMill= is() - start) + " ms" ); + log.trace( "Copy for {} took {} ms", indexName, (System.currentTimeMill= is() - start) ); } } = Modified: search/trunk/src/java/org/hibernate/search/store/FSSlaveDirectory= Provider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/store/FSSlaveDirectoryProvid= er.java 2008-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/java/org/hibernate/search/store/FSSlaveDirectoryProvid= er.java 2008-05-17 12:54:06 UTC (rev 14674) @@ -10,12 +10,12 @@ import java.io.IOException; = import org.apache.lucene.store.FSDirectory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.hibernate.AssertionFailure; import org.hibernate.search.SearchException; import org.hibernate.search.util.FileHelper; import org.hibernate.search.engine.SearchFactoryImplementor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * File based directory provider that takes care of getting a version of t= he index @@ -31,7 +31,7 @@ */ public class FSSlaveDirectoryProvider implements DirectoryProvider { = - private static Log log =3D LogFactory.getLog( FSSlaveDirectoryProvider.cl= ass ); + private final Logger log =3D LoggerFactory.getLogger( FSSlaveDirectoryPro= vider.class ); = private FSDirectory directory1; private FSDirectory directory2; @@ -53,9 +53,9 @@ if ( ! new File( sourceIndexDir, "current1" ).exists() && ! new File( so= urceIndexDir, "current2" ).exists() ) { throw new IllegalStateException( "No current marker in source directory= " ); } - log.debug( "Source directory: " + sourceIndexDir.getPath() ); + log.debug( "Source directory: {}", sourceIndexDir.getPath() ); indexDir =3D DirectoryProviderHelper.getVerifiedIndexDir( directoryProvi= derName, properties, true ); - log.debug( "Index directory: " + indexDir.getPath() ); + log.debug( "Index directory: {}", indexDir.getPath() ); try { indexName =3D indexDir.getCanonicalPath(); } @@ -105,7 +105,7 @@ throw new SearchException( "Unable to create the directory marker fil= e: " + indexName ); } } - log.debug( "Current directory: " + current); + log.debug( "Current directory: {}", current); } catch (IOException e) { throw new SearchException( "Unable to initialize index: " + directoryPr= oviderName, e ); @@ -162,7 +162,7 @@ executor.execute( copyTask ); } else { - log.trace( "Skipping directory synchronization, previous work still in= progress: " + indexName); + log.trace( "Skipping directory synchronization, previous work still in= progress: {}", indexName); } } } @@ -199,7 +199,7 @@ File destinationFile =3D new File( destination, Integer.valueOf( index= ).toString() ); //TODO make smart a parameter try { - log.trace( "Copying " + sourceFile + " into " + destinationFile ); + log.trace( "Copying {} into {}", sourceFile, destinationFile ); FileHelper.synchronize( sourceFile, destinationFile, true ); current =3D index; } @@ -222,7 +222,7 @@ finally { inProgress =3D false; } - log.trace( "Copy for " + indexName + " took " + (System.currentTimeMill= is() - start) + " ms" ); + log.trace( "Copy for {} took {} ms", indexName, (System.currentTimeMill= is() - start) ); } } = Modified: search/trunk/src/java/org/hibernate/search/store/optimization/Inc= rementalOptimizerStrategy.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/java/org/hibernate/search/store/optimization/Increment= alOptimizerStrategy.java 2008-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/java/org/hibernate/search/store/optimization/Increment= alOptimizerStrategy.java 2008-05-17 12:54:06 UTC (rev 14674) @@ -10,8 +10,8 @@ import org.hibernate.search.SearchException; import org.hibernate.annotations.common.util.StringHelper; import org.apache.lucene.index.IndexWriter; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; = /** * Optimization strategy triggered after a certain amount of operations @@ -24,7 +24,7 @@ private long operations =3D 0; private long transactions =3D 0; private DirectoryProvider directoryProvider; - private Log log =3D LogFactory.getLog( IncrementalOptimizerStrategy.class= ); + private final Logger log =3D LoggerFactory.getLogger( IncrementalOptimize= rStrategy.class ); = public void initialize(DirectoryProvider directoryProvider, Properties in= dexProperties, SearchFactoryImplementor searchFactoryImplementor) { this.directoryProvider =3D directoryProvider; @@ -56,11 +56,8 @@ = public void optimize(Workspace workspace) { if ( needOptimization() ) { - if ( log.isDebugEnabled() ) { - log.debug( "Optimize " - + directoryProvider.getDirectory().toString() - +" after " + operations + " operations and " + transactions + " trans= actions"); - } + log.debug( "Optimize {} after {} operations and {} transactions", + new Object[] { directoryProvider.getDirectory(), operations, transacti= ons }); IndexWriter writer =3D workspace.getIndexWriter( directoryProvider ); try { writer.optimize(); Modified: search/trunk/src/test/org/hibernate/search/test/embedded/doublein= sert/Contact.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/C= ontact.java 2008-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/test/org/hibernate/search/test/embedded/doubleinsert/C= ontact.java 2008-05-17 12:54:06 UTC (rev 14674) @@ -5,7 +5,6 @@ import java.util.HashSet; import java.util.List; import java.util.Set; - import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.DiscriminatorColumn; @@ -22,8 +21,6 @@ = import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.Predicate; -import org.apache.commons.logging.LogFactory; -import org.apache.commons.logging.Log; import org.hibernate.annotations.Type; import org.hibernate.search.annotations.ContainedIn; import org.hibernate.search.annotations.DocumentId; @@ -40,8 +37,6 @@ @Indexed public class Contact implements Serializable { = - private static Log logger =3D LogFactory.getLog(Contact.class); - private static final long serialVersionUID =3D 1L; = @Id @GeneratedValue(strategy=3DGenerationType.AUTO) Modified: search/trunk/src/test/org/hibernate/search/test/query/LuceneQuery= SortTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/test/org/hibernate/search/test/query/LuceneQuerySortTe= st.java 2008-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/test/org/hibernate/search/test/query/LuceneQuerySortTe= st.java 2008-05-17 12:54:06 UTC (rev 14674) @@ -4,8 +4,6 @@ import java.util.List; import java.util.Calendar; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.lucene.analysis.StopAnalyzer; import org.apache.lucene.queryParser.QueryParser; import org.apache.lucene.search.Query; @@ -14,7 +12,6 @@ import org.hibernate.Transaction; import org.hibernate.search.FullTextSession; import org.hibernate.search.Search; -import org.hibernate.search.Version; import org.hibernate.search.FullTextQuery; import org.hibernate.search.test.SearchTestCase; = @@ -25,11 +22,6 @@ public class LuceneQuerySortTest extends SearchTestCase { = /** - * Class logger. - */ - private static Log log =3D LogFactory.getLog( Version.class ); - - /** * Test that we can change the default sort order of the lucene search re= sult. * * @throws Exception in case the test fails. Modified: search/trunk/src/test/org/hibernate/search/test/query/TermVectorT= est.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- search/trunk/src/test/org/hibernate/search/test/query/TermVectorTest.ja= va 2008-05-17 12:52:14 UTC (rev 14673) +++ search/trunk/src/test/org/hibernate/search/test/query/TermVectorTest.ja= va 2008-05-17 12:54:06 UTC (rev 14674) @@ -1,7 +1,5 @@ package org.hibernate.search.test.query; = -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.TermPositionVector; import org.apache.lucene.index.TermVectorOffsetInfo; @@ -17,8 +15,7 @@ * @author John Griffin */ public class TermVectorTest extends SearchTestCase { - private static Log log =3D LogFactory.getLog(TermVectorTest.class); - + = public void testPositionOffsets() throws Exception { FullTextSession s =3D Search.createFullTextSession(openSession()); createIndex(s); --===============3159337642337367567==-- From hibernate-commits at lists.jboss.org Mon May 19 11:22:26 2008 Content-Type: multipart/mixed; boundary="===============6551752886009568033==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14675 - branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x. Date: Mon, 19 May 2008 11:22:26 -0400 Message-ID: --===============6551752886009568033== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: max.andersen(a)jboss.com Date: 2008-05-19 11:22:26 -0400 (Mon, 19 May 2008) New Revision: 14675 Modified: branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x= /Hbm2DDLExporter.java Log: JBIDE-2232 BuildException Modified: branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/too= l/hbm2x/Hbm2DDLExporter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2= x/Hbm2DDLExporter.java 2008-05-17 12:54:06 UTC (rev 14674) +++ branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2= x/Hbm2DDLExporter.java 2008-05-19 15:22:26 UTC (rev 14675) @@ -13,7 +13,6 @@ import java.io.File; import java.util.Iterator; = -import org.apache.tools.ant.BuildException; import org.hibernate.cfg.Configuration; import org.hibernate.tool.hbm2ddl.SchemaExport; import org.hibernate.tool.hbm2ddl.SchemaUpdate; @@ -100,9 +99,9 @@ log.warn("Error #" + i + ": ", element); = } - log.error(i - 1 + " occurred while performing Hbm2DDLExporter."); + log.error(i - 1 + " errors occurred while performing Hbm2DDLExporter."= ); if (haltOnError) { - throw new BuildException( + throw new ExporterException( "Errors while performing Hbm2DDLExporter"); } } --===============6551752886009568033==-- From hibernate-commits at lists.jboss.org Tue May 20 02:44:02 2008 Content-Type: multipart/mixed; boundary="===============7471102840055533805==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r14676 - in core/branches/Branch_3_2_4_SP1_CP: src/org/hibernate/loader and 2 other directories. Date: Tue, 20 May 2008 02:44:01 -0400 Message-ID: --===============7471102840055533805== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: anthonyHib Date: 2008-05-20 02:44:01 -0400 (Tue, 20 May 2008) New Revision: 14676 Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/SubqueryEx= pression.java core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/loader/AbstractEntit= yJoinWalker.java core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/loader/criteria/Crit= eriaJoinWalker.java core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/criteria/Crite= riaQueryTest.java Log: fix for JBPAPP-838/HHH-957/HHH-952 Modified: core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/Sub= queryExpression.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/SubqueryE= xpression.java 2008-05-19 15:22:26 UTC (rev 14675) +++ core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/SubqueryE= xpression.java 2008-05-20 06:44:01 UTC (rev 14676) @@ -1,17 +1,18 @@ //$Id$ package org.hibernate.criterion; = +import java.util.HashMap; + import org.hibernate.Criteria; import org.hibernate.EntityMode; import org.hibernate.HibernateException; import org.hibernate.engine.QueryParameters; import org.hibernate.engine.SessionFactoryImplementor; -import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.TypedValue; import org.hibernate.impl.CriteriaImpl; +import org.hibernate.loader.criteria.CriteriaJoinWalker; import org.hibernate.loader.criteria.CriteriaQueryTranslator; import org.hibernate.persister.entity.OuterJoinLoadable; -import org.hibernate.sql.Select; import org.hibernate.type.Type; = /** @@ -24,7 +25,8 @@ private String op; private QueryParameters params; private Type[] types; - = + private CriteriaQueryTranslator innerQuery; + protected Type[] getTypes() { return types; } @@ -39,34 +41,23 @@ = public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { - = - final SessionImplementor session =3D ( (CriteriaImpl) criteria ).getSess= ion(); //ugly! - final SessionFactoryImplementor factory =3D session.getFactory(); - = + + final SessionFactoryImplementor factory =3D criteriaQuery.getFactory(); final OuterJoinLoadable persister =3D (OuterJoinLoadable) factory.getEnt= ityPersister( criteriaImpl.getEntityOrClassName() ); - CriteriaQueryTranslator innerQuery =3D new CriteriaQueryTranslator( = - factory, = - criteriaImpl, = - criteriaImpl.getEntityOrClassName(), //implicit polymorphism not suppo= rted (would need a union) = - criteriaQuery.generateSQLAlias(), - criteriaQuery - ); + + createAndSetInnerQuery( criteriaQuery, factory ); = - params =3D innerQuery.getQueryParameters(); //TODO: bad lifecycle.... - types =3D innerQuery.getProjectedTypes(); - = - //String filter =3D persister.filterFragment( innerQuery.getRootSQLALias= (), session.getEnabledFilters() ); - = - String sql =3D new Select( factory.getDialect() ) - .setWhereClause( innerQuery.getWhereCondition() ) - .setGroupByClause( innerQuery.getGroupBy() ) - .setSelectClause( innerQuery.getSelect() ) - .setFromClause( - persister.fromTableFragment( innerQuery.getRootSQLALias() ) + = - persister.fromJoinFragment( innerQuery.getRootSQLALias(), true, false= ) - ) - .toStatementString(); - = + CriteriaJoinWalker walker =3D new CriteriaJoinWalker( + persister, + innerQuery, + factory, + criteriaImpl, + criteriaImpl.getEntityOrClassName(), + new HashMap(), + innerQuery.getRootSQLALias()); + + String sql =3D walker.getSQLString(); + final StringBuffer buf =3D new StringBuffer() .append( toLeftSqlString(criteria, criteriaQuery) ); if (op!=3Dnull) buf.append(' ').append(op).append(' '); @@ -77,13 +68,49 @@ = public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery crite= riaQuery) = throws HibernateException { - Type[] types =3D params.getPositionalParameterTypes(); - Object[] values =3D params.getPositionalParameterValues(); - TypedValue[] tv =3D new TypedValue[types.length]; - for ( int i=3D0; i --===============2461790096998563935== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: steve.ebersole(a)jboss.com Date: 2008-05-21 14:20:50 -0400 (Wed, 21 May 2008) New Revision: 14677 Added: cglib/ cglib/branches/ cglib/tags/ cglib/trunk/ cglib/trunk/hibernate-cglib-repack.ipr cglib/trunk/hibernate-cglib-repack.iws cglib/trunk/pom.xml cglib/trunk/target/ cglib/trunk/target/dependency-reduced-pom.xml cglib/trunk/target/hibernate-cglib-repack-2.1_3.jar cglib/trunk/target/original-hibernate-cglib-repack-2.1_3.jar Log: Importing cglib repackaging project Added: cglib/trunk/hibernate-cglib-repack.ipr =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- cglib/trunk/hibernate-cglib-repack.ipr (rev 0) +++ cglib/trunk/hibernate-cglib-repack.ipr 2008-05-21 18:20:50 UTC (rev 146= 77) @@ -0,0 +1,304 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +