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

Hibernate example source code file (performance.po)

This example Hibernate source code file (performance.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

cache, cat, hibernate, hibernate, if, les, si, tag, tag, the, the, this, this, you

The Hibernate performance.po source code

# translation of performance.po to French
# Myriam Malga <mmalga@redhat.com>, 2007.
# Xi HUANG <xhuang@redhat.com>, 2007.
# Corina Roe <croe@redhat.com>, 2009, 2010.
# translation of Collection_Mapping.po to
msgid ""
msgstr ""
"Project-Id-Version: performance\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2010-07-20 21:02+0000\n"
"PO-Revision-Date: 2010-01-05 09:38+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
#: performance.xml:31
#, no-c-format
msgid "Improving performance"
msgstr "Améliorer les performances"

#. Tag: title
#: performance.xml:34
#, no-c-format
msgid "Fetching strategies"
msgstr "Stratégies de chargement"

#. Tag: para
#: performance.xml:36
#, no-c-format
msgid ""
"Hibernate uses a <emphasis>fetching strategy to retrieve "
"associated objects if the application needs to navigate the association. "
"Fetch strategies can be declared in the O/R mapping metadata, or over-ridden "
"by a particular HQL or <literal>Criteria query."
msgstr ""
"Une <emphasis>stratégie de chargement est une stratégie que "
"Hibernate va utiliser pour récupérer des objets associés si l'application a "
"besoin de naviguer à travers une association. Les stratégies de chargement "
"peuvent être déclarées dans les méta-données de l'outil de mappage objet "
"relationnel, ou surchargées par une requête de type HQL ou "
"<literal>Criteria particulière."

#. Tag: para
#: performance.xml:42
#, no-c-format
msgid "Hibernate3 defines the following fetching strategies:"
msgstr "Hibernate3 définit les stratégies de chargement suivantes :"

#. Tag: para
#: performance.xml:46
#, no-c-format
msgid ""
"<emphasis>Join fetching: Hibernate retrieves the associated "
"instance or collection in the same <literal>SELECT, using an "
"<literal>OUTER JOIN."
msgstr ""
"<emphasis>Chargement par jointure - Hibernate récupère l'instance "
"associée ou la collection dans un même <literal>SELECT, en "
"utilisant un <literal>OUTER JOIN. "

#. Tag: para
#: performance.xml:53
#, no-c-format
msgid ""
"<emphasis>Select fetching: a second SELECT is "
"used to retrieve the associated entity or collection. Unless you explicitly "
"disable lazy fetching by specifying <literal>lazy=\"false\", this "
"second select will only be executed when you access the association."
msgstr ""
"<emphasis>Chargement par select - Un second SELECT, ce second select ne "
"sera exécuté que lorsque vous accéderez réellement à l'association."

#. Tag: para
#: performance.xml:61
#, no-c-format
msgid ""
"<emphasis>Subselect fetching: a second SELECT "
"is used to retrieve the associated collections for all entities retrieved in "
"a previous query or fetch. Unless you explicitly disable lazy fetching by "
"specifying <literal>lazy=\"false\", this second select will only "
"be executed when you access the association."
msgstr ""
"<emphasis>Chargement par sous-select - Un second SELECT: an optimization strategy for select "
"fetching. Hibernate retrieves a batch of entity instances or collections in "
"a single <literal>SELECT by specifying a list of primary or "
"foreign keys."
msgstr ""
"<emphasis>Chargement par lot - Il s'agit d'une stratégie "
"d'optimisation pour le chargement par select - Hibernate récupère un lot "
"d'instances ou de collections en un seul <literal>SELECT en "
"spécifiant une liste de clés primaires ou de clés étrangères. "

#. Tag: para
#: performance.xml:77
#, no-c-format
msgid "Hibernate also distinguishes between:"
msgstr "Hibernate fait également la distinction entre :"

#. Tag: para
#: performance.xml:81
#, no-c-format
msgid ""
"<emphasis>Immediate fetching: an association, collection or "
"attribute is fetched immediately when the owner is loaded."
msgstr ""
"<emphasis>Chargement immédiat - Une association, une collection "
"ou un attribut est chargé immédiatement lorsque l'objet auquel appartient "
"cet élément est chargé. "

#. Tag: para
#: performance.xml:87
#, no-c-format
msgid ""
"<emphasis>Lazy collection fetching: a collection is fetched when "
"the application invokes an operation upon that collection. This is the "
"default for collections."
msgstr ""
"<emphasis>Chargement différé d'une collection - Une collection "
"est chargée lorsque l'application invoque une méthode sur cette collection "
"(il s'agit du mode de chargement par défaut pour les collections). "

#. Tag: para
#: performance.xml:93
#, no-c-format
msgid ""
"<emphasis>\"Extra-lazy\" collection fetching: individual elements "
"of the collection are accessed from the database as needed. Hibernate tries "
"not to fetch the whole collection into memory unless absolutely needed. It "
"is suitable for large collections."
msgstr ""
"<emphasis>Chargement \"super différé\" d'une collection - On "
"accède aux éléments de la collection depuis la base de données lorsque c'est "
"nécessaire. Hibernate essaie de ne pas charger toute la collection en "
"mémoire sauf si cela est absolument nécessaire (bien adapté aux très grandes "
"collections). "

#. Tag: para
#: performance.xml:101
#, no-c-format
msgid ""
"<emphasis>Proxy fetching: a single-valued association is fetched "
"when a method other than the identifier getter is invoked upon the "
"associated object."
msgstr ""
"<emphasis>Chargement par proxy - Une association vers un seul "
"objet est chargée lorsqu'une méthode autre que le getter sur l'identifiant "
"est appelée sur l'objet associé."

#. Tag: para
#: performance.xml:107
#, no-c-format
msgid ""
"<emphasis>\"No-proxy\" fetching: a single-valued association is "
"fetched when the instance variable is accessed. Compared to proxy fetching, "
"this approach is less lazy; the association is fetched even when only the "
"identifier is accessed. It is also more transparent, since no proxy is "
"visible to the application. This approach requires buildtime bytecode "
"instrumentation and is rarely necessary."
msgstr ""
"<emphasis>Chargement \"sans proxy\" - une association vers un "
"seul objet est chargée lorsque l'on accède à la variable d'instance. Par "
"rapport au chargement par proxy, cette approche est moins différée "
"(l'association est quand même chargée même si on n'accède qu'à "
"l'identifiant) mais plus transparente car il n'y a pas de proxy visible dans "
"l'application. Cette approche requiert une instrumentation du bytecode à la "
"compilation et est rarement nécessaire. "

#. Tag: para
#: performance.xml:117
#, no-c-format
msgid ""
"<emphasis>Lazy attribute fetching: an attribute or single valued "
"association is fetched when the instance variable is accessed. This approach "
"requires buildtime bytecode instrumentation and is rarely necessary."
msgstr ""
"<emphasis>Chargement différé des attributs - Un attribut ou un "
"objet associé seul est chargé lorsque l'on accède à la variable d'instance. "
"Cette approche requiert une instrumentation du bytecode à la compilation et "
"est rarement nécessaire. "

#. Tag: para
#: performance.xml:124
#, no-c-format
msgid ""
"We have two orthogonal notions here: <emphasis>when is the "
"association fetched and <emphasis>how is it fetched. It is "
"important that you do not confuse them. We use <literal>fetch to "
"tune performance. We can use <literal>lazy to define a contract "
"for what data is always available in any detached instance of a particular "
"class."
msgstr ""
"Nous avons ici deux notions orthogonales : <emphasis>quand "
"l'association est chargée et <emphasis>comment (quelle requête "
"SQL est utilisée). Il ne faut pas les confondre. Le mode de chargement "
"<literal>fetch est utilisé pour améliorer les performances. On "
"peut utiliser le mode <literal>lazy pour définir un contrat sur "
"quelles données sont toujours accessibles sur toute instance détachée d'une "
"classe particulière. "

#. Tag: title
#: performance.xml:132
#, no-c-format
msgid "Working with lazy associations"
msgstr "Travailler avec des associations chargées en différé"

#. Tag: para
#: performance.xml:134
#, no-c-format
msgid ""
"By default, Hibernate3 uses lazy select fetching for collections and lazy "
"proxy fetching for single-valued associations. These defaults make sense for "
"most associations in the majority of applications."
msgstr ""
"Par défaut, Hibernate3 utilise le chargement différé par select pour les "
"collections et le chargement différé par proxy pour les associations vers un "
"seul objet. Ces valeurs par défaut sont valables pour la plupart des "
"associations dans la plupart des applications. "

#. Tag: para
#: performance.xml:138
#, no-c-format
msgid ""
"If you set <literal>hibernate.default_batch_fetch_size, Hibernate "
"will use the batch fetch optimization for lazy fetching. This optimization "
"can also be enabled at a more granular level."
msgstr ""
"Si vous définissez <literal>hibernate.default_batch_fetch_size, "
"Hibernate va utiliser l'optimisation du chargement par lot pour le "
"chargement différé (cette optimisation peut aussi être activée à un niveau "
"de granularité plus fin). "

#. Tag: para
#: performance.xml:142
#, no-c-format
msgid ""
"Please be aware that access to a lazy association outside of the context of "
"an open Hibernate session will result in an exception. For example:"
msgstr ""
"L'accès à une association définie comme \"différé\", hors du contexte d'une "
"session Hibernate ouverte, entraîne une exception. Par exemple : "

#. Tag: programlisting
#: performance.xml:146
#, no-c-format
msgid ""
"s = sessions.openSession();\n"
"Transaction tx = s.beginTransaction();\n"
"            \n"
"User u = (User) s.createQuery(\"from User u where u.name=:userName\")\n"
"    .setString(\"userName\", userName).uniqueResult();\n"
"Map permissions = u.getPermissions();\n"
"\n"
"tx.commit();\n"
"s.close();\n"
"\n"
"Integer accessLevel = (Integer) permissions.get(\"accounts\");  // Error!"
msgstr ""

#. Tag: para
#: performance.xml:148
#, no-c-format
msgid ""
"Since the permissions collection was not initialized when the "
"<literal>Session was closed, the collection will not be able to "
"load its state. <emphasis>Hibernate does not support lazy initialization for "
"detached objects</emphasis>. This can be fixed by moving the code that reads "
"from the collection to just before the transaction is committed."
msgstr ""
"Étant donné que la collection des permissions n'a pas été initialisée avant "
"de fermer la <literal>Session, la collection n'est pas capable de "
"charger son état. <emphasis>Hibernate ne supporte pas le chargement différé "
"pour des objets détachés</emphasis>. La solution à ce problème est de "
"déplacer le code qui lit à partir de la collection avant le \"commit\" de la "
"transaction. "

#. Tag: para
#: performance.xml:155
#, no-c-format
msgid ""
"Alternatively, you can use a non-lazy collection or association, by "
"specifying <literal>lazy=\"false\" for the association mapping. "
"However, it is intended that lazy initialization be used for almost all "
"collections and associations. If you define too many non-lazy associations "
"in your object model, Hibernate will fetch the entire database into memory "
"in every transaction."
msgstr ""
"Une autre alternative est d'utiliser une collection ou une association non "
"\"différée\" en spécifiant <literal>lazy=\"false\" dans le mappage "
"de l'association. Cependant il est prévu que le chargement différé soit "
"utilisé pour quasiment toutes les collections ou associations. Si vous "
"définissez trop d'associations non \"différées\" dans votre modèle objet, "
"Hibernate va finir par devoir charger toute la base de données en mémoire à "
"chaque transaction."

#. Tag: para
#: performance.xml:162
#, no-c-format
msgid ""
"On the other hand, you can use join fetching, which is non-lazy by nature, "
"instead of select fetching in a particular transaction. We will now explain "
"how to customize the fetching strategy. In Hibernate3, the mechanisms for "
"choosing a fetch strategy are identical for single-valued associations and "
"collections."
msgstr ""
"Par ailleurs, on veut souvent choisir un chargement par jointure (qui est "
"par défaut non différé) à la place du chargement par select dans une "
"transaction particulière. Nous allons maintenant voir comment adapter les "
"stratégies de chargement. Dans Hibernate3 les mécanismes pour choisir une "
"stratégie de chargement sont identiques que l'on ait une association vers un "
"objet simple ou vers une collection. "

#. Tag: title
#: performance.xml:170
#, no-c-format
msgid "Tuning fetch strategies"
msgstr "Personnalisation des stratégies de chargement"

#. Tag: para
#: performance.xml:172
#, no-c-format
msgid ""
"Select fetching (the default) is extremely vulnerable to N+1 selects "
"problems, so we might want to enable join fetching in the mapping document:"
msgstr ""
"Le chargement par select (mode par défaut) est très vulnérable au problème "
"du N+1 selects, ainsi vous souhaiterez peut-être activer le chargement par "
"jointure dans les fichiers de mappage :"

#. Tag: programlisting
#: performance.xml:176
#, no-c-format
msgid ""
"<set name=\"permissions\"\n"
"            fetch=\"join\">\n"
"    <key column=\"userId\"/>\n"
"    <one-to-many class=\"Permission\"/>\n"
"</set"
msgstr ""

#. Tag: programlisting
#: performance.xml:178
#, no-c-format
msgid "<many-to-one name=\"mother\" class=\"Cat\" fetch=\"join\"/>"
msgstr ""

#. Tag: para
#: performance.xml:180
#, no-c-format
msgid ""
"The <literal>fetch strategy defined in the mapping document "
"affects:"
msgstr ""
"La stratégie de chargement définie à l'aide du mot <literal>fetch "
"dans les fichiers de mappage affecte :"

#. Tag: para
#: performance.xml:185
#, no-c-format
msgid "retrieval via <literal>get() or load()"
msgstr ""
"La récupération via <literal>get() ou load()"

#. Tag: para
#: performance.xml:190
#, no-c-format
msgid "retrieval that happens implicitly when an association is navigated"
msgstr ""
"La récupération implicite lorsque l'on navigue à travers une association"

#. Tag: para
#: performance.xml:195
#, no-c-format
msgid "<literal>Criteria queries"
msgstr "Les requêtes par <literal>Criteria"

#. Tag: para
#: performance.xml:199
#, no-c-format
msgid "HQL queries if <literal>subselect fetching is used"
msgstr ""
"Les requêtes HQL si l'on utilise le chargement par <literal>subselect in HQL. This tells Hibernate to "
"fetch the association eagerly in the first select, using an outer join. In "
"the <literal>Criteria query API, you would use "
"<literal>setFetchMode(FetchMode.JOIN)."
msgstr ""
"On n'utilise pas souvent les documents de mappage pour adapter le "
"chargement. En revanche, on conserve le comportement par défaut et on le "
"surcharge pour une transaction particulière en utilisant <literal>left join "
"fetch</literal> dans les requêtes HQL. Cela indique à Hibernate de charger "
"l'association de manière agressive lors du premier select en utilisant une "
"jointure externe. Dans la requête API <literal>Criteria vous "
"utiliserez la méthode <literal>setFetchMode(FetchMode.JOIN)."

#. Tag: para
#: performance.xml:216
#, no-c-format
msgid ""
"If you want to change the fetching strategy used by <literal>get() "
"or <literal>load(), you can use a Criteria "
"query. For example:"
msgstr ""
"S'il vous arrive de vouloir changer la stratégie de chargement utilisée par "
"utilisée par <literal>get() ou load(), vous "
"pouvez juste utiliser une requête de type <literal>Criteria comme "
"par exemple : "

#. Tag: programlisting
#: performance.xml:220
#, no-c-format
msgid ""
"User user = (User) session.createCriteria(User.class)\n"
"                .setFetchMode(\"permissions\", FetchMode.JOIN)\n"
"                .add( Restrictions.idEq(userId) )\n"
"                .uniqueResult();"
msgstr ""

#. Tag: para
#: performance.xml:222
#, no-c-format
msgid ""
"This is Hibernate's equivalent of what some ORM solutions call a \"fetch plan"
"\"."
msgstr ""
"Il s'agit de l'équivalent pour Hibernate de ce que d'autres outils de "
"mappage appellent un \"fetch plan\" ou \"plan de chargement\"."

#. Tag: para
#: performance.xml:225
#, no-c-format
msgid ""
"A completely different approach to problems with N+1 selects is to use the "
"second-level cache."
msgstr ""
"Une autre manière complètement différente d'éviter le problème des N+1 "
"selects est d'utiliser le cache de second niveau. "

#. Tag: title
#: performance.xml:230
#, no-c-format
msgid "Single-ended association proxies"
msgstr "Proxies pour des associations vers un seul objet "

#. Tag: para
#: performance.xml:232
#, no-c-format
msgid ""
"Lazy fetching for collections is implemented using Hibernate's own "
"implementation of persistent collections. However, a different mechanism is "
"needed for lazy behavior in single-ended associations. The target entity of "
"the association must be proxied. Hibernate implements lazy initializing "
"proxies for persistent objects using runtime bytecode enhancement which is "
"accessed via the CGLIB library."
msgstr ""
"Le chargement différé des collections est implémenté par Hibernate qui "
"utilise ses propres implémentations pour des collections persistantes. Si "
"l'on veut un chargement différé pour des associations vers un seul objet, il "
"faut utiliser un autre mécanisme. L'entité qui est pointée par l'association "
"doit être masquée derrière un proxy. Hibernate implémente l'initialisation "
"différée des proxies sur des objets persistants via une mise à jour à chaud "
"du bytecode (à l'aide de l'excellente librairie CGLIB)."

#. Tag: para
#: performance.xml:239
#, no-c-format
msgid ""
"At startup, Hibernate3 generates proxies by default for all persistent "
"classes and uses them to enable lazy fetching of <literal>many-to-oneone-to-one associations."
msgstr ""
"Par défaut, Hibernate génère des proxies (au démarrage) pour toutes les "
"classes persistantes et les utilise pour activer le chargement différé des "
"associations <literal>many-to-one et one-to-one."

#. Tag: para
#: performance.xml:244
#, no-c-format
msgid ""
"The mapping file may declare an interface to use as the proxy interface for "
"that class, with the <literal>proxy attribute. By default, "
"Hibernate uses a subclass of the class. <emphasis>The proxied class must "
"implement a default constructor with at least package visibility. This "
"constructor is recommended for all persistent classes</emphasis>."
msgstr ""
"Le fichier de mappage peut déclarer une interface à utiliser comme interface "
"de proxy pour cette classe à l'aide de l'attribut <literal>proxy. "
"Par défaut Hibernate utilise une sous-classe de la classe persistante. "
"<emphasis>Il faut que les classes pour lesquelles on ajoute un proxy "
"implémentent un constructeur par défaut avec au minimum une visibilité de "
"paquetage. Ce constructeur est recommandé pour toutes les classes "
"persistantes !</emphasis>."

#. Tag: para
#: performance.xml:251
#, no-c-format
msgid ""
"There are potential problems to note when extending this approach to "
"polymorphic classes.For example:"
msgstr ""
"Il y a quelques précautions à prendre lorsque l'on étend cette approche à "
"des classes polymorphiques, par exemple : "

#. Tag: programlisting
#: performance.xml:254
#, no-c-format
msgid ""
"<class name=\"Cat\" proxy=\"Cat\">\n"
"    ......\n"
"    <subclass name=\"DomesticCat\">\n"
"        .....\n"
"    </subclass>\n"
"</class>"
msgstr ""

#. Tag: para
#: performance.xml:256
#, no-c-format
msgid ""
"Firstly, instances of <literal>Cat will never be castable to "
"<literal>DomesticCat, even if the underlying instance is an "
"instance of <literal>DomesticCat:"
msgstr ""
"Tout d'abord, les instances de <literal>Cat ne pourront jamais "
"être \"castées\" en <literal>DomesticCat, même si l'instance sous-"
"jacente est une instance de <literal>DomesticCat :"

#. Tag: programlisting
#: performance.xml:260
#, no-c-format
msgid ""
"Cat cat = (Cat) session.load(Cat.class, id);  // instantiate a proxy (does "
"not hit the db)\n"
"if ( cat.isDomesticCat() ) {                  // hit the db to initialize "
"the proxy\n"
"    DomesticCat dc = (DomesticCat) cat;       // Error!\n"
"    ....\n"
"}"
msgstr ""

#. Tag: para
#: performance.xml:262
#, no-c-format
msgid "Secondly, it is possible to break proxy <literal>==:"
msgstr ""
"Deuxièmement, il est possible de casser la notion de <literal>== "
"des proxies. "

#. Tag: programlisting
#: performance.xml:265
#, no-c-format
msgid ""
"Cat cat = (Cat) session.load(Cat.class, id);            // instantiate a Cat "
"proxy\n"
"DomesticCat dc = \n"
"        (DomesticCat) session.load(DomesticCat.class, id);  // acquire new "
"DomesticCat proxy!\n"
"System.out.println(cat==dc);                            // false"
msgstr ""

#. Tag: para
#: performance.xml:267
#, no-c-format
msgid ""
"However, the situation is not quite as bad as it looks. Even though we now "
"have two references to different proxy objects, the underlying instance will "
"still be the same object:"
msgstr ""
"Cette situation n'est pas si mauvaise qu'il n'y parait. Même si nous avons "
"deux références à deux objets proxies différents, l'instance sous-jacente "
"sera quand même le même objet :"

#. Tag: programlisting
#: performance.xml:271
#, no-c-format
msgid ""
"cat.setWeight(11.0);  // hit the db to initialize the proxy\n"
"System.out.println( dc.getWeight() );  // 11.0"
msgstr ""

#. Tag: para
#: performance.xml:273
#, no-c-format
msgid ""
"Third, you cannot use a CGLIB proxy for a <literal>final class or "
"a class with any <literal>final methods."
msgstr ""
"Troisièmement, vous ne pourrez pas utiliser un proxy CGLIB pour une classe "
"<literal>final ou pour une classe contenant la moindre méthode "
"<literal>final. "

#. Tag: para
#: performance.xml:276
#, no-c-format
msgid ""
"Finally, if your persistent object acquires any resources upon instantiation "
"(e.g. in initializers or default constructor), then those resources will "
"also be acquired by the proxy. The proxy class is an actual subclass of the "
"persistent class."
msgstr ""
"Enfin, si votre objet persistant obtient une quelconque ressource à "
"l'instanciation (par exemple dans les initialiseurs ou dans le constructeur "
"par défaut), alors ces ressources seront aussi obtenues par le proxy. La "
"classe proxy est en réalité une sous-classe de la classe persistante. "

#. Tag: para
#: performance.xml:281
#, no-c-format
msgid ""
"These problems are all due to fundamental limitations in Java's single "
"inheritance model. To avoid these problems your persistent classes must each "
"implement an interface that declares its business methods. You should "
"specify these interfaces in the mapping file where <literal>CatImplCat and "
"<literal>DomesticCatImpl implements the interface "
"<literal>DomesticCat. For example:"
msgstr ""
"Ces problèmes sont tous dus aux limitations fondamentales du modèle "
"d'héritage unique de Java. Si vous souhaitez éviter ces problèmes, vos "
"classes persistantes doivent chacune implémenter une interface qui déclare "
"ses méthodes métier. Vous devriez alors spécifier ces interfaces dans le "
"fichier de mappage : <literal>CatImpl implémente l'interface "
"<literal>Cat et DomesticCatImpl implémente "
"l'interface <literal>DomesticCat. Par exemple :"

#. Tag: programlisting
#: performance.xml:289
#, no-c-format
msgid ""
"<class name=\"CatImpl\" proxy=\"Cat\">\n"
"    ......\n"
"    <subclass name=\"DomesticCatImpl\" proxy=\"DomesticCat\">\n"
"        .....\n"
"    </subclass>\n"
"</class>"
msgstr ""

#. Tag: para
#: performance.xml:291
#, no-c-format
msgid ""
"Then proxies for instances of <literal>Cat and "
"<literal>DomesticCat can be returned by load() "
"or <literal>iterate()."
msgstr ""
"Tout d'abord, les instances de <literal>Cat et de "
"<literal>DomesticCat peuvent être retournées par load()iterate()."

#. Tag: programlisting
#: performance.xml:295
#, no-c-format
msgid ""
"Cat cat = (Cat) session.load(CatImpl.class, catid);\n"
"Iterator iter = session.createQuery(\"from CatImpl as cat where cat."
"name='fritz'\").iterate();\n"
"Cat fritz = (Cat) iter.next();"
msgstr ""

#. Tag: title
#: performance.xml:298
#, no-c-format
msgid "Note"
msgstr "Remarque"

#. Tag: para
#: performance.xml:300
#, no-c-format
msgid "<literal>list() does not usually return proxies."
msgstr "<literal>list() ne retourne pas les proxies normalement."

#. Tag: para
#: performance.xml:304
#, no-c-format
msgid ""
"Relationships are also lazily initialized. This means you must declare any "
"properties to be of type <literal>Cat, not CatImpl, "
"et non <literal>CatImpl."

#. Tag: para
#: performance.xml:308
#, no-c-format
msgid ""
"Certain operations do <emphasis>not require proxy initialization:"
msgstr ""
"Certaines opérations ne nécessitent <emphasis>pas "
"l'initialisation du proxy :"

#. Tag: para
#: performance.xml:313
#, no-c-format
msgid ""
"<literal>equals(): if the persistent class does not override "
"<literal>equals()"
msgstr ""
"<literal>equals(), si la classe persistante ne surcharge pas "
"<literal>equals() "

#. Tag: para
#: performance.xml:318
#, no-c-format
msgid ""
"<literal>hashCode(): if the persistent class does not override "
"<literal>hashCode()"
msgstr ""
"<literal>hashCode(), si la classe persistante ne surcharge pas "
"<literal>hashCode() "

#. Tag: para
#: performance.xml:323
#, no-c-format
msgid "The identifier getter method"
msgstr "La méthode getter de l'identifiant "

#. Tag: para
#: performance.xml:327
#, no-c-format
msgid ""
"Hibernate will detect persistent classes that override <literal>equals()hashCode()."
msgstr ""
"Hibernate détectera les classes qui surchargent <literal>equals() "
"ou <literal>hashCode()."

#. Tag: para
#: performance.xml:330
#, no-c-format
msgid ""
"By choosing <literal>lazy=\"no-proxy\" instead of the default "
"<literal>lazy=\"proxy\", you can avoid problems associated with "
"typecasting. However, buildtime bytecode instrumentation is required, and "
"all operations will result in immediate proxy initialization."
msgstr ""
"Eh choisissant <literal>lazy=\"no-proxy\" au lieu de lazy="
"\"proxy\"</literal> qui est la valeur par défaut, il est possible d'éviter "
"les problèmes liés au transtypage. Il faudra alors une instrumentation du "
"bytecode à la compilation et toutes les opérations résulteront immédiatement "
"en une initialisation du proxy. "

#. Tag: title
#: performance.xml:338
#, no-c-format
msgid "Initializing collections and proxies"
msgstr "Initialisation des collections et des proxies"

#. Tag: para
#: performance.xml:340
#, no-c-format
msgid ""
"A <literal>LazyInitializationException will be thrown by Hibernate "
"if an uninitialized collection or proxy is accessed outside of the scope of "
"the <literal>Session, i.e., when the entity owning the collection "
"or having the reference to the proxy is in the detached state."
msgstr ""
"Une exception de type <literal>LazyInitializationException sera "
"renvoyée par Hibernate si une collection ou un proxy non initialisé est "
"accédé en dehors de la portée de la <literal>Session, par ex. "
"lorsque l'entité à laquelle appartient la collection ou qui a une référence "
"vers le proxy, est dans l'état \"détaché\". "

#. Tag: para
#: performance.xml:346
#, no-c-format
msgid ""
"Sometimes a proxy or collection needs to be initialized before closing the "
"<literal>Session. You can force initialization by calling "
"<literal>cat.getSex() or cat.getKittens().size(). Bien sûr, nous "
"pouvons toujours forcer l'initialisation en appelant par exemple "
"<literal>cat.getSex() ou cat.getKittens().size() and "
"<literal>Hibernate.isInitialized(), provide the application with a "
"convenient way of working with lazily initialized collections or proxies. "
"<literal>Hibernate.initialize(cat) will force the initialization "
"of a proxy, <literal>cat, as long as its SessionHibernate.initialize( cat.getKittens() ) et "
"<literal>Hibernate.isInitialized() fournissent à l'application un "
"moyen de travailler avec des proxies ou des collections initialisés. "
"<literal>Hibernate.initialize(cat) forcera l'initialisation d'un "
"proxy de <literal>cat, si tant est que sa SessionHibernate.initialize( cat.getKittens() ) open until all "
"required collections and proxies have been loaded. In some application "
"architectures, particularly where the code that accesses data using "
"Hibernate, and the code that uses it are in different application layers or "
"different physical processes, it can be a problem to ensure that the "
"<literal>Session is open when a collection is initialized. There "
"are two basic ways to deal with this issue:"
msgstr ""
"Une autre option est de conserver la <literal>Session ouverte "
"jusqu'à ce que toutes les collections et tous les proxies nécessaires aient "
"été chargés. Dans certaines architectures applicatives, particulièrement "
"celles ou le code d'accès aux données via Hiberante et le code qui utilise "
"ces données sont dans des couches applicatives différentes ou des processus "
"physiques différents, il sera alors difficile de garantir que la "
"<literal>Session est ouverte lorsqu'une collection est "
"initialisée. Il y a deux moyens de maîtriser ce problème : "

#. Tag: para
#: performance.xml:372
#, no-c-format
msgid ""
"In a web-based application, a servlet filter can be used to close the "
"<literal>Session only at the end of a user request, once the "
"rendering of the view is complete (the <emphasis>Open Session in View is closed and the transaction "
"ended before returning to the user, even when an exception occurs during "
"rendering of the view. See the Hibernate Wiki for examples of this \"Open "
"Session in View\" pattern."
msgstr ""
"Dans une application web, un filtre de servlet peut être utilisé pour fermer "
"la <literal>Session uniquement lorsque la requête a été "
"entièrement traitée, lorsque le rendu de la vue est fini (il s'agit du "
"modèle <emphasis>Vue de la session ouverte). Bien sûr, cela "
"demande plus d'attention à la bonne gestion des exceptions de l'application. "
"Il est d'une importance vitale que la <literal>Session soit fermée "
"et la transaction terminée avant que l'on rende la main à l'utilisateur même "
"si une exception survient durant le traitement de la vue. Voir le wiki "
"Hibernate pour des exemples sur le modèle \"Open Session in View\". "

#. Tag: para
#: performance.xml:385
#, no-c-format
msgid ""
"In an application with a separate business tier, the business logic must "
"\"prepare\" all collections that the web tier needs before returning. This "
"means that the business tier should load all the data and return all the "
"data already initialized to the presentation/web tier that is required for a "
"particular use case. Usually, the application calls <literal>Hibernate."
"initialize()</literal> for each collection that will be needed in the web "
"tier (this call must occur before the session is closed) or retrieves the "
"collection eagerly using a Hibernate query with a <literal>FETCH "
"clause or a <literal>FetchMode.JOIN in CriteriaCommandSession Facade."
msgstr ""
"Dans une application avec une couche métier multiniveaux séparée, la couche "
"contenant la logique métier doit \"préparer\" toutes les collections qui "
"seront nécessaires à la couche web multiniveaux avant de retourner les "
"données. Cela signifie que la couche métier doit charger toutes les données "
"et retourner toutes les données déjà initialisées à la couche de "
"présentation/web pour un cas d'utilisation donné. En général l'application "
"appelle la méthode <literal>Hibernate.initialize() pour chaque "
"collection nécessaire dans la couche web (cet appel doit être fait avant la "
"fermeture de la session) ou bien récupère les collections de manière "
"agressive à l'aide d'une requête HQL avec une clause <literal>FETCHFetchMode.JOIN pour une "
"requête de type <literal>Criteria. Cela est en général plus facile "
"si vous utilisez le modèle <emphasis>Command plutôt que "
"<emphasis>Session Facade. "

#. Tag: para
#: performance.xml:401
#, no-c-format
msgid ""
"You can also attach a previously loaded object to a new <literal>Sessionmerge() or lock() before "
"accessing uninitialized collections or other proxies. Hibernate does not, "
"and certainly <emphasis>should not, do this automatically since "
"it would introduce impromptu transaction semantics."
msgstr ""
"Vous pouvez également attacher à une <literal>Session un objet "
"chargé au préalable à l'aide des méthodes <literal>merge() ou "
"<literal>lock() avant d'accéder aux collections (ou aux proxies) "
"non initialisés. Non, Hibernate ne fait pas, et ne doit pas faire cela "
"automatiquement car cela pourrait introduire une sémantique transactionnelle "
"ad hoc. "

#. Tag: para
#: performance.xml:410
#, no-c-format
msgid ""
"Sometimes you do not want to initialize a large collection, but still need "
"some information about it, like its size, for example, or a subset of the "
"data."
msgstr ""
"Parfois, vous ne voulez pas initialiser une grande collection mais vous avez "
"quand même besoin d'informations sur elle (comme sa taille) ou un sous-"
"ensemble de ses données."

#. Tag: para
#: performance.xml:414
#, no-c-format
msgid ""
"You can use a collection filter to get the size of a collection without "
"initializing it:"
msgstr ""
"Vous pouvez utiliser un filtre de collection pour récupérer sa taille sans "
"l'initialiser :"

#. Tag: programlisting
#: performance.xml:417
#, no-c-format
msgid ""
"( (Integer) s.createFilter( collection, \"select count(*)\" ).list().get"
"(0) ).intValue()"
msgstr ""

#. Tag: para
#: performance.xml:419
#, no-c-format
msgid ""
"The <literal>createFilter() method is also used to efficiently "
"retrieve subsets of a collection without needing to initialize the whole "
"collection:"
msgstr ""
"La méthode <literal>createFilter() est également utilisée pour "
"récupérer efficacement des sous-ensembles d'une collection sans avoir besoin "
"de l'initialiser dans son ensemble :"

#. Tag: programlisting
#: performance.xml:423
#, no-c-format
msgid ""
"s.createFilter( lazyCollection, \"\").setFirstResult(0).setMaxResults(10)."
"list();"
msgstr ""

#. Tag: title
#: performance.xml:427
#, no-c-format
msgid "Using batch fetching"
msgstr "Utiliser le chargement par lot"

#. Tag: para
#: performance.xml:429
#, no-c-format
msgid ""
"Using batch fetching, Hibernate can load several uninitialized proxies if "
"one proxy is accessed. Batch fetching is an optimization of the lazy select "
"fetching strategy. There are two ways you can configure batch fetching: on "
"the class level and the collection level."
msgstr ""
"Pour améliorer les performances, Hibernate peut utiliser le chargement par "
"lot ce qui veut dire que Hibernate peut charger plusieurs proxies (ou "
"collections) non initialisés en une seule requête lorsque l'on accède à l'un "
"de ces proxies. Le chargement par lot est une optimisation intimement liée à "
"la stratégie de chargement en différé par select. Il y a deux moyens "
"d'activer le chargement par lot : au niveau de la classe et au niveau de la "
"collection."

#. Tag: para
#: performance.xml:434
#, no-c-format
msgid ""
"Batch fetching for classes/entities is easier to understand. Consider the "
"following example: at runtime you have 25 <literal>Cat instances "
"loaded in a <literal>Session, and each Cat has "
"a reference to its <literal>owner, a Person. "
"The <literal>Person class is mapped with a proxy, lazy="
"\"true\"</literal>. If you now iterate through all cats and call "
"<literal>getOwner() on each, Hibernate will, by default, execute "
"25 <literal>SELECT statements to retrieve the proxied owners. You "
"can tune this behavior by specifying a <literal>batch-size in the "
"mapping of <literal>Person:"
msgstr ""
"Le chargement par lot pour les classes/entités est plus simple à comprendre. "
"Imaginez que vous ayez la situation suivante à l'exécution : vous avez 25 "
"instances de <literal>Cat chargées dans une SessionCat a une référence à son "
"<literal>owner, une Person. La classe "
"<literal>Person est mappée avec un proxy, lazy=\"true\"getOwner(), pour charger les owners (initialiser le proxy). "
"Vous pouvez paramétrer ce comportement en spécifiant une <literal>batch-"
"size</literal> (taille du lot) dans le mappage de Person has a lazy collection of Cats, "
"and 10 persons are currently loaded in the <literal>Session, "
"iterating through all persons will generate 10 <literal>SELECTs, "
"one for every call to <literal>getCats(). If you enable batch "
"fetching for the <literal>cats collection in the mapping of "
"<literal>Person, Hibernate can pre-fetch collections:"
msgstr ""
"Vous pouvez aussi activer le chargement par lot pour les collections. Par "
"exemple, si chaque <literal>Person a une collection chargée en "
"différé des <literal>Cats, et que 10 personnes sont actuellement "
"chargées dans la <literal>Session, itérer sur toutes les persons "
"générera 10 <literal>SELECT s, un pour chaque appel de "
"<literal>getCats(). Si vous activez le chargement par lot pour la "
"collection <literal>cats dans le mappage de Person of 3, Hibernate will load 3, 3, 3, 1 "
"collections in four <literal>SELECTs. Again, the value of the "
"attribute depends on the expected number of uninitialized collections in a "
"particular <literal>Session."
msgstr ""
"Avec une taille de lot <literal>batch-size de 8, Hibernate "
"chargera respectivement des collections 3, 3, 3, et 1 en quatre "
"<literal>SELECT s. Encore une fois, la valeur de l'attribut dépend "
"du nombre de collections non initialisées dans une <literal>Session or a materialized path "
"might be a better option for read-mostly trees."
msgstr ""
"Le chargement par lot de collections est particulièrement utile si vous avez "
"une arborescence imbriquée d'éléments, c'est-à-dire le le schéma facture de "
"matériels typique. (Bien qu'un <emphasis>sous ensemble ou un "
"<emphasis>chemin matérialisé soit probablement une meilleure "
"option pour des arbres principalement en lecture.) "

#. Tag: title
#: performance.xml:475
#, no-c-format
msgid "Using subselect fetching"
msgstr "Utilisation du chargement par sous select"

#. Tag: para
#: performance.xml:477
#, no-c-format
msgid ""
"If one lazy collection or single-valued proxy has to be fetched, Hibernate "
"will load all of them, re-running the original query in a subselect. This "
"works in the same way as batch-fetching but without the piecemeal loading."
msgstr ""
"Si une collection en différé ou un proxy vers un objet doit être chargée, "
"Hibernate va tous les charger en ré-exécutant la requête originale dans un "
"sous select. Cela fonctionne de la même manière que le chargement par lot "
"sans la possibilité de fragmenter le chargement."

#. Tag: title
#: performance.xml:486
#, fuzzy, no-c-format
msgid "Fetch profiles"
msgstr "Stratégies de chargement"

#. Tag: para
#: performance.xml:488
#, no-c-format
msgid ""
"Another way to affect the fetching strategy for loading associated objects "
"is through something called a fetch profile, which is a named configuration "
"associated with the <interfacename>org.hibernate.SessionFactoryorg.hibernate."
"Session</interfacename>. Once enabled on a org.hibernate."
"Session</interfacename>, the fetch profile will be in affect for that "
"<interfacename>org.hibernate.Session until it is explicitly "
"disabled."
msgstr ""

#. Tag: para
#: performance.xml:498
#, no-c-format
msgid ""
"So what does that mean? Well lets explain that by way of an example which "
"show the different available approaches to configure a fetch profile:"
msgstr ""

#. Tag: title
#: performance.xml:503
#, no-c-format
msgid "Specifying a fetch profile using <classname>@FetchProfile"
msgstr ""

#. Tag: programlisting
#: performance.xml:506
#, no-c-format
msgid ""
"@Entity\n"
"@FetchProfile(name = \"customer-with-orders\", fetchOverrides = {\n"
"   @FetchProfile.FetchOverride(entity = Customer.class, association = "
"\"orders\", mode = FetchMode.JOIN)\n"
"})\n"
"public class Customer {\n"
"   @Id\n"
"   @GeneratedValue\n"
"   private long id;\n"
"\n"
"   private String name;\n"
"\n"
"   private long customerNumber;\n"
"\n"
"   @OneToMany\n"
"   private Set<Order> orders;\n"
"\n"
"   // standard getter/setter\n"
"   ...\n"
"}"
msgstr ""

#. Tag: title
#: performance.xml:510
#, no-c-format
msgid ""
"Specifying a fetch profile using <literal><fetch-profile> "
"outside <literal><class> node"
msgstr ""

#. Tag: programlisting
#: performance.xml:514
#, no-c-format
msgid ""
"<hibernate-mapping>\n"
"    <class name=\"Customer\">\n"
"        ...\n"
"        <set name=\"orders\" inverse=\"true\">\n"
"            <key column=\"cust_id\"/>\n"
"            <one-to-many class=\"Order\"/>\n"
"        </set>\n"
"    </class>\n"
"    <class name=\"Order\">\n"
"        ...\n"
"    </class>\n"
"    <fetch-profile name=\"customer-with-orders\">\n"
"        <fetch entity=\"Customer\" association=\"orders\" style=\"join\"/"
">\n"
"    </fetch-profile>\n"
"</hibernate-mapping>"
msgstr ""

#. Tag: title
#: performance.xml:518
#, no-c-format
msgid ""
"Specifying a fetch profile using <literal><fetch-profile> "
"inside <literal><class> node"
msgstr ""

#. Tag: programlisting
#: performance.xml:522
#, no-c-format
msgid ""
"<hibernate-mapping>\n"
"    <class name=\"Customer\">\n"
"        ...\n"
"        <set name=\"orders\" inverse=\"true\">\n"
"            <key column=\"cust_id\"/>\n"
"            <one-to-many class=\"Order\"/>\n"
"        </set>\n"
"        <fetch-profile name=\"customer-with-orders\">\n"
"            <fetch association=\"orders\" style=\"join\"/>\n"
"        </fetch-profile>\n"
"    </class>\n"
"    <class name=\"Order\">\n"
"        ...\n"
"    </class>\n"
"</hibernate-mapping>"
msgstr ""

#. Tag: para
#: performance.xml:525
#, no-c-format
msgid ""
"Now normally when you get a reference to a particular customer, that "
"customer's set of orders will be lazy meaning we will not yet have loaded "
"those orders from the database. Normally this is a good thing. Now lets say "
"that you have a certain use case where it is more efficient to load the "
"customer and their orders together. One way certainly is to use \"dynamic "
"fetching\" strategies via an HQL or criteria queries. But another option is "
"to use a fetch profile to achieve that. The following code will load both "
"the customer <emphasis>andtheir orders:"
msgstr ""

#. Tag: title
#: performance.xml:536
#, no-c-format
msgid "Activating a fetch profile for a given <classname>Session"
msgstr ""

#. Tag: programlisting
#: performance.xml:539
#, no-c-format
msgid ""
"Session session = ...;\n"
"session.enableFetchProfile( \"customer-with-orders\" );  // name matches "
"from mapping\n"
"Customer customer = (Customer) session.get( Customer.class, customerId );"
msgstr ""

#. Tag: para
#: performance.xml:543
#, no-c-format
msgid ""
"<classname>@FetchProfile definitions are global and it does not "
"matter on which class you place them. You can place the "
"<classname>@FetchProfile annotation either onto a class or "
"package (package-info.java). In order to define multiple fetch profiles for "
"the same class or package <classname>@FetchProfiles can be used."
msgstr ""

#. Tag: para
#: performance.xml:551
#, no-c-format
msgid ""
"Currently only join style fetch profiles are supported, but they plan is to "
"support additional styles. See <ulink url=\"http://opensource.atlassian.com/"
"projects/hibernate/browse/HHH-3414\">HHH-3414</ulink> for details."
msgstr ""

#. Tag: title
#: performance.xml:558
#, no-c-format
msgid "Using lazy property fetching"
msgstr "Utiliser le chargement en différé des propriétés"

#. Tag: para
#: performance.xml:560
#, no-c-format
msgid ""
"Hibernate3 supports the lazy fetching of individual properties. This "
"optimization technique is also known as <emphasis>fetch groups. "
"Please note that this is mostly a marketing feature; optimizing row reads is "
"much more important than optimization of column reads. However, only loading "
"some properties of a class could be useful in extreme cases. For example, "
"when legacy tables have hundreds of columns and the data model cannot be "
"improved."
msgstr ""
"Hibernate3 supporte le chargement en différé de propriétés individuelles. La "
"technique d'optimisation est également connue sous le nom de <emphasis>fetch "
"groups</emphasis> (groupes de chargement). Il faut noter qu'il s'agit "
"principalement d'une fonctionnalité marketing car en pratique l'optimisation "
"de la lecture d'un enregistrement est beaucoup plus importante que "
"l'optimisation de la lecture d'une colonne. Cependant, la restriction du "
"chargement à certaines colonnes peut être pratique dans des cas extrêmes, "
"lorsque des tables \"legacy\" possèdent des centaines de colonnes et que le "
"modèle de données ne peut pas être amélioré."

#. Tag: para
#: performance.xml:568
#, no-c-format
msgid ""
"To enable lazy property loading, set the <literal>lazy attribute "
"on your particular property mappings:"
msgstr ""
"Pour activer le chargement en différé d'une propriété, il faut mettre "
"l'attribut <literal>lazy sur une propriété particulière du "
"mappage :"

#. Tag: programlisting
#: performance.xml:571
#, no-c-format
msgid ""
"<class name=\"Document\">\n"
"       <id name=\"id\">\n"
"        <generator class=\"native\"/>\n"
"    </id>\n"
"    <property name=\"name\" not-null=\"true\" length=\"50\"/>\n"
"    <property name=\"summary\" not-null=\"true\" length=\"200\" lazy="
"\"true\"/>\n"
"    <property name=\"text\" not-null=\"true\" length=\"2000\" lazy=\"true"
"\"/>\n"
"</class>"
msgstr ""

#. Tag: para
#: performance.xml:573
#, no-c-format
msgid ""
"Lazy property loading requires buildtime bytecode instrumentation. If your "
"persistent classes are not enhanced, Hibernate will ignore lazy property "
"settings and return to immediate fetching."
msgstr ""
"Le chargement en différé des propriétés requiert une instrumentation du "
"bytecode lors de la compilation ! Si les classes persistantes ne sont pas "
"instrumentées, Hibernate ignorera de manière silencieuse le mode en différé "
"et retombera dans le mode de chargement immédiat. "

#. Tag: para
#: performance.xml:577
#, no-c-format
msgid "For bytecode instrumentation, use the following Ant task:"
msgstr ""
"Pour l'instrumentation du bytecode vous pouvez utiliser la tâche Ant "
"suivante :"

#. Tag: programlisting
#: performance.xml:579
#, no-c-format
msgid ""
"<target name=\"instrument\" depends=\"compile\">\n"
"    <taskdef name=\"instrument\" classname=\"org.hibernate.tool."
"instrument.InstrumentTask\">\n"
"        <classpath path=\"${jar.path}\"/>\n"
"        <classpath path=\"${classes.dir}\"/>\n"
"        <classpath refid=\"lib.class.path\"/>\n"
"    </taskdef>\n"
"\n"
"    <instrument verbose=\"true\">\n"
"        <fileset dir=\"${testclasses.dir}/org/hibernate/auction/model"
"\">\n"
"            <include name=\"*.class\"/>\n"
"        </fileset>\n"
"    </instrument>\n"
"</target>"
msgstr ""

#. Tag: para
#: performance.xml:581
#, no-c-format
msgid ""
"A different way of avoiding unnecessary column reads, at least for read-only "
"transactions, is to use the projection features of HQL or Criteria queries. "
"This avoids the need for buildtime bytecode processing and is certainly a "
"preferred solution."
msgstr ""
"Une autre façon (meilleure ?) pour éviter de lire plus de colonnes que "
"nécessaire au moins pour des transactions en lecture seule est d'utiliser "
"les fonctionnalités de projection des requêtes HQL ou Criteria. Cela évite "
"de devoir instrumenter le bytecode à la compilation et est certainement une "
"solution préférable. "

#. Tag: para
#: performance.xml:586
#, no-c-format
msgid ""
"You can force the usual eager fetching of properties using <literal>fetch "
"all properties</literal> in HQL."
msgstr ""
"Vous pouvez forcer le mode de chargement agressif des propriétés en "
"utilisant <literal>fetch all properties dans les requêtes HQL. "

#. Tag: title
#: performance.xml:592
#, no-c-format
msgid "The Second Level Cache"
msgstr "Le cache de second niveau"

#. Tag: para
#: performance.xml:594
#, no-c-format
msgid ""
"A Hibernate <literal>Session is a transaction-level cache of "
"persistent data. It is possible to configure a cluster or JVM-level "
"(<literal>SessionFactory-level) cache on a class-by-class and "
"collection-by-collection basis. You can even plug in a clustered cache. Be "
"aware that caches are not aware of changes made to the persistent store by "
"another application. They can, however, be configured to regularly expire "
"cached data."
msgstr ""
"Une <literal>Session Hibernate est un cache de niveau "
"transactionnel de données persistantes. Il est possible de configurer un "
"cache de cluster ou de JVM (de niveau <literal>SessionFactory) "
"défini classe par classe et collection par collection. Vous pouvez même "
"utiliser votre choix de cache en implémentant le fournisseur associé. Faites "
"attention, les caches ne sont jamais avertis des modifications faites dans "
"la base de données par d'autres applications (ils peuvent cependant être "
"configurés pour régulièrement expirer les données en cache). "

#. Tag: para
#: performance.xml:602
#, fuzzy, no-c-format
msgid ""
"You have the option to tell Hibernate which caching implementation to use by "
"specifying the name of a class that implements <literal>org.hibernate.cache."
"CacheProvider</literal> using the property hibernate.cache."
"provider_class</literal>. Hibernate is bundled with a number of built-in "
"integrations with the open-source cache providers that are listed in <xref "
"linkend=\"cacheproviders\"/>. You can also implement your own and plug it in "
"as outlined above. Note that versions prior to Hibernate 3.2 use EhCache as "
"the default cache provider."
msgstr ""
"Vous pouvez choisir une autre implémentation en spécifiant le nom de la "
"classe qui implémente <literal>org.hibernate.cache.CacheProvider "
"en utilisant la propriété <literal>hibernate.cache.provider_class. "
"Hibernate est accompagné de plusieurs intégrations imbriquées avec des "
"fournisseurs de cache open-source (listés ci-dessous) ; par ailleurs vous "
"pouvez implémenter votre propre fournisseur et le brancher comme indiqué ci-"
"dessus. Notez que les versions antérieures à 3.2, utilisaient par défaut le "
"EhCache comme le fournisseur de cache par défaut, ce qui n'est plus le cas. "

#. Tag: title
#: performance.xml:613
#, no-c-format
msgid "Cache Providers"
msgstr "Fournisseurs de cache"

#. Tag: entry
#: performance.xml:628 performance.xml:976
#, no-c-format
msgid "Cache"
msgstr "Cache"

#. Tag: entry
#: performance.xml:630
#, no-c-format
msgid "Provider class"
msgstr "Classe pourvoyeuse"

#. Tag: entry
#: performance.xml:632
#, no-c-format
msgid "Type"
msgstr "Type"

#. Tag: entry
#: performance.xml:634
#, no-c-format
msgid "Cluster Safe"
msgstr "Cluster sécurisé"

#. Tag: entry
#: performance.xml:636
#, no-c-format
msgid "Query Cache Supported"
msgstr "Cache de requêtes supporté"

#. Tag: entry
#: performance.xml:642 performance.xml:990
#, no-c-format
msgid "Hashtable (not intended for production use)"
msgstr "Table de hachage (ne pas utiliser en production)"

#. Tag: literal
#: performance.xml:644
#, fuzzy, no-c-format
msgid "org.hibernate.cache.HashtableCacheProvider"
msgstr "<literal>org.hibernate.cache.HashtableCacheProvider"

#. Tag: entry
#: performance.xml:646
#, no-c-format
msgid "memory"
msgstr "mémoire"

#. Tag: entry
#: performance.xml:650 performance.xml:662 performance.xml:674
#: performance.xml:992 performance.xml:994 performance.xml:996
#: performance.xml:1004 performance.xml:1006 performance.xml:1008
#: performance.xml:1016 performance.xml:1018 performance.xml:1020
#: performance.xml:1028 performance.xml:1030 performance.xml:1040
#: performance.xml:1046 performance.xml:1052 performance.xml:1058
#, no-c-format
msgid "<entry>yes"
msgstr ""

#. Tag: entry
#: performance.xml:654 performance.xml:1002
#, no-c-format
msgid "EHCache"
msgstr "EHCache"

#. Tag: literal
#: performance.xml:656
#, fuzzy, no-c-format
msgid "org.hibernate.cache.EhCacheProvider"
msgstr "<literal>org.hibernate.cache.EhCacheProvider"

#. Tag: entry
#: performance.xml:658 performance.xml:670
#, no-c-format
msgid "memory, disk"
msgstr "mémoire, disque"

#. Tag: entry
#: performance.xml:666 performance.xml:1014
#, no-c-format
msgid "OSCache"
msgstr "OSCache"

#. Tag: literal
#: performance.xml:668
#, fuzzy, no-c-format
msgid "org.hibernate.cache.OSCacheProvider"
msgstr "<literal>org.hibernate.cache.OSCacheProvider"

#. Tag: entry
#: performance.xml:678 performance.xml:1026
#, no-c-format
msgid "SwarmCache"
msgstr "SwarmCache"

#. Tag: literal
#: performance.xml:680
#, fuzzy, no-c-format
msgid "org.hibernate.cache.SwarmCacheProvider"
msgstr "<literal>org.hibernate.cache.SwarmCacheProvider"

#. Tag: entry
#: performance.xml:682
#, no-c-format
msgid "clustered (ip multicast)"
msgstr "en cluster (multicast ip)"

#. Tag: entry
#: performance.xml:684
#, no-c-format
msgid "yes (clustered invalidation)"
msgstr "oui (invalidation de cluster)"

#. Tag: entry
#: performance.xml:690 performance.xml:1038
#, no-c-format
msgid "JBoss Cache 1.x"
msgstr "JBoss Cache 1.x"

#. Tag: literal
#: performance.xml:692
#, fuzzy, no-c-format
msgid "org.hibernate.cache.TreeCacheProvider"
msgstr "    org.hibernate.cache.TreeCacheProvider"

#. Tag: entry
#: performance.xml:694 performance.xml:706
#, no-c-format
msgid "clustered (ip multicast), transactional"
msgstr "en cluster (multicast ip), transactionnel"

#. Tag: entry
#: performance.xml:696
#, no-c-format
msgid "yes (replication)"
msgstr "oui (réplication)"

#. Tag: entry
#: performance.xml:698 performance.xml:710
#, no-c-format
msgid "yes (clock sync req.)"
msgstr "oui (horloge sync. nécessaire)"

#. Tag: entry
#: performance.xml:702 performance.xml:1050
#, no-c-format
msgid "JBoss Cache 2"
msgstr "JBoss Cache 2"

#. Tag: literal
#: performance.xml:704
#, fuzzy, no-c-format
msgid "org.hibernate.cache.jbc.JBossCacheRegionFactory"
msgstr "<literal>org.hibernate.cache.jbc2.JBossCacheRegionFactory"

#. Tag: entry
#: performance.xml:708
#, no-c-format
msgid "yes (replication or invalidation)"
msgstr "oui (replication ou invalidation)"

#. Tag: title
#: performance.xml:717
#, no-c-format
msgid "Cache mappings"
msgstr "Mappages de Cache"

#. Tag: para
#: performance.xml:719
#, no-c-format
msgid ""
"As we have done in previous chapters we are looking at the two different "
"possibiltites to configure caching. First configuration via annotations and "
"then via Hibernate mapping files."
msgstr ""

#. Tag: para
#: performance.xml:723
#, no-c-format
msgid ""
"By default, entities are not part of the second level cache and we recommend "
"you to stick to this setting. However, you can override this by setting the "
"<literal>shared-cache-mode element in your persistence."
"xml</filename> file or by using the javax.persistence.sharedCache."
"mode </literal>property in your configuration. The following values are "
"possible:"
msgstr ""

#. Tag: para
#: performance.xml:732
#, no-c-format
msgid ""
"<literal>ENABLE_SELECTIVE (Default and recommended value): "
"entities are not cached unless explicitly marked as cacheable."
msgstr ""

#. Tag: para
#: performance.xml:738
#, no-c-format
msgid ""
"<literal>DISABLE_SELECTIVE: entities are cached unless explicitly "
"marked as not cacheable."
msgstr ""

#. Tag: para
#: performance.xml:743
#, no-c-format
msgid ""
"<literal>ALL: all entities are always cached even if marked as non "
"cacheable."
msgstr ""

#. Tag: para
#: performance.xml:748
#, no-c-format
msgid ""
"<literal>NONE: no entity are cached even if marked as cacheable. "
"This option can make sense to disable second-level cache altogether."
msgstr ""

#. Tag: para
#: performance.xml:754
#, no-c-format
msgid ""
"The cache concurrency strategy used by default can be set globaly via the "
"<literal>hibernate.cache.default_cache_concurrency_strategy "
"configuration property. The values for this property are:"
msgstr ""

#. Tag: literal
#: performance.xml:761
#, fuzzy, no-c-format
msgid "<literal>read-only"
msgstr "Les requêtes par <literal>Criteria"

#. Tag: literal
#: performance.xml:765
#, fuzzy, no-c-format
msgid "<literal>read-write"
msgstr "Les requêtes par <literal>Criteria"

#. Tag: literal
#: performance.xml:769
#, fuzzy, no-c-format
msgid "<literal>nonstrict-read-write"
msgstr "nonstrict-read-write (lecture-écriture non stricte)"

#. Tag: literal
#: performance.xml:773
#, fuzzy, no-c-format
msgid "<literal>transactional"
msgstr "Les requêtes par <literal>Criteria"

#. Tag: para
#: performance.xml:778
#, no-c-format
msgid ""
"It is recommended to define the cache concurrency strategy per entity rather "
"than using a global one. Use the <classname>@org.hibernate.annotations."
"Cache</classname> annotation for that."
msgstr ""

#. Tag: title
#: performance.xml:785
#, no-c-format
msgid ""
"Definition of cache concurrency strategy via <classname>@Cache"
msgstr ""

#. Tag: programlisting
#: performance.xml:788
#, no-c-format
msgid ""
"@Entity \n"
"@Cacheable\n"
"@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)\n"
"public class Forest { ... }"
msgstr ""

#. Tag: para
#: performance.xml:791
#, no-c-format
msgid ""
"Hibernate also let's you cache the content of a collection or the "
"identifiers if the collection contains other entities. Use the "
"<classname>@Cache annotation on the collection property."
msgstr ""

#. Tag: title
#: performance.xml:797
#, fuzzy, no-c-format
msgid "Caching collections using annotations"
msgstr "Initialisation des collections et des proxies"

#. Tag: programlisting
#: performance.xml:799
#, no-c-format
msgid ""
"@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER)\n"
"@JoinColumn(name=\"CUST_ID\")\n"
"@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)\n"
"public SortedSet<Ticket> getTickets() {\n"
"    return tickets;\n"
"}"
msgstr ""

#. Tag: para
#: performance.xml:802
#, no-c-format
msgid ""
"shows the<literal> @org.hibernate.annotations.Cache annotations "
"with its attributes. It allows you to define the caching strategy and region "
"of a given second level cache."
msgstr ""

#. Tag: title
#: performance.xml:808
#, no-c-format
msgid "<classname>@Cache annotation with attributes"
msgstr ""

#. Tag: programlisting
#: performance.xml:820
#, no-c-format
msgid ""
"@Cache(\n"
"    CacheConcurrencyStrategy usage();\n"
"    String region() default \"\";\n"
"    String include() default \"all\";\n"
")"
msgstr ""

#. Tag: para
#: performance.xml:824
#, no-c-format
msgid ""
"usage: the given cache concurrency strategy (NONE, READ_ONLY, "
"NONSTRICT_READ_WRITE, READ_WRITE, TRANSACTIONAL)"
msgstr ""

#. Tag: para
#: performance.xml:830
#, no-c-format
msgid ""
"region (optional): the cache region (default to the fqcn of the class or the "
"fq role name of the collection)"
msgstr ""

#. Tag: para
#: performance.xml:835
#, no-c-format
msgid ""
"<literal>include (optional): all to include all properties, non-"
"lazy to only include non lazy properties (default all)."
msgstr ""

#. Tag: para
#: performance.xml:843
#, no-c-format
msgid ""
"Let's now take a look at Hibernate mapping files. There the <literal><"
"cache></literal> element of a class or collection mapping is used to "
"configure the second level cache. Looking at <xref linkend=\"example-"
"hibernate-cache-mapping-element\"/> the parallels to anotations is obvious."
msgstr ""

#. Tag: title
#: performance.xml:850
#, no-c-format
msgid "The Hibernate <literal><cache> mapping element"
msgstr ""

#. Tag: programlisting
#: performance.xml:862
#, no-c-format
msgid ""
"<cache\n"
"    usage=\"transactional|read-write|nonstrict-read-write|read-only\"\n"
"    region=\"RegionName\"\n"
"    include=\"all|non-lazy\"\n"
"/>"
msgstr ""

#. Tag: para
#: performance.xml:866
#, no-c-format
msgid ""
"<literal>usage (required) specifies the caching strategy: "
"<literal>transactional, read-write, "
"<literal>nonstrict-read-write or read-only"
msgstr ""
"<literal>usage (requis) spécifie la stratégie de cache : "
"<literal>transactionel, lecture-écriture, "
"<literal>lecture-écriture non stricte ou lecture seule (optional: defaults to the class or collection "
"role name): specifies the name of the second level cache region"
msgstr ""
"<literal>region (optionnel, par défaut il s'agit du nom de la "
"classe ou du nom de rôle de la collection) : spécifie le nom de la région du "
"cache de second niveau"

#. Tag: para
#: performance.xml:880
#, no-c-format
msgid ""
"<literal>include (optional: defaults to all) "
"<literal>non-lazy: specifies that properties of the entity mapped "
"with <literal>lazy=\"true\" cannot be cached when attribute-level "
"lazy fetching is enabled"
msgstr ""
"<literal>include (optionnel, par défaut all) "
"<literal>non-lazy : spécifie que les propriétés des entités "
"mappées avec <literal>lazy=\"true\" ne doivent pas être mises en "
"cache lorsque le chargement en différé des attributs est activé."

#. Tag: para
#: performance.xml:890
#, fuzzy, no-c-format
msgid ""
"Alternatively to <literal><cache>, you can use <"
"class-cache></literal> and <collection-cache> "
"elements in <literal>hibernate.cfg.xml."
msgstr ""
"Alternativement (voir préférentiellement), vous pouvez spécifier les "
"éléments <literal><class-cache> et <collection-"
"cache></literal> dans hibernate.cfg.xml. "

#. Tag: para
#: performance.xml:895
#, no-c-format
msgid "Let's now have a closer look at the different usage strategies"
msgstr ""

#. Tag: title
#: performance.xml:900
#, no-c-format
msgid "Strategy: read only"
msgstr "Stratégie : lecture seule"

#. Tag: para
#: performance.xml:902
#, no-c-format
msgid ""
"If your application needs to read, but not modify, instances of a persistent "
"class, a <literal>read-only cache can be used. This is the "
"simplest and optimal performing strategy. It is even safe for use in a "
"cluster."
msgstr ""
"Si votre application a besoin de lire mais ne modifie jamais les instances "
"d'une classe, un cache <literal>read-only peut être utilisé. C'est "
"la stratégie la plus simple et la plus performante. Elle est même "
"parfaitement sûre dans un cluster. "

#. Tag: title
#: performance.xml:909
#, no-c-format
msgid "Strategy: read/write"
msgstr "Stratégie : lecture/écriture"

#. Tag: para
#: performance.xml:911
#, no-c-format
msgid ""
"If the application needs to update data, a <literal>read-write "
"cache might be appropriate. This cache strategy should never be used if "
"serializable transaction isolation level is required. If the cache is used "
"in a JTA environment, you must specify the property <literal>hibernate."
"transaction.manager_lookup_class</literal> and naming a strategy for "
"obtaining the JTA <literal>TransactionManager. In other "
"environments, you should ensure that the transaction is completed when "
"<literal>Session.close() or Session.disconnect() support locking."
msgstr ""
"Si l'application a besoin de mettre à jour des données, un cache "
"<literal>read-write peut être approprié. Cette stratégie ne "
"devrait jamais être utilisée si votre application nécessite un niveau "
"d'isolation transactionnelle sérialisable. Si le cache est utilisé dans un "
"environnement JTA, vous devez spécifier la propriété <literal>hibernate."
"transaction.manager_lookup_class</literal>, fournissant une stratégie pour "
"obtenir le JTA <literal>TransactionManager. Dans d'autres "
"environnements, vous devriez vous assurer que la transation est terminée à "
"l'appel de <literal>Session.close() ou Session.disconnect"
"()</literal>. Si vous souhaitez utiliser cette stratégie dans un cluster, "
"vous devriez vous assurer que l'implémentation de cache utilisée supporte le "
"verrouillage, ce que ne font <emphasis>pas les pourvoyeurs caches "
"fournis. "

#. Tag: title
#: performance.xml:927
#, no-c-format
msgid "Strategy: nonstrict read/write"
msgstr "Stratégie : lecture/écriture non stricte"

#. Tag: para
#: performance.xml:929
#, no-c-format
msgid ""
"If the application only occasionally needs to update data (i.e. if it is "
"extremely unlikely that two transactions would try to update the same item "
"simultaneously), and strict transaction isolation is not required, a "
"<literal>nonstrict-read-write cache might be appropriate. If the "
"cache is used in a JTA environment, you must specify <literal>hibernate."
"transaction.manager_lookup_class</literal>. In other environments, you "
"should ensure that the transaction is completed when <literal>Session.close()"
"</literal> or Session.disconnect() is called."
msgstr ""
"Si l'application a besoin de mettre à jour les données de manière "
"occasionnelle (il est très peu probable que deux transactions essaient de "
"mettre à jour le même élément simultanément) et si une isolation "
"transactionnelle stricte n'est pas nécessaire, un cache <literal>nonstrict-"
"read-write</literal> peut être approprié. Si le cache est utilisé dans un "
"environnement JTA, vous devez spécifier <literal>hibernate.transaction."
"manager_lookup_class</literal>. Dans d'autres environnements, vous devriez "
"vous assurer que la transation est terminée à l'appel de <literal>Session."
"close()</literal> ou Session.disconnect()."

#. Tag: title
#: performance.xml:941
#, no-c-format
msgid "Strategy: transactional"
msgstr "Stratégie : transactionelle"

#. Tag: para
#: performance.xml:943
#, no-c-format
msgid ""
"The <literal>transactional cache strategy provides support for "
"fully transactional cache providers such as JBoss TreeCache. Such a cache "
"can only be used in a JTA environment and you must specify "
"<literal>hibernate.transaction.manager_lookup_class."
msgstr ""
"La stratégie de cache <literal>transactional supporte un cache "
"complètement transactionnel comme, par exemple, JBoss TreeCache. Un tel "
"cache ne peut être utilisé que dans un environnement JTA et vous devez "
"spécifier <literal>hibernate.transaction.manager_lookup_class. "

#. Tag: title
#: performance.xml:950
#, no-c-format
msgid "Cache-provider/concurrency-strategy compatibility"
msgstr "Support de stratégie de concurrence du fournisseur-cache"

#. Tag: para
#: performance.xml:953
#, no-c-format
msgid ""
"None of the cache providers support all of the cache concurrency strategies."
msgstr ""
"Aucun des caches livrés ne supporte toutes les stratégies de concurrence. Le "
"tableau suivant montre quels caches sont compatibles avec quelles stratégies "
"de concurrence. "

#. Tag: para
#: performance.xml:957
#, no-c-format
msgid ""
"The following table shows which providers are compatible with which "
"concurrency strategies."
msgstr ""
"Aucun des caches livrés ne supporte toutes les stratégies de concurrence. Le "
"tableau suivant montre quels caches sont compatibles avec quelles stratégies "
"de concurrence. "

#. Tag: title
#: performance.xml:961
#, no-c-format
msgid "Cache Concurrency Strategy Support"
msgstr "Support de stratégie de concurrence du cache"

#. Tag: entry
#: performance.xml:978
#, no-c-format
msgid "<entry>read-only"
msgstr ""

#. Tag: entry
#: performance.xml:980
#, fuzzy, no-c-format
msgid "<entry>nonstrict-read-write"
msgstr "nonstrict-read-write (lecture-écriture non stricte)"

#. Tag: entry
#: performance.xml:982
#, no-c-format
msgid "<entry>read-write"
msgstr ""

#. Tag: entry
#: performance.xml:984
#, fuzzy, no-c-format
msgid "<entry>transactional"
msgstr "transactional (transactionnel)"

#. Tag: title
#: performance.xml:1067
#, no-c-format
msgid "Managing the caches"
msgstr "Gérer les caches"

#. Tag: para
#: performance.xml:1069
#, no-c-format
msgid ""
"Whenever you pass an object to <literal>save(), update()saveOrUpdate(), and whenever you retrieve an "
"object using <literal>load(), get(), "
"<literal>list(), iterate() or scroll()"
"</literal>, that object is added to the internal cache of the "
"<literal>Session."
msgstr ""
"A chaque fois que vous passez un objet à la méthode <literal>save()update() ou saveOrUpdate() "
"et à chaque fois que vous récupérez un objet avec <literal>load(), "
"<literal>get(), list(), iterate()scroll(), cet objet est ajouté au cache "
"interne de la <literal>Session. "

#. Tag: para
#: performance.xml:1076
#, no-c-format
msgid ""
"When <literal>flush() is subsequently called, the state of that "
"object will be synchronized with the database. If you do not want this "
"synchronization to occur, or if you are processing a huge number of objects "
"and need to manage memory efficiently, the <literal>evict() method "
"can be used to remove the object and its collections from the first-level "
"cache."
msgstr ""
"Lorsqu'il y a un appel à la méthode <literal>flush(), l'état de "
"cet objet va être synchronisé avec la base de données. Si vous ne voulez pas "
"que cette synchronisation ait lieu ou si vous traitez un grand nombre "
"d'objets et que vous avez besoin de gérer la mémoire de manière efficace, "
"vous pouvez utiliser la méthode <literal>evict() pour supprimer "
"l'objet et ses collections dépendantes du cache de premier niveau de la "
"session. "

#. Tag: title
#: performance.xml:1084
#, no-c-format
msgid ""
"Explcitly evicting a cached instance from the first level cache using "
"<methodname>Session.evict()"
msgstr ""

#. Tag: programlisting
#: performance.xml:1087
#, no-c-format
msgid ""
"ScrollableResult cats = sess.createQuery(\"from Cat as cat\").scroll(); //a "
"huge result set\n"
"while ( cats.next() ) {\n"
"    Cat cat = (Cat) cats.get(0);\n"
"    doSomethingWithACat(cat);\n"
"    sess.evict(cat);\n"
"}"
msgstr ""

#. Tag: para
#: performance.xml:1090
#, no-c-format
msgid ""
"The <literal>Session also provides a contains() "
"method to determine if an instance belongs to the session cache."
msgstr ""
"La <literal>Session fournit également une méthode contains"
"()</literal> pour déterminer si une instance appartient au cache de la "
"session. "

#. Tag: para
#: performance.xml:1094
#, no-c-format
msgid ""
"To evict all objects from the session cache, call <literal>Session.clear() for evicting the cached state of an "
"instance, entire class, collection instance or entire collection role."
msgstr ""
"Pour le cache de second niveau, il existe des méthodes définies dans "
"<literal>SessionFactory pour retirer du cache d'une instance, de "
"la classe entière, d'une instance de collection ou du rôle entier d'une "
"collection."

#. Tag: title
#: performance.xml:1103
#, no-c-format
msgid ""
"Second-level cache eviction via <methodname>SessionFactoty.evict() SessionFacyory.evictCollection()"
msgstr ""

#. Tag: programlisting
#: performance.xml:1107
#, no-c-format
msgid ""
"sessionFactory.evict(Cat.class, catId); //evict a particular Cat\n"
"sessionFactory.evict(Cat.class);  //evict all Cats\n"
"sessionFactory.evictCollection(\"Cat.kittens\", catId); //evict a particular "
"collection of kittens\n"
"sessionFactory.evictCollection(\"Cat.kittens\"); //evict all kitten "
"collections"
msgstr ""

#. Tag: para
#: performance.xml:1110
#, no-c-format
msgid ""
"The <literal>CacheMode controls how a particular session interacts "
"with the second-level cache:"
msgstr ""
"Le <literal>CacheMode contrôle la manière dont une session "
"particulière interagit avec le cache de second niveau :"

#. Tag: para
#: performance.xml:1115
#, no-c-format
msgid ""
"<literal>CacheMode.NORMAL: will read items from and write items to "
"the second-level cache"
msgstr ""
"<literal>CacheMode.NORMAL - lit et écrit les articles dans le "
"cache de second niveau "

#. Tag: para
#: performance.xml:1120
#, no-c-format
msgid ""
"<literal>CacheMode.GET: will read items from the second-level "
"cache. Do not write to the second-level cache except when updating data"
msgstr ""
"<literal>CacheMode.GET - lit les articles du cache de second "
"niveau mais ne les écrit pas sauf dans le cas d'une mise à jour des données "

#. Tag: para
#: performance.xml:1126
#, no-c-format
msgid ""
"<literal>CacheMode.PUT: will write items to the second-level "
"cache. Do not read from the second-level cache"
msgstr ""
"<literal>CacheMode.PUT - écrit les articles dans le cache de "
"second niveau mais ne les lit pas dans le cache de second niveau "

#. Tag: para
#: performance.xml:1131
#, no-c-format
msgid ""
"<literal>CacheMode.REFRESH: will write items to the second-level "
"cache. Do not read from the second-level cache. Bypass the effect of "
"<literal>hibernate.cache.use_minimal_puts forcing a refresh of the "
"second-level cache for all items read from the database"
msgstr ""
"<literal>CacheMode.REFRESH - écrit les articles dans le cache de "
"second niveau mais ne les lit pas dans le cache de second niveau, outrepasse "
"l'effet de <literal>hibernate.cache.use_minimal_puts, en forçant "
"un rafraîchissement du cache de second niveau pour chaque article lu dans la "
"base de données. "

#. Tag: para
#: performance.xml:1139
#, no-c-format
msgid ""
"To browse the contents of a second-level or query cache region, use the "
"<literal>Statistics API:"
msgstr ""
"Pour parcourir le contenu du cache de second niveau ou la région du cache "
"dédiée aux requêtes, vous pouvez utiliser l'API <literal>Statistics, holding the "
"cached query results"
msgstr ""

#. Tag: para
#: performance.xml:1186
#, no-c-format
msgid ""
"<classname>org.hibernate.cache.UpdateTimestampsCache, holding "
"timestamps of the most recent updates to queryable tables. These are used to "
"validate the results as they are served from the query cache."
msgstr ""

#. Tag: para
#: performance.xml:1194
#, no-c-format
msgid ""
"If you configure your underlying cache implementation to use expiry or "
"timeouts is very important that the cache timeout of the underlying cache "
"region for the UpdateTimestampsCache be set to a higher value than the "
"timeouts of any of the query caches. In fact, we recommend that the the "
"UpdateTimestampsCache region not be configured for expiry at all. Note, in "
"particular, that an LRU cache expiry policy is never appropriate."
msgstr ""

#. Tag: para
#: performance.xml:1203
#, fuzzy, no-c-format
msgid ""
"As mentioned above, most queries do not benefit from caching or their "
"results. So by default, individual queries are not cached even after "
"enabling query caching. To enable results caching for a particular query, "
"call <literal>org.hibernate.Query.setCacheable(true). This call "
"allows the query to look for existing cache results or add its results to "
"the cache when it is executed."
msgstr ""
"La plupart des requêtes ne tirent pas avantage du cache, donc par défaut les "
"requêtes ne sont pas mises en cache. Pour activer le cache, appelez "
"<literal>Query.setCacheable(true). Cet appel permet de vérifier si "
"les résultats sont en cache ou non, voire d'ajouter ces résultats quand la "
"requête est exécutée. "

#. Tag: para
#: performance.xml:1211
#, no-c-format
msgid ""
"The query cache does not cache the state of the actual entities in the "
"cache; it caches only identifier values and results of value type. For this "
"reaso, the query cache should always be used in conjunction with the second-"
"level cache for those entities expected to be cached as part of a query "
"result cache (just as with collection caching)."
msgstr ""

#. Tag: title
#: performance.xml:1221
#, fuzzy, no-c-format
msgid "Query cache regions"
msgstr "Cache de requêtes supporté"

#. Tag: para
#: performance.xml:1223
#, no-c-format
msgid ""
"If you require fine-grained control over query cache expiration policies, "
"you can specify a named cache region for a particular query by calling "
"<literal>Query.setCacheRegion()."
msgstr ""
"Si vous avez besoin de contrôler finement les délais d'expiration du cache, "
"vous pouvez spécifier une région de cache nommée pour une requête "
"particulière en appelant <literal>Query.setCacheRegion(). "

#. Tag: programlisting
#: performance.xml:1227
#, no-c-format
msgid ""
"List blogs = sess.createQuery(\"from Blog blog where blog.blogger = :blogger"
"\")\n"
"        .setEntity(\"blogger\", blogger)\n"
"        .setMaxResults(15)\n"
"        .setCacheable(true)\n"
"        .setCacheRegion(\"frontpages\")\n"
"        .list();"
msgstr ""

#. Tag: para
#: performance.xml:1229
#, fuzzy, no-c-format
msgid ""
"If you want to force the query cache to refresh one of its regions "
"(disregard any cached results it finds there) you can use <literal>org."
"hibernate.Query.setCacheMode(CacheMode.REFRESH)</literal>. In conjunction "
"with the region you have defined for the given query, Hibernate will "
"selectively force the results cached in that particular region to be "
"refreshed. This is particularly useful in cases where underlying data may "
"have been updated via a separate process and is a far more efficient "
"alternative to bulk eviction of the region via <literal>org.hibernate."
"SessionFactory.evictQueries()</literal>."
msgstr ""
"Si une requête doit forcer le rafraîchissement de sa région de cache, vous "
"devez appeler <literal>Query.setCacheMode(CacheMode.REFRESH). "
"C'est particulièrement utile lorsque les données peuvent avoir été mises à "
"jour par un processus séparé (c'est-à-dire qu'elles n'ont pas été modifiées "
"par Hibernate). Cela permet à l'application de rafraîchir de manière "
"sélective les résultats d'une requête particulière. Il s'agit d'une "
"alternative plus efficace à l'éviction d'une région du cache à l'aide de la "
"méthode <literal>SessionFactory.evictQueries()."

#. Tag: title
#: performance.xml:1242
#, no-c-format
msgid "Understanding Collection performance"
msgstr "Comprendre les performances des collections"

#. Tag: para
#: performance.xml:1244
#, no-c-format
msgid ""
"In the previous sections we have covered collections and their applications. "
"In this section we explore some more issues in relation to collections at "
"runtime."
msgstr ""
"Dans les sections précédentes, nous avons couvert les collections et leurs "
"applications. Dans cette section, nous allons explorer de nouveaux problèmes "
"en rapport aux collections en cours d'exécution."

#. Tag: title
#: performance.xml:1249
#, no-c-format
msgid "Taxonomy"
msgstr "Taxinomie"

#. Tag: para
#: performance.xml:1251
#, no-c-format
msgid "Hibernate defines three basic kinds of collections:"
msgstr "Hibernate définit trois types de collections de base :"

#. Tag: para
#: performance.xml:1255
#, no-c-format
msgid "collections of values"
msgstr "les collections de valeurs"

#. Tag: para
#: performance.xml:1259
#, no-c-format
msgid "one-to-many associations"
msgstr "Association un-à-plusieurs "

#. Tag: para
#: performance.xml:1263
#, no-c-format
msgid "many-to-many associations"
msgstr "les associations plusieurs-à-plusieurs "

#. Tag: para
#: performance.xml:1267
#, no-c-format
msgid ""
"This classification distinguishes the various table and foreign key "
"relationships but does not tell us quite everything we need to know about "
"the relational model. To fully understand the relational structure and "
"performance characteristics, we must also consider the structure of the "
"primary key that is used by Hibernate to update or delete collection rows. "
"This suggests the following classification:"
msgstr ""
"Cette classification distingue les différentes relations entre les tables et "
"les clés étrangères mais ne n'en dit pas suffisamment sur le modèle "
"relationnel. Pour comprendre parfaitement la structure relationnelle et les "
"caractéristiques des performances, nous devons considérer la structure de la "
"clé primaire qui est utilisée par Hibernate pour mettre à jour ou supprimer "
"les lignes des collections. Cela nous amène aux classifications suivantes :"

#. Tag: para
#: performance.xml:1276
#, no-c-format
msgid "indexed collections"
msgstr "collections indexées"

#. Tag: para
#: performance.xml:1280
#, no-c-format
msgid "sets"
msgstr "ensembles (sets)"

#. Tag: para
#: performance.xml:1284
#, no-c-format
msgid "bags"
msgstr "sacs (bags)"

#. Tag: para
#: performance.xml:1288
#, no-c-format
msgid ""
"All indexed collections (maps, lists, and arrays) have a primary key "
"consisting of the <literal><key> and <index>) et "
"<literal><index>. Avec ce type de clé primaire, la mise à "
"jour de collection est en général très performante - la clé primaire peut "
"être indexées efficacement et une ligne particulière peut être localisée "
"efficacement lorsque Hibernate essaie de la mettre à jour ou de la "
"supprimer. "

#. Tag: para
#: performance.xml:1295
#, no-c-format
msgid ""
"Sets have a primary key consisting of <literal><key> and "
"element columns. This can be less efficient for some types of collection "
"element, particularly composite elements or large text or binary fields, as "
"the database may not be able to index a complex primary key as efficiently. "
"However, for one-to-many or many-to-many associations, particularly in the "
"case of synthetic identifiers, it is likely to be just as efficient. If you "
"want <literal>SchemaExport to actually create the primary key of a "
"<literal><set>, you must declare all columns as not-"
"null=\"true\"</literal>."
msgstr ""
"Les ensembles ont une clé primaire composée de <literal><key> crée "
"effectivement la clé primaire d'un <literal><set> pour vous, "
"vous devez déclarer toutes les colonnes avec <literal>not-null=\"true\" mappings define a surrogate key, so they "
"are efficient to update. In fact, they are the best case."
msgstr ""
"Le mappage à l'aide de <literal><idbag> définit une clé de "
"substitution ce qui leur permet d'être très efficaces lors de la mise à "
"jour. En fait il s'agit du meilleur cas de mise à jour d'une collection."

#. Tag: para
#: performance.xml:1309
#, no-c-format
msgid ""
"Bags are the worst case since they permit duplicate element values and, as "
"they have no index column, no primary key can be defined. Hibernate has no "
"way of distinguishing between duplicate rows. Hibernate resolves this "
"problem by completely removing in a single <literal>DELETE and "
"recreating the collection whenever it changes. This can be inefficient."
msgstr ""
"Le pire cas intervient pour les sacs. Dans la mesure où un sac permet la "
"duplication des valeurs d'éléments et n'a pas de colonne d'index, aucune clé "
"primaire ne peut être définie. Hibernate n'a aucun moyen de distinguer entre "
"les  lignes dupliquées. Hibernate résout ce problème en supprimant "
"complètement (via un simple <literal>DELETE), puis en recréant la "
"collection chaque fois qu'elle change. Ce qui peut être très inefficace. "

#. Tag: para
#: performance.xml:1316
#, no-c-format
msgid ""
"For a one-to-many association, the \"primary key\" may not be the physical "
"primary key of the database table. Even in this case, the above "
"classification is still useful. It reflects how Hibernate \"locates\" "
"individual rows of the collection."
msgstr ""
"Notez que pour une relation un-à-plusieurs, la \"clé primaire\" peut ne pas "
"être la clé primaire de la table en base de données - mais même dans ce cas, "
"la classification ci-dessus reste utile (Elle explique comment Hibernate "
"localise les lignes individuelles de la collection). "

#. Tag: title
#: performance.xml:1323
#, no-c-format
msgid ""
"Lists, maps, idbags and sets are the most efficient collections to update"
msgstr ""
"Les lists, les maps, les idbags et les ensembles sont les collections les "
"plus efficaces pour la mise à jour "

#. Tag: para
#: performance.xml:1326
#, no-c-format
msgid ""
"From the discussion above, it should be clear that indexed collections and "
"sets allow the most efficient operation in terms of adding, removing and "
"updating elements."
msgstr ""
"La discussion précédente montre clairement que les collections indexées et "
"(la plupart du temps) les ensembles, permettent de réaliser le plus "
"efficacement les opérations d'ajout, de suppression ou mise à jour "
"d'éléments. "

#. Tag: para
#: performance.xml:1330
#, no-c-format
msgid ""
"There is, arguably, one more advantage that indexed collections have over "
"sets for many-to-many associations or collections of values. Because of the "
"structure of a <literal>Set, Hibernate does not UPDATESetINSERT and DELETE, Hibernate n'effectue "
"jamais de ligne <literal>UPDATE quand un élément est modifié. Les "
"modifications apportées à un <literal>Set se font via un "
"<literal>INSERT et DELETE (de chaque ligne). "
"Une fois de plus, ce cas ne s'applique pas aux associations un-à-plusieurs. "

#. Tag: para
#: performance.xml:1338
#, no-c-format
msgid ""
"After observing that arrays cannot be lazy, you can conclude that lists, "
"maps and idbags are the most performant (non-inverse) collection types, with "
"sets not far behind. You can expect sets to be the most common kind of "
"collection in Hibernate applications. This is because the \"set\" semantics "
"are most natural in the relational model."
msgstr ""
"Après s'être rappelé que les tableaux ne peuvent pas être chargés en "
"différé, nous pouvons conclure que les lists, les maps et les idbags sont "
"les types de collections (non inversées) les plus performants, avec les "
"ensembles pas loin derrière. Les ensembles sont le type de collection le "
"plus courant dans les applications Hibernate. Cela vient du fait que la "
"sémantique des ensembles est la plus naturelle dans le modèle relationnel. "

#. Tag: para
#: performance.xml:1344
#, no-c-format
msgid ""
"However, in well-designed Hibernate domain models, most collections are in "
"fact one-to-many associations with <literal>inverse=\"true\". For "
"these associations, the update is handled by the many-to-one end of the "
"association, and so considerations of collection update performance simply "
"do not apply."
msgstr ""
"Cependant, dans des modèles objet bien conçus avec Hibernate, on constate "
"que la plupart des collections sont en fait des associations un-à-plusieurs "
"avec <literal>inverse=\"true\". Pour ces associations, les mises à "
"jour sont gérées au niveau de l'association \"plusieurs-à-un\" et les "
"considérations de performance de mise à jour des collections ne s'appliquent "
"tout simplement pas dans ces cas-là. "

#. Tag: title
#: performance.xml:1352
#, no-c-format
msgid "Bags and lists are the most efficient inverse collections"
msgstr ""
"Les sacs et les listes sont les plus efficaces pour les collections inverses"

#. Tag: para
#: performance.xml:1354
#, no-c-format
msgid ""
"There is a particular case, however, in which bags, and also lists, are much "
"more performant than sets. For a collection with <literal>inverse=\"true\", "
"<literal>Collection.add() or Collection.addAll()List. This "
"can make the following common code much faster:"
msgstr ""
"Avant que vous n'oubliez les sacs pour toujours, il y a un cas précis où les "
"sacs (et les listes) sont bien plus performants que les ensembles. Pour une "
"collection marquée comme <literal>inverse=\"true\" (le choix le "
"plus courant pour un relation un-à-plusieurs bidirectionnelle), nous pouvons "
"ajouter des éléments à un sac ou une liste sans avoir besoin de "
"l'initialiser (charger) les éléments du sac! Ceci parce que "
"<literal>Collection.add() ou Collection.addAll()ListSet). Cela peut rendre le code "
"suivant beaucoup plus rapide :"

#. Tag: programlisting
#: performance.xml:1365
#, no-c-format
msgid ""
"Parent p = (Parent) sess.load(Parent.class, id);\n"
"Child c = new Child();\n"
"c.setParent(p);\n"
"p.getChildren().add(c);  //no need to fetch the collection!\n"
"sess.flush();"
msgstr ""

#. Tag: title
#: performance.xml:1369
#, no-c-format
msgid "One shot delete"
msgstr "Suppression en un coup"

#. Tag: para
#: performance.xml:1371
#, no-c-format
msgid ""
"Deleting collection elements one by one can sometimes be extremely "
"inefficient. Hibernate knows not to do that in the case of an newly-empty "
"collection (if you called <literal>list.clear(), for example). In "
"this case, Hibernate will issue a single <literal>DELETE."
msgstr ""
"Parfois, effacer les éléments d'une collection un par un peut être "
"extrêmement inefficace. Hibernate n'est pas totalement stupide, il sait "
"qu'il ne faut pas le faire dans le cas d'une collection complètement vidée "
"(lorsque vous appelez <literal>list.clear(), par exemple). Dans ce "
"cas, Hibernate fera un simple <literal>DELETE et le travail est "
"fait ! "

#. Tag: para
#: performance.xml:1377
#, no-c-format
msgid ""
"Suppose you added a single element to a collection of size twenty and then "
"remove two elements. Hibernate will issue one <literal>INSERT "
"statement and two <literal>DELETE statements, unless the "
"collection is a bag. This is certainly desirable."
msgstr ""
"Supposons que nous ajoutions un élément unique dans une collection de taille "
"vingt et que nous enlevions ensuite deux éléments. Hibernate effectuera un "
"<literal>INSERT puis deux DELETE (à moins que "
"la collection ne soit un sac). Cela est préférable. "

#. Tag: para
#: performance.xml:1383
#, no-c-format
msgid ""
"However, suppose that we remove eighteen elements, leaving two and then add "
"thee new elements. There are two possible ways to proceed"
msgstr ""
"Cependant, supposons que nous enlevions dix-huit éléments, laissant ainsi "
"deux éléments, puis que nous ajoutions trois nouveaux éléments. Il y a deux "
"moyens de procéder."

#. Tag: para
#: performance.xml:1389
#, no-c-format
msgid "delete eighteen rows one by one and then insert three rows"
msgstr "effacer dix-huit lignes une à une puis en insérer trois"

#. Tag: para
#: performance.xml:1394
#, no-c-format
msgid ""
"remove the whole collection in one SQL <literal>DELETE and insert "
"all five current elements one by one"
msgstr ""
"effacer la totalité de la collection (en un SQL <literal>DELETE) "
"puis insérer les cinq éléments restant (un à un) "

#. Tag: para
#: performance.xml:1400
#, no-c-format
msgid ""
"Hibernate cannot know that the second option is probably quicker. It would "
"probably be undesirable for Hibernate to be that intuitive as such behavior "
"might confuse database triggers, etc."
msgstr ""
"Hibernate n'est pas assez intelligent pour savoir que, dans ce cas, la "
"seconde option est plus rapide (Il vaut mieux que Hibernate ne soit pas trop "
"intelligent ; un tel comportement pourrait rendre l'utilisation de triggers "
"de bases de données plutôt aléatoire, etc...). "

#. Tag: para
#: performance.xml:1404
#, no-c-format
msgid ""
"Fortunately, you can force this behavior (i.e. the second strategy) at any "
"time by discarding (i.e. dereferencing) the original collection and "
"returning a newly instantiated collection with all the current elements."
msgstr ""
"Heureusement, vous pouvez forcer ce comportement (c'est-à-dire la deuxième "
"stratégie) à tout moment en libérant (c'est-à-dire en déréférençant) la "
"collection initiale et en retournant une collection nouvellement instanciée "
"avec tous les éléments restants. "

#. Tag: para
#: performance.xml:1409
#, no-c-format
msgid ""
"One-shot-delete does not apply to collections mapped <literal>inverse=\"true"
"\"</literal>."
msgstr ""
"Bien sûr, la suppression en un coup ne s'applique pas pour les collections "
"qui sont mappées avec <literal>inverse=\"true\". "

#. Tag: title
#: performance.xml:1415
#, no-c-format
msgid "Monitoring performance"
msgstr "Moniteur de performance"

#. Tag: para
#: performance.xml:1417
#, no-c-format
msgid ""
"Optimization is not much use without monitoring and access to performance "
"numbers. Hibernate provides a full range of figures about its internal "
"operations. Statistics in Hibernate are available per "
"<literal>SessionFactory."
msgstr ""
"L'optimisation n'est pas d'un grand intérêt sans le suivi et l'accès aux "
"données de performance. Hibernate fournit toute une panoplie de rapport sur "
"ses opérations internes. Les statistiques dans Hibernate sont fournies par "
"<literal>SessionFactory."

#. Tag: title
#: performance.xml:1423
#, no-c-format
msgid "Monitoring a SessionFactory"
msgstr "Suivi d'une SessionFactory"

#. Tag: para
#: performance.xml:1425
#, no-c-format
msgid ""
"You can access <literal>SessionFactory metrics in two ways. Your "
"first option is to call <literal>sessionFactory.getStatistics() "
"and read or display the <literal>Statistics yourself."
msgstr ""
"Vous pouvez accéder aux métriques d'une <literal>SessionFactory de "
"deux manières. La première option est d'appeler <literal>sessionFactory."
"getStatistics()</literal> et de lire ou d'afficher les Statistics MBean. You can enable a single MBean "
"for all your <literal>SessionFactory or one per factory. See the "
"following code for minimalistic configuration examples:"
msgstr ""
"Hibernate peut également utiliser JMX pour publier les métriques si vous "
"activez le MBean <literal>StatisticsService. Vous pouvez activer "
"un seul MBean pour toutes vos <literal>SessionFactory ou un par "
"fabrique. Voici un code qui montre un exemple de configuration minimaliste : "

#. Tag: programlisting
#: performance.xml:1435
#, no-c-format
msgid ""
"// MBean service registration for a specific SessionFactory\n"
"Hashtable tb = new Hashtable();\n"
"tb.put(\"type\", \"statistics\");\n"
"tb.put(\"sessionFactory\", \"myFinancialApp\");\n"
"ObjectName on = new ObjectName(\"hibernate\", tb); // MBean object name\n"
"\n"
"StatisticsService stats = new StatisticsService(); // MBean implementation\n"
"stats.setSessionFactory(sessionFactory); // Bind the stats to a "
"SessionFactory\n"
"server.registerMBean(stats, on); // Register the Mbean on the server"
msgstr ""

#. Tag: programlisting
#: performance.xml:1437
#, no-c-format
msgid ""
"// MBean service registration for all SessionFactory's\n"
"Hashtable tb = new Hashtable();\n"
"tb.put(\"type\", \"statistics\");\n"
"tb.put(\"sessionFactory\", \"all\");\n"
"ObjectName on = new ObjectName(\"hibernate\", tb); // MBean object name\n"
"\n"
"StatisticsService stats = new StatisticsService(); // MBean implementation\n"
"server.registerMBean(stats, on); // Register the MBean on the server"
msgstr ""

#. Tag: para
#: performance.xml:1439
#, no-c-format
msgid ""
"You can activate and deactivate the monitoring for a "
"<literal>SessionFactory:"
msgstr ""
"Vous pouvez (dés)activer le suivi pour une <literal>SessionFactory "
"to <literal>false"
msgstr ""
"au moment de la configuration en mettant <literal>hibernate."
"generate_statistics</literal> à false"

#. Tag: para
#: performance.xml:1452
#, no-c-format
msgid ""
"at runtime: <literal>sf.getStatistics().setStatisticsEnabled(true) "
"or <literal>hibernateStatsBean.setStatisticsEnabled(true)"
msgstr ""
"à chaud avec <literal>sf.getStatistics().setStatisticsEnabled(true)hibernateStatsBean.setStatisticsEnabled(true)"

#. Tag: para
#: performance.xml:1458
#, no-c-format
msgid ""
"Statistics can be reset programmatically using the <literal>clear() method."
msgstr ""
"Les statistiques peuvent être remises à zéro de manière programmatique à "
"l'aide de la méthode <literal>clear() Un résumé peut être envoyé à "
"un logger (niveau info) à l'aide de la méthode <literal>logSummary() "
"interface API, in three categories:"
msgstr ""
"Hibernate fournit plusieurs métriques, qui vont des informations très "
"basiques aux informations très spécialisées qui ne sont appropriées que dans "
"certains scénarios. Tous les compteurs accessibles sont décrits dans l'API "
"de l'interface <literal>Statistics dans trois catégories : "

#. Tag: para
#: performance.xml:1473
#, no-c-format
msgid ""
"Metrics related to the general <literal>Session usage, such as "
"number of open sessions, retrieved JDBC connections, etc."
msgstr ""
"Les métriques relatives à l'usage général de la <literal>Session "
"comme le nombre de sessions ouvertes, le nombre de connexions JDBC "
"récupérées, etc..."

#. Tag: para
#: performance.xml:1479
#, no-c-format
msgid ""
"Metrics related to the entities, collections, queries, and caches as a whole "
"(aka global metrics)."
msgstr ""
"Les métriques relatives aux entités, collections, requêtes et caches dans "
"leur ensemble (métriques globales aka)."

#. Tag: para
#: performance.xml:1484
#, no-c-format
msgid ""
"Detailed metrics related to a particular entity, collection, query or cache "
"region."
msgstr ""
"Les métriques détaillées relatives à une entité, une collection, une requête "
"ou une région de cache particulière."

#. Tag: para
#: performance.xml:1489
#, no-c-format
msgid ""
"For example, you can check the cache hit, miss, and put ratio of entities, "
"collections and queries, and the average time a query needs. Be aware that "
"the number of milliseconds is subject to approximation in Java. Hibernate is "
"tied to the JVM precision and on some platforms this might only be accurate "
"to 10 seconds."
msgstr ""
"Par exemple, vous pouvez vérifier les hit, miss du cache ainsi que le taux "
"d'éléments manquants et de mise à jour des entités, collections et requêtes "
"et le temps moyen que met une requête. Il faut faire attention au fait que "
"le nombre de millisecondes est sujet à approximation en Java. Hibernate est "
"lié à la précision de la machine virtuelle, sur certaines plateformes, cela "
"n'offre qu'une précision de l'ordre de 10 secondes. "

#. Tag: para
#: performance.xml:1495
#, no-c-format
msgid ""
"Simple getters are used to access the global metrics (i.e. not tied to a "
"particular entity, collection, cache region, etc.). You can access the "
"metrics of a particular entity, collection or cache region through its name, "
"and through its HQL or SQL representation for queries. Please refer to the "
"<literal>Statistics, EntityStatistics, "
"<literal>CollectionStatistics, "
"<literal>SecondLevelCacheStatistics, and QueryStatistics, EntityStatisticsCollectionStatistics, "
"<literal>SecondLevelCacheStatistics, et QueryStatistics, "
"<literal>getEntityNames(), getCollectionRoleNames()getSecondLevelCacheRegionNames()."
msgstr ""
"Pour travailler sur toutes les entités, collections, requêtes et régions de "
"cache, vous pouvez récupérer la liste des noms des entités, collections, "
"requêtes et régions de cache avec les méthodes suivantes : "
"<literal>getQueries(), getEntityNames(), "
"<literal>getCollectionRoleNames(), et "
"<literal>getSecondLevelCacheRegionNames(). "

#~ msgid "yes"
#~ msgstr "oui"

#~ msgid ""
#~ "The <literal><cache> element of a class or collection "
#~ "mapping has the following form:"
#~ msgstr ""
#~ "L'élément <literal><cache> d'une classe ou d'une "
#~ "collection a la forme suivante :"

#~ msgid ""
#~ "The <literal>usage attribute specifies a cache "
#~ "concurrency strategy</emphasis>."
#~ msgstr ""
#~ "L'attribut <literal>usage spécifie une stratégie de "
#~ "concurrence d'accès au cache</emphasis>."

#~ msgid "read-only"
#~ msgstr "read-only (lecture seule)"

#~ msgid "read-write"
#~ msgstr "read-write (lecture-écriture)"

#~ msgid ""
#~ "This setting creates two new cache regions: one holding cached query "
#~ "result sets (<literal>org.hibernate.cache.StandardQueryCache), "
#~ "the other holding timestamps of the most recent updates to queryable "
#~ "tables (<literal>org.hibernate.cache.UpdateTimestampsCache). "
#~ "Note that the query cache does not cache the state of the actual entities "
#~ "in the result set; it caches only identifier values and results of value "
#~ "type. The query cache should always be used in conjunction with the "
#~ "second-level cache."
#~ msgstr ""
#~ "Ce paramètre amène la création de deux nouvelles régions dans le cache, "
#~ "une qui va conserver le résultat des requêtes mises en cache "
#~ "(<literal>org.hibernate.cache.StandardQueryCache) et l'autre "
#~ "qui va conserver l'horodatage des mises à jour les plus récentes "
#~ "effectuées sur les tables requêtables (<literal>org.hibernate.cache."
#~ "UpdateTimestampsCache</literal>). Il faut noter que le cache de requête "
#~ "ne conserve pas l'état des entités dans les résultats, il met en cache "
#~ "uniquement les valeurs de l'identifiant et les résultats de types de "
#~ "valeurs. Par conséquent, le cache de requête doit toujours être utilisé "
#~ "avec le cache de second niveau. "

Other Hibernate examples (source code examples)

Here is a short list of links related to this Hibernate performance.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.