3
"Project-Id-Version: PACKAGE VERSION\n"
4
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
5
"POT-Creation-Date: 2009-06-10 21:02+0000\n"
6
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
7
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
"Language-Team: LANGUAGE <LL@li.org>\n"
10
"Content-Type: text/plain; charset=UTF-8\n"
11
"Content-Transfer-Encoding: 8bit\n"
23
"XML Mapping is an experimental feature in Hibernate 3.0 and is currently "
24
"under active development."
26
"Notez que cette fonctionnalité est expérimentale dans Hibernate 3.0 et est "
27
"en développement extrêmement actif."
32
msgid "Working with XML data"
33
msgstr "Travailler avec des données XML"
39
"Hibernate allows you to work with persistent XML data in much the same way "
40
"you work with persistent POJOs. A parsed XML tree can be thought of as "
41
"another way of representing the relational data at the object level, instead "
44
"Hibernate vous laisse travailler avec des données XML persistantes de la "
45
"même manière que vous travaillez avec des POJOs persistants. Un arbre XML "
46
"peut être vu comme une autre manière de représenter les données "
47
"relationnelles au niveau objet, à la place des POJOs."
53
"Hibernate supports dom4j as API for manipulating XML trees. You can write "
54
"queries that retrieve dom4j trees from the database and have any "
55
"modification you make to the tree automatically synchronized to the "
56
"database. You can even take an XML document, parse it using dom4j, and write "
57
"it to the database with any of Hibernate's basic operations: <literal>persist"
58
"(), saveOrUpdate(), merge(), delete(), replicate()</literal> (merging is not "
61
"Hibernate supporte dom4j en tant qu'API pour la manipulation des arbres XML. "
62
"Vous pouvez écrire des requêtes qui récupèrent des arbres dom4j à partie de "
63
"la base de données, et avoir toutes les modifications que vous faites sur "
64
"l'arbre automatiquement synchronisées dans la base de données. Vous pouvez "
65
"même prendre un document XML, l'analyser en utilisant dom4j, et l'écrire "
66
"dans la base de données via les opérations basiques d'Hibernate : "
67
"<literal>persist(), saveOrUpdate(), merge(), delete(), replicate()</literal> "
68
"(merge() n'est pas encore supporté)."
74
"This feature has many applications including data import/export, "
75
"externalization of entity data via JMS or SOAP and XSLT-based reporting."
77
"Cette fonctionnalité a plusieurs applications dont l'import/export de "
78
"données, l'externalisation d'entités via JMS ou SOAP et les rapports XSLT."
84
"A single mapping can be used to simultaneously map properties of a class and "
85
"nodes of an XML document to the database, or, if there is no class to map, "
86
"it can be used to map just the XML."
88
"Un simple mapping peut être utilisé pour simultanément mapper les propriétés "
89
"d'une classe et les noeuds d'un document XML vers la base de données, ou, si "
90
"il n'y a pas de classe à mapper, il peut être utilisé juste pour mapper le "
96
msgid "Specifying XML and class mapping together"
97
msgstr "Spécifier le mapping XML et le mapping d'une classe ensemble"
102
msgid "Here is an example of mapping a POJO and XML simultaneously:"
103
msgstr "Voici un exemple de mapping d'un POJO et du XML simultanément :"
105
#. Tag: programlisting
109
"<![CDATA[<class name=\"Account\" \n"
110
" table=\"ACCOUNTS\" \n"
111
" node=\"account\">\n"
113
" <id name=\"accountId\" \n"
114
" column=\"ACCOUNT_ID\" \n"
117
" <many-to-one name=\"customer\" \n"
118
" column=\"CUSTOMER_ID\" \n"
119
" node=\"customer/@id\" \n"
120
" embed-xml=\"false\"/>\n"
122
" <property name=\"balance\" \n"
123
" column=\"BALANCE\" \n"
124
" node=\"balance\"/>\n"
134
msgid "Specifying only an XML mapping"
135
msgstr "Spécifier seulement un mapping XML"
140
msgid "Here is an example where there is no POJO class:"
141
msgstr "Voici un exemple dans lequel il n'y a pas de class POJO :"
143
#. Tag: programlisting
147
"<![CDATA[<class entity-name=\"Account\" \n"
148
" table=\"ACCOUNTS\" \n"
149
" node=\"account\">\n"
151
" <id name=\"id\" \n"
152
" column=\"ACCOUNT_ID\" \n"
154
" type=\"string\"/>\n"
156
" <many-to-one name=\"customerId\" \n"
157
" column=\"CUSTOMER_ID\" \n"
158
" node=\"customer/@id\" \n"
159
" embed-xml=\"false\" \n"
160
" entity-name=\"Customer\"/>\n"
162
" <property name=\"balance\" \n"
163
" column=\"BALANCE\" \n"
164
" node=\"balance\" \n"
165
" type=\"big_decimal\"/>\n"
174
#, fuzzy, no-c-format
176
"This mapping allows you to access the data as a dom4j tree, or as a graph of "
177
"property name/value pairs or java <literal>Map</literal>s. The property "
178
"names are purely logical constructs that can be referred to in HQL queries."
180
"Ce mapping vous permet d'accéder aux données comme un arbre dom4j, ou comme "
181
"un graphe de paire nom de propriété/valeur (<literal>Map</literal>s java). "
182
"Les noms des propriétés sont des constructions purement logiques qui peuvent "
183
"être référées des dans requêtes HQL."
188
msgid "XML mapping metadata"
189
msgstr "Métadonnées du mapping XML"
193
#, fuzzy, no-c-format
195
"A range of Hibernate mapping elements accept the <literal>node</literal> "
196
"attribute. This lets you specify the name of an XML attribute or element "
197
"that holds the property or entity data. The format of the <literal>node</"
198
"literal> attribute must be one of the following:"
200
"Plusieurs éléments du mapping Hibernate acceptent l'attribut <literal>node</"
201
"literal>. Ceci vous permet de spécifier le nom d'un attribut XML ou d'un "
202
"élément qui contient la propriété ou les données de l'entité. Le format de "
203
"l'attribut <literal>node</literal> doit être un des suivants :"
207
#, fuzzy, no-c-format
208
msgid "<literal>\"element-name\"</literal>: map to the named XML element"
209
msgstr "<literal>\"element-name\"</literal> - mappe vers l'élément XML nommé"
213
#, fuzzy, no-c-format
214
msgid "<literal>\"@attribute-name\"</literal>: map to the named XML attribute"
216
"<literal>\"@attribute-name\"</literal> - mappe vers l'attribut XML nommé"
220
#, fuzzy, no-c-format
221
msgid "<literal>\".\"</literal>: map to the parent element"
222
msgstr "<literal>\".\"</literal> - mappe vers le parent de l'élément"
226
#, fuzzy, no-c-format
228
"<literal>\"element-name/@attribute-name\"</literal>: map to the named "
229
"attribute of the named element"
231
"<literal>\"element-name/@attribute-name\"</literal> - mappe vers l'élément "
232
"nommé de l'attribut nommé"
236
#, fuzzy, no-c-format
238
"For collections and single valued associations, there is an additional "
239
"<literal>embed-xml</literal> attribute. If <literal>embed-xml=\"true\"</"
240
"literal>, the default, the XML tree for the associated entity (or collection "
241
"of value type) will be embedded directly in the XML tree for the entity that "
242
"owns the association. Otherwise, if <literal>embed-xml=\"false\"</literal>, "
243
"then only the referenced identifier value will appear in the XML for single "
244
"point associations and collections will not appear at all."
246
"Pour des collections et de simples associations valuées, il y a un attribut "
247
"<literal>embed-xml</literal> supplémentaire. Si <literal>embed-xml=\"true\"</"
248
"literal>, qui est la valeur par défaut, l'arbre XML pour l'entité associée "
249
"(ou la collection des types de valeurs) sera embarquée directement dans "
250
"l'arbre XML pour l'entité qui possède l'association. Sinon, si "
251
"<literal>embed-xml=\"false\"</literal>, alors seule la valeur de "
252
"l'identifiant référencé apparaîtra dans le XML pour de simples associations "
253
"de points, et les collections n'appraîtront simplement pas."
257
#, fuzzy, no-c-format
259
"Do not leave <literal>embed-xml=\"true\"</literal> for too many "
260
"associations, since XML does not deal well with circularity."
262
"Vous devriez faire attention à ne pas laisser <literal>embed-xml=\"true\"</"
263
"literal> pour trop d'associations, puisque XML ne traite pas bien les liens "
266
#. Tag: programlisting
270
"<![CDATA[<class name=\"Customer\" \n"
271
" table=\"CUSTOMER\" \n"
272
" node=\"customer\">\n"
274
" <id name=\"id\" \n"
275
" column=\"CUST_ID\" \n"
278
" <map name=\"accounts\" \n"
280
" embed-xml=\"true\">\n"
281
" <key column=\"CUSTOMER_ID\" \n"
282
" not-null=\"true\"/>\n"
283
" <map-key column=\"SHORT_DESC\" \n"
284
" node=\"@short-desc\" \n"
285
" type=\"string\"/>\n"
286
" <one-to-many entity-name=\"Account\"\n"
287
" embed-xml=\"false\" \n"
288
" node=\"account\"/>\n"
291
" <component name=\"name\" \n"
293
" <property name=\"firstName\" \n"
294
" node=\"first-name\"/>\n"
295
" <property name=\"initial\" \n"
296
" node=\"initial\"/>\n"
297
" <property name=\"lastName\" \n"
298
" node=\"last-name\"/>\n"
308
#, fuzzy, no-c-format
310
"In this case, the collection of account ids is embedded, but not the actual "
311
"account data. The following HQL query:"
313
"dans ce cas, nous avons décidé d'embarquer la collection d'identifiants de "
314
"compte, mais pas les données actuelles du compte. La requête HQL suivante :"
316
#. Tag: programlisting
320
"<![CDATA[from Customer c left join fetch c.accounts where c.lastName like :"
326
#, fuzzy, no-c-format
327
msgid "would return datasets such as this:"
328
msgstr "devrait retourner l'ensemble de données suivant :"
330
#. Tag: programlisting
334
"<![CDATA[<customer id=\"123456789\">\n"
335
" <account short-desc=\"Savings\">987632567</account>\n"
336
" <account short-desc=\"Credit Card\">985612323</account>\n"
338
" <first-name>Gavin</first-name>\n"
339
" <initial>A</initial>\n"
340
" <last-name>King</last-name>\n"
350
"If you set <literal>embed-xml=\"true\"</literal> on the <literal><one-to-"
351
"many></literal> mapping, the data might look more like this:"
353
"Si vous positionnez <literal>embed-xml=\"true\"</literal> sur le mapping "
354
"<literal><one-to-many></literal>, les données pourraient ressembler "
357
#. Tag: programlisting
361
"<![CDATA[<customer id=\"123456789\">\n"
362
" <account id=\"987632567\" short-desc=\"Savings\">\n"
363
" <customer id=\"123456789\"/>\n"
364
" <balance>100.29</balance>\n"
366
" <account id=\"985612323\" short-desc=\"Credit Card\">\n"
367
" <customer id=\"123456789\"/>\n"
368
" <balance>-2370.34</balance>\n"
371
" <first-name>Gavin</first-name>\n"
372
" <initial>A</initial>\n"
373
" <last-name>King</last-name>\n"
382
msgid "Manipulating XML data"
383
msgstr "Manipuler des données XML"
387
#, fuzzy, no-c-format
389
"You can also re-read and update XML documents in the application. You can do "
390
"this by obtaining a dom4j session:"
392
"Relisons et mettons à jour des documents XML dans l'application. Nous "
393
"faisons ça en obtenant une session dom4j :"
395
#. Tag: programlisting
399
"<![CDATA[Document doc = ....;\n"
401
"Session session = factory.openSession();\n"
402
"Session dom4jSession = session.getSession(EntityMode.DOM4J);\n"
403
"Transaction tx = session.beginTransaction();\n"
405
"List results = dom4jSession\n"
406
" .createQuery(\"from Customer c left join fetch c.accounts where c."
407
"lastName like :lastName\")\n"
409
"for ( int i=0; i<results.size(); i++ ) {\n"
410
" //add the customer data to the XML document\n"
411
" Element customer = (Element) results.get(i);\n"
412
" doc.add(customer);\n"
416
"session.close();]]>"
419
#. Tag: programlisting
423
"<![CDATA[Session session = factory.openSession();\n"
424
"Session dom4jSession = session.getSession(EntityMode.DOM4J);\n"
425
"Transaction tx = session.beginTransaction();\n"
427
"Element cust = (Element) dom4jSession.get(\"Customer\", customerId);\n"
428
"for ( int i=0; i<results.size(); i++ ) {\n"
429
" Element customer = (Element) results.get(i);\n"
430
" //change the customer name in the XML and database\n"
431
" Element name = customer.element(\"name\");\n"
432
" name.element(\"first-name\").setText(firstName);\n"
433
" name.element(\"initial\").setText(initial);\n"
434
" name.element(\"last-name\").setText(lastName);\n"
438
"session.close();]]>"
443
#, fuzzy, no-c-format
445
"When implementing XML-based data import/export, it is useful to combine this "
446
"feature with Hibernate's <literal>replicate()</literal> operation."
448
"Il est extrêmement utile de combiner cette fonctionnalité avec l'opération "
449
"<literal>replicate()</literal> d'Hibernate pour implémenter des imports/"
450
"exports de données XML."