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

📄 query_hql.po

📁 hibernate 开源框架的代码 jar包希望大家能喜欢
💻 PO
📖 第 1 页 / 共 5 页
字号:
#. Tag: programlisting#: query_hql.xml:389#, no-c-formatmsgid "<![CDATA[from Named n, Named m where n.name = m.name]]>"msgstr ""#. Tag: para#: query_hql.xml:391#, no-c-formatmsgid """Note that these last two queries will require more than one SQL ""<literal>SELECT</literal>. This means that the <literal>order by</literal> ""clause does not correctly order the whole result set. (It also means you ""can't call these queries using <literal>Query.scroll()</literal>.)"msgstr """Note que as duas últimas queries requerem mais de um SQL SELECT . Isto ""significa que a clausula <literal>order by</literal> não ordena corretamente ""todo o resultado. (Isso também significa que você não pode chamar essas ""queries usando <literal>Query.scroll()</literal>.)"#. Tag: title#: query_hql.xml:400#, no-c-formatmsgid "The where clause"msgstr "A clausula where"#. Tag: para#: query_hql.xml:402#, no-c-formatmsgid """The <literal>where</literal> clause allows you to narrow the list of ""instances returned. If no alias exists, you may refer to properties by name:"msgstr """A clausula <literal>where</literal> permite estreitar a lista de instancias ""retornada. Se não houver referencia alguma, pode-se referir a propriedades ""pelo nome:"#. Tag: programlisting#: query_hql.xml:407#, no-c-formatmsgid "<![CDATA[from Cat where name='Fritz']]>"msgstr ""#. Tag: para#: query_hql.xml:409#, no-c-formatmsgid "If there is an alias, use a qualified property name:"msgstr "Se houver uma referência, use o nome da propriedade qualificada:"#. Tag: programlisting#: query_hql.xml:413#, no-c-formatmsgid "<![CDATA[from Cat as cat where cat.name='Fritz']]>"msgstr ""#. Tag: para#: query_hql.xml:415#, no-c-formatmsgid "returns instances of <literal>Cat</literal> named 'Fritz'."msgstr "retorna instancias de <literal>Cat</literal> com nome ‘Fritz’."#. Tag: programlisting#: query_hql.xml:419#, no-c-formatmsgid """<![CDATA[select foo\n""from Foo foo, Bar bar\n""where foo.startDate = bar.date]]>"msgstr ""#. Tag: para#: query_hql.xml:421#, no-c-formatmsgid """will return all instances of <literal>Foo</literal> for which there exists ""an instance of <literal>bar</literal> with a <literal>date</literal> ""property equal to the <literal>startDate</literal> property of the ""<literal>Foo</literal>. Compound path expressions make the <literal>where</""literal> clause extremely powerful. Consider:"msgstr """retornará todas as instancias de <literal>Foo</literal>, para cada um que ""tiver uma instancia de <literal>bar</literal> com a propriedade ""<literal>date</literal> igual a propriedade <literal>startDate</literal> de ""<literal>Foo</literal>. Expressões de filtro compostas fazem da clausula ""<literal>where</literal>, extremamente poderosa. Consideremos:"#. Tag: programlisting#: query_hql.xml:430#, no-c-formatmsgid "<![CDATA[from Cat cat where cat.mate.name is not null]]>"msgstr ""#. Tag: para#: query_hql.xml:432#, no-c-formatmsgid """This query translates to an SQL query with a table (inner) join. If you were ""to write something like"msgstr """Esta query traduzida para uma query SQL <literal>com</literal> uma tabela ""(inner) join. Se fosse escrever algo como:"#. Tag: programlisting#: query_hql.xml:437#, no-c-formatmsgid """<![CDATA[from Foo foo\n""where foo.bar.baz.customer.address.city is not null]]>"msgstr ""#. Tag: para#: query_hql.xml:439#, no-c-formatmsgid """you would end up with a query that would require four table joins in SQL."msgstr """Poderia-se terminar <literal>com</literal> uma query que necessitasse de ""join de quatro tabelas, no SQL."#. Tag: para#: query_hql.xml:443#, no-c-formatmsgid """The <literal>=</literal> operator may be used to compare not only ""properties, but also instances:"msgstr """O operador <literal>=</literal> pode ser uasdo para comparar não apenas ""propriedades, mas também instancias:"#. Tag: programlisting#: query_hql.xml:448#, no-c-formatmsgid "<![CDATA[from Cat cat, Cat rival where cat.mate = rival.mate]]>"msgstr ""#. Tag: programlisting#: query_hql.xml:450#, no-c-formatmsgid """<![CDATA[select cat, mate\n""from Cat cat, Cat mate\n""where cat.mate = mate]]>"msgstr ""#. Tag: para#: query_hql.xml:452#, no-c-formatmsgid """The special property (lowercase) <literal>id</literal> may be used to ""reference the unique identifier of an object. See <xref linkend=\"queryhql-""identifier-property\"/> for more information."msgstr """A propriedade especial (lowercase) <literal>id</literal> pode ser usada para ""referenciar o identificador único de um objeto. (Pode-se usar também o nome ""de sua propriedade)"#. Tag: programlisting#: query_hql.xml:458#, no-c-formatmsgid """<![CDATA[from Cat as cat where cat.id = 123\n""\n""from Cat as cat where cat.mate.id = 69]]>"msgstr ""#. Tag: para#: query_hql.xml:460#, no-c-formatmsgid "The second query is efficient. No table join is required!"msgstr "A Segunda query é eficiente. Nenhuma união de tabelas é necessária!"#. Tag: para#: query_hql.xml:464#, no-c-formatmsgid """Properties of composite identifiers may also be used. Suppose ""<literal>Person</literal> has a composite identifier consisting of ""<literal>country</literal> and <literal>medicareNumber</literal>. Again, see ""<xref linkend=\"queryhql-identifier-property\"/> for more information ""regarding referencing identifier properties."msgstr """As propriedades de identificadores compostas também podem ser usadas. ""Suponha que <literal>Person</literal> tenha um identificador composto que ""consiste de <literal>country</literal> e <literal>medicareNumber</literal>."#. Tag: programlisting#: query_hql.xml:471#, no-c-formatmsgid """<![CDATA[from bank.Person person\n""where person.id.country = 'AU'\n""    and person.id.medicareNumber = 123456]]>"msgstr ""#. Tag: programlisting#: query_hql.xml:473#, no-c-formatmsgid """<![CDATA[from bank.Account account\n""where account.owner.id.country = 'AU'\n""    and account.owner.id.medicareNumber = 123456]]>"msgstr ""#. Tag: para#: query_hql.xml:475#, no-c-formatmsgid "Once again, the second query requires no table join."msgstr "Mais uma vez, a Segunda query não precisa de nenhum join de tabela."#. Tag: para#: query_hql.xml:479#, no-c-formatmsgid """Likewise, the special property <literal>class</literal> accesses the ""discriminator value of an instance in the case of polymorphic persistence. A ""Java class name embedded in the where clause will be translated to its ""discriminator value."msgstr """Assim mesmo, a propriedade especial <literal>class</literal> acessa o valor ""discriminador da instancia, no caso de persistência polimórfica. O nome de ""uma classe Java inclusa em uma clausula \"where\", será traduzida para seu ""valor descriminante."#. Tag: programlisting#: query_hql.xml:485#, no-c-formatmsgid "<![CDATA[from Cat cat where cat.class = DomesticCat]]>"msgstr ""#. Tag: para#: query_hql.xml:487#, no-c-formatmsgid """You may also use components or composite user types, or properties of said ""component types. See <xref linkend=\"queryhql-components\"/> for more ""details."msgstr """Pode-se também especificar as propriedades dos components ou tipos de ""usuário composto (e de componentes de componentes). Nunca tente usar uma ""expressão de filtro que termine na propriedade de um tipo de componente (ao ""contrário de uma propriedade de um componente). Por exemplo, se store.owner ""é uma entidade <literal>com</literal> um componente <literal>address</""literal>."#. Tag: para#: query_hql.xml:492#, no-c-formatmsgid """An \"any\" type has the special properties <literal>id</literal> and ""<literal>class</literal>, allowing us to express a join in the following way ""(where <literal>AuditLog.item</literal> is a property mapped with ""<literal>&lt;any&gt;</literal>)."msgstr """Um tipo \"any\" tem as propriedades <literal>id</literal> e <literal>class</""literal> especiais, nôs permitindo expressar um join da seguinte forma (onde ""<literal>AuditLog.item</literal> é uma propriedade mapeada <literal>com</""literal><literal>&lt;any&gt;</literal>)"#. Tag: programlisting#: query_hql.xml:498#, no-c-formatmsgid """<![CDATA[from AuditLog log, Payment payment\n""where log.item.class = 'Payment' and log.item.id = payment.id]]>"msgstr ""#. Tag: para#: query_hql.xml:500#, no-c-formatmsgid """Notice that <literal>log.item.class</literal> and <literal>payment.class</""literal> would refer to the values of completely different database columns ""in the above query."msgstr """Veja que <literal>log.item.class</literal> e <literal>payment.class</""literal> podem referir-se a valores de colunas de banco de dados ""completamente diferentes, na query acima."#. Tag: title#: query_hql.xml:508#, no-c-formatmsgid "Expressions"msgstr "Expressões"#. Tag: para#: query_hql.xml:510#, no-c-formatmsgid """Expressions allowed in the <literal>where</literal> clause include most of ""the kind of things you could write in SQL:"msgstr """As expressões permitidas na cláusula <literal>where</literal> inclui a ""maioria das coisas que você poderia escrever no SQL:"#. Tag: para#: query_hql.xml:517#, no-c-formatmsgid "mathematical operators <literal>+, -, *, /</literal>"msgstr "operadores matemáticos <literal>+, -, *, /</literal>"#. Tag: para#: query_hql.xml:522#, no-c-formatmsgid """binary comparison operators <literal>=, &gt;=, &lt;=, &lt;&gt;, !=, like</""literal>"msgstr """operadores de comparação binários <literal>=, &gt;=, &lt;=, &lt;&gt;, !=, ""like</literal>"#. Tag: para#: query_hql.xml:527#, no-c-formatmsgid "logical operations <literal>and, or, not</literal>"msgstr "operadores lógicos <literal>and, or, not</literal>"#. Tag: para#: query_hql.xml:532#, no-c-formatmsgid "Parentheses <literal>( )</literal>, indicating grouping"msgstr "parenteses <literal>( )</literal>, indicating grouping"#. Tag: para#: query_hql.xml:537#, no-c-formatmsgid """<literal>in</literal>, <literal>not in</literal>, <literal>between</""literal>, <literal>is null</literal>, <literal>is not null</literal>, ""<literal>is empty</literal>, <literal>is not empty</literal>, ""<literal>member of</literal> and <literal>not member of</literal>"msgstr """<literal>in</literal>, <literal>not in</literal>, <literal>between</""literal>, <literal>is null</literal>, <literal>is not null</literal>, ""<literal>is empty</literal>, <literal>is not empty</literal>, ""<literal>member of</literal> and <literal>not member of</literal>"#. Tag: para#: query_hql.xml:550#, no-c-formatmsgid """\"Simple\" case, <literal>case ... when ... then ... else ... end</literal>, ""and \"searched\" case, <literal>case when ... then ... else ... end</literal>"msgstr """case \"simples\" , <literal>case ... when ... then ... else ... end</""literal>, and \"searched\" case, <literal>case when ... then ... else ... ""end</literal>"#. Tag: para#: query_hql.xml:556#, no-c-formatmsgid """string concatenation <literal>...||...</literal> or <literal>concat(...,...)""</literal>"msgstr """concatenação de string <literal>...||...</literal> ou <literal>concat""(...,...)</literal>"#. Tag: para#: query_hql.xml:561#, no-c-formatmsgid """<literal>current_date()</literal>, <literal>current_time()</literal>, ""<literal>current_timestamp()</literal>"msgstr """<literal>current_date()</literal>, <literal>current_time()</literal>, ""<literal>current_timestamp()</literal>"#. Tag: para#: query_hql.xml:567#, no-c-formatmsgid """<literal>second(...)</literal>, <literal>minute(...)</literal>, <literal>hour""(...)</literal>, <literal>day(...)</literal>, <literal>month(...)</literal>, ""<literal>year(...)</literal>,"msgstr """<literal>second(...)</literal>, <literal>minute(...)</literal>, <literal>hour""(...)</literal>, <literal>day(...)</literal>, <literal>month(...)</literal>, ""<literal>year(...)</literal>,"#. Tag: para#: query_hql.xml:574#, no-c-formatmsgid """Any function or operator defined by EJB-QL 3.0: <literal>substring(), trim""(), lower(), upper(), length(), locate(), abs(), sqrt(), bit_length(), mod()""</literal>"msgstr """qualquer funcao ou operador definida pela EJB-QL 3.0: <literal>substring(), ""trim(), lower(), upper(), length(), locate(), abs(), sqrt(), bit_length(), ""mod()</literal>"#. Tag: para#: query_hql.xml:580#, no-c-formatmsgid "<literal>coalesce()</literal> and <literal>nullif()</literal>"msgstr "<literal>coalesce()</literal> and <literal>nullif()</literal>"#. Tag: para#: query_hql.xml:585#, no-c-formatmsgid """<literal>str()</literal> for converting numeric or temporal values to a ""readable string"msgstr """<literal>str()</literal> para converter valores numericos ou temporais para ""string"#. Tag: para#: query_hql.xml:591#, no-c-formatmsgid """<literal>cast(... as ...)</literal>, where the second argument is the name ""of a Hibernate type, and <literal>extract(... from ...)</literal> if ANSI ""<literal>cast()</literal> and <literal>extract()</literal> is supported by ""the underlying database"

⌨️ 快捷键说明

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