|
Hibernate example source code file (component_mapping.po)
This example Hibernate source code file (component_mapping.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.
The Hibernate component_mapping.po source code
# translation of component_mapping.po to French
# Myriam Malga <mmalga@redhat.com>, 2007.
# Xi HUANG <xhuang@redhat.com>, 2007.
# Corina Roe <croe@redhat.com>, 2009.
# translation of Collection_Mapping.po to
msgid ""
msgstr ""
"Project-Id-Version: component_mapping\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2010-02-11T05:38:15\n"
"PO-Revision-Date: 2009-11-11 08:51+1000\n"
"Last-Translator: Corina Roe <croe@redhat.com>\n"
"Language-Team: French <i18@redhat.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#, no-c-format
msgid "Component Mapping"
msgstr "Mappage de composants"
#. Tag: para
#, no-c-format
msgid ""
"The notion of a <emphasis>component is re-used in several "
"different contexts and purposes throughout Hibernate."
msgstr ""
"La notion de <emphasis>composants est réutilisée dans différents "
"contextes, avec différents objectifs, à travers Hibernate. "
#. Tag: title
#, no-c-format
msgid "Dependent objects"
msgstr "Objets dépendants"
#. Tag: para
#, no-c-format
msgid ""
"A component is a contained object that is persisted as a value type and not "
"an entity reference. The term \"component\" refers to the object-oriented "
"notion of composition and not to architecture-level components. For example, "
"you can model a person like this:"
msgstr ""
"Le composant est un objet inclus dans un autre objet, sauvegardé en tant que "
"type valeur, et non en tant que référence entité. Le terme \"composant\" "
"fait référence à la notion (au sens objet) de composition et non pas de "
"composant au sens d'architecture de composants. Par exemple, on pourrait "
"modéliser l'objet personne de la façon suivante :"
#. Tag: para
#, no-c-format
msgid ""
"Now <literal>Name can be persisted as a component of "
"<literal>Person. Name defines getter and setter "
"methods for its persistent properties, but it does not need to declare any "
"interfaces or identifier properties."
msgstr ""
"Maintenant <literal>Name pourra être sauvegardé en tant que "
"composant de <literal>Person. Remarquez que Name"
"literal> définit des méthodes getter et setter pour ses propriétés "
"persistantes, mais ne doit déclarer aucune interface ou propriété "
"d'identification."
#. Tag: para
#, no-c-format
msgid "Our Hibernate mapping would look like this:"
msgstr "Dans Hibernate le mappage du composant serait :"
#. Tag: para
#, no-c-format
msgid ""
"The person table would have the columns <literal>pid, "
"<literal>birthday, initial, first"
"literal> and <literal>last."
msgstr ""
"La table \"person\" aurait les colonnes <literal>pid, "
"<literal>birthday, initial, first"
"literal> et <literal>last."
#. Tag: para
#, no-c-format
msgid ""
"Like value types, components do not support shared references. In other "
"words, two persons could have the same name, but the two person objects "
"would contain two independent name objects that were only \"the same\" by "
"value. The null value semantics of a component are <emphasis>ad hoc"
"emphasis>. When reloading the containing object, Hibernate will assume that "
"if all component columns are null, then the entire component is null. This "
"is suitable for most purposes."
msgstr ""
"Comme tous les types valeurs, les composants ne supportent pas les "
"références partagées. En d'autres termes, deux instances de person peuvent "
"avoir un même nom, mais ces noms sont indépendants, ils peuvent être "
"identiques si on les compare par valeur mais ils représentent deux objets "
"distincts en mémoire. La sémantique de la valeur null d'un composant est "
"<emphasis>ad hoc. Quand il recharge l'objet qui contient le "
"composant, Hibernate suppose que si toutes les colonnes de composants sont "
"nulles, le composant est positionné à la valeur null. Ce choix programmatif "
"devrait être satisfaisant dans la plupart des cas. "
#. Tag: para
#, no-c-format
msgid ""
"The properties of a component can be of any Hibernate type (collections, "
"many-to-one associations, other components, etc). Nested components should "
"<emphasis>not be considered an exotic usage. Hibernate is "
"intended to support a fine-grained object model."
msgstr ""
"Les propriétés d'un composant peuvent être de tous les types habituellement "
"supportés par Hibernate (collections, associations plusieurs-à-un, autres "
"composants, etc). Les composants imbriqués ne doivent <emphasis>pas"
"emphasis> être vus comme quelque chose d'exotique. Hibernate a été conçu "
"pour supporter un modèle d'objet finement granulé. "
#. Tag: para
#, no-c-format
msgid ""
"The <literal><component> element allows a <"
"parent></literal> subelement that maps a property of the component class "
"as a reference back to the containing entity."
msgstr ""
"L'élément <literal><component> permet de déclarer un sous-"
"élément <literal><parent> qui associe une propriété de la "
"classe composant comme une référence arrière vers l'entité contenante."
#. Tag: title
#, no-c-format
msgid "Collections of dependent objects"
msgstr "Collection d'objets dépendants"
#. Tag: para
#, no-c-format
msgid ""
"Collections of components are supported (e.g. an array of type "
"<literal>Name). Declare your component collection by replacing the "
"<literal><element> tag with a <composite-"
"element></literal> tag:"
msgstr ""
"Les collections d'objets dépendants sont supportées (exemple: un tableau de "
"type <literal>Name). Déclarez votre collection de composants en "
"remplaçant la balise <literal><element> par la balise "
"<literal><composite-element> :"
#. Tag: para
#, no-c-format
msgid ""
"If you define a <literal>Set of composite elements, it is "
"important to implement <literal>equals() and hashCode()"
"literal> correctly."
msgstr ""
"Remarque : si vous définissez un <literal>Set d'éléments "
"composites, il est très important d'implémenter les méthodes <literal>equals"
"()</literal> et hashCode() correctement. "
#. Tag: para
#, no-c-format
msgid ""
"Composite elements can contain components but not collections. If your "
"composite element contains components, use the <literal><nested-composite-"
"element></literal> tag. This case is a collection of components which "
"themselves have components. You may want to consider if a one-to-many "
"association is more appropriate. Remodel the composite element as an entity, "
"but be aware that even though the Java model is the same, the relational "
"model and persistence semantics are still slightly different."
msgstr ""
"Les éléments composites peuvent aussi contenir des composants mais pas des "
"collections. Si votre élément composite contient aussi des composants, "
"utilisez la balise <literal><nested-composite-element>. Une "
"collection de composants qui contiennent eux-mêmes des composants est un cas "
"très exotique. A ce stade, demandez-vous si une association un-à-plusieurs "
"ne serait pas plus appropriée. Essayez de remodeler votre élément composite "
"comme une entité - remarquez que si le modèle Java est le même, toutefois le "
"modèle relationnel et la sémantique de persistance diffèrent quelque peu. "
#. Tag: para
#, no-c-format
msgid ""
"A composite element mapping does not support null-able properties if you are "
"using a <literal><set>. There is no separate primary key "
"column in the composite element table. Hibernate uses each column's value to "
"identify a record when deleting objects, which is not possible with null "
"values. You have to either use only not-null properties in a composite-"
"element or choose a <literal><list>, <map>"
"literal>, <literal><bag> or <idbag>."
msgstr ""
"Remarquez que le mappage d'éléments composites ne supporte pas la nullité "
"des propriétés lorsqu'on utilise un <literal><set>. "
"Hibernate lorsqu'il supprime un objet, utilise chaque colonne pour "
"identifier un objet (il n'y a pas de colonne distincte de clés primaires "
"dans la table d'éléments composites), ce qui n'est pas possible avec des "
"valeurs nulles. Vous devez donc choisir d'interdire la nullité des "
"propriétés d'un élément composite ou choisir un autre type de collection "
"comme : <literal><list>, <map>, "
"<literal><bag> ou <idbag>. "
#. Tag: para
#, no-c-format
msgid ""
"A special case of a composite element is a composite element with a nested "
"<literal><many-to-one> element. This mapping allows you to "
"map extra columns of a many-to-many association table to the composite "
"element class. The following is a many-to-many association from "
"<literal>Order to Item, where "
"<literal>purchaseDate, price and "
"<literal>quantity are properties of the association:"
msgstr ""
"Un cas particulier d'élément composite est un élément composite qui inclut "
"un élément imbriqué <literal><many-to-one>. Un mappage comme "
"celui-ci vous permet d'associer des colonnes supplémentaires d'une table "
"d'association plusieurs à plusieurs à la classe de l'élément composite. "
"L'exemple suivant est une association plusieurs à plusieurs de "
"<literal>Order à Item où purchaseDate"
"literal>, <literal>price et quantity sont des "
"propriétés de l'association :"
#. Tag: para
#, no-c-format
msgid ""
"There cannot be a reference to the purchase on the other side for "
"bidirectional association navigation. Components are value types and do not "
"allow shared references. A single <literal>Purchase can be in the "
"set of an <literal>Order, but it cannot be referenced by the "
"<literal>Item at the same time."
msgstr ""
"Par ailleurs, on ne peut évidemment pas faire référence à l'achat "
"(purchase), pour pouvoir naviguer de façon bidirectionnelle dans "
"l'association. N'oubliez pas que les composants sont de type valeurs et "
"n'autorisent pas les références partagées. Un <literal>Purchase "
"unique peut être dans le set d'un <literal>Order, mais ne peut pas "
"être référencé par <literal>Item simultanément."
#. Tag: para
#, no-c-format
msgid "Even ternary (or quaternary, etc) associations are possible:"
msgstr ""
"Même les associations ternaires, quaternaires ou autres sont possibles :"
#. Tag: para
#, no-c-format
msgid ""
"Composite elements can appear in queries using the same syntax as "
"associations to other entities."
msgstr ""
"Des éléments composites peuvent apparaître dans les requêtes en utilisant la "
"même syntaxe que les associations vers d'autres entités. "
#. Tag: title
#, no-c-format
msgid "Components as Map indices"
msgstr "Les composants en tant qu'indices de Map"
#. Tag: para
#, no-c-format
msgid ""
"The <literal><composite-map-key> element allows you to map a "
"component class as the key of a <literal>Map. Ensure that you "
"override <literal>hashCode() and equals() "
"correctly on the component class."
msgstr ""
"L'élément <literal><composite-map-key> vous permet de mapper "
"une classe de composant comme indice d'une <literal>Map. Assurez-"
"vous de surcharger correctement <literal>hashCode() et "
"<literal>equals() dans la classe du composant. "
#. Tag: title
#, no-c-format
msgid "Components as composite identifiers"
msgstr "Les composants en tant qu'identifiants composites"
#. Tag: para
#, no-c-format
msgid ""
"You can use a component as an identifier of an entity class. Your component "
"class must satisfy certain requirements:"
msgstr ""
"Vous pouvez utiliser un composant comme identifiant d'une classe entité. À "
"cet effet, votre classe de composant doit respecter certaines exigences : "
#. Tag: para
#, no-c-format
msgid "It must implement <literal>java.io.Serializable."
msgstr "Elle doit implémenter <literal>java.io.Serializable."
#. Tag: para
#, no-c-format
msgid ""
"It must re-implement <literal>equals() and hashCode()"
"literal> consistently with the database's notion of composite key equality."
msgstr ""
"Elle doit redéfinir <literal>equals() et hashCode()"
"literal>, de façon cohérente avec la notion d'égalité de clé composite de la "
"base de données. "
#. Tag: title
#, no-c-format
msgid "Note"
msgstr "Remarque"
#. Tag: para
#, no-c-format
msgid ""
"In Hibernate3, although the second requirement is not an absolutely hard "
"requirement of Hibernate, it is recommended."
msgstr ""
"Avec Hibernate3, la seconde exigence n'est plus absolument nécessaire, "
"néanmoins continuez de l'effectuer."
#. Tag: para
#, no-c-format
msgid ""
"You cannot use an <literal>IdentifierGenerator to generate "
"composite keys. Instead the application must assign its own identifiers."
msgstr ""
"Vous ne pouvez pas utiliser de <literal>IdentifierGenerator pour "
"générer des clés composites, par contre l'application doit assigner ses "
"propres identifiants. "
#. Tag: para
#, no-c-format
msgid ""
"Use the <literal><composite-id> tag, with nested "
"<literal><key-property> elements, in place of the usual "
"<literal><id> declaration. For example, the "
"<literal>OrderLine class has a primary key that depends upon the "
"(composite) primary key of <literal>Order."
msgstr ""
"Utiliser la balise <literal><composite-id> (avec les "
"éléments imbriqués <literal><key-property>) à la place de "
"l'habituel déclaration <literal><id>. Par exemple, la classe "
"<literal>OrderLine possède une clé primaire qui dépend de la clé "
"primaire (composite) de <literal>Order. "
#. Tag: para
#, no-c-format
msgid ""
"Any foreign keys referencing the <literal>OrderLine table are now "
"composite. Declare this in your mappings for other classes. An association "
"to <literal>OrderLine is mapped like this:"
msgstr ""
"Toutes les clés étrangères référençant la table <literal>OrderLine "
"sont également composites. Vous devez en tenir compte lorsque vous écrivez "
"vos mappage d'association pour les autres classes. Une association à "
"<literal>OrderLine sera mappée de la façon suivante : "
#. Tag: para
#, fuzzy, no-c-format
msgid ""
"The <literal>column element is an alternative to the "
"<literal>column attribute everywhere. Using the column"
"literal> element just gives more declaration options, which are mostly "
"useful when utilizing <literal>hbm2ddl"
msgstr ""
"Remarquez que la balise <literal><column> est une "
"alternative à l'attribut <literal>column que l'on utilise partout."
#. Tag: para
#, no-c-format
msgid ""
"A <literal>many-to-many association to OrderLine"
"literal> also uses the composite foreign key:"
msgstr ""
"Une association <literal>plusieurs-à-plusieurs à "
"<literal>OrderLine utilisera aussi une clé étrangère composite :"
#. Tag: para
#, no-c-format
msgid ""
"The collection of <literal>OrderLines in Order "
"would use:"
msgstr ""
"La collection des <literal>OrderLine s dans Order"
"literal> utilisera : "
#. Tag: para
#, no-c-format
msgid "The <literal><one-to-many> element declares no columns."
msgstr ""
"Comme d'habitude, l'élément <literal><one-to-many> ne "
"déclare pas de colonne."
#. Tag: para
#, no-c-format
msgid ""
"If <literal>OrderLine itself owns a collection, it also has a "
"composite foreign key."
msgstr ""
"Si <literal>OrderLine lui-même possède une collection, il "
"possédera de même une clé composite étrangère."
#. Tag: title
#, no-c-format
msgid "Dynamic components"
msgstr "Les composants dynamiques"
#. Tag: para
#, no-c-format
msgid "You can also map a property of type <literal>Map:"
msgstr ""
"Vous pouvez également mapper une propriété de type <literal>Map :"
#. Tag: para
#, no-c-format
msgid ""
"The semantics of a <literal><dynamic-component> mapping are "
"identical to <literal><component>. The advantage of this "
"kind of mapping is the ability to determine the actual properties of the "
"bean at deployment time just by editing the mapping document. Runtime "
"manipulation of the mapping document is also possible, using a DOM parser. "
"You can also access, and change, Hibernate's configuration-time metamodel "
"via the <literal>Configuration object."
msgstr ""
"La sémantique de l'association à un <literal><dynamic-component>"
"literal> est identique à celle que l'on utilise pour le <literal><"
"component></literal>. L'avantage de ce type de mappage est qu'il permet "
"de déterminer les véritables propriétés du bean au moment du déploiement, en "
"éditant simplement le document de mappage. La manipulation du document de "
"mappage pendant l'exécution de l'application est aussi possible en utilisant "
"un parser DOM. Il y a même mieux, vous pouvez accéder (et changer) le "
"métamodèle de configuration-temps de Hibernate en utilisant l'objet "
"<literal>Configuration."
#~ msgid ""
#~ "<![CDATA[public class Person {\n"
#~ " private java.util.Date birthday;\n"
#~ " private Name name;\n"
#~ " private String key;\n"
#~ " public String getKey() {\n"
#~ " return key;\n"
#~ " }\n"
#~ " private void setKey(String key) {\n"
#~ " this.key=key;\n"
#~ " }\n"
#~ " public java.util.Date getBirthday() {\n"
#~ " return birthday;\n"
#~ " }\n"
#~ " public void setBirthday(java.util.Date birthday) {\n"
#~ " this.birthday = birthday;\n"
#~ " }\n"
#~ " public Name getName() {\n"
#~ " return name;\n"
#~ " }\n"
#~ " public void setName(Name name) {\n"
#~ " this.name = name;\n"
#~ " }\n"
#~ " ......\n"
#~ " ......\n"
#~ "}]]>"
#~ msgstr ""
#~ "<![CDATA[public class Person {\n"
#~ " private java.util.Date birthday;\n"
#~ " private Name name;\n"
#~ " private String key;\n"
#~ " public String getKey() {\n"
#~ " return key;\n"
#~ " }\n"
#~ " private void setKey(String key) {\n"
#~ " this.key=key;\n"
#~ " }\n"
#~ " public java.util.Date getBirthday() {\n"
#~ " return birthday;\n"
#~ " }\n"
#~ " public void setBirthday(java.util.Date birthday) {\n"
#~ " this.birthday = birthday;\n"
#~ " }\n"
#~ " public Name getName() {\n"
#~ " return name;\n"
#~ " }\n"
#~ " public void setName(Name name) {\n"
#~ " this.name = name;\n"
#~ " }\n"
#~ " ......\n"
#~ " ......\n"
#~ "}]]>"
#~ msgid ""
#~ "<![CDATA[public class Name {\n"
#~ " char initial;\n"
#~ " String first;\n"
#~ " String last;\n"
#~ " public String getFirst() {\n"
#~ " return first;\n"
#~ " }\n"
#~ " void setFirst(String first) {\n"
#~ " this.first = first;\n"
#~ " }\n"
#~ " public String getLast() {\n"
#~ " return last;\n"
#~ " }\n"
#~ " void setLast(String last) {\n"
#~ " this.last = last;\n"
#~ " }\n"
#~ " public char getInitial() {\n"
#~ " return initial;\n"
#~ " }\n"
#~ " void setInitial(char initial) {\n"
#~ " this.initial = initial;\n"
#~ " }\n"
#~ "}]]>"
#~ msgstr ""
#~ "<![CDATA[public class Name {\n"
#~ " char initial;\n"
#~ " String first;\n"
#~ " String last;\n"
#~ " public String getFirst() {\n"
#~ " return first;\n"
#~ " }\n"
#~ " void setFirst(String first) {\n"
#~ " this.first = first;\n"
#~ " }\n"
#~ " public String getLast() {\n"
#~ " return last;\n"
#~ " }\n"
#~ " void setLast(String last) {\n"
#~ " this.last = last;\n"
#~ " }\n"
#~ " public char getInitial() {\n"
#~ " return initial;\n"
#~ " }\n"
#~ " void setInitial(char initial) {\n"
#~ " this.initial = initial;\n"
#~ " }\n"
#~ "}]]>"
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
#~ msgid ""
#~ "<![CDATA[\n"
#~ " <column name=\"lineId\"/>\n"
#~ " <column name=\"orderId\"/>\n"
#~ " <column name=\"customerId\"/>\n"
#~ " </key>\n"
#~ " <list-index column=\"attemptId\" base=\"1\"/>\n"
#~ " <composite-element class=\"DeliveryAttempt\">\n"
#~ " ...\n"
#~ " </composite-element>\n"
#~ " </set>\n"
#~ "</class>]]>"
#~ msgstr ""
#~ "<![CDATA[\n"
#~ " <column name=\"lineId\"/>\n"
#~ " <column name=\"orderId\"/>\n"
#~ " <column name=\"customerId\"/>\n"
#~ " </key>\n"
#~ " <list-index column=\"attemptId\" base=\"1\"/>\n"
#~ " <composite-element class=\"DeliveryAttempt\">\n"
#~ " ...\n"
#~ " </composite-element>\n"
#~ " </set>\n"
#~ "</class>]]>"
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["
Other Hibernate examples (source code examples)
Here is a short list of links related to this Hibernate component_mapping.po source code file:
|