alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Hibernate example source code file (session_api.po)

This example Hibernate source code file (session_api.po) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Hibernate tags/keywords

cat, cat, domesticcat, hibernate, hibernate, if, objekt, objekte, session, sie, sie, sql, tag, tag

The Hibernate session_api.po source code

# translation of Collection_Mapping.po to 
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# Language /mnt/hgfs/base/Hibernate/Reference translations for PACKAGE package.
# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
# Automatically generated, 2006.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
#
msgid ""
msgstr ""
"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2010-07-21 05:43+0000\n"
"PO-Revision-Date: 2007-02-26 10:27+1000\n"
"Last-Translator: \n"
"Language-Team:  <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.9.1\n"

#. Tag: title
#: session_api.xml:31
#, no-c-format
msgid "Working with objects"
msgstr "Das Arbeiten mit Objekten"

#. Tag: para
#: session_api.xml:33
#, fuzzy, no-c-format
msgid ""
"Hibernate is a full object/relational mapping solution that not only shields "
"the developer from the details of the underlying database management system, "
"but also offers <emphasis>state management of objects. This is, "
"contrary to the management of SQL <literal>statements in common "
"JDBC/SQL persistence layers, a natural object-oriented view of persistence "
"in Java applications."
msgstr ""
"Hibernate ist eine komplette objekt/relationale Mapping-Lösung, die dem "
"Entwickler nicht nur Details des zu Grunde liegenden Datenbank-Management-"
"Systems abnimmt, sondern auch die <emphasis>Statusverwaltung von "
"Objekten bereit stellt. Dies ist im Gegensatz zur Verwaltung von SQL "
"<literal>statements in gängigen JDBC/SQL-Persistenzschichten eine "
"sehr natürliche, objektorientierte Ansicht der Persistenz in Java-"
"Anwendungen."

#. Tag: para
#: session_api.xml:40
#, no-c-format
msgid ""
"In other words, Hibernate application developers should always think about "
"the <emphasis>state of their objects, and not necessarily about "
"the execution of SQL statements. This part is taken care of by Hibernate and "
"is only relevant for the application developer when tuning the performance "
"of the system."
msgstr ""
"Mit anderen Worten - Hibernate Anwendungsentwickler sollten sich stets über "
"den <emphasis>Status Ihrer Objekte Gedanken machen und nicht "
"unbedingt über die Ausführung von SQL-Anweisungen. Dieser Teil wird von "
"Hibernate übernommen und ist nur dann für den Anwendungsentwickler von "
"Bedeutung, wenn die Performance des Systems eingestellt wird."

#. Tag: title
#: session_api.xml:47
#, no-c-format
msgid "Hibernate object states"
msgstr "Statusarten von Hibernate Objekten"

#. Tag: para
#: session_api.xml:49
#, no-c-format
msgid "Hibernate defines and supports the following object states:"
msgstr ""
"Hibernate definiert und unterstützt die folgenden Arten des Objektstatus:"

#. Tag: para
#: session_api.xml:53
#, fuzzy, no-c-format
msgid ""
"<emphasis>Transient - an object is transient if it has just been "
"instantiated using the <literal>new operator, and it is not "
"associated with a Hibernate <literal>Session. It has no persistent "
"representation in the database and no identifier value has been assigned. "
"Transient instances will be destroyed by the garbage collector if the "
"application does not hold a reference anymore. Use the Hibernate "
"<literal>Session to make an object persistent (and let Hibernate "
"take care of the SQL statements that need to be executed for this "
"transition)."
msgstr ""
"<emphasis>Transient - ein Objekt ist transient (vorübergehend), "
"wenn es mittels des <literal>new Operator gerade instantiiert "
"wurde und mit keiner Hibernate <literal>Session assoziiert wird. "
"Es besitzt keine persistene (dauerhafte) Repräsentation in der Datenbank, "
"und es wurde kein Identifier-Wert zugeordnet. Transiente Instanzen werden "
"durch die Speicherbereinigung (sog. \"Garbage Collector\") gelöscht, wenn "
"die Anwendung keine Referenz mehr hält. Verwenden Sie die Hibernate "
"<literal>Session, um ein Objekt persistent zu machen (und "
"überlassen Sie Hibernate die Ausführung der SQL-Anweisungen, die für diesen "
"Wechsel nötig sind)."

#. Tag: para
#: session_api.xml:65
#, fuzzy, no-c-format
msgid ""
"<emphasis>Persistent - a persistent instance has a representation "
"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 <literal>Session "
"statements, or <literal>DELETE statements when an object should be "
"made transient."
msgstr ""
"<emphasis>Persistent - eine persistente Instanz besitzt eine "
"Repräsentation in der Datenbank sowie einen Bezeichnerwert. Sie könnte "
"gerade gespeichert oder geladen worden sein, ist jedoch der Definition nach "
"im Gültigkeitsbereich einer <literal>Session. Hibernate findet "
"sämtliche Veränderungen, die sich an einem Objekt in persistentem Zustand "
"ergeben haben und synchronisiert den Status mit der Datenbank, wenn die "
"Arbeitseinheit abgeschlossen ist. Entwickler führen keine manuellen "
"<literal>UPDATE oder DELETE-Anweisungen durch, "
"wenn ein Objekt transient gemacht werden soll."

#. Tag: para
#: session_api.xml:77
#, fuzzy, no-c-format
msgid ""
"<emphasis>Detached - a detached instance is an object that has "
"been persistent, but its <literal>Session has been closed. The "
"reference to the object is still valid, of course, and the detached instance "
"might even be modified in this state. A detached instance can be reattached "
"to a new <literal>Session at a later point in time, making it (and "
"all the modifications) persistent again. This feature enables a programming "
"model for long running units of work that require user think-time. We call "
"them <emphasis>application transactions, i.e., a unit of work "
"from the point of view of the user."
msgstr ""
"<emphasis>Detached - eine abgesetzte Instanz ist ein Objekt, das "
"persistent war, dessen <literal>Session jedoch geschlossen wurde. "
"Der Verweis zum Objekt besitzt natürlich nach wie vor Gültigkeit, und die "
"abgesetzte Instanz kann sogar in diesem Status verändert werden. Eine "
"abgesetzte Instanz kann einer neuen <literal>Session zu einem "
"späteren Zeitpunkt wieder hinzugefügt werden, wodurch sie (mitsamt den "
"Modifikationen) wieder persistent wird. Dieses Feature ermöglicht ein "
"Programmiermodell für lange laufende Arbeitseinheiten, die Benutzer \"Think "
"Time\" erfordern. Wir nennen diese <emphasis>Anwendungstransaktionen by Hibernate. We can make a transient "
"instance <emphasis>persistent by associating it with a session:"
msgstr ""
"Neu instantiierte Instanzen einer persistenten Klasse werden von Hibernate "
"als <emphasis>transient angesehen. Wir können eine transiente "
"Instanz jedoch <emphasis>persistent machen, indem wir sie mit "
"einer Session assoziieren:"

#. Tag: programlisting
#: session_api.xml:102
#, fuzzy, no-c-format
msgid ""
"DomesticCat fritz = new DomesticCat();\n"
"fritz.setColor(Color.GINGER);\n"
"fritz.setSex('M');\n"
"fritz.setName(\"Fritz\");\n"
"Long generatedId = (Long) sess.save(fritz);"
msgstr ""
"DomesticCat fritz = new DomesticCat();\n"
"fritz.setColor(Color.GINGER);\n"
"fritz.setSex('M');\n"
"fritz.setName(\"Fritz\");\n"
"Long generatedId = (Long) sess.save(fritz);"

#. Tag: para
#: session_api.xml:104
#, fuzzy, no-c-format
msgid ""
"If <literal>Cat has a generated identifier, the identifier is "
"generated and assigned to the <literal>cat when save()Cat has an assigned instance before calling save()persist() instead of "
"<literal>save(), with the semantics defined in the EJB3 early "
"draft."
msgstr ""
"Wenn <literal>Cat einen generierten Bezeichner besitzt, so wird "
"dieser generiert und <literal>cat zugeordnet, wenn der Aufruf "
"<literal>save() erfolgt. Wenn Cat einen "
"<literal>assigned Bezeichner oder einen zusammengesetzten "
"Schlüssel besitzt, so sollte der Bezeichner der <literal>cat "
"Instanz zugeordnet werden, ehe <literal>save() aufgerufen wird. "
"Sie können auch <literal>persist() statt save() "
"verwenden, mit der Semantik der frühen EJB3-Fassung."

#. Tag: para
#: session_api.xml:115
#, no-c-format
msgid ""
"<literal>persist() makes a transient instance persistent. However, "
"it does not guarantee that the identifier value will be assigned to the "
"persistent instance immediately, the assignment might happen at flush time. "
"<literal>persist() also guarantees that it will not execute an "
"<literal>INSERT statement if it is called outside of transaction "
"boundaries. This is useful in long-running conversations with an extended "
"Session/persistence context."
msgstr ""

#. Tag: para
#: session_api.xml:126
#, no-c-format
msgid ""
"<literal>save() does guarantee to return an identifier. If an "
"INSERT has to be executed to get the identifier ( e.g. \"identity\" "
"generator, not \"sequence\"), this INSERT happens immediately, no matter if "
"you are inside or outside of a transaction. This is problematic in a long-"
"running conversation with an extended Session/persistence context."
msgstr ""

#. Tag: para
#: session_api.xml:135
#, fuzzy, no-c-format
msgid ""
"Alternatively, you can assign the identifier using an overloaded version of "
"<literal>save()."
msgstr ""
"Alternativ können Sie den Bezeichner unter Verwendung einer überladenen "
"Version von <literal>save() zuordnen."

#. Tag: programlisting
#: session_api.xml:138
#, fuzzy, no-c-format
msgid ""
"DomesticCat pk = new DomesticCat();\n"
"pk.setColor(Color.TABBY);\n"
"pk.setSex('F');\n"
"pk.setName(\"PK\");\n"
"pk.setKittens( new HashSet() );\n"
"pk.addKitten(fritz);\n"
"sess.save( pk, new Long(1234) );"
msgstr ""
"DomesticCat pk = new DomesticCat();\n"
"pk.setColor(Color.TABBY);\n"
"pk.setSex('F');\n"
"pk.setName(\"PK\");\n"
"pk.setKittens( new HashSet() );\n"
"pk.addKitten(fritz);\n"
"sess.save( pk, new Long(1234) );"

#. Tag: para
#: session_api.xml:140
#, fuzzy, no-c-format
msgid ""
"If the object you make persistent has associated objects (e.g. the "
"<literal>kittens collection in the previous example), these "
"objects can be made persistent in any order you like unless you have a "
"<literal>NOT NULL constraint upon a foreign key column. There is "
"never a risk of violating foreign key constraints. However, you might "
"violate a <literal>NOT NULL constraint if you save()-Collection im vorherigen Beispiel), so "
"können diese Objekte in beliebiger Reihenfolge persistent gemacht werden, so "
"lange keine <literal>NOT NULL-Bedingung für eine "
"Fremdschlüsselspalte existiert. Es besteht niemals das Risiko, dass "
"Bedingungen für Fremdschlüssel verletzt werden. Allerdings kann eine "
"<literal>NOT NULL-Bedingung verletzt werden, falls Sie mittels "
"<literal>save() die Objekte in der falschen Reihenfolge speichern."

#. Tag: para
#: session_api.xml:148
#, fuzzy, no-c-format
msgid ""
"Usually you do not bother with this detail, as you will normally use "
"Hibernate's <emphasis>transitive persistence feature to save the "
"associated objects automatically. Then, even <literal>NOT NULL "
"constraint violations do not occur - Hibernate will take care of everything. "
"Transitive persistence is discussed later in this chapter."
msgstr ""
"In der Regel kümmern Sie sich nicht um dieses Detail, da Sie sehr "
"wahrscheinlich Hibernates Feature für <emphasis>transitive Persistenz Bedingungen kommt. Wir gehen später in "
"diesem Kapitel noch näher auf transitive Persistenz ein."

#. Tag: title
#: session_api.xml:157
#, no-c-format
msgid "Loading an object"
msgstr "Das Laden eines Objekts"

#. Tag: para
#: session_api.xml:159
#, fuzzy, no-c-format
msgid ""
"The <literal>load() methods of Session provide "
"a way of retrieving a persistent instance if you know its identifier. "
"<literal>load() takes a class object and loads the state into a "
"newly instantiated instance of that class in a persistent state."
msgstr ""
"Die <literal>load()-Methode von Session gibt "
"Ihnen die Möglichkeit, eine persistente Instanz abzurufen, wenn Sie deren "
"Bezeichner bereits kennen. <literal>load() nimmt ein Klassenobjekt "
"und lädt den Status in eine neu instantiierte Instanz der Klasse, in "
"persistentem Zustand."

#. Tag: programlisting
#: session_api.xml:165
#, fuzzy, no-c-format
msgid "Cat fritz = (Cat) sess.load(Cat.class, generatedId);"
msgstr "Cat fritz = (Cat) sess.load(Cat.class, generatedId);"

#. Tag: programlisting
#: session_api.xml:167
#, fuzzy, no-c-format
msgid ""
"// you need to wrap primitive identifiers\n"
"long id = 1234;\n"
"DomesticCat pk = (DomesticCat) sess.load( DomesticCat.class, new Long(id) );"
msgstr ""
"// you need to wrap primitive identifiers\n"
"long id = 1234;\n"
"DomesticCat pk = (DomesticCat) sess.load( DomesticCat.class, new Long(id) );"

#. Tag: para
#: session_api.xml:169
#, no-c-format
msgid "Alternatively, you can load state into a given instance:"
msgstr "Alternativ können Sie den Status in eine beliebige Instanz laden:"

#. Tag: programlisting
#: session_api.xml:171
#, fuzzy, no-c-format
msgid ""
"Cat cat = new DomesticCat();\n"
"// load pk's state into cat\n"
"sess.load( cat, new Long(pkId) );\n"
"Set kittens = cat.getKittens();"
msgstr ""
"Cat cat = new DomesticCat();\n"
"// load pk's state into cat\n"
"sess.load( cat, new Long(pkId) );\n"
"Set kittens = cat.getKittens();"

#. Tag: para
#: session_api.xml:173
#, fuzzy, no-c-format
msgid ""
"Be aware that <literal>load() will throw an unrecoverable "
"exception if there is no matching database row. If the class is mapped with "
"a proxy, <literal>load() just returns an uninitialized proxy and "
"does not actually hit the database until you invoke a method of the proxy. "
"This is useful if you wish to create an association to an object without "
"actually loading it from the database. It also allows multiple instances to "
"be loaded as a batch if <literal>batch-size is defined for the "
"class mapping."
msgstr ""
"Bitte beachten Sie, dass <literal>load() zu einer nicht behebbaren "
"Ausnahmemeldung führt, falls keine passende Datenbankreihe existiert. Falls "
"die Klasse mit einem Proxy gemappt ist, so reagiert <literal>load() method which hits the database immediately and "
"returns null if there is no matching row."
msgstr ""
"Falls Sie nicht sicher sind, ob eine passende Datenbankreihe existiert, so "
"sollten Sie die <literal>get()-Methode anwenden, die direkt auf "
"die Datenbank zugreift und mit einer Nullmeldung reagiert, falls keine "
"passende Reihe existiert."

#. Tag: programlisting
#: session_api.xml:186
#, fuzzy, no-c-format
msgid ""
"Cat cat = (Cat) sess.get(Cat.class, id);\n"
"if (cat==null) {\n"
"    cat = new Cat();\n"
"    sess.save(cat, id);\n"
"}\n"
"return cat;"
msgstr ""
"Cat cat = (Cat) sess.get(Cat.class, id);\n"
"if (cat==null) {\n"
"    cat = new Cat();\n"
"    sess.save(cat, id);\n"
"}\n"
"return cat;"

#. Tag: para
#: session_api.xml:188
#, fuzzy, no-c-format
msgid ""
"You can even load an object using an SQL <literal>SELECT ... FOR UPDATELockMode. See the API documentation for "
"more information."
msgstr ""
"Sie können sogar ein Objekt mittels SQL <literal>SELECT ... FOR UPDATELockMode verwenden. Siehe "
"dazu auch die API-Dokumentation."

#. Tag: programlisting
#: session_api.xml:192
#, fuzzy, no-c-format
msgid "Cat cat = (Cat) sess.get(Cat.class, id, LockMode.UPGRADE);"
msgstr "Cat cat = (Cat) sess.get(Cat.class, id, LockMode.UPGRADE);"

#. Tag: para
#: session_api.xml:194
#, fuzzy, no-c-format
msgid ""
"Any associated instances or contained collections will <emphasis>notFOR UPDATE, unless you decide to "
"specify <literal>lock or all as a cascade style "
"for the association."
msgstr ""
"Bitte beachten Sie, dass sämtliche assoziierten Instanzen oder enthaltenen "
"Collections <emphasis>nicht für FOR UPDATE "
"ausgewählt werden, außer Sie spezifizieren <literal>lock oder "
"<literal>all als Aufeinanderschaltung der Assoziation (\"sog. "
"Cascade Style\")."

#. Tag: para
#: session_api.xml:199
#, no-c-format
msgid ""
"It is possible to re-load an object and all its collections at any time, "
"using the <literal>refresh() method. This is useful when database "
"triggers are used to initialize some of the properties of the object."
msgstr ""
"Es ist mittels der <literal>refresh()-Methode jederzeit möglich, "
"ein Objekt und alle seine Collections erneut zu laden. Dies ist insbesondere "
"dann von Nutzen, wenn Datenbank-Trigger zur Initialisierung der Objekt-"
"Properties verwendet werden."

#. Tag: programlisting
#: session_api.xml:204
#, fuzzy, no-c-format
msgid ""
"sess.save(cat);\n"
"sess.flush(); //force the SQL INSERT\n"
"sess.refresh(cat); //re-read the state (after the trigger executes)"
msgstr ""
"sess.save(cat);\n"
"sess.flush(); //force the SQL INSERT\n"
"sess.refresh(cat); //re-read the state (after the trigger executes)"

#. Tag: para
#: session_api.xml:206
#, fuzzy, no-c-format
msgid ""
"How much does Hibernate load from the database and how many SQL "
"<literal>SELECTs will it use? This depends on the "
"<emphasis>fetching strategy. This is explained in s werden verwendet? "
"Nun, das hängt von der <emphasis>Abrufstrategie (sog. \"fetching "
"strategy\") ab und wird in <xref linkend=\"performance-fetching\"/> näher "
"erläutert."

#. Tag: title
#: session_api.xml:213
#, no-c-format
msgid "Querying"
msgstr "Anfragen"

#. Tag: para
#: session_api.xml:215
#, fuzzy, no-c-format
msgid ""
"If you do not know the identifiers of the objects you are looking for, you "
"need a query. Hibernate supports an easy-to-use but powerful object oriented "
"query language (HQL). For programmatic query creation, Hibernate supports a "
"sophisticated Criteria and Example query feature (QBC and QBE). You can also "
"express your query in the native SQL of your database, with optional support "
"from Hibernate for result set conversion into objects."
msgstr ""
"Falls Sie die Bezeichner der Objekte, die Sie suchen nicht kennen, so "
"benötigen Sie eine Anfrage. Hibernate unterstützt eine einfach zu "
"verwendende doch leistungsfähige objektorientierte Anfragensprache (HQL). "
"Für die befehlsorientierte Erstellung einer Anfrage unterstützt Hibernate "
"ein technisch ausgefeiltes Feature für Kriterien- und Beispielanfragen (QBC "
"and QBE). Sie können die Anfrage auch in der nativen SQL Ihrer Datenbank mit "
"optionalem Support von Hibernate hinsichtlich der Konversion des "
"Ergebnissatzes in die Objekte ausdrücken."

#. Tag: title
#: session_api.xml:224
#, no-c-format
msgid "Executing queries"
msgstr "Ausführen von Anfragen"

#. Tag: para
#: session_api.xml:226
#, no-c-format
msgid ""
"HQL and native SQL queries are represented with an instance of <literal>org."
"hibernate.Query</literal>. This interface offers methods for parameter "
"binding, result set handling, and for the execution of the actual query. You "
"always obtain a <literal>Query using the current Session immer eine Query erhalten:"

#. Tag: programlisting
#: session_api.xml:232
#, fuzzy, no-c-format
msgid ""
"List cats = session.createQuery(\n"
"    \"from Cat as cat where cat.birthdate < ?\")\n"
"    .setDate(0, date)\n"
"    .list();\n"
"\n"
"List mothers = session.createQuery(\n"
"    \"select mother from Cat as cat join cat.mother as mother where cat.name "
"= ?\")\n"
"    .setString(0, name)\n"
"    .list();\n"
"\n"
"List kittens = session.createQuery(\n"
"    \"from Cat as cat where cat.mother = ?\")\n"
"    .setEntity(0, pk)\n"
"    .list();\n"
"\n"
"Cat mother = (Cat) session.createQuery(\n"
"    \"select cat.mother from Cat as cat where cat = ?\")\n"
"    .setEntity(0, izi)\n"
"    .uniqueResult();]]\n"
"\n"
"Query mothersWithKittens = (Cat) session.createQuery(\n"
"    \"select mother from Cat as mother left join fetch mother.kittens\");\n"
"Set uniqueMothers = new HashSet(mothersWithKittens.list());"
msgstr ""
"List cats = session.createQuery(\n"
"    \"from Cat as cat where cat.birthdate < ?\")\n"
"    .setDate(0, date)\n"
"    .list();\n"
"\n"
"List mothers = session.createQuery(\n"
"    \"select mother from Cat as cat join cat.mother as mother where cat.name "
"= ?\")\n"
"    .setString(0, name)\n"
"    .list();\n"
"\n"
"List kittens = session.createQuery(\n"
"    \"from Cat as cat where cat.mother = ?\")\n"
"    .setEntity(0, pk)\n"
"    .list();\n"
"\n"
"Cat mother = (Cat) session.createQuery(\n"
"    \"select cat.mother from Cat as cat where cat = ?\")\n"
"    .setEntity(0, izi)\n"
"    .uniqueResult();]]\n"
"\n"
"Query mothersWithKittens = (Cat) session.createQuery(\n"
"    \"select mother from Cat as mother left join fetch mother.kittens\");\n"
"Set uniqueMothers = new HashSet(mothersWithKittens.list());"

#. Tag: para
#: session_api.xml:234
#, fuzzy, no-c-format
msgid ""
"A query is usually executed by invoking <literal>list(). The "
"result of the query will be loaded completely into a collection in memory. "
"Entity instances retrieved by a query are in a persistent state. The "
"<literal>uniqueResult() method offers a shortcut if you know your "
"query will only return a single object. Queries that make use of eager "
"fetching of collections usually return duplicates of the root objects, but "
"with their collections initialized. You can filter these duplicates through "
"a <literal>Set."
msgstr ""
"Eine Anfrage wird in der Regel durch den Aufruf <literal>list() "
"ausgeführt, und das Ergebnis der Anfrage wird vollständig in eine Collection "
"des Speichers geladen. Die durch eine Anfrage erhaltenen Entity-Instanzen "
"befinden sich in persistentem Zustand. Die <literal>uniqueResult()-"
"Methode bietet ein Tastaturkürzel, wenn Sie wissen, dass Ihre Anfrage nur "
"mit einem einzelnen Objekt reagiert. Bitte beachten Sie, dass Anfragen, die "
"für Collections \"eager Fetching\" (d.h. zusammengefasstes Laden von Objekt "
"und assoziierten Objekten mit Verbundoperationen) verwenden, in der Regel "
"mit Doubletten der Stammobjekte (sog. \"Root Objects\") reagieren (deren "
"Collections sind jedoch initialisiert). Sie können diese Doubletten mittels "
"<literal>Set jedoch ganz einfach filtern."

#. Tag: title
#: session_api.xml:244
#, no-c-format
msgid "Iterating results"
msgstr "Iterationsergebnisse"

#. Tag: para
#: session_api.xml:246
#, fuzzy, no-c-format
msgid ""
"Occasionally, you might be able to achieve better performance by executing "
"the query using the <literal>iterate() method. This will usually "
"be the case if you expect that the actual entity instances returned by the "
"query will already be in the session or second-level cache. If they are not "
"already cached, <literal>iterate() will be slower than "
"<literal>list() and might require many database hits for a simple "
"query, usually <emphasis>1 for the initial select which only "
"returns identifiers, and <emphasis>n additional selects to "
"initialize the actual instances."
msgstr ""
"Manchmal lässt sich die Performance verbessern, indem die Anfrage mittels "
"<literal>iterate()-Methode ausgeführt wird. Dies wird in der Regel "
"nur der Fall sein, wenn sich die zu erwartenden Instanzen der Entity, die "
"auf die Anfrage reagieren, bereits in der Session oder dem Cache-Speicher "
"der zweiten Ebene befinden. Wenn diese nicht bereits gecacht sind, so wird "
"<literal>iterate() langsamer als list() sein "
"und könnte zahlreiche Datenbanktreffer für eine einfache Anfrage benötigen - "
"für gewöhnlich <emphasis>1 für die ursprüngliche Auswahl, die "
"lediglich mit den Bezeichnern reagiert und <emphasis>n "
"zusätzliche Auswahlen zur Initialisierung der tatsächlichen Instanzen."

#. Tag: programlisting
#: session_api.xml:257
#, fuzzy, no-c-format
msgid ""
"// fetch ids\n"
"Iterator iter = sess.createQuery(\"from eg.Qux q order by q.likeliness\")."
"iterate();\n"
"while ( iter.hasNext() ) {\n"
"    Qux qux = (Qux) iter.next();  // fetch the object\n"
"    // something we couldnt express in the query\n"
"    if ( qux.calculateComplicatedAlgorithm() ) {\n"
"        // delete the current instance\n"
"        iter.remove();\n"
"        // dont need to process the rest\n"
"        break;\n"
"    }\n"
"}"
msgstr ""
"// fetch ids\n"
"Iterator iter = sess.createQuery(\"from eg.Qux q order by q.likeliness\")."
"iterate();\n"
"while ( iter.hasNext() ) {\n"
"    Qux qux = (Qux) iter.next();  // fetch the object\n"
"    // something we couldnt express in the query\n"
"    if ( qux.calculateComplicatedAlgorithm() ) {\n"
"        // delete the current instance\n"
"        iter.remove();\n"
"        // dont need to process the rest\n"
"        break;\n"
"    }\n"
"}"

#. Tag: title
#: session_api.xml:261
#, no-c-format
msgid "Queries that return tuples"
msgstr "Anfragen, die mit Tupeln reagieren"

#. Tag: para
#: session_api.xml:263
#, fuzzy, no-c-format
msgid ""
"Hibernate queries sometimes return tuples of objects. Each tuple is returned "
"as an array:"
msgstr ""
"Hibernate Anfragen reagieren manchmal mit Tupeln (d.h. einer Liste "
"korrelierter Datenwerte), wobei jeder Tupel als Array wiedergegeben wird:"

#. Tag: programlisting
#: session_api.xml:266
#, fuzzy, no-c-format
msgid ""
"Iterator kittensAndMothers = sess.createQuery(\n"
"            \"select kitten, mother from Cat kitten join kitten.mother mother"
"\")\n"
"            .list()\n"
"            .iterator();\n"
"\n"
"while ( kittensAndMothers.hasNext() ) {\n"
"    Object[] tuple = (Object[]) kittensAndMothers.next();\n"
"    Cat kitten = (Cat) tuple[0];\n"
"    Cat mother = (Cat) tuple[1];\n"
"    ....\n"
"}"
msgstr ""
"Iterator kittensAndMothers = sess.createQuery(\n"
"            \"select kitten, mother from Cat kitten join kitten.mother mother"
"\")\n"
"            .list()\n"
"            .iterator();\n"
"\n"
"while ( kittensAndMothers.hasNext() ) {\n"
"    Object[] tuple = (Object[]) kittensAndMothers.next();\n"
"    Cat kitten  = tuple[0];\n"
"    Cat mother  = tuple[1];\n"
"    ....\n"
"}"

#. Tag: title
#: session_api.xml:270
#, no-c-format
msgid "Scalar results"
msgstr "Skalare Ergebnisse"

#. Tag: para
#: session_api.xml:272
#, fuzzy, no-c-format
msgid ""
"Queries can specify a property of a class in the <literal>select "
"clause. They can even call SQL aggregate functions. Properties or aggregates "
"are considered \"scalar\" results and not entities in persistent state."
msgstr ""
"Anfragen können im <literal>select-Satzteil die Property einer "
"Klasse spezifizieren. Sie können sogar SQL-Datengruppen-Funktionen aufrufen. "
"Properties oder Datengruppen werden als \"skalare\" Ergebnisse angesehen "
"(und nicht als Entities in persistentem Zustand)."

#. Tag: programlisting
#: session_api.xml:277
#, fuzzy, no-c-format
msgid ""
"Iterator results = sess.createQuery(\n"
"        \"select cat.color, min(cat.birthdate), count(cat) from Cat cat \" "
"+\n"
"        \"group by cat.color\")\n"
"        .list()\n"
"        .iterator();\n"
"\n"
"while ( results.hasNext() ) {\n"
"    Object[] row = (Object[]) results.next();\n"
"    Color type = (Color) row[0];\n"
"    Date oldest = (Date) row[1];\n"
"    Integer count = (Integer) row[2];\n"
"    .....\n"
"}"
msgstr ""
"Iterator results = sess.createQuery(\n"
"        \"select cat.color, min(cat.birthdate), count(cat) from Cat cat \" "
"+\n"
"        \"group by cat.color\")\n"
"        .list()\n"
"        .iterator();\n"
"\n"
"while ( results.hasNext() ) {\n"
"    Object[] row = (Object[]) results.next();\n"
"    Color type = (Color) row[0];\n"
"    Date oldest = (Date) row[1];\n"
"    Integer count = (Integer) row[2];\n"
"    .....\n"
"}"

#. Tag: title
#: session_api.xml:281
#, no-c-format
msgid "Bind parameters"
msgstr "Bind-Parameter"

#. Tag: para
#: session_api.xml:283
#, fuzzy, no-c-format
msgid ""
"Methods on <literal>Query are provided for binding values to named "
"parameters or JDBC-style <literal>? parameters. Contrary "
"to JDBC, Hibernate numbers parameters from zero.</emphasis> Named parameters "
"are identifiers of the form <literal>:name in the query string. "
"The advantages of named parameters are as follows:"
msgstr ""
"Methoden an <literal>Query sind vorhanden, um Werte an benannte "
"Parameter oder <literal>?-Parameter nach JDBC-Art zu binden. "
"<emphasis>Im Gegensatz zu JDBC nummeriert Hibernate Parameter ab Null. im Anfragenstring. Die Vorteile benannter Parameter "
"sind:"

#. Tag: para
#: session_api.xml:292
#, no-c-format
msgid ""
"named parameters are insensitive to the order they occur in the query string"
msgstr ""
"benannte Parameter sind unempfindlich im Bezug auf die Reihenfolge, in der "
"sie im Anfragenstring erscheinen"

#. Tag: para
#: session_api.xml:297
#, fuzzy, no-c-format
msgid "they can occur multiple times in the same query"
msgstr "sie können innerhalb derselben Anfrage mehrere Male vorkommen"

#. Tag: para
#: session_api.xml:301
#, no-c-format
msgid "they are self-documenting"
msgstr "sie dokumentieren sich selbst"

#. Tag: programlisting
#: session_api.xml:305
#, fuzzy, no-c-format
msgid ""
"//named parameter (preferred)\n"
"Query q = sess.createQuery(\"from DomesticCat cat where cat.name = :name"
"\");\n"
"q.setString(\"name\", \"Fritz\");\n"
"Iterator cats = q.iterate();"
msgstr ""
"//named parameter (preferred)\n"
"Query q = sess.createQuery(\"from DomesticCat cat where cat.name = :name"
"\");\n"
"q.setString(\"name\", \"Fritz\");\n"
"Iterator cats = q.iterate();"

#. Tag: programlisting
#: session_api.xml:307
#, fuzzy, no-c-format
msgid ""
"//positional parameter\n"
"Query q = sess.createQuery(\"from DomesticCat cat where cat.name = ?\");\n"
"q.setString(0, \"Izi\");\n"
"Iterator cats = q.iterate();"
msgstr ""
"//positional parameter\n"
"Query q = sess.createQuery(\"from DomesticCat cat where cat.name = ?\");\n"
"q.setString(0, \"Izi\");\n"
"Iterator cats = q.iterate();"

#. Tag: programlisting
#: session_api.xml:309
#, fuzzy, no-c-format
msgid ""
"//named parameter list\n"
"List names = new ArrayList();\n"
"names.add(\"Izi\");\n"
"names.add(\"Fritz\");\n"
"Query q = sess.createQuery(\"from DomesticCat cat where cat.name in (:"
"namesList)\");\n"
"q.setParameterList(\"namesList\", names);\n"
"List cats = q.list();"
msgstr ""
"//named parameter list\n"
"List names = new ArrayList();\n"
"names.add(\"Izi\");\n"
"names.add(\"Fritz\");\n"
"Query q = sess.createQuery(\"from DomesticCat cat where cat.name in (:"
"namesList)\");\n"
"q.setParameterList(\"namesList\", names);\n"
"List cats = q.list();"

#. Tag: title
#: session_api.xml:313
#, no-c-format
msgid "Pagination"
msgstr "Nummerierung"

#. Tag: para
#: session_api.xml:315
#, fuzzy, no-c-format
msgid ""
"If you need to specify bounds upon your result set, that is, the maximum "
"number of rows you want to retrieve and/or the first row you want to "
"retrieve, you can use methods of the <literal>Query interface:"
msgstr ""
"Falls Sie Grenzen an Ihrem Ergebnissatz spezifizieren müssen (die maximale "
"Anzahl von Reihen, die Sie erhalten und / oder die erste Reihe, die Sie "
"erhalten wollen), sollten Sie Methoden des <literal>Query-"
"Interface verwenden:"

#. Tag: programlisting
#: session_api.xml:320
#, fuzzy, no-c-format
msgid ""
"Query q = sess.createQuery(\"from DomesticCat cat\");\n"
"q.setFirstResult(20);\n"
"q.setMaxResults(10);\n"
"List cats = q.list();"
msgstr ""
"Query q = sess.createQuery(\"from DomesticCat cat\");\n"
"q.setFirstResult(20);\n"
"q.setMaxResults(10);\n"
"List cats = q.list();"

#. Tag: para
#: session_api.xml:322
#, no-c-format
msgid ""
"Hibernate knows how to translate this limit query into the native SQL of "
"your DBMS."
msgstr ""
"Hibernate weiß, wie die Grenzanfrage in die native SQL Ihres DBMS zu "
"übersetzen ist."

#. Tag: title
#: session_api.xml:327
#, no-c-format
msgid "Scrollable iteration"
msgstr "Scrollbare Iteration"

#. Tag: para
#: session_api.xml:329
#, fuzzy, no-c-format
msgid ""
"If your JDBC driver supports scrollable <literal>ResultSets, the "
"<literal>Query interface can be used to obtain a "
"<literal>ScrollableResults object that allows flexible navigation "
"of the query results."
msgstr ""
"Falls Ihr JDBC-Treiber scrollbare <literal>ResultSets unterstützt, "
"kann das <literal>Query-Interface benutzt werden, um ein "
"<literal>ScrollableResults-Objekt zu erhalten, das die flexible "
"Navigation der Anfragenergebnisse ermöglicht."

#. Tag: programlisting
#: session_api.xml:334
#, fuzzy, no-c-format
msgid ""
"Query q = sess.createQuery(\"select cat.name, cat from DomesticCat cat \" +\n"
"                            \"order by cat.name\");\n"
"ScrollableResults cats = q.scroll();\n"
"if ( cats.first() ) {\n"
"\n"
"    // find the first name on each page of an alphabetical list of cats by "
"name\n"
"    firstNamesOfPages = new ArrayList();\n"
"    do {\n"
"        String name = cats.getString(0);\n"
"        firstNamesOfPages.add(name);\n"
"    }\n"
"    while ( cats.scroll(PAGE_SIZE) );\n"
"\n"
"    // Now get the first page of cats\n"
"    pageOfCats = new ArrayList();\n"
"    cats.beforeFirst();\n"
"    int i=0;\n"
"    while( ( PAGE_SIZE > i++ ) && cats.next() ) pageOfCats.add"
"( cats.get(1) );\n"
"\n"
"}\n"
"cats.close()"
msgstr ""
"Query q = sess.createQuery(\"select cat.name, cat from DomesticCat cat \" +\n"
"                            \"order by cat.name\");\n"
"ScrollableResults cats = q.scroll();\n"
"if ( cats.first() ) {\n"
"\n"
"    // find the first name on each page of an alphabetical list of cats by "
"name\n"
"    firstNamesOfPages = new ArrayList();\n"
"    do {\n"
"        String name = cats.getString(0);\n"
"        firstNamesOfPages.add(name);\n"
"    }\n"
"    while ( cats.scroll(PAGE_SIZE) );\n"
"\n"
"    // Now get the first page of cats\n"
"    pageOfCats = new ArrayList();\n"
"    cats.beforeFirst();\n"
"    int i=0;\n"
"    while( ( PAGE_SIZE > i++ ) && cats.next() ) pageOfCats.add"
"( cats.get(1) );\n"
"\n"
"}\n"
"cats.close()"

#. Tag: para
#: session_api.xml:336
#, fuzzy, no-c-format
msgid ""
"Note that an open database connection and cursor is required for this "
"functionality. Use <literal>setMaxResult()/setFirstResult"
"()</literal> if you need offline pagination functionality."
msgstr ""
"Bitte beachten Sie, dass eine offene Datenbankverbindung (und Cursor) für "
"dies Funktionalität benötigt werden. Verwenden Sie <literal>setMaxResult()setFirstResult(), falls Sie die offline "
"Nummerierungsfunktionalität benötigen."

#. Tag: title
#: session_api.xml:343
#, no-c-format
msgid "Externalizing named queries"
msgstr "Externalisierung benannter Anfragen"

#. Tag: para
#: session_api.xml:345
#, no-c-format
msgid ""
"Queries can also be configured as so called named queries using annotations "
"or Hibernate mapping documents. <literal>@NamedQuery and "
"<literal>@NamedQueries can be defined at the class level as seen "
"in <xref linkend=\"example-named-query-annotation\"/> . However their "
"definitions are global to the session factory/entity manager factory scope. "
"A named query is defined by its name and the actual query string."
msgstr ""

#. Tag: title
#: session_api.xml:355
#, no-c-format
msgid "Defining a named query using <classname>@NamedQuery"
msgstr ""

#. Tag: programlisting
#: session_api.xml:358
#, no-c-format
msgid ""
"@Entity\n"
"@NamedQuery(name=\"night.moreRecentThan\", query=\"select n from Night n "
"where n.date >= :date\")\n"
"public class Night {\n"
"    ...\n"
"}\n"
"\n"
"public class MyDao {\n"
"    doStuff() {\n"
"        Query q = s.getNamedQuery(\"night.moreRecentThan\");\n"
"        q.setDate( \"date\", aMonthAgo );\n"
"        List results = q.list();\n"
"        ...\n"
"    }\n"
"    ...\n"
"}"
msgstr ""

#. Tag: para
#: session_api.xml:361
#, fuzzy, no-c-format
msgid ""
"Using a mapping document can be configured using the <literal><query>CDATA section if your "
"query contains characters that could be interpreted as markup."
msgstr ""
"Sie können benannte Anfragen auch im Mapping-Dokument definieren. (Vergessen "
"Sie nicht einen <literal>CDATA-Abschnitt zu verwenden, falls Ihre "
"Anfrage Zeichen enthält, die als Markup interpretiert werden könnten)."

#. Tag: title
#: session_api.xml:367
#, no-c-format
msgid "Defining a named query using <literal><query>"
msgstr ""

#. Tag: programlisting
#: session_api.xml:370
#, fuzzy, no-c-format
msgid ""
"<query name=\"ByNameAndMaximumWeight\"><![CDATA[\n"
"    from eg.DomesticCat as cat\n"
"        where cat.name = ?\n"
"        and cat.weight > ?\n"
"] ]></query>"
msgstr ""
"<query name=\"ByNameAndMaximumWeight\"><![CDATA[\n"
"    from eg.DomesticCat as cat\n"
"        where cat.name = ?\n"
"        and cat.weight > ?\n"
"] ]></query>"

#. Tag: para
#: session_api.xml:373
#, fuzzy, no-c-format
msgid ""
"Parameter binding and executing is done programatically as seen in <xref "
"linkend=\"example-parameter-binding-named-query\"/>."
msgstr "Die Bindung und Ausführung der Parameter erfolgen befehlsorientiert:"

#. Tag: title
#: session_api.xml:377
#, no-c-format
msgid "Parameter binding of a named query"
msgstr ""

#. Tag: programlisting
#: session_api.xml:379
#, fuzzy, no-c-format
msgid ""
"Query q = sess.getNamedQuery(\"ByNameAndMaximumWeight\");\n"
"q.setString(0, name);\n"
"q.setInt(1, minWeight);\n"
"List cats = q.list();"
msgstr ""
"Query q = sess.getNamedQuery(\"ByNameAndMaximumWeight\");\n"
"q.setString(0, name);\n"
"q.setInt(1, minWeight);\n"
"List cats = q.list();"

#. Tag: para
#: session_api.xml:382
#, fuzzy, no-c-format
msgid ""
"The actual program code is independent of the query language that is used. "
"You can also define native SQL queries in metadata, or migrate existing "
"queries to Hibernate by placing them in mapping files."
msgstr ""
"Bitte beachten Sie, dass der tatsächliche Programmcode unabhängig von der "
"verwendeten Anfragensprache ist. Sie können auch native SQL-Anfragen in "
"Metadata definieren oder bestehende Anfragen zu Hibernate migrieren, indem "
"Sie sie in Mapping-Dateien platzieren."

#. Tag: para
#: session_api.xml:387
#, fuzzy, no-c-format
msgid ""
"Also note that a query declaration inside a <literal><hibernate-"
"mapping></literal> element requires a global unique name for the query, "
"while a query declaration inside a <literal><class> element "
"is made unique automatically by prepending the fully qualified name of the "
"class. For example <literal>eg.Cat.ByNameAndMaximumWeight."
msgstr ""
"Beachten Sie außerdem, dass eine Anfragendeklaration innerhalb eines "
"<literal><hibernate-mapping>-Elements einen "
"allgemeingültigen, eindeutigen Namen für die Anfrage erfordert, während eine "
"Anfragendeklaration innerhalb eines <literal><class>-"
"Elements dadurch automatisch eindeutig gemacht wird, dass der vollständige "
"Name der Klasse, z.B. <literal>eg.Cat.ByNameAndMaximumWeight "
"vorangestellt wird."

#. Tag: title
#: session_api.xml:397
#, no-c-format
msgid "Filtering collections"
msgstr "Das Filtern von Collections"

#. Tag: para
#: session_api.xml:399
#, fuzzy, no-c-format
msgid ""
"A collection <emphasis>filter is a special type of query that can "
"be applied to a persistent collection or array. The query string can refer "
"to <literal>this, meaning the current collection element."
msgstr ""
"Ein Collection <emphasis>filter ist eine spezielle Art der "
"Anfrage, die an einer persistenten Collection oder einem Array angewendet "
"werden kann. Der Anfragenstring kann auf <literal>this verweisen, "
"womit das aktuelle Element der Collection gemeint ist."

#. Tag: programlisting
#: session_api.xml:404
#, fuzzy, no-c-format
msgid ""
"Collection blackKittens = session.createFilter(\n"
"    pk.getKittens(), \n"
"    \"where this.color = ?\")\n"
"    .setParameter( Color.BLACK, Hibernate.custom(ColorUserType.class) )\n"
"    .list()\n"
");"
msgstr ""
"Collection blackKittens = session.createFilter(\n"
"    pk.getKittens(), \n"
"    \"where this.color = ?\")\n"
"    .setParameter( Color.BLACK, Hibernate.custom(ColorUserType.class) )\n"
"    .list()\n"
");"

#. Tag: para
#: session_api.xml:406
#, fuzzy, no-c-format
msgid ""
"The returned collection is considered a bag that is a copy of the given "
"collection. The original collection is not modified. This is contrary to the "
"implication of the name \"filter\", but consistent with expected behavior."
msgstr ""
"Die zurückgesendete Collection wird als \"Bag\" (Duplikat) angesehen, und es "
"handelt sich um eine Kopie der vorgegebenen Collection. Die ursprüngliche "
"Collection wird nicht verändert (dies steht im Gegensatz zur "
"Schlussfolgerung den der Name \"Filter\" vermuten lässt, aber in Konsistenz "
"mit dem erwarteten Verhalten)."

#. Tag: para
#: session_api.xml:411
#, fuzzy, no-c-format
msgid ""
"Observe that filters do not require a <literal>from clause, "
"although they can have one if required. Filters are not limited to returning "
"the collection elements themselves."
msgstr ""
"Beachten Sie, dass Filter keinen <literal>from-Satzteil benötigen "
"(jedoch bei Bedarf einen besitzen können). Filter sind nicht darauf "
"beschränkt, die Elemente der Collection selbst wiederzugeben."

#. Tag: programlisting
#: session_api.xml:415
#, fuzzy, no-c-format
msgid ""
"Collection blackKittenMates = session.createFilter(\n"
"    pk.getKittens(), \n"
"    \"select this.mate where this.color = eg.Color.BLACK.intValue\")\n"
"    .list();"
msgstr ""
"Collection blackKittenMates = session.createFilter(\n"
"    pk.getKittens(), \n"
"    \"select this.mate where this.color = eg.Color.BLACK.intValue\")\n"
"    .list();"

#. Tag: para
#: session_api.xml:417
#, fuzzy, no-c-format
msgid ""
"Even an empty filter query is useful, e.g. to load a subset of elements in a "
"large collection:"
msgstr ""
"Selbst eine Anfrage mit leerem Filter ist von Nutzen, wenn man etwa einen "
"Untersatz von Elementen in einer riesigen Collection lädt."

#. Tag: programlisting
#: session_api.xml:420
#, fuzzy, no-c-format
msgid ""
"Collection tenKittens = session.createFilter(\n"
"    mother.getKittens(), \"\")\n"
"    .setFirstResult(0).setMaxResults(10)\n"
"    .list();"
msgstr ""
"Collection tenKittens = session.createFilter(\n"
"    mother.getKittens(), \"\")\n"
"    .setFirstResult(0).setMaxResults(10)\n"
"    .list();"

#. Tag: title
#: session_api.xml:424
#, no-c-format
msgid "Criteria queries"
msgstr "Kriterienanfragen"

#. Tag: para
#: session_api.xml:426
#, fuzzy, no-c-format
msgid ""
"HQL is extremely powerful, but some developers prefer to build queries "
"dynamically using an object-oriented API, rather than building query "
"strings. Hibernate provides an intuitive <literal>Criteria query "
"API for these cases:"
msgstr ""
"HQL ist sehr leistungsfähig, jedoch bevorzugen manche Entwickler den "
"dynamischen Bau von Anfragen unter Verwendung einer objektorientierten API, "
"statt des Erstellens von Anfragenstrings. Hibernate liefert für diese Fälle "
"eine API für intuitive <literal>Criteria-Anfragen:"

#. Tag: programlisting
#: session_api.xml:431
#, fuzzy, no-c-format
msgid ""
"Criteria crit = session.createCriteria(Cat.class);\n"
"crit.add( Restrictions.eq( \"color\", eg.Color.BLACK ) );\n"
"crit.setMaxResults(10);\n"
"List cats = crit.list();"
msgstr ""
"Criteria crit = session.createCriteria(Cat.class);\n"
"crit.add( Expression.eq( \"color\", eg.Color.BLACK ) );\n"
"crit.setMaxResults(10);\n"
"List cats = crit.list();"

#. Tag: para
#: session_api.xml:433
#, fuzzy, no-c-format
msgid ""
"The <literal>Criteria and the associated Example und die zugehörige Example näher erläutert."

#. Tag: title
#: session_api.xml:439
#, no-c-format
msgid "Queries in native SQL"
msgstr "Anfragen in nativer SQL"

#. Tag: para
#: session_api.xml:441
#, fuzzy, no-c-format
msgid ""
"You can express a query in SQL, using <literal>createSQLQuery() "
"and let Hibernate manage the mapping from result sets to objects. You can at "
"any time call <literal>session.connection() and use the JDBC "
"<literal>Connection directly. If you choose to use the Hibernate "
"API, you must enclose SQL aliases in braces:"
msgstr ""
"Sie können eine Anfrage in SQL mittels <literal>createSQLQuery() "
"ausdrücken und Hibernate das Mapping von den Ergebnissätzen zu den Objekten "
"übernehmen lassen. Beachten Sie, dass Sie zu jedem Zeitpunkt "
"<literal>session.connection() aufrufen und die JDBC "
"<literal>Connection direkt benutzen können. Falls Sie die "
"Hibernate API verwenden wollen, müssen Sie die SQL-Aliasse in Klammern mit "
"einschließen:"

#. Tag: programlisting
#: session_api.xml:448
#, fuzzy, no-c-format
msgid ""
"List cats = session.createSQLQuery(\"SELECT {cat.*} FROM CAT {cat} WHERE "
"ROWNUM<10\")\n"
"    .addEntity(\"cat\", Cat.class)\n"
".list();"
msgstr ""
"List cats = session.createSQLQuery(\n"
"    \"SELECT {cat.*} FROM CAT {cat} WHERE ROWNUM<10\",\n"
"    \"cat\",\n"
"    Cat.class\n"
").list();"

#. Tag: programlisting
#: session_api.xml:450
#, fuzzy, no-c-format
msgid ""
"List cats = session.createSQLQuery(\n"
"    \"SELECT {cat}.ID AS {cat.id}, {cat}.SEX AS {cat.sex}, \" +\n"
"           \"{cat}.MATE AS {cat.mate}, {cat}.SUBCLASS AS {cat.class}, ... \" "
"+\n"
"    \"FROM CAT {cat} WHERE ROWNUM<10\")\n"
"    .addEntity(\"cat\", Cat.class)\n"
".list()"
msgstr ""
"List cats = session.createSQLQuery(\n"
"    \"SELECT {cat}.ID AS {cat.id}, {cat}.SEX AS {cat.sex}, \" +\n"
"           \"{cat}.MATE AS {cat.mate}, {cat}.SUBCLASS AS {cat.class}, ... \" "
"+\n"
"    \"FROM CAT {cat} WHERE ROWNUM<10\",\n"
"    \"cat\",\n"
"    Cat.class\n"
").list()"

#. Tag: para
#: session_api.xml:452
#, fuzzy, no-c-format
msgid ""
"SQL queries can contain named and positional parameters, just like Hibernate "
"queries. More information about native SQL queries in Hibernate can be found "
"in <xref linkend=\"querysql\"/>."
msgstr ""
"SQL-Anfragen können - wie auch Hibernate Anfragen - benannte und "
"positionelle Parameter enthalten. Weitere Informationen zu nativen SQL-"
"Anfragen in Hibernate finden Sie in <xref linkend=\"querysql\"/>."

#. Tag: title
#: session_api.xml:459
#, no-c-format
msgid "Modifying persistent objects"
msgstr "Änderungen an persistenten Objekten vornehmen"

#. Tag: para
#: session_api.xml:461
#, fuzzy, no-c-format
msgid ""
"<emphasis>Transactional persistent instances (i.e. objects "
"loaded, saved, created or queried by the <literal>Session) can be "
"manipulated by the application, and any changes to persistent state will be "
"persisted when the <literal>Session is flushed, which has a different "
"purpose) to make your modifications persistent. The most straightforward way "
"to update the state of an object is to <literal>load() it and then "
"manipulate it directly while the <literal>Session is open:"
msgstr ""
"<emphasis>Transaktionale persistente Instanzen (d.h. durch die "
"<literal>Session geladene, gespeicherte, erstellte oder angefragte "
"Objekte) können durch die Anwendung verarbeitet werden und sämtliche "
"Veränderungen am persistenten Status bleiben bestehen, wenn die "
"<literal>Session geräumt wird (darauf gehen "
"wir später in diesem Kapitel noch ein). Es muss keine bestimmte Methode "
"aufgerufen werden (wie etwa <literal>update(), das einen anderen "
"Zweck hat), um Ihre Änderungen persistent zu machen. Die einfachste Art der "
"Statusaktualisierung eines Objektes ist daher das Laden mittels <literal>load"
"()</literal> und dessen direkte Modifizierung während die Session to load an object and an SQL "
"<literal>UPDATE to persist its updated state. Hibernate offers an "
"alternate approach by using detached instances."
msgstr ""
"Manchmal ist dieses Programmiermodell jedoch ineffizient, da es sowohl ein "
"SQL <literal>SELECT (zum Laden eines Objekts) als auch ein SQL "
"<literal>UPDATE (um den aktualisierten Status zu persistieren) "
"innerhalb derselben Session erfordern würde. Daher bietet Hibernate mit der "
"Verwendung abgesetzter Instanzen eine alternative Vorgehensweise."

#. Tag: title
#: session_api.xml:483
#, no-c-format
msgid "Modifying detached objects"
msgstr "Änderungen an abgesetzten Objekten"

#. Tag: para
#: session_api.xml:485
#, no-c-format
msgid ""
"Many applications need to retrieve an object in one transaction, send it to "
"the UI layer for manipulation, then save the changes in a new transaction. "
"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 ""
"Zahlreiche Anwendungen müssen ein Objekt in einer Transaktion abrufen, "
"dieses für Modifizierungen an die UI-Schicht schicken und die Änderungen "
"anschließend in einer neuen Transaktion speichern. Anwendungen, die diese "
"Herangehensweise in einer Umgebung mit hoher Nebenläufigkeit (d.h. häufigem "
"gleichzeitigen Zugriff) benutzen, verwenden in der Regel versionierte Daten, "
"um die Isolation der \"langen\" Arbeitseinheit zu gewährleisten."

#. Tag: para
#: session_api.xml:491
#, no-c-format
msgid ""
"Hibernate supports this model by providing for reattachment of detached "
"instances using the <literal>Session.update() or Session."
"merge()</literal> methods:"
msgstr ""
"Hibernate unterstützt dieses Modell, indem es mittels der <literal>Session."
"update()</literal> oder Session.merge()-Methoden die "
"Möglichkeit der Wiederanbindung abgesetzter Instanzen bietet:"

#. Tag: programlisting
#: session_api.xml:495
#, fuzzy, no-c-format
msgid ""
"// in the first session\n"
"Cat cat = (Cat) firstSession.load(Cat.class, catId);\n"
"Cat potentialMate = new Cat();\n"
"firstSession.save(potentialMate);\n"
"\n"
"// in a higher layer of the application\n"
"cat.setMate(potentialMate);\n"
"\n"
"// later, in a new session\n"
"secondSession.update(cat);  // update cat\n"
"secondSession.update(mate); // update mate"
msgstr ""
"// in the first session\n"
"Cat cat = (Cat) firstSession.load(Cat.class, catId);\n"
"Cat potentialMate = new Cat();\n"
"firstSession.save(potentialMate);\n"
"\n"
"// in a higher layer of the application\n"
"cat.setMate(potentialMate);\n"
"\n"
"// later, in a new session\n"
"secondSession.update(cat);  // update cat\n"
"secondSession.update(mate); // update mate"

#. Tag: para
#: session_api.xml:497
#, no-c-format
msgid ""
"If the <literal>Cat with identifier catId had "
"already been loaded by <literal>secondSession when the application "
"tried to reattach it, an exception would have been thrown."
msgstr ""
"Wäre <literal>Cat mit Bezeichner catId bereits "
"durch <literal>secondSession geladen worden, wenn die Anwendung "
"die Wiederanbindung durchzuführen versucht hätte, so wäre eine Ausnahme "
"gemeldet worden."

#. Tag: para
#: session_api.xml:502
#, fuzzy, no-c-format
msgid ""
"Use <literal>update() if you are certain that the session does not "
"contain an already persistent instance with the same identifier. Use "
"<literal>merge() if you want to merge your modifications at any "
"time without consideration of the state of the session. In other words, "
"<literal>update() is usually the first method you would call in a "
"fresh session, ensuring that the reattachment of your detached instances is "
"the first operation that is executed."
msgstr ""
"Verwenden Sie <literal>update() falls Sie sicher sind, dass die "
"Session nicht bereits eine persistente Instanz mit demselben Bezeichner "
"besitzt und <literal>merge(), falls Sie Ihre Modifikationen zu "
"einem beliebigen Zeitpunkt ohne Berücksichtigung des Sessionstatus mischen "
"möchten. Mit anderen Worten ist <literal>update() in der Regel die "
"erste Methode, die Sie in einer neuen Session aufrufen würden, um "
"sicherzustellen, dass die Wiederanbindung Ihrer abgesetzten Instanzen der "
"als erstes ausgeführte Vorgang ist."

#. Tag: para
#: session_api.xml:510
#, fuzzy, no-c-format
msgid ""
"The application should individually <literal>update() detached "
"instances that are reachable from the given detached instance "
"<emphasis>only if it wants their state to be updated. This can be "
"automated using <emphasis>transitive persistence. See  "
"aktualisieren, jedoch <emphasis>nur, wenn auch deren Status "
"aktualisiert werden soll. Dieser Vorgang kann selbstverständlich mittels "
"<emphasis>transitiver Persistenz automatisiert werden, siehe "
"<xref linkend=\"objectstate-transitive\"/>."

#. Tag: para
#: session_api.xml:516
#, fuzzy, no-c-format
msgid ""
"The <literal>lock() method also allows an application to "
"reassociate an object with a new session. However, the detached instance has "
"to be unmodified."
msgstr ""
"Die <literal>lock()-Methode ermöglicht es einer Anwendung "
"ebenfalls, ein Objekt mit einer neuen Session zu re-assoziieren. Allerdings "
"darf die abgesetzte Instanz in diesem Fall nicht verändert worden sein!"

#. Tag: programlisting
#: session_api.xml:520
#, fuzzy, no-c-format
msgid ""
"//just reassociate:\n"
"sess.lock(fritz, LockMode.NONE);\n"
"//do a version check, then reassociate:\n"
"sess.lock(izi, LockMode.READ);\n"
"//do a version check, using SELECT ... FOR UPDATE, then reassociate:\n"
"sess.lock(pk, LockMode.UPGRADE);"
msgstr ""
"//just reassociate:\n"
"sess.lock(fritz, LockMode.NONE);\n"
"//do a version check, then reassociate:\n"
"sess.lock(izi, LockMode.READ);\n"
"//do a version check, using SELECT ... FOR UPDATE, then reassociate:\n"
"sess.lock(pk, LockMode.UPGRADE);"

#. Tag: para
#: session_api.xml:522
#, fuzzy, no-c-format
msgid ""
"Note that <literal>lock() can be used with various "
"<literal>LockModes. See the API documentation and the chapter on "
"transaction handling for more information. Reattachment is not the only "
"usecase for <literal>lock()."
msgstr ""
"Beachten Sie, dass <literal>lock() mit verschiedenen "
"<literal>LockModes verwendet werden kann. Weitere Informationen "
"dazu finden Sie in der API-Dokumentation und dem Kapitel zum \"Transaction "
"Handling\". Die Wiederanbindung ist nicht der einzige Anwendungsfall für "
"<literal>lock()."

#. Tag: para
#: session_api.xml:527
#, fuzzy, no-c-format
msgid ""
"Other models for long units of work are discussed in <xref linkend="
"\"transactions-optimistic\"/>."
msgstr ""
"Andere Modelle für lange Arbeitseinheiten werden in <xref linkend="
"\"transactions-optimistic\"/> erläutert."

#. Tag: title
#: session_api.xml:532
#, no-c-format
msgid "Automatic state detection"
msgstr "Automatische Statuserkennung"

#. Tag: para
#: session_api.xml:534
#, 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/reattaches the "
"detached instances associated with its current identifier. The "
"<literal>saveOrUpdate() method implements this functionality."
msgstr ""
"Benutzer von Hibernate haben den Wunsch nach einer allgemeinen Methode "
"geäußert, die entweder eine transiente Instanz durch Generierung eines neuen "
"Bezeichners speichert oder die dem aktuellen Bezeichner zugehörigen "
"abgesetzten Instanzen aktualisiert/erneut hinzufügt. Die "
"<literal>saveOrUpdate()-Methode implementiert diese Funktionalität."

#. Tag: programlisting
#: session_api.xml:540
#, fuzzy, no-c-format
msgid ""
"// in the first session\n"
"Cat cat = (Cat) firstSession.load(Cat.class, catID);\n"
"\n"
"// in a higher tier of the application\n"
"Cat mate = new Cat();\n"
"cat.setMate(mate);\n"
"\n"
"// later, in a new session\n"
"secondSession.saveOrUpdate(cat);   // update existing state (cat has a non-"
"null id)\n"
"secondSession.saveOrUpdate(mate);  // save the new instance (mate has a null "
"id)"
msgstr ""
"// in the first session\n"
"Cat cat = (Cat) firstSession.load(Cat.class, catID);\n"
"\n"
"// in a higher tier of the application\n"
"Cat mate = new Cat();\n"
"cat.setMate(mate);\n"
"\n"
"// later, in a new session\n"
"secondSession.saveOrUpdate(cat);   // update existing state (cat has a non-"
"null id)\n"
"secondSession.saveOrUpdate(mate);  // save the new instance (mate has a null "
"id)"

#. Tag: para
#: session_api.xml:542
#, no-c-format
msgid ""
"The usage and semantics of <literal>saveOrUpdate() seems to be "
"confusing for new users. Firstly, so long as you are not trying to use "
"instances from one session in another new session, you should not need to "
"use <literal>update(), saveOrUpdate(), or "
"<literal>merge(). Some whole applications will never use either of "
"these methods."
msgstr ""
"Gebrauch und Semantik von <literal>saveOrUpdate() scheinen neue "
"Benutzer manchmal zu überfordern. So lange Sie nicht versuchen, diese "
"Instanzen von einer Session in einer neuen Session zu verwenden, sollten Sie "
"<literal>update(), saveOrUpdate() oder "
"<literal>merge() ohnehin nicht benutzen müssen. Manchmal kommen "
"ganze Anwendungen ohne irgendeine dieser Methoden aus."

#. Tag: para
#: session_api.xml:549
#, no-c-format
msgid ""
"Usually <literal>update() or saveOrUpdate() are "
"used in the following scenario:"
msgstr ""
"In der Regel kommen <literal>update() oder saveOrUpdate()"
"</literal> in folgenden Situationen zum Einsatz:"

#. Tag: para
#: session_api.xml:555
#, no-c-format
msgid "the application loads an object in the first session"
msgstr "die Anwendung lädt ein Objekt in der ersten Session"

#. Tag: para
#: session_api.xml:559
#, no-c-format
msgid "the object is passed up to the UI tier"
msgstr "das Objekt wird an den UI-\"Tier\" weitergegeben"

#. Tag: para
#: session_api.xml:563
#, no-c-format
msgid "some modifications are made to the object"
msgstr "am Objekt werden einige Modifikationen vorgenommen"

#. Tag: para
#: session_api.xml:567
#, no-c-format
msgid "the object is passed back down to the business logic tier"
msgstr "das Objekt wird zurück an den \"Business-Logic-Tier\" geleitet"

#. Tag: para
#: session_api.xml:571
#, no-c-format
msgid ""
"the application persists these modifications by calling <literal>update() in einer zweiten Session"

#. Tag: para
#: session_api.xml:576
#, no-c-format
msgid "<literal>saveOrUpdate() does the following:"
msgstr "<literal>saveOrUpdate() tut folgendes:"

#. Tag: para
#: session_api.xml:580
#, no-c-format
msgid "if the object is already persistent in this session, do nothing"
msgstr ""
"falls das Objekt in dieser Session bereits persistent ist, geschieht nichts"

#. Tag: para
#: session_api.xml:585
#, no-c-format
msgid ""
"if another object associated with the session has the same identifier, throw "
"an exception"
msgstr ""
"falls ein anderes mit der Session assoziiertes Objekt denselben Bezeichner "
"besitzt, wird eine Ausnahme gemeldet"

#. Tag: para
#: session_api.xml:590
#, no-c-format
msgid "if the object has no identifier property, <literal>save() it"
msgstr ""
"falls das Objekt keine Bezeichner-Property besitzt, speichern Sie es mittels "
"<literal>save()"

#. Tag: para
#: session_api.xml:595
#, no-c-format
msgid ""
"if the object's identifier has the value assigned to a newly instantiated "
"object, <literal>save() it"
msgstr ""
"falls der Bezeichner des Objekts einen ihm zugeordneten Wert am neu "
"instantiierten Objekt besitzt, speichern Sie mittels <literal>save() or "
"<literal><timestamp>, and the version property value is the "
"same value assigned to a newly instantiated object, <literal>save() "
"oder <literal><timestamp>) und der Property-Wert der Version "
"derselbe Wert wie der dem neu instantiierten Objekt zugeordnete ist, "
"speichern Sie mittels <literal>save()"

#. Tag: para
#: session_api.xml:608
#, no-c-format
msgid "otherwise <literal>update() the object"
msgstr ""
"andernfalls aktualisieren Sie das Objekt mittels <literal>update()"

#. Tag: para
#: session_api.xml:612
#, no-c-format
msgid "and <literal>merge() is very different:"
msgstr "und <literal>merge() ist völlig anders:"

#. Tag: para
#: session_api.xml:616
#, no-c-format
msgid ""
"if there is a persistent instance with the same identifier currently "
"associated with the session, copy the state of the given object onto the "
"persistent instance"
msgstr ""
"falls eine persistente Instanz mit demselben Bezeichner zum gegenwärtigen "
"Zeitpunkt mit der Session assoziiert ist, so kopieren Sie den Status des "
"vorgegebenen Objekts in die persistente Instanz"

#. Tag: para
#: session_api.xml:622
#, no-c-format
msgid ""
"if there is no persistent instance currently associated with the session, "
"try to load it from the database, or create a new persistent instance"
msgstr ""
"falls keine persistente Instanz zum gegenwärtigen Zeitpunkt mit der Session "
"assoziiert wird, so versuchen Sie sie aus der Datenbank zu laden oder "
"erstellen Sie eine neue persistente Instanz"

#. Tag: para
#: session_api.xml:628
#, no-c-format
msgid "the persistent instance is returned"
msgstr "die persistente Instanz wird zurückgeschickt"

#. Tag: para
#: session_api.xml:632
#, no-c-format
msgid ""
"the given instance does not become associated with the session, it remains "
"detached"
msgstr ""
"die vorgegebene Instanz wird nicht mit der Session assoziiert, sie bleibt "
"abgesetzt"

#. Tag: title
#: session_api.xml:639
#, no-c-format
msgid "Deleting persistent objects"
msgstr "Das Löschen persistenter Objekte"

#. Tag: para
#: session_api.xml:641
#, fuzzy, no-c-format
msgid ""
"<literal>Session.delete() will remove an object's state from the "
"database. Your application, however, can still hold a reference to a deleted "
"object. It is best to think of <literal>delete() as making a "
"persistent instance, transient."
msgstr ""
"Mit <literal>Session.delete() wird der Status eines Objekts aus "
"der Datenbank gelöscht. Natürlich kann Ihre Anwendung nach wie vor einen "
"Verweis auf ein gelöschtes Objekt beinhalten. Durch <literal>delete() "
"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 children."
msgstr ""
"Sie können Objekte in beliebiger Reihenfolge löschen, ohne sich Sorgen um "
"die Verletzung von Fremdschlüsselbedingungen machen zu müssen. Es ist nach "
"wie vor möglich, eine <literal>NOT NULL-Bedingung an der "
"Fremdschlüsselspalte zu verletzen, indem Objekte in der falschen Reihenfolge "
"gelöscht werden, z.B. wenn Sie das übergeordnete Objekt löschen, jedoch "
"vergessen, dies mit den untergeordneten Objekten ebenfalls zu tun."

#. Tag: title
#: session_api.xml:656
#, no-c-format
msgid "Replicating object between two different datastores"
msgstr "Objektreplikation zwischen zwei verschiedenen Datenspeichern"

#. Tag: para
#: session_api.xml:658
#, fuzzy, no-c-format
msgid ""
"It is sometimes useful to be able to take a graph of persistent instances "
"and make them persistent in a different datastore, without regenerating "
"identifier values."
msgstr ""
"Es ist hin und wieder von Nutzen ein Diagramm persistenter Instanzen nehmen "
"zu können und diese in einem anderen Datenspeicher persistent machen zu "
"können, ohne Bezeichnerwerte erneut generieren zu müssen."

#. Tag: programlisting
#: session_api.xml:662
#, fuzzy, no-c-format
msgid ""
"//retrieve a cat from one database\n"
"Session session1 = factory1.openSession();\n"
"Transaction tx1 = session1.beginTransaction();\n"
"Cat cat = session1.get(Cat.class, catId);\n"
"tx1.commit();\n"
"session1.close();\n"
"\n"
"//reconcile with a second database\n"
"Session session2 = factory2.openSession();\n"
"Transaction tx2 = session2.beginTransaction();\n"
"session2.replicate(cat, ReplicationMode.LATEST_VERSION);\n"
"tx2.commit();\n"
"session2.close();"
msgstr ""
"//retrieve a cat from one database\n"
"Session session1 = factory1.openSession();\n"
"Transaction tx1 = session1.beginTransaction();\n"
"Cat cat = session1.get(Cat.class, catId);\n"
"tx1.commit();\n"
"session1.close();\n"
"\n"
"//reconcile with a second database\n"
"Session session2 = factory2.openSession();\n"
"Transaction tx2 = session2.beginTransaction();\n"
"session2.replicate(cat, ReplicationMode.LATEST_VERSION);\n"
"tx2.commit();\n"
"session2.close();"

#. Tag: para
#: session_api.xml:664
#, fuzzy, no-c-format
msgid ""
"The <literal>ReplicationMode determines how replicate() bestimmt, wie replicate(): ignores the object when there is "
"an existing database row with the same identifier"
msgstr ""
"<literal>ReplicationMode.IGNORE - ignoriert das Objekt, wenn "
"bereits eine Datenbankreihe mit demselben Bezeichner existiert"

#. Tag: para
#: session_api.xml:675
#, fuzzy, no-c-format
msgid ""
"<literal>ReplicationMode.OVERWRITE: overwrites any existing "
"database row with the same identifier"
msgstr ""
"<literal>ReplicationMode.OVERWRITE - überschreibt eine bestehende "
"Datenbankreihe mit demselben Bezeichner"

#. Tag: para
#: session_api.xml:680
#, fuzzy, no-c-format
msgid ""
"<literal>ReplicationMode.EXCEPTION: throws an exception if there "
"is an existing database row with the same identifier"
msgstr ""
"<literal>ReplicationMode.EXCEPTION - meldet eine Ausnahme, falls "
"eine Datenbankreihe mit demselben Bezeichner existiert"

#. Tag: para
#: session_api.xml:686
#, fuzzy, no-c-format
msgid ""
"<literal>ReplicationMode.LATEST_VERSION: overwrites the row if its "
"version number is earlier than the version number of the object, or ignore "
"the object otherwise"
msgstr ""
"<literal>ReplicationMode.LATEST_VERSION - überschreibt die Reihe, "
"falls deren Versionsnummer älter ist als die Versionsnummer des Objekts, "
"oder ignoriert andernfalls das Objekt"

#. Tag: para
#: session_api.xml:692
#, no-c-format
msgid ""
"Usecases for this feature include reconciling data entered into different "
"database instances, upgrading system configuration information during "
"product upgrades, rolling back changes made during non-ACID transactions and "
"more."
msgstr ""
"Anwendungsfälle dieses Features beinhalten die Abstimmung von in "
"verschiedenen Datenbankinstanzen eingegebenen Daten, das Upgrade von "
"Systemkonfigurationsinformationen während Produkt-Upgrades, die Wiederholung "
"von während nicht-ACID Transaktionen gemachten Änderungen und mehr."

#. Tag: title
#: session_api.xml:699
#, no-c-format
msgid "Flushing the Session"
msgstr "Das Räumen der Session"

#. Tag: para
#: session_api.xml:701
#, fuzzy, no-c-format
msgid ""
"Sometimes the <literal>Session will execute the SQL statements "
"needed to synchronize the JDBC connection's state with the state of objects "
"held in memory. This process, called <emphasis>flush, occurs by "
"default at the following points:"
msgstr ""
"Von Zeit zu Zeit wird die <literal>Session die SQL-Anweisungen "
"ausführen, die benötigt werden, um den Verbindungsstatus der JDBC mit dem "
"Status der gespeicherten Objekte zu synchronisieren. Während dieses Vorgangs "
"kommt es standardmäßig an den folgenden Punkten zur <emphasis>Räumung"
msgstr "von <literal>org.hibernate.Transaction.commit()"

#. Tag: para
#: session_api.xml:718
#, no-c-format
msgid "from <literal>Session.flush()"
msgstr "von <literal>Session.flush()"

#. Tag: para
#: session_api.xml:722
#, fuzzy, no-c-format
msgid "The SQL statements are issued in the following order:"
msgstr "Die SQL-Anweisungen werden in der folgenden Reihenfolge herausgegeben"

#. Tag: para
#: session_api.xml:726
#, fuzzy, no-c-format
msgid ""
"all entity insertions in the same order the corresponding objects were saved "
"using <literal>Session.save()"
msgstr ""
"alle Entity-Einfügungen in derselben Reihenfolge der entsprechenden Objekte "
"wurden mittels <literal>Session.save() gespeichert"

#. Tag: para
#: session_api.xml:731
#, no-c-format
msgid "all entity updates"
msgstr "alle Entity-Aktualisierungen"

#. Tag: para
#: session_api.xml:735
#, no-c-format
msgid "all collection deletions"
msgstr "alle Collection-Löschungen"

#. Tag: para
#: session_api.xml:739
#, no-c-format
msgid "all collection element deletions, updates and insertions"
msgstr ""
"alle Löschungen, Aktualisierungen und Einfügungen von Elementen der "
"Collection"

#. Tag: para
#: session_api.xml:743
#, no-c-format
msgid "all collection insertions"
msgstr "alle Einfügungen in Collections"

#. Tag: para
#: session_api.xml:747
#, fuzzy, no-c-format
msgid ""
"all entity deletions in the same order the corresponding objects were "
"deleted using <literal>Session.delete()"
msgstr ""
"alle Entity-Löschungen in derselben Reihenfolge, in der die entsprechenden "
"Objekte gelöscht wurden unter Verwendung von <literal>Session.delete() ID generation "
"are inserted when they are saved."
msgstr ""
"(Eine Ausnahme ist, dass Objekte, die <literal>native ID-"
"Generierung verwenden, beim Speichern eingefügt werden)."

#. Tag: para
#: session_api.xml:755
#, fuzzy, no-c-format
msgid ""
"Except when you explicitly <literal>flush(), there are absolutely "
"no guarantees about <emphasis>when the Session "
"executes the JDBC calls, only the <emphasis>order in which they "
"are executed. However, Hibernate does guarantee that the <literal>Query.list"
"(..)</literal> will never return stale or incorrect data."
msgstr ""
"Außer wenn Sie explizit <literal>flush() einsetzen, gibt es "
"keinerlei Garantien dafür, <emphasis>wann die SessionReihenfolge "
"der Ausführung steht fest. Hibernate gewährleistet jedoch, dass die "
"<literal>Query.list(..) niemals abgelaufene oder falsche Daten "
"liefert."

#. Tag: para
#: session_api.xml:762
#, fuzzy, no-c-format
msgid ""
"It is possible to change the default behavior so that flush occurs less "
"frequently. The <literal>FlushMode class defines three different "
"modes: only flush at commit time when the Hibernate <literal>Transaction is called explicitly. The last "
"mode is useful for long running units of work, where a <literal>Session-Klasse "
"definiert drei verschiedene Modi: Nur zum Zeitpunkt des Festschreibens (sog. "
"\"Commit-Time\") räumen (und nur wenn die Hibernate <literal>Transaction "
"explizit erfolgt. Der letzte Modus ist insbesondere bei langen "
"Arbeitseinheiten von Nutzen, wenn eine <literal>Session über "
"längere Zeit hinweg geöffnet und abgekuppelt bleibt (siehe <xref linkend="
"\"transactions-optimistic-longsession\"/>)."

#. Tag: programlisting
#: session_api.xml:772
#, fuzzy, no-c-format
msgid ""
"sess = sf.openSession();\n"
"Transaction tx = sess.beginTransaction();\n"
"sess.setFlushMode(FlushMode.COMMIT); // allow queries to return stale state\n"
"\n"
"Cat izi = (Cat) sess.load(Cat.class, id);\n"
"izi.setName(iznizi);\n"
"\n"
"// might return stale data\n"
"sess.find(\"from Cat as cat left outer join cat.kittens kitten\");\n"
"\n"
"// change to izi is not flushed!\n"
"...\n"
"tx.commit(); // flush occurs\n"
"sess.close();"
msgstr ""
"sess = sf.openSession();\n"
"Transaction tx = sess.beginTransaction();\n"
"sess.setFlushMode(FlushMode.COMMIT); // allow queries to return stale state\n"
"\n"
"Cat izi = (Cat) sess.load(Cat.class, id);\n"
"izi.setName(iznizi);\n"
"\n"
"// might return stale data\n"
"sess.find(\"from Cat as cat left outer join cat.kittens kitten\");\n"
"\n"
"// change to izi is not flushed!\n"
"...\n"
"tx.commit(); // flush occurs\n"
"sess.close();"

#. Tag: para
#: session_api.xml:774
#, fuzzy, no-c-format
msgid ""
"During flush, an exception might occur (e.g. if a DML operation violates a "
"constraint). Since handling exceptions involves some understanding of "
"Hibernate's transactional behavior, we discuss it in <xref linkend="
"\"transactions\"/>."
msgstr ""
"Während der Räumung kann es zu einer Ausnahmemeldung kommen (wenn z.B. ein "
"DML-Vorgang eine Bedingung verletzt). Da der Umgang mit Ausnahmen ein "
"gewisses Verständnis für das transaktionale Verhalten in Hibernate "
"voraussetzt, erläutern wir es in <xref linkend=\"transactions\"/>."

#. Tag: title
#: session_api.xml:781
#, no-c-format
msgid "Transitive persistence"
msgstr "Transitive Persistenz"

#. Tag: para
#: session_api.xml:783
#, no-c-format
msgid ""
"It is quite cumbersome to save, delete, or reattach individual objects, "
"especially if you deal with a graph of associated objects. A common case is "
"a parent/child relationship. Consider the following example:"
msgstr ""
"Es ist recht mühselig, einzelne Objekte zu speichern, zu löschen und erneut "
"hinzuzufügen, insbesondere dann, wenn man es mit einem Diagramm assoziierter "
"Objekte zu tun hat. Ein gängiger Fall ist die Beziehung zwischen "
"übergeordneten und untergeordneten Objekten (sog. \"parent/child\"-"
"Beziehung). Sehen Sie sich das folgende Beispiel an:"

#. Tag: para
#: session_api.xml:788
#, fuzzy, 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 \"cascading\" "
"of state changes. When the parent is saved, the value-typed child objects "
"are saved and when the parent is deleted, the children will be deleted, etc. "
"This works for operations such as the removal of a child from the "
"collection. Since value-typed objects cannot have shared references, "
"Hibernate will detect this and delete the child from the database."
msgstr ""
"Falls die untergeordneten Objekte (\"children\") in einer \"Parent/Child\"-"
"Beziehung Wertetypen wären (z.B. eine Collection von Adressen oder Strings), "
"so wäre ihr Lebenszyklus abhängig vom übergeordneten Objekt (\"Parent\"), "
"und es wären keine weiteren Maßnahmen nötig, um die Statusänderungen bequem "
"weiterzugeben (sog. \"cascading\"). Wenn das übergeordnete Objekt "
"gespeichert wird, so werden auch die untergeordneten Objekte gespeichert, "
"wird ein übergeordnetes Objekt gelöscht, werden auch die untergeordneten "
"Objekte gelöscht usw. Das funktioniert sogar für Vorgänge bei denen etwa ein "
"untergeordnetes Objekt aus der Collection entfernt wird: Hibernate spürt "
"dieses auf und da solche Objekte keine geteilten Verweise besitzen können, "
"wird das untergeordnete Objekt aus der Datenbank gelöscht."

#. Tag: para
#: session_api.xml:798
#, fuzzy, 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 cats). "
"Entities have their own life cycle and support shared references. Removing "
"an entity from the collection does not mean it can be deleted), and there is "
"by default no cascading of state from one entity to any other associated "
"entities. Hibernate does not implement <emphasis>persistence by "
"reachability</emphasis> by default."
msgstr ""
"Stellen Sie sich nun dieselbe Situation vor, mit dem Unterschied, dass es "
"sich bei übergeordneten und untergeordneten Objekten um Entities, nicht "
"Wertetypen (z.B. Kategorien und Posten oder \"Parent\" und \"Child\"-Cats) "
"handelt. Entities besitzen ihren eigenen Lebenszyklus, unterstützen geteilte "
"Verweise (d.h. selbst wenn eine Entity aus der Collection entfernt wird, "
"kann sie deswegen nicht gelöscht werden) und standardmäßig existiert keine "
"Statusweitergabe von einer Entity an eine andere zugehörige Entity. "
"Hibernate implementiert standardmäßig keine <emphasis>Persistenz durch "
"Erreichbarkeit</emphasis>."

#. Tag: para
#: session_api.xml:806
#, no-c-format
msgid ""
"For each basic operation of the Hibernate session - including "
"<literal>persist(), merge(), saveOrUpdate(), delete(), lock(), refresh(), "
"evict(), replicate()</literal> - there is a corresponding cascade style. "
"Respectively, the cascade styles are named <literal>create, merge, save-"
"update, delete, lock, refresh, evict, replicate</literal>. If you want an "
"operation to be cascaded along an association, you must indicate that in the "
"mapping document. For example:"
msgstr ""
"Für jeden Grundvorgang der Hibernate Session - einschließlich "
"<literal>persist(), merge(), saveOrUpdate(), delete(), lock(), refresh(), "
"evict(), replicate()</literal> - gibt es eine entsprechende Art der "
"Weitergabe. Die Arten sind dem entsprechend <literal>create, merge, save-"
"update, delete, lock, refresh, evict, replicate</literal> benannt. Falls Sie "
"möchten, dass ein Vorgang entlang einer Assoziation weitergegeben wird, so "
"müssen Sie dass im Mapping-Dokument angeben. Zum Beispiel wie folgt aussehen:"

#. Tag: programlisting
#: session_api.xml:814
#, fuzzy, no-c-format
msgid "<one-to-one name=\"person\" cascade=\"persist\"/>"
msgstr "<one-to-one name=\"person\" cascade=\"persist\"/>"

#. Tag: para
#: session_api.xml:816
#, no-c-format
msgid "Cascade styles my be combined:"
msgstr ""
"Die Arten der Weitergabe (sog. \"Cascade Styles\") können kombiniert werden:"

#. Tag: programlisting
#: session_api.xml:818
#, fuzzy, no-c-format
msgid "<one-to-one name=\"person\" cascade=\"persist,delete,lock\"/>"
msgstr "<one-to-one name=\"person\" cascade=\"persist,delete,lock\"/>"

#. Tag: para
#: session_api.xml:820
#, fuzzy, no-c-format
msgid ""
"You can even use <literal>cascade=\"all\" to specify that "
"<emphasis>all operations should be cascaded along the "
"association. The default <literal>cascade=\"none\" specifies that "
"no operations are to be cascaded."
msgstr ""
"Sie können sogar mittels <literal>cascade=\"all\" bestimmen, "
"dass<emphasis>alle Vorgänge entlang der Assoziation weitergegeben "
"werden. In der Standardeinstellung <literal>cascade=\"none\" ist "
"festgelegt, dass keine Vorgänge weitergegeben werden."

#. Tag: para
#: session_api.xml:825
#, no-c-format
msgid ""
"In case you are using annotatons you probably have noticed the "
"<literal>cascade attribute taking an array of "
"<classname>CascadeType as a value. The cascade concept in JPA is "
"very is similar to the transitive persistence and cascading of operations as "
"described above, but with slightly different semantics and cascading types:"
msgstr ""

#. Tag: para
#: session_api.xml:834
#, no-c-format
msgid ""
"<literal>CascadeType.PERSIST: cascades the persist (create) "
"operation to associated entities persist() is called or if the entity is "
"managed"
msgstr ""

#. Tag: para
#: session_api.xml:840
#, no-c-format
msgid ""
"<literal>CascadeType.MERGE: cascades the merge operation to "
"associated entities if merge() is called or if the entity is managed"
msgstr ""

#. Tag: para
#: session_api.xml:846
#, no-c-format
msgid ""
"<literal>CascadeType.REMOVE: cascades the remove operation to "
"associated entities if delete() is called"
msgstr ""

#. Tag: para
#: session_api.xml:851
#, no-c-format
msgid ""
"<literal>CascadeType.REFRESH: cascades the refresh operation to "
"associated entities if refresh() is called"
msgstr ""

#. Tag: para
#: session_api.xml:856
#, no-c-format
msgid ""
"<literal>CascadeType.DETACH: cascades the detach operation to "
"associated entities if detach() is called"
msgstr ""

#. Tag: para
#: session_api.xml:861
#, fuzzy, no-c-format
msgid "<literal>CascadeType.ALL: all of the above"
msgstr "<literal>saveOrUpdate() tut folgendes:"

#. Tag: para
#: session_api.xml:866
#, no-c-format
msgid ""
"CascadeType.ALL also covers Hibernate specific operations like save-update, "
"lock etc..."
msgstr ""

#. Tag: para
#: session_api.xml:870
#, no-c-format
msgid ""
"A special cascade style, <literal>delete-orphan, applies only to "
"one-to-many associations, and indicates that the <literal>delete() "
"operation should be applied to any child object that is removed from the "
"association. Using annotations there is no <literal>CascadeType.DELETE-"
"ORPHAN</literal> equivalent. Instead you can use the attribute "
"<literal>orphanRemoval as seen in  collection or an associated entity is "
"dereferenced from a <classname>@OneToOne association, this "
"associated entity can be marked for deletion if <literal>orphanRemoval with orphanRemoval"
msgstr ""

#. Tag: programlisting
#: session_api.xml:886
#, no-c-format
msgid ""
"@Entity \n"
"public class Customer {\n"
"   private Set<Order> orders;\n"
"\n"
"   @OneToMany(cascade=CascadeType.ALL, orphanRemoval=true) \n"
"   public Set<Order> getOrders() { return orders; }\n"
"\n"
"   public void setOrders(Set<Order> orders) { this.orders = orders; }\n"
"\n"
"   [...]\n"
"}\n"
"\n"
"@Entity \n"
"public class Order { ... }\n"
"\n"
"Customer customer = em.find(Customer.class, 1l);\n"
"Order order = em.find(Order.class, 1l);\n"
"customer.getOrders().remove(order); //order will be deleted by cascade"
msgstr ""

#. Tag: para
#: session_api.xml:889
#, no-c-format
msgid "Recommendations:"
msgstr "Empfehlungen:"

#. Tag: para
#: session_api.xml:893
#, fuzzy, no-c-format
msgid ""
"It does not usually make sense to enable cascade on a many-to-one or many-to-"
"many association. In fact the <literal>@ManyToOne and "
"<literal>@ManyToMany don't even offer a orphanRemoval<many-to-many>-"
"Assoziation zu aktivieren. Die Weitergabe ist oftmals für <literal><one-"
"to-one></literal> und <one-to-many>-"
"Assoziationen von Nutzen."

#. Tag: para
#: session_api.xml:901
#, fuzzy, no-c-format
msgid ""
"If the child object's lifespan is bounded by the lifespan of the parent "
"object, make it a <emphasis>life cycle object by specifying "
"<literal>cascade=\"all,delete-orphan\"(@OneToMany"
"(cascade=CascadeType.ALL, orphanRemoval=true)</literal>)."
msgstr ""
"Falls die Lebensdauer des untergeordneten Objekts an die Lebensdauer des "
"übergeordneten Objekts gebunden ist, erklären Sie es zum <emphasis>"
"\"Lifecycle Object\"</emphasis> indem Sie cascade=\"all,delete-"
"orphan\"</literal> festlegen."

#. Tag: para
#: session_api.xml:909
#, 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 same "
"transaction, and you want to save yourself some typing, consider using "
"<literal>cascade=\"persist,merge,save-update\"."
msgstr ""
"Andernfalls wird keine Weitergabe benötigt. Wenn Sie jedoch glauben, dass "
"Sie oft mit über- und untergeordneten Objekten in derselben Transaktion "
"arbeiten werden und Sie sich etwas Tipparbeit sparen möchten, so können Sie "
"<literal>cascade=\"persist,merge,save-update\" verwenden."

#. Tag: para
#: session_api.xml:917
#, no-c-format
msgid ""
"Mapping an association (either a single valued association, or a collection) "
"with <literal>cascade=\"all\" marks the association as a "
"<emphasis>parent/child style relationship where save/update/"
"delete of the parent results in save/update/delete of the child or children."
msgstr ""
"Das Mappen einer Assoziation (entweder einer einwertigen Assoziation oder "
"einer Collection) unter Verwendung von <literal>cascade=\"all\" "
"kennzeichnet die Assoziation als zum <emphasis>Parent/Child-"
"Beziehungstyp gehörig, bei dem Speichern/Aktualisieren/Löschen des "
"übergeordneten Objekts zum Speichern/Aktualisieren/Löschen des "
"untergeordneten Objekts (oder Objekte) führt."

#. Tag: para
#: session_api.xml:923
#, fuzzy, no-c-format
msgid ""
"Furthermore, a mere reference to a child from a persistent parent will "
"result in save/update of the child. This metaphor is incomplete, however. A "
"child which becomes unreferenced by its parent is <emphasis>not "
"automatically deleted, except in the case of a one-to-many association "
"mapped with <literal>cascade=\"delete-orphan\". The precise "
"semantics of cascading operations for a parent/child relationship are as "
"follows:"
msgstr ""
"Desweiteren führt schon der Verweis eines übergeordneten Objektes auf ein "
"untergeordnetes Objekt zur Speicherung/Aktualisierung des letzteren. Diese "
"Metapher ist jedoch unvollständig. Ein untergeordnetes Objekt auf das nicht "
"mehr durch das übergeordnete Objekt verwiesen wird, wird <emphasis>nicht<one-to-"
"many></literal>-Assoziation, die mit cascade=\"delete-orphan\", all children are "
"passed to <literal>persist()"
msgstr ""
"Falls für einen \"Parent\" <literal>persist() gilt, so gilt für "
"sämtliche \"Children\" ebenfalls <literal>persist()"

#. Tag: para
#: session_api.xml:939
#, no-c-format
msgid ""
"If a parent is passed to <literal>merge(), all children are passed "
"to <literal>merge()"
msgstr ""
"Falls für einen \"Parent\" <literal>merge() gilt, so gilt für "
"sämtliche \"Children\" ebenfalls <literal>merge()"

#. Tag: para
#: session_api.xml:944
#, no-c-format
msgid ""
"If a parent is passed to <literal>save(), update()saveOrUpdate(), all children are passed to "
"<literal>saveOrUpdate()"
msgstr ""
"Falls für einen \"Parent\" <literal>save(), update()saveOrUpdate() gilt, so gilt für sämtliche "
"\"Children\" ebenfalls <literal>saveOrUpdate()"

#. Tag: para
#: session_api.xml:950
#, no-c-format
msgid ""
"If a transient or detached child becomes referenced by a persistent parent, "
"it is passed to <literal>saveOrUpdate()"
msgstr ""
"Falls auf ein transientes oder abgesetztes \"Child\" durch einen "
"persistenten \"Parent\" verwiesen wird, so gilt dafür <literal>saveOrUpdate()"
"</literal>"

#. Tag: para
#: session_api.xml:956
#, no-c-format
msgid ""
"If a parent is deleted, all children are passed to <literal>delete()"

#. Tag: para
#: session_api.xml:961
#, no-c-format
msgid ""
"If a child is dereferenced by a persistent parent, <emphasis>nothing special "
"happens</emphasis> - the application should explicitly delete the child if "
"necessary - unless <literal>cascade=\"delete-orphan\", in which "
"case the \"orphaned\" child is deleted."
msgstr ""
"Falls der Verweis auf ein \"Child\" von einem persistenten \"Parent\" "
"entfällt, <emphasis>passiert nicht besonderes - die Anwendung "
"sollte das \"Child\" explizit löschen falls nötig - außer es gilt "
"<literal>cascade=\"delete-orphan\", in welchem Fall das \"verwaiste"
"\" Child gelöscht wird."

#. Tag: para
#: session_api.xml:969
#, fuzzy, no-c-format
msgid ""
"Finally, note that cascading of operations can be applied to an object graph "
"at <emphasis>call time or at flush time. All "
"operations, if enabled, are cascaded to associated entities reachable when "
"the operation is executed. However, <literal>save-update and "
"<literal>delete-orphan are transitive for all associated entities "
"reachable during flush of the <literal>Session."
msgstr ""
"Beachten Sie außerdem, dass die Weitergabe von Vorgängen bei einem "
"Objektdiagramm zum <emphasis>Zeitpunkt des Aufrufs oder "
"<emphasis>zum Zeitpunkt der Räumung angewendet werden kann. Falls "
"aktiviert werden alle Vorgänge an assoziierte Entities weitergegeben, die "
"bei der Ausführung des Vorgangs erreichbar sind. Jedoch sind <literal>save-"
"upate</literal> und delete-orphan für alle während der "
"Räumung der <literal>Session erreichbaren, zugehörigen Entities "
"transitiv."

#. Tag: title
#: session_api.xml:979
#, no-c-format
msgid "Using metadata"
msgstr "Die Verwendung von Metadata"

#. Tag: para
#: session_api.xml:981
#, fuzzy, no-c-format
msgid ""
"Hibernate requires a rich meta-level model of all entity and value types. "
"This model can be useful to the application itself. For example, the "
"application might use Hibernate's metadata to implement a \"smart\" deep-"
"copy algorithm that understands which objects should be copied (eg. mutable "
"value types) and which objects that should not (e.g. immutable value types "
"and, possibly, associated entities)."
msgstr ""
"Hibernate benötigt von allen Entity und Wertetypen ein sehr umfassendes "
"Modell auf Meta-Ebene. Von Zeit zu Zeit ist dieses Modell für die Anwendung "
"selbst sehr hilfreich. Die Anwendung könnte zum Beispiel Hibernates "
"Metadaten verwenden, um einen \"intelligenten\" Algorithmus der Detailkopie "
"zu implementieren, der weiß, welche Objekte kopiert werden müssen (z.B. "
"veränderliche Wertetypen) und welche nicht (z.B. unveränderliche Wertetypen "
"und möglicherweise zugehörige Entities)."

#. Tag: para
#: session_api.xml:988
#, fuzzy, no-c-format
msgid ""
"Hibernate exposes metadata via the <literal>ClassMetadata and "
"<literal>CollectionMetadata interfaces and the Type."
msgstr ""
"Hibernate legt Metadata mittels der <literal>ClassMetadata und "
"<literal>CollectionMetadata-Interfaces und der Type verfügbar."

#. Tag: programlisting
#: session_api.xml:993
#, fuzzy, no-c-format
msgid ""
"Cat fritz = ......;\n"
"ClassMetadata catMeta = sessionfactory.getClassMetadata(Cat.class);\n"
"\n"
"Object[] propertyValues = catMeta.getPropertyValues(fritz);\n"
"String[] propertyNames = catMeta.getPropertyNames();\n"
"Type[] propertyTypes = catMeta.getPropertyTypes();\n"
"\n"
"// get a Map of all properties which are not collections or associations\n"
"Map namedValues = new HashMap();\n"
"for ( int i=0; i<propertyNames.length; i++ ) {\n"
"    if ( !propertyTypes[i].isEntityType() && !propertyTypes[i]."
"isCollectionType() ) {\n"
"        namedValues.put( propertyNames[i], propertyValues[i] );\n"
"    }\n"
"}"
msgstr ""
"Cat fritz = ......;\n"
"ClassMetadata catMeta = sessionfactory.getClassMetadata(Cat.class);\n"
"\n"
"Object[] propertyValues = catMeta.getPropertyValues(fritz);\n"
"String[] propertyNames = catMeta.getPropertyNames();\n"
"Type[] propertyTypes = catMeta.getPropertyTypes();\n"
"\n"
"// get a Map of all properties which are not collections or associations\n"
"Map namedValues = new HashMap();\n"
"for ( int i=0; i<propertyNames.length; i++ ) {\n"
"    if ( !propertyTypes[i].isEntityType() && !propertyTypes[i]."
"isCollectionType() ) {\n"
"        namedValues.put( propertyNames[i], propertyValues[i] );\n"
"    }\n"
"}"

#, fuzzy
#~ msgid ""
#~ "Hibernate does not offer its own API for direct execution of "
#~ "<literal>UPDATE or DELETE statements. "
#~ "Hibernate is a <emphasis>state management service, you do not "
#~ "have to think in <emphasis>statements to use it. JDBC is a "
#~ "perfect API for executing SQL statements, you can get a JDBC "
#~ "<literal>Connection at any time by calling session."
#~ "connection()</literal>. Furthermore, the notion of mass operations "
#~ "conflicts with object/relational mapping for online transaction "
#~ "processing-oriented applications. Future versions of Hibernate can, "
#~ "however, provide special mass operation functions. See <xref linkend="
#~ "\"batch\"/> for some possible batch operation tricks."
#~ msgstr ""
#~ "Bitte beachten Sie, dass Hibernate keine eigene API für die direkte "
#~ "Ausführung von <literal>UPDATE oder DELETE-"
#~ "Anweisungen besitzt. Bei Hibernate handelt es sich um einen Dienst zur "
#~ "<emphasis>Statusverwaltung, das heißt, Sie müssen bei seiner "
#~ "Benutzung nicht in <emphasis>Anweisungen denken. JDBC ist eine "
#~ "perfekte API für die Ausführung von SQL-Anweisungen, sie können jederzeit "
#~ "eine JDBC <literal>Connection durch Aufruf von session."
#~ "connection()</literal> erhalten. Desweiteren steht die Idee von "
#~ "Massenvorgängen in Konflikt zu objekt/relationalem Mapping für "
#~ "Anwendungen, die an der Bearbeitung von online Transaktionen orientiert "
#~ "sind. Zukünftige Versionen von Hibernate werden möglicherweise spezielle "
#~ "Funktionen für Massenvorgänge bieten. Unter <xref linkend=\"batch\"/> "
#~ "finden Sie einige mögliche Tricks zur Batch-Bearbeitung."

#~ msgid ""
#~ "A special cascade style, <literal>delete-orphan, applies only "
#~ "to one-to-many associations, and indicates that the <literal>delete() "
#~ "gilt nur bei \"One-to-Many\"-Assoziationen und zeigt an, dass der "
#~ "<literal>delete()-Vorgang angewendet werden soll, wenn ein "
#~ "untergeordnetes Objekt aus der Assoziation entfernt wird."

Other Hibernate examples (source code examples)

Here is a short list of links related to this Hibernate session_api.po source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.