📄 collection_mapping.po
字号:
msgid ""msgstr """Project-Id-Version: PACKAGE VERSION\n""Report-Msgid-Bugs-To: http://bugs.kde.org\n""POT-Creation-Date: 2008-08-14 15:28+0000\n""PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Language-Team: LANGUAGE <LL@li.org>\n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=UTF-8\n""Content-Transfer-Encoding: 8bit\n"#. Tag: title#: collection_mapping.xml:29#, no-c-formatmsgid "Collection Mapping"msgstr "Mapping des collections"#. Tag: title#: collection_mapping.xml:32#, no-c-formatmsgid "Persistent collections"msgstr "Collections persistantes"#. Tag: para#: collection_mapping.xml:34#, no-c-formatmsgid """Hibernate requires that persistent collection-valued fields be declared as ""an interface type, for example:"msgstr """Hibernate requiert que les champs contenant des collections persistantes ""soient déclarés comme des types d'interface, par exemple :"#. Tag: programlisting#: collection_mapping.xml:39#, no-c-formatmsgid """<![CDATA[public class Product {\n"" private String serialNumber;\n"" private Set parts = new HashSet();\n"" \n"" public Set getParts() { return parts; }\n"" void setParts(Set parts) { this.parts = parts; }\n"" public String getSerialNumber() { return serialNumber; }\n"" void setSerialNumber(String sn) { serialNumber = sn; }\n""}]]>"msgstr ""#. Tag: para#: collection_mapping.xml:41#, no-c-formatmsgid """The actual interface might be <literal>java.util.Set</literal>, ""<literal>java.util.Collection</literal>, <literal>java.util.List</literal>, ""<literal>java.util.Map</literal>, <literal>java.util.SortedSet</literal>, ""<literal>java.util.SortedMap</literal> or ... anything you like! (Where ""\"anything you like\" means you will have to write an implementation of ""<literal>org.hibernate.usertype.UserCollectionType</literal>.)"msgstr """L'interface réelle devrait être <literal>java.util.Set</literal>, ""<literal>java.util.Collection</literal>, <literal>java.util.List</literal>, ""<literal>java.util.Map</literal>, <literal>java.util.SortedSet</literal>, ""<literal>java.util.SortedMap</literal> ou ... n'importe quoi d'autre ! (Où ""\"n'importe quoi d'autre\" signifie que vous devrez écrire une ""implémentation de <literal>org.hibernate.usertype.UserCollectionType</""literal>.)"#. Tag: para#: collection_mapping.xml:50#, no-c-formatmsgid """Notice how we initialized the instance variable with an instance of ""<literal>HashSet</literal>. This is the best way to initialize collection ""valued properties of newly instantiated (non-persistent) instances. When you ""make the instance persistent - by calling <literal>persist()</literal>, for ""example - Hibernate will actually replace the <literal>HashSet</literal> ""with an instance of Hibernate's own implementation of <literal>Set</""literal>. Watch out for errors like this:"msgstr """Notez comment nous avons initialisé les variables d'instance avec une ""instance de <literal>HashSet</literal>. C'est le meilleur moyen pour ""initialiser les collections d'instances nouvellement créées (non ""persistantes). Quand nous fabriquons l'instance persistante - en appelant ""<literal>persist()</literal>, par exemple - Hibernate remplacera réellement ""le <literal>HashSet</literal> avec une instance d'une implémentation propre ""à Hibernate de <literal>Set</literal>. Prenez garde aux erreurs :"#. Tag: programlisting#: collection_mapping.xml:60#, no-c-formatmsgid """<![CDATA[Cat cat = new DomesticCat();\n""Cat kitten = new DomesticCat();\n""....\n""Set kittens = new HashSet();\n""kittens.add(kitten);\n""cat.setKittens(kittens);\n""session.persist(cat);\n""kittens = cat.getKittens(); // Okay, kittens collection is a Set\n""(HashSet) cat.getKittens(); // Error!]]>"msgstr ""#. Tag: para#: collection_mapping.xml:62#, no-c-formatmsgid """The persistent collections injected by Hibernate behave like ""<literal>HashMap</literal>, <literal>HashSet</literal>, <literal>TreeMap</""literal>, <literal>TreeSet</literal> or <literal>ArrayList</literal>, ""depending upon the interface type."msgstr """Les collections persistantes injectées par Hibernate se comportent de la ""même manière que <literal>HashMap</literal>, <literal>HashSet</literal>, ""<literal>TreeMap</literal>, <literal>TreeSet</literal> ou ""<literal>ArrayList</literal>, selon le type de l'interface."#. Tag: para#: collection_mapping.xml:69#, no-c-formatmsgid """Collections instances have the usual behavior of value types. They are ""automatically persisted when referenced by a persistent object and ""automatically deleted when unreferenced. If a collection is passed from one ""persistent object to another, its elements might be moved from one table to ""another. Two entities may not share a reference to the same collection ""instance. Due to the underlying relational model, collection-valued ""properties do not support null value semantics; Hibernate does not ""distinguish between a null collection reference and an empty collection."msgstr """Les instances des collections ont le comportement habituel des types des ""valeurs. Elles sont automatiquement persistées quand elles sont référencées ""par un objet persistant et automatiquement effacées quand elles sont ""déréférencées. Si une collection est passée d'un objet persistant à un ""autre, ses éléments pourraient être déplacés d'une table à une autre. Deux ""entités ne peuvent pas partager une référence vers une même instance d'une ""collection. Dû au modèle relationnel sous-jacent, les propriétés contenant ""des collections ne supportent pas la sémantique de la valeur null ; ""Hibernate ne distingue pas une référence vers une collection nulle d'une ""collection vide."#. Tag: para#: collection_mapping.xml:80#, no-c-formatmsgid """You shouldn't have to worry much about any of this. Use persistent ""collections the same way you use ordinary Java collections. Just make sure ""you understand the semantics of bidirectional associations (discussed later)."msgstr """Vous ne devriez pas vous préoccuper trop de ça. Utilisez les collections ""persistantes de la même manière que vous utilisez des collections Java ""ordinaires. Assurez-vous de comprendre la sémantique des associations ""bidirectionnelles (traitée plus loin)."#. Tag: title#: collection_mapping.xml:89#, no-c-formatmsgid "Collection mappings"msgstr "Mapper une collection"#. Tag: para#: collection_mapping.xml:92#, no-c-formatmsgid """There are quite a range of mappings that can be generated for collections, ""covering many common relational models. We suggest you experiment with the ""schema generation tool to get a feeling for how various mapping declarations ""translate to database tables."msgstr """Il y a pas mal de variétés de mappings qui peuvent être générés pour les ""collections, couvrant beaucoup des modèles relationnels communs. Nous vous ""suggérons d'expérimenter avec l'outil de génération de schéma pour avoir une ""idée de comment traduire les différentes déclarations de mapping vers des ""table de la base de données."#. Tag: para#: collection_mapping.xml:99#, no-c-formatmsgid """The Hibernate mapping element used for mapping a collection depends upon the ""type of the interface. For example, a <literal><set></literal> element ""is used for mapping properties of type <literal>Set</literal>."msgstr """L'élément de mapping d'Hibernate utilisé pour mapper une collection dépend ""du type de l'interface. Par exemple, un élément <literal><set></""literal> est utilisé pour mapper des propriétés de type <literal>Set</""literal>."#. Tag: programlisting#: collection_mapping.xml:105#, no-c-formatmsgid """<![CDATA[<class name=\"Product\">\n"" <id name=\"serialNumber\" column=\"productSerialNumber\"/>\n"" <set name=\"parts\">\n"" <key column=\"productSerialNumber\" not-null=\"true\"/>\n"" <one-to-many class=\"Part\"/>\n"" </set>\n""</class>]]>"msgstr ""#. Tag: para#: collection_mapping.xml:107#, no-c-formatmsgid """Apart from <literal><set></literal>, there is also <literal><""list></literal>, <literal><map></literal>, <literal><bag></""literal>, <literal><array></literal> and <literal><primitive-""array></literal> mapping elements. The <literal><map></literal> ""element is representative:"msgstr """À part <literal><set></literal>, il y aussi les éléments de mapping ""<literal><list></literal>, <literal><map></literal>, ""<literal><bag></literal>, <literal><array></literal> et ""<literal><primitive-array></literal>. L'élément <literal><map></""literal> est représentatif :"#. Tag: programlisting#: collection_mapping.xml:132#, no-c-formatmsgid """<![CDATA[<map\n"" name=\"propertyName\"\n"" table=\"table_name\"\n"" schema=\"schema_name\"\n"" lazy=\"true|extra|false\"\n"" inverse=\"true|false\"\n"" cascade=\"all|none|save-update|delete|all-delete-orphan|delete-orphan\"\n"" sort=\"unsorted|natural|comparatorClass\"\n"" order-by=\"column_name asc|desc\"\n"" where=\"arbitrary sql where condition\"\n"" fetch=\"join|select|subselect\"\n"" batch-size=\"N\"\n"" access=\"field|property|ClassName\"\n"" optimistic-lock=\"true|false\"\n"" mutable=\"true|false\"\n"" node=\"element-name|.\"\n"" embed-xml=\"true|false\"\n"">\n""\n"" <key .... />\n"" <map-key .... />\n"" <element .... />\n""</map>]]>"msgstr ""#. Tag: para#: collection_mapping.xml:135#, no-c-formatmsgid "<literal>name</literal> the collection property name"msgstr """<literal>name</literal> : le nom de la propriété contenant la collection"#. Tag: para#: collection_mapping.xml:140#, no-c-formatmsgid """<literal>table</literal> (optional - defaults to property name) the name of ""the collection table (not used for one-to-many associations)"msgstr """<literal>table</literal> (optionnel - par défaut = nom de la propriété) : le ""nom de la table de la collection (non utilisé pour les associations one-to-""many)"#. Tag: para#: collection_mapping.xml:146#, no-c-formatmsgid """<literal>schema</literal> (optional) the name of a table schema to override ""the schema declared on the root element"msgstr """<literal>schema</literal> (optionnel) : le nom du schéma pour surcharger le ""schéma déclaré dans l'élément racine"#. Tag: para#: collection_mapping.xml:152#, no-c-formatmsgid """<literal>lazy</literal> (optional - defaults to <literal>true</literal>) may ""be used to disable lazy fetching and specify that the association is always ""eagerly fetched, or to enable \"extra-lazy\" fetching where most operations ""do not initialize the collection (suitable for very large collections)"msgstr """<literal>lazy</literal> (optionnel - par défaut = <literal>true</literal>) : ""peut être utilisé pour désactiver l'initialisation tardive et spécifier que ""l'association est toujours rapportée, ou pour activer la récupération extra-""paresseuse (NdT : extra-lazy) où la plupart des opérations n'initialisent ""pas la collection (approprié pour de très grosses collections)"#. Tag: para#: collection_mapping.xml:161#, no-c-formatmsgid """<literal>inverse</literal> (optional - defaults to <literal>false</literal>) ""mark this collection as the \"inverse\" end of a bidirectional association"msgstr """<literal>inverse</literal> (optionnel - par défaut = <literal>false</""literal>) : définit cette collection comme l'extrêmité \"inverse\" de ""l'association bidirectionnelle"#. Tag: para#: collection_mapping.xml:167#, no-c-formatmsgid """<literal>cascade</literal> (optional - defaults to <literal>none</literal>) ""enable operations to cascade to child entities"msgstr """<literal>cascade</literal> (optionnel - par défaut = <literal>none</""literal>) : active les opérations de cascade vers les entités filles"#. Tag: para#: collection_mapping.xml:173#, no-c-formatmsgid """<literal>sort</literal> (optional) specify a sorted collection with ""<literal>natural</literal> sort order, or a given comparator class"msgstr """<literal>sort</literal> (optionnel) : spécifie une collection triée via un ""ordre de tri <literal>naturel</literal>, ou via une classe comparateur ""donnée (implémentant Comparator)"#. Tag: para#: collection_mapping.xml:179#, no-c-formatmsgid """<literal>order-by</literal> (optional, JDK1.4 only) specify a table column ""(or columns) that define the iteration order of the <literal>Map</literal>, ""<literal>Set</literal> or bag, together with an optional <literal>asc</""literal> or <literal>desc</literal>"msgstr """<literal>order-by</literal> (optionnel, seulement à partir du JDK1.4) : ""spécifie une colonne de table (ou des colonnes) qui définit l'ordre ""d'itération de <literal>Map</literal>, <literal>Set</literal> ou Bag, avec ""en option <literal>asc</literal> ou <literal>desc</literal>"#. Tag: para#: collection_mapping.xml:186#, no-c-formatmsgid """<literal>where</literal> (optional) specify an arbitrary SQL <literal>WHERE</""literal> condition to be used when retrieving or removing the collection ""(useful if the collection should contain only a subset of the available data)"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -