📄 inheritance_mapping.po
字号:
#: inheritance_mapping.xml:194#, no-c-formatmsgid """The limitation of this approach is that if a property is mapped on the ""superclass, the column name must be the same on all subclass tables. (We ""might relax this in a future release of Hibernate.) The identity generator ""strategy is not allowed in union subclass inheritance, indeed the primary ""key seed has to be shared accross all unioned subclasses of a hierarchy."msgstr """La limitation de cette approche est que si une propriété est mappée sur la ""classe mère, le nom de la colonne doit être le même pour toutes les classes ""filles. (Nous pourrions être plus souple dans une future version ""d'Hibernate). La stratégie du générateur d'identifiant n'est pas permise ""dans l'héritage de classes filles par union, en effet la valeur (NdT : seed) ""de la clef primaire doit être partagée par toutes les classes filles \"union""\" d'une hiérarchie."#. Tag: para#: inheritance_mapping.xml:203#, no-c-formatmsgid """If your superclass is abstract, map it with <literal>abstract=\"true\"</""literal>. Of course, if it is not abstract, an additional table (defaults to ""<literal>PAYMENT</literal> in the example above) is needed to hold instances ""of the superclass."msgstr """Si votre classe mère est abstraite, mappez la avec <literal>abstract=\"true""\"</literal>. Bien sûr, si elle n'est pas abstraite, une table ""supplémentaire (par défaut, <literal>PAYMENT</literal> dans l'exemple ci-""dessus) est requise pour contenir des instances de la classe mère."#. Tag: title#: inheritance_mapping.xml:213#, no-c-formatmsgid "Table per concrete class, using implicit polymorphism"msgstr "Une table par classe concrète, en utilisant le polymorphisme implicite"#. Tag: para#: inheritance_mapping.xml:215#, no-c-formatmsgid "An alternative approach is to make use of implicit polymorphism:"msgstr "Une approche alternative est l'emploi du polymorphisme implicite :"#. Tag: programlisting#: inheritance_mapping.xml:219#, no-c-formatmsgid """<![CDATA[<class name=\"CreditCardPayment\" table=\"CREDIT_PAYMENT\">\n"" <id name=\"id\" type=\"long\" column=\"CREDIT_PAYMENT_ID\">\n"" <generator class=\"native\"/>\n"" </id>\n"" <property name=\"amount\" column=\"CREDIT_AMOUNT\"/>\n"" ...\n""</class>\n""\n""<class name=\"CashPayment\" table=\"CASH_PAYMENT\">\n"" <id name=\"id\" type=\"long\" column=\"CASH_PAYMENT_ID\">\n"" <generator class=\"native\"/>\n"" </id>\n"" <property name=\"amount\" column=\"CASH_AMOUNT\"/>\n"" ...\n""</class>\n""\n""<class name=\"ChequePayment\" table=\"CHEQUE_PAYMENT\">\n"" <id name=\"id\" type=\"long\" column=\"CHEQUE_PAYMENT_ID\">\n"" <generator class=\"native\"/>\n"" </id>\n"" <property name=\"amount\" column=\"CHEQUE_AMOUNT\"/>\n"" ...\n""</class>]]>"msgstr ""#. Tag: para#: inheritance_mapping.xml:221#, no-c-formatmsgid """Notice that nowhere do we mention the <literal>Payment</literal> interface ""explicitly. Also notice that properties of <literal>Payment</literal> are ""mapped in each of the subclasses. If you want to avoid duplication, consider ""using XML entities (e.g. <literal>[ <!ENTITY allproperties SYSTEM ""\"allproperties.xml\"> ]</literal> in the <literal>DOCTYPE</literal> ""declartion and <literal>&allproperties;</literal> in the mapping)."msgstr """Notez que nulle part nous ne mentionnons l'interface <literal>Payment</""literal> explicitement. Notez aussi que des propriétés de <literal>Payment</""literal> sont mappées dans chaque classe fille. Si vous voulez éviter des ""duplications, considérez l'utilisation des entités XML (cf. <literal>[ <!""ENTITY allproperties SYSTEM \"allproperties.xml\"> ]</literal> dans la ""déclaration du <literal>DOCTYPE</literal> et <literal>&allproperties;</""literal> dans le mapping)."#. Tag: para#: inheritance_mapping.xml:231#, no-c-formatmsgid """The disadvantage of this approach is that Hibernate does not generate SQL ""<literal>UNION</literal>s when performing polymorphic queries."msgstr """L'inconvénient de cette approche est qu'Hibernate ne génère pas ""d'<literal>UNION</literal>s SQL lors de l'exécution des requêtes ""polymorphiques."#. Tag: para#: inheritance_mapping.xml:236#, no-c-formatmsgid """For this mapping strategy, a polymorphic association to <literal>Payment</""literal> is usually mapped using <literal><any></literal>."msgstr """Pour cette stratégie de mapping, une association polymorphique pour ""<literal>Payment</literal> est habituellement mappée en utilisant ""<literal><any></literal>."#. Tag: programlisting#: inheritance_mapping.xml:241#, no-c-formatmsgid """<![CDATA[<any name=\"payment\" meta-type=\"string\" id-type=\"long\">\n"" <meta-value value=\"CREDIT\" class=\"CreditCardPayment\"/>\n"" <meta-value value=\"CASH\" class=\"CashPayment\"/>\n"" <meta-value value=\"CHEQUE\" class=\"ChequePayment\"/>\n"" <column name=\"PAYMENT_CLASS\"/>\n"" <column name=\"PAYMENT_ID\"/>\n""</any>]]>"msgstr ""#. Tag: title#: inheritance_mapping.xml:246#, no-c-formatmsgid "Mixing implicit polymorphism with other inheritance mappings"msgstr "Mélange du polymorphisme implicite avec d'autres mappings d'héritage"#. Tag: para#: inheritance_mapping.xml:248#, no-c-formatmsgid """There is one further thing to notice about this mapping. Since the ""subclasses are each mapped in their own <literal><class></literal> ""element (and since <literal>Payment</literal> is just an interface), each of ""the subclasses could easily be part of another inheritance hierarchy! (And ""you can still use polymorphic queries against the <literal>Payment</literal> ""interface.)"msgstr """Il y a une chose supplémentaire à noter à propos de ce mapping. Puisque les ""classes filles sont chacune mappées avec leur propre élément <literal><""class></literal> (et puisque <literal>Payment</literal> est juste une ""interface), chaque classe fille pourrait facilement faire partie d'une autre ""hiérarchie d'héritage ! (Et vous pouvez encore faire des requêtes ""polymorphiques pour l'interface <literal>Payment</literal>)."#. Tag: programlisting#: inheritance_mapping.xml:256#, no-c-formatmsgid """<![CDATA[<class name=\"CreditCardPayment\" table=\"CREDIT_PAYMENT\">\n"" <id name=\"id\" type=\"long\" column=\"CREDIT_PAYMENT_ID\">\n"" <generator class=\"native\"/>\n"" </id>\n"" <discriminator column=\"CREDIT_CARD\" type=\"string\"/>\n"" <property name=\"amount\" column=\"CREDIT_AMOUNT\"/>\n"" ...\n"" <subclass name=\"MasterCardPayment\" discriminator-value=\"MDC\"/>\n"" <subclass name=\"VisaPayment\" discriminator-value=\"VISA\"/>\n""</class>\n""\n""<class name=\"NonelectronicTransaction\" table=\"NONELECTRONIC_TXN\">\n"" <id name=\"id\" type=\"long\" column=\"TXN_ID\">\n"" <generator class=\"native\"/>\n"" </id>\n"" ...\n"" <joined-subclass name=\"CashPayment\" table=\"CASH_PAYMENT\">\n"" <key column=\"PAYMENT_ID\"/>\n"" <property name=\"amount\" column=\"CASH_AMOUNT\"/>\n"" ...\n"" </joined-subclass>\n"" <joined-subclass name=\"ChequePayment\" table=\"CHEQUE_PAYMENT\">\n"" <key column=\"PAYMENT_ID\"/>\n"" <property name=\"amount\" column=\"CHEQUE_AMOUNT\"/>\n"" ...\n"" </joined-subclass>\n""</class>]]>"msgstr ""#. Tag: para#: inheritance_mapping.xml:258#, no-c-formatmsgid """Once again, we don't mention <literal>Payment</literal> explicitly. If we ""execute a query against the <literal>Payment</literal> interface - for ""example, <literal>from Payment</literal> - Hibernate automatically returns ""instances of <literal>CreditCardPayment</literal> (and its subclasses, since ""they also implement <literal>Payment</literal>), <literal>CashPayment</""literal> and <literal>ChequePayment</literal> but not instances of ""<literal>NonelectronicTransaction</literal>."msgstr """Encore une fois, nous ne mentionnons pas explicitement <literal>Payment</""literal>. Si nous exécutons une requête sur l'interface <literal>Payment</""literal> - par exemple, <literal>from Payment</literal> - Hibernate ""retournera automatiquement les instances de <literal>CreditCardPayment</""literal> (et ses classes filles puisqu'elles implémentent aussi ""<literal>Payment</literal>), <literal>CashPayment</literal> et ""<literal>ChequePayment</literal> mais pas les instances de ""<literal>NonelectronicTransaction</literal>."#. Tag: title#: inheritance_mapping.xml:273#, no-c-formatmsgid "Limitations"msgstr "Limitations"#. Tag: para#: inheritance_mapping.xml:275#, no-c-formatmsgid """There are certain limitations to the \"implicit polymorphism\" approach to ""the table per concrete-class mapping strategy. There are somewhat less ""restrictive limitations to <literal><union-subclass></literal> ""mappings."msgstr """Il y a certaines limitations à l'approche du \"polymorphisme implicite\" ""pour la stratégie de mapping d'une table par classe concrète. Il y a plutôt ""moins de limitations restrictives aux mappings <literal><union-""subclass></literal>."#. Tag: para#: inheritance_mapping.xml:282#, no-c-formatmsgid """The following table shows the limitations of table per concrete-class ""mappings, and of implicit polymorphism, in Hibernate."msgstr """La table suivante montre les limitations des mappings d'une table par classe ""concrète, et du polymorphisme implicite, dans Hibernate."#. Tag: title#: inheritance_mapping.xml:288#, no-c-formatmsgid "Features of inheritance mappings"msgstr "Caractéristiques du mapping d'héritage"#. Tag: entry#: inheritance_mapping.xml:300#, no-c-formatmsgid "Inheritance strategy"msgstr "Stratégie d'héritage"#. Tag: entry#: inheritance_mapping.xml:301#, no-c-formatmsgid "Polymorphic many-to-one"msgstr "many-to-one polymorphique"#. Tag: entry#: inheritance_mapping.xml:302#, no-c-formatmsgid "Polymorphic one-to-one"msgstr "one-to-one polymorphique"#. Tag: entry#: inheritance_mapping.xml:303#, no-c-formatmsgid "Polymorphic one-to-many"msgstr "one-to-many polymorphique"#. Tag: entry#: inheritance_mapping.xml:304#, no-c-formatmsgid "Polymorphic many-to-many"msgstr "many-to-many polymorphique"#. Tag: entry#: inheritance_mapping.xml:305#, no-c-formatmsgid "Polymorphic <literal>load()/get()</literal>"msgstr ""#. Tag: entry#: inheritance_mapping.xml:306#, no-c-formatmsgid "Polymorphic queries"msgstr "Requêtes polymorphiques"#. Tag: entry#: inheritance_mapping.xml:307#, no-c-formatmsgid "Polymorphic joins"msgstr "Jointures polymorphiques"#. Tag: entry#: inheritance_mapping.xml:308#, no-c-formatmsgid "Outer join fetching"msgstr "Récupération par jointure externe"#. Tag: entry#: inheritance_mapping.xml:313#, no-c-formatmsgid "table per class-hierarchy"msgstr "une table par hiérarchie de classe"#. Tag: literal#: inheritance_mapping.xml:314 inheritance_mapping.xml:325#: inheritance_mapping.xml:336#, no-c-formatmsgid "<many-to-one>"msgstr "<many-to-one>"#. Tag: literal#: inheritance_mapping.xml:315 inheritance_mapping.xml:326#: inheritance_mapping.xml:337#, no-c-formatmsgid "<one-to-one>"msgstr "<one-to-one>"#. Tag: literal#: inheritance_mapping.xml:316 inheritance_mapping.xml:327#, no-c-formatmsgid "<one-to-many>"msgstr "<one-to-many>"#. Tag: literal#: inheritance_mapping.xml:317 inheritance_mapping.xml:328#: inheritance_mapping.xml:339#, no-c-formatmsgid "<many-to-many>"msgstr "<many-to-many>"#. Tag: literal#: inheritance_mapping.xml:318 inheritance_mapping.xml:329#: inheritance_mapping.xml:340#, no-c-formatmsgid "s.get(Payment.class, id)"msgstr "s.get(Payment.class, id)"#. Tag: literal#: inheritance_mapping.xml:319 inheritance_mapping.xml:330#: inheritance_mapping.xml:341 inheritance_mapping.xml:352#, no-c-formatmsgid "from Payment p"msgstr "from Payment p"#. Tag: literal#: inheritance_mapping.xml:320 inheritance_mapping.xml:331#: inheritance_mapping.xml:342#, no-c-formatmsgid "from Order o join o.payment p"msgstr "from Order o join o.payment p"#. Tag: emphasis#: inheritance_mapping.xml:321 inheritance_mapping.xml:332#: inheritance_mapping.xml:343#, no-c-formatmsgid "supported"msgstr "supportée"#. Tag: entry#: inheritance_mapping.xml:324#, fuzzy, no-c-formatmsgid "<entry>table per subclass</entry>"msgstr """#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n""une table par classe fille (table per subclass)\n""#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n""une table par classe fille"#. Tag: entry#: inheritance_mapping.xml:335#, no-c-formatmsgid "table per concrete-class (union-subclass)"msgstr "une table par classe concrète (union-subclass)"#. Tag: entry#: inheritance_mapping.xml:338#, no-c-formatmsgid """<literal><one-to-many></literal> (for <literal>inverse=\"true\"</""literal> only)"msgstr ""#. Tag: entry#: inheritance_mapping.xml:346#, no-c-formatmsgid "table per concrete class (implicit polymorphism)"msgstr "une table par classe concrète (polymorphisme implicite)"#. Tag: literal#: inheritance_mapping.xml:347#, no-c-formatmsgid "<any>"msgstr "<any>"#. Tag: emphasis#: inheritance_mapping.xml:348 inheritance_mapping.xml:349#: inheritance_mapping.xml:353 inheritance_mapping.xml:354#, fuzzy, no-c-formatmsgid "not supported"msgstr """#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n""non supporté\n""#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n""non supporté\n""#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n""non supportées\n""#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n""non supportée"#. Tag: literal#: inheritance_mapping.xml:350#, no-c-formatmsgid "<many-to-any>"msgstr "<many-to-any>"#. Tag: literal#: inheritance_mapping.xml:351#, no-c-formatmsgid """s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()"msgstr """s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()"#~ msgid "load()/get()"#~ msgstr "load()/get()"#~ msgid "Polymorphic <placeholder-1/>"#~ msgstr "<placeholder-1/> polymorphique"#~ msgid "inverse=\"true\""#~ msgstr "inverse=\"true\""#~ msgid "<placeholder-1/> (for <placeholder-2/> only)"#~ msgstr "<placeholder-1/> (pour <placeholder-2/> seulement)"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -