⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 query_hql.po

📁 hibernate-distribution-3.3.1.GA-dist.zip源码
💻 PO
📖 第 1 页 / 共 5 页
字号:
"HQL supports two forms of association joining: <literal>implicit</literal> ""and <literal>explicit</literal>."msgstr """HQL supporte deux formes pour joindre les associations: <literal>implicite</""literal> et <literal>explicite</literal>."#. Tag: para#: query_hql.xml:214#, no-c-formatmsgid """The queries shown in the previous section all use the <literal>explicit</""literal> form where the join keyword is explicitly used in the from clause. ""This is the recommended form."msgstr """Les requêtes présentes dans la section précédente utilisent la forme ""<literal>explicite</literal> où le mode clé join est explicitement utilisé ""dans la clause from. C'est la forme recommandée."#. Tag: para#: query_hql.xml:219#, no-c-formatmsgid """The <literal>implicit</literal> form does not use the join keyword. Instead, ""the associations are \"dereferenced\" using dot-notation. <literal>implicit</""literal> joins can appear in any of the HQL clauses. <literal>implicit</""literal> join result in inner joins in the resulting SQL statement."msgstr """La forme <literal>implicite</literal> n'utilise pas le mot clé join. A la ""place, les associations sont \"déréférencées\" en utilisant le notation '.'. ""Ces jointures peuvent apparaitre dans toutes les clauses. Les jointures ""<literal>implicites</literal> résultent en des inner join dans le SQL généré."#. Tag: programlisting#: query_hql.xml:226#, no-c-formatmsgid "<![CDATA[from Cat as cat where cat.mate.name like '%s%']]>"msgstr ""#. Tag: title#: query_hql.xml:230#, no-c-formatmsgid "Refering to identifier property"msgstr "Refering to identifier property"#. Tag: para#: query_hql.xml:232#, no-c-formatmsgid """There are, generally speaking, 2 ways to refer to an entity's identifier ""property:"msgstr """There are, generally speaking, 2 ways to refer to an entity's identifier ""property:"#. Tag: para#: query_hql.xml:237#, no-c-formatmsgid """The special property (lowercase) <literal>id</literal> may be used to ""reference the identifier property of an entity <emphasis>provided that ""entity does not define a non-identifier property named id</emphasis>."msgstr """The special property (lowercase) <literal>id</literal> may be used to ""reference the identifier property of an entity <emphasis>provided that ""entity does not define a non-identifier property named id</emphasis>."#. Tag: para#: query_hql.xml:244#, no-c-formatmsgid """If the entity defines a named identifier property, you may use that property ""name."msgstr """If the entity defines a named identifier property, you may use that property ""name."#. Tag: para#: query_hql.xml:250#, no-c-formatmsgid """References to composite identifier properties follow the same naming rules. ""If the entity has a non-identifier property named id, the composite ""identifier property can only be referenced by its defined named; otherwise, ""the special <literal>id</literal> property can be used to rerference the ""identifier property."msgstr """References to composite identifier properties follow the same naming rules. ""If the entity has a non-identifier property named id, the composite ""identifier property can only be referenced by its defined named; otherwise, ""the special <literal>id</literal> property can be used to rerference the ""identifier property."#. Tag: para#: query_hql.xml:257#, fuzzy, no-c-formatmsgid """Note: this has changed significantly starting in version 3.2.2. In previous ""versions, <literal>id</literal> <emphasis>always</emphasis> referred to the ""identifier property no matter what its actual name. A ramification of that ""decision was that non-identifier properties named <literal>id</literal> ""could never be referenced in Hibernate queries."msgstr """Note: this has changed significantly starting in version 3.2.2. In previous ""versions, <literal>id</literal><emphasis>always</emphasis> referred to the ""identifier property no matter what its actual name. A ramification of that ""decision was that non-identifier properties named <literal>id</literal> ""could never be referenced in Hibernate queries."#. Tag: title#: query_hql.xml:266#, no-c-formatmsgid "The select clause"msgstr "La clause select"#. Tag: para#: query_hql.xml:268#, no-c-formatmsgid """The <literal>select</literal> clause picks which objects and properties to ""return in the query result set. Consider:"msgstr """La clause <literal>select</literal> sélectionne les objets et propriétés qui ""doivent être retournés dans le résultat de la requête. Soit :"#. Tag: programlisting#: query_hql.xml:273#, no-c-formatmsgid """<![CDATA[select mate\n""from Cat as cat\n""    inner join cat.mate as mate]]>"msgstr ""#. Tag: para#: query_hql.xml:275#, no-c-formatmsgid """The query will select <literal>mate</literal>s of other <literal>Cat</""literal>s. Actually, you may express this query more compactly as:"msgstr """La requête recherchera les <literal>mate</literal>s liés aux <literal>Cat</""literal>s. Vous pouvez explimer la requête d'une manière plus compacte :"#. Tag: programlisting#: query_hql.xml:280#, no-c-formatmsgid "<![CDATA[select cat.mate from Cat cat]]>"msgstr ""#. Tag: para#: query_hql.xml:282#, no-c-formatmsgid """Queries may return properties of any value type including properties of ""component type:"msgstr """Les requêtes peuvent retourner des propriétés de n'importe quel type, même ""celles de type composant (component) :"#. Tag: programlisting#: query_hql.xml:286#, no-c-formatmsgid """<![CDATA[select cat.name from DomesticCat cat\n""where cat.name like 'fri%']]>"msgstr ""#. Tag: programlisting#: query_hql.xml:288#, no-c-formatmsgid "<![CDATA[select cust.name.firstName from Customer as cust]]>"msgstr ""#. Tag: para#: query_hql.xml:290#, no-c-formatmsgid """Queries may return multiple objects and/or properties as an array of type ""<literal>Object[]</literal>,"msgstr """Les requêtes peuvent retourner plusieurs objets et/ou propriétés sous la ""forme d'un tableau du type <literal>Object[]</literal>,"#. Tag: programlisting#: query_hql.xml:295#, no-c-formatmsgid """<![CDATA[select mother, offspr, mate.name\n""from DomesticCat as mother\n""    inner join mother.mate as mate\n""    left outer join mother.kittens as offspr]]>"msgstr ""#. Tag: para#: query_hql.xml:297#, no-c-formatmsgid "or as a <literal>List</literal>,"msgstr "ou sous la forme d'une <literal>List</literal>,"#. Tag: programlisting#: query_hql.xml:301#, no-c-formatmsgid """<![CDATA[select new list(mother, offspr, mate.name)\n""from DomesticCat as mother\n""    inner join mother.mate as mate\n""    left outer join mother.kittens as offspr]]>"msgstr ""#. Tag: para#: query_hql.xml:303#, no-c-formatmsgid "or as an actual typesafe Java object,"msgstr "ou sous la forme d'un objet Java typé,"#. Tag: programlisting#: query_hql.xml:307#, no-c-formatmsgid """<![CDATA[select new Family(mother, mate, offspr)\n""from DomesticCat as mother\n""    join mother.mate as mate\n""    left join mother.kittens as offspr]]>"msgstr ""#. Tag: para#: query_hql.xml:309#, no-c-formatmsgid """assuming that the class <literal>Family</literal> has an appropriate ""constructor."msgstr """à condition que la classe <literal>Family</literal> possède le constructeur ""approprié."#. Tag: para#: query_hql.xml:313#, no-c-formatmsgid """You may assign aliases to selected expressions using <literal>as</literal>:"msgstr """Vous pouvez assigner des alias aux expressions sélectionnées en utilisant ""<literal>as</literal> :"#. Tag: programlisting#: query_hql.xml:317#, no-c-formatmsgid """<![CDATA[select max(bodyWeight) as max, min(bodyWeight) as min, count(*) as ""n\n""from Cat cat]]>"msgstr ""#. Tag: para#: query_hql.xml:319#, no-c-formatmsgid """This is most useful when used together with <literal>select new map</""literal>:"msgstr """C'est surtout utile lorsque c'est utilisé avec <literal>select new map</""literal> :"#. Tag: programlisting#: query_hql.xml:323#, no-c-formatmsgid """<![CDATA[select new map( max(bodyWeight) as max, min(bodyWeight) as min, ""count(*) as n )\n""from Cat cat]]>"msgstr ""#. Tag: para#: query_hql.xml:325#, no-c-formatmsgid """This query returns a <literal>Map</literal> from aliases to selected values."msgstr """Cette requête retourne une <literal>Map</literal> à partir des alias vers ""les valeurs sélectionnées."#. Tag: title#: query_hql.xml:332#, no-c-formatmsgid "Aggregate functions"msgstr "Fonctions d'aggrégation"#. Tag: para#: query_hql.xml:334#, no-c-formatmsgid """HQL queries may even return the results of aggregate functions on properties:"msgstr """Les requêtes HQL peuvent aussi retourner le résultat de fonctions ""d'aggrégation sur les propriétés :"#. Tag: programlisting#: query_hql.xml:338#, no-c-formatmsgid """<![CDATA[select avg(cat.weight), sum(cat.weight), max(cat.weight), count""(cat)\n""from Cat cat]]>"msgstr ""#. Tag: para#: query_hql.xml:349#, no-c-formatmsgid "The supported aggregate functions are"msgstr "Les fonctions supportées sont"#. Tag: literal#: query_hql.xml:356#, no-c-formatmsgid "avg(...), sum(...), min(...), max(...)"msgstr "avg(...), sum(...), min(...), max(...)"#. Tag: literal#: query_hql.xml:361#, no-c-formatmsgid "count(*)"msgstr "count(*)"#. Tag: literal#: query_hql.xml:366#, no-c-formatmsgid "count(...), count(distinct ...), count(all...)"msgstr "count(...), count(distinct ...), count(all...)"#. Tag: para#: query_hql.xml:371#, no-c-formatmsgid """You may use arithmetic operators, concatenation, and recognized SQL ""functions in the select clause:"msgstr """Vous pouvez utiliser des opérateurs arithmétiques, la concaténation, et des ""fonctions SQL reconnues dans la clause select :"#. Tag: programlisting#: query_hql.xml:376#, no-c-formatmsgid """<![CDATA[select cat.weight + sum(kitten.weight)\n""from Cat cat\n""    join cat.kittens kitten\n""group by cat.id, cat.weight]]>"msgstr ""#. Tag: programlisting#: query_hql.xml:378#, no-c-formatmsgid """<![CDATA[select firstName||' '||initial||' '||upper(lastName) from Person]]>"msgstr ""#. Tag: para#: query_hql.xml:380#, no-c-formatmsgid """The <literal>distinct</literal> and <literal>all</literal> keywords may be ""used and have the same semantics as in SQL."msgstr """Les mots clé <literal>distinct</literal> et <literal>all</literal> peuvent ""être utilisés et ont la même signification qu'en SQL."#. Tag: programlisting#: query_hql.xml:385#, no-c-formatmsgid """<![CDATA[select distinct cat.name from Cat cat\n""\n""select count(distinct cat.name), count(cat) from Cat cat]]>"msgstr ""#. Tag: title#: query_hql.xml:390#, no-c-formatmsgid "Polymorphic queries"msgstr "Requêtes polymorphiques"#. Tag: para#: query_hql.xml:392#, no-c-formatmsgid "A query like:"msgstr "Une requête comme:"#. Tag: para#: query_hql.xml:398#, no-c-formatmsgid """returns instances not only of <literal>Cat</literal>, but also of subclasses ""like <literal>DomesticCat</literal>. Hibernate queries may name ""<emphasis>any</emphasis> Java class or interface in the <literal>from</""literal> clause. The query will return instances of all persistent classes ""that extend that class or implement the interface. The following query would ""return all persistent objects:"msgstr """retourne non seuleument les instances de <literal>Cat</literal>, mais aussi ""celles des sous classes comme <literal>DomesticCat</literal>. Les requêtes ""Hibernate peuvent nommer n'importe quelle classe ou interface Java dans la ""clause <literal>from</literal>. La requête retournera les instances de ""toutes les classes persistantes qui étendent cette classe ou implémente ""cette interface. La requête suivante retournera tous les objets persistants :"#. Tag: programlisting#: query_hql.xml:406#, no-c-formatmsgid "<![CDATA[from java.lang.Object o]]>"msgstr ""#. Tag: para#: query_hql.xml:408#, no-c-format

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -