📄 query_hql.po
字号:
msgid ""msgstr """Project-Id-Version: PACKAGE VERSION\n""Report-Msgid-Bugs-To: http://bugs.kde.org\n""POT-Creation-Date: 2008-08-14 15:28+0000\n""PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Language-Team: LANGUAGE <LL@li.org>\n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=UTF-8\n""Content-Transfer-Encoding: 8bit\n"#. Tag: title#: query_hql.xml:29#, no-c-formatmsgid "HQL: The Hibernate Query Language"msgstr "HQL: Langage de requêtage d'Hibernate"#. Tag: para#: query_hql.xml:31#, no-c-formatmsgid """Hibernate is equipped with an extremely powerful query language that (quite ""intentionally) looks very much like SQL. But don't be fooled by the syntax; ""HQL is fully object-oriented, understanding notions like inheritence, ""polymorphism and association."msgstr """Hibernate fourni un langage d'interrogation extrêmement puissant qui ""ressemble (et c'est voulu) au SQL. Mais ne soyez pas distraits par la ""syntaxe ; HQL est totalement orienté objet, comprenant des notions ""d'héritage, de polymorphisme et d'association."#. Tag: title#: query_hql.xml:38#, no-c-formatmsgid "Case Sensitivity"msgstr "Sensibilité à la casse"#. Tag: para#: query_hql.xml:40#, no-c-formatmsgid """Queries are case-insensitive, except for names of Java classes and ""properties. So <literal>SeLeCT</literal> is the same as <literal>sELEct</""literal> is the same as <literal>SELECT</literal> but <literal>org.hibernate.""eg.FOO</literal> is not <literal>org.hibernate.eg.Foo</literal> and ""<literal>foo.barSet</literal> is not <literal>foo.BARSET</literal>."msgstr """Les requêtes sont insensibles à la casse, à l'exception des noms des classes ""Java et des propriétés. Ainsi, <literal>SeLeCT</literal> est identique à ""<literal>sELEct</literal> et à <literal>SELECT</literal> mais <literal>net.""sf.hibernate.eg.FOO</literal> n'est pas identique <literal>net.sf.hibernate.""eg.Foo</literal> et <literal>foo.barSet</literal> n'est pas identique à ""<literal>foo.BARSET</literal>."#. Tag: para#: query_hql.xml:51#, no-c-formatmsgid """This manual uses lowercase HQL keywords. Some users find queries with ""uppercase keywords more readable, but we find this convention ugly when ""embedded in Java code."msgstr """Ce guide utilise les mots clés HQL en minuscule. Certains utilisateurs ""trouvent les requêtes écrites avec les mots clés en majuscule plus lisibles, ""mais nous trouvons cette convention pénible lorsqu'elle est lue dans du code ""Java."#. Tag: title#: query_hql.xml:59#, no-c-formatmsgid "The from clause"msgstr "La clause from"#. Tag: para#: query_hql.xml:61#, no-c-formatmsgid "The simplest possible Hibernate query is of the form:"msgstr "La requête Hibernate la plus simple est de la forme :"#. Tag: programlisting#: query_hql.xml:65#, no-c-formatmsgid "<![CDATA[from eg.Cat]]>"msgstr ""#. Tag: para#: query_hql.xml:67#, no-c-formatmsgid """which simply returns all instances of the class <literal>eg.Cat</literal>. ""We don't usually need to qualify the class name, since <literal>auto-import</""literal> is the default. So we almost always just write:"msgstr """qui retourne simplement toutes les instances de la classe <literal>eg.Cat</""literal>. Nous n'avons pas besoin d'habitude de qualifier le nom de la ""classe, puisque <literal>auto-import</literal> est la valeur par défaut. ""Donc nous écrivons presque toujours :"#. Tag: programlisting#: query_hql.xml:73#, no-c-formatmsgid "<![CDATA[from Cat]]>"msgstr ""#. Tag: para#: query_hql.xml:75#, no-c-formatmsgid """Most of the time, you will need to assign an <emphasis>alias</emphasis>, ""since you will want to refer to the <literal>Cat</literal> in other parts of ""the query."msgstr """La plupart du temps, vous devrez assigner un <emphasis>alias</emphasis> ""puisque vous voudrez faire référence à <literal>Cat</literal> dans d'autres ""parties de la requête."#. Tag: programlisting#: query_hql.xml:81 query_hql.xml:396#, no-c-formatmsgid "<![CDATA[from Cat as cat]]>"msgstr ""#. Tag: para#: query_hql.xml:83#, no-c-formatmsgid """This query assigns the alias <literal>cat</literal> to <literal>Cat</""literal> instances, so we could use that alias later in the query. The ""<literal>as</literal> keyword is optional; we could also write:"msgstr """Cette requête assigne l'alias <literal>cat</literal> à l'instance ""<literal>Cat</literal>, nous pouvons donc utiliser cet alias ailleurs dans ""la requête. Le mot clé <literal>as</literal> est optionnel ; nous aurions pu ""écrire :"#. Tag: programlisting#: query_hql.xml:89#, no-c-formatmsgid "<![CDATA[from Cat cat]]>"msgstr ""#. Tag: para#: query_hql.xml:91#, no-c-formatmsgid """Multiple classes may appear, resulting in a cartesian product or \"cross\" ""join."msgstr """Plusieurs classes peuvent apparaître, ce qui conduira à un produit cartésien ""(encore appelé jointures croisées)."#. Tag: programlisting#: query_hql.xml:95#, no-c-formatmsgid "<![CDATA[from Formula, Parameter]]>"msgstr ""#. Tag: programlisting#: query_hql.xml:96#, no-c-formatmsgid "<![CDATA[from Formula as form, Parameter as param]]>"msgstr ""#. Tag: para#: query_hql.xml:98#, no-c-formatmsgid """It is considered good practice to name query aliases using an initial ""lowercase, consistent with Java naming standards for local variables (eg. ""<literal>domesticCat</literal>)."msgstr """C'est une bonne pratique que de nommer les alias dans les requêtes en ""utilisant l'initiale en miniscule, ce qui a le mérite d'être en phase avec ""les standards de nommage Java pour les variables locales ""(<literal>domesticCat</literal>)."#. Tag: title#: query_hql.xml:107#, no-c-formatmsgid "Associations and joins"msgstr "Associations et jointures"#. Tag: para#: query_hql.xml:109#, no-c-formatmsgid """We may also assign aliases to associated entities, or even to elements of a ""collection of values, using a <literal>join</literal>."msgstr """On peut aussi assigner des alias à des entités associées, ou même aux ""éléments d'une collection de valeurs, en utilisant un <literal>join</""literal> (jointure)."#. Tag: programlisting#: query_hql.xml:114#, no-c-formatmsgid """<![CDATA[from Cat as cat\n"" inner join cat.mate as mate\n"" left outer join cat.kittens as kitten]]>"msgstr ""#. Tag: programlisting#: query_hql.xml:116#, no-c-formatmsgid "<![CDATA[from Cat as cat left join cat.mate.kittens as kittens]]>"msgstr ""#. Tag: programlisting#: query_hql.xml:118#, no-c-formatmsgid "<![CDATA[from Formula form full join form.parameter param]]>"msgstr ""#. Tag: para#: query_hql.xml:120#, no-c-formatmsgid "The supported join types are borrowed from ANSI SQL"msgstr "Les types de jointures supportées sont celles de ANSI SQL"#. Tag: literal#: query_hql.xml:127#, no-c-formatmsgid "inner join"msgstr "<literal>inner join</literal> (jointure fermée)"#. Tag: literal#: query_hql.xml:132#, no-c-formatmsgid "left outer join"msgstr "<literal>left outer join</literal> (jointure ouverte par la gauche)"#. Tag: literal#: query_hql.xml:137#, no-c-formatmsgid "right outer join"msgstr "<literal>right outer join</literal> (jointure ouverte par la droite)"#. Tag: para#: query_hql.xml:141#, no-c-formatmsgid "<literal>full join</literal> (not usually useful)"msgstr """<literal>full join</literal> (jointure ouverte totalement - généralement ""inutile)"#. Tag: para#: query_hql.xml:147#, no-c-formatmsgid """The <literal>inner join</literal>, <literal>left outer join</literal> and ""<literal>right outer join</literal> constructs may be abbreviated."msgstr """Les constructions des jointures <literal>inner join</literal>, <literal>left ""outer join</literal> et <literal>right outer join</literal> peuvent être ""abbrégées."#. Tag: programlisting#: query_hql.xml:152#, no-c-formatmsgid """<![CDATA[from Cat as cat\n"" join cat.mate as mate\n"" left join cat.kittens as kitten]]>"msgstr ""#. Tag: para#: query_hql.xml:154#, no-c-formatmsgid """You may supply extra join conditions using the HQL <literal>with</literal> ""keyword."msgstr """Nous pouvons soumettre des conditions de jointure supplémentaires en ""utilisant le mot-clef HQL <literal>with</literal>."#. Tag: programlisting#: query_hql.xml:159#, no-c-formatmsgid """<![CDATA[from Cat as cat\n"" left join cat.kittens as kitten\n"" with kitten.bodyWeight > 10.0]]>"msgstr ""#. Tag: para#: query_hql.xml:161#, no-c-formatmsgid """In addition, a \"fetch\" join allows associations or collections of values ""to be initialized along with their parent objects, using a single select. ""This is particularly useful in the case of a collection. It effectively ""overrides the outer join and lazy declarations of the mapping file for ""associations and collections. See <xref linkend=\"performance-fetching\"/> ""for more information."msgstr """Par ailleurs, une jointure \"fetchée\" (rapportée) permet d'initialiser les ""associations ou collections de valeurs en même temps que leur objet parent, ""le tout n'utilisant qu'un seul Select. Ceci est particulièrement utile dans ""le cas des collections. Ce système permet de surcharger les déclarations ""\"lazy\" et \"outer-join\" des fichiers de mapping pour les associations et ""collections. Voir <xref linkend=\"performance-fetching\"/> pour plus ""d'informations."#. Tag: programlisting#: query_hql.xml:169#, no-c-formatmsgid """<![CDATA[from Cat as cat\n"" inner join fetch cat.mate\n"" left join fetch cat.kittens]]>"msgstr ""#. Tag: para#: query_hql.xml:171#, no-c-formatmsgid """A fetch join does not usually need to assign an alias, because the ""associated objects should not be used in the <literal>where</literal> clause ""(or any other clause). Also, the associated objects are not returned ""directly in the query results. Instead, they may be accessed via the parent ""object. The only reason we might need an alias is if we are recursively join ""fetching a further collection:"msgstr """Une jointure \"fetchée\" (rapportée) n'a généralement pas besoin de se voir ""assigner un alias puisque les objets associés n'ont pas à être utilisés dans ""les autres clauses. Notez aussi que les objets associés ne sont pas ""retournés directement dans le résultat de la requête mais l'on peut y ""accéder via l'objet parent. La seule raison pour laquelle nous pourrions ""avoir besoin d'un alias est si nous récupérions récursivement une collection ""supplémentaire :"#. Tag: programlisting#: query_hql.xml:179#, no-c-formatmsgid """<![CDATA[from Cat as cat\n"" inner join fetch cat.mate\n"" left join fetch cat.kittens child\n"" left join fetch child.kittens]]>"msgstr ""#. Tag: para#: query_hql.xml:181#, no-c-formatmsgid """Note that the <literal>fetch</literal> construct may not be used in queries ""called using <literal>iterate()</literal> (though <literal>scroll()</""literal> can be used). Nor should <literal>fetch</literal> be used together ""with <literal>setMaxResults()</literal> or <literal>setFirstResult()</""literal> as these operations are based on the result rows, which usually ""contain duplicates for eager collection fetching, hence, the number of rows ""is not what you'd expect. Nor may <literal>fetch</literal> be used together ""with an ad hoc <literal>with</literal> condition. It is possible to create a ""cartesian product by join fetching more than one collection in a query, so ""take care in this case. Join fetching multiple collection roles also ""sometimes gives unexpected results for bag mappings, so be careful about how ""you formulate your queries in this case. Finally, note that <literal>full ""join fetch</literal> and <literal>right join fetch</literal> are not ""meaningful."msgstr """Notez que la construction de <literal>fetch</literal> ne peut pas être ""utilisée dans les requêtes appelées par <literal>scroll()</literal> ou ""<literal>iterate()</literal>. <literal>fetch</literal> ne devrait pas non ""plus être utilisé avec <literal>setMaxResults()</literal> ou ""<literal>setFirstResult()</literal>. <literal>fetch</literal> ne peut pas ""non plus être utilisé avec une condition <literal>with</literal> ad hoc. Il ""est possible de créer un produit cartésien par jointure en récupérant plus ""d'une collection dans une requête, donc faites attention dans ce cas. ""Récupérer par jointure de multiples collections donne aussi parfois des ""résultats inattendus pour des mappings de bag, donc soyez prudent lorsque ""vous formulez vos requêtes dans de tels cas. Finalement, notez que ""<literal>full join fetch</literal> et <literal>right join fetch</literal> ne ""sont pas utiles en général."#. Tag: para#: query_hql.xml:196#, no-c-formatmsgid """If you are using property-level lazy fetching (with bytecode ""instrumentation), it is possible to force Hibernate to fetch the lazy ""properties immediately (in the first query) using <literal>fetch all ""properties</literal>."msgstr """Si vous utilisez un chargement retardé pour les propriétés (avec une ""instrumentation par bytecode), il est possible de forcer Hibernate à ""récupérer les propriétés non encore chargées immédiatement (dans la première ""requête) en utilisant <literal>fetch all properties</literal>."#. Tag: programlisting#: query_hql.xml:202#, no-c-formatmsgid "<![CDATA[from Document fetch all properties order by name]]>"msgstr ""#. Tag: programlisting#: query_hql.xml:203#, no-c-formatmsgid """<![CDATA[from Document doc fetch all properties where lower(doc.name) like '%""cats%']]>"msgstr ""#. Tag: title#: query_hql.xml:208#, no-c-formatmsgid "Forms of join syntax"msgstr "Formes de syntaxes pour les jointures"#. Tag: para#: query_hql.xml:210#, no-c-formatmsgid ""
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -