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

Hibernate example source code file (query_hql.po)

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

a, a, as, hibernate, hql, java, sql, sql, tag, tag, the, the, this, you

The Hibernate query_hql.po source code

# translation of query_hql.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2006.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# Michael H. Smith <mhideo@redhat.com>, 2007.
# Glaucia Cintra <gcintra@redhat.com>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: query_hql\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2010-02-11T05:38:15\n"
"PO-Revision-Date: 2010-03-19 09:37+1000\n"
"Last-Translator: \n"
"Language-Team:  <en@li.org>\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
#, no-c-format
msgid "HQL: The Hibernate Query Language"
msgstr "HQL: A Linguagem de Consultas do Hibernate"

#. Tag: para
#, no-c-format
msgid ""
"Hibernate uses a powerful query language (HQL) that is similar in appearance "
"to SQL. Compared with SQL, however, HQL is fully object-oriented and "
"understands notions like inheritance, polymorphism and association."
msgstr ""
"O Hibernate vem com uma poderosa linguagem de consulta (HQL) que é muito "
"parecida com o SQL. No entanto, comparado com o SQL o HQL é totalmente "
"orientado à objetos, e compreende noções de herança, polimorfismo e "
"associações."

#. Tag: title
#, no-c-format
msgid "Case Sensitivity"
msgstr "Diferenciação de maiúscula e minúscula"

#. Tag: para
#, no-c-format
msgid ""
"With the exception of names of Java classes and properties, queries are case-"
"insensitive. So <literal>SeLeCT is the same as sELEctSELECT, but org."
"hibernate.eg.FOO</literal> is not org.hibernate.eg.Foo, "
"and <literal>foo.barSet is not foo.BARSET."
msgstr ""
"As Consultas não diferenciam maiúscula de minúscula, exceto pelo nomes das "
"classes e propriedades Java. Portanto, <literal>SeLeCT é o mesmo "
"que <literal>sELEct que é o mesmo que SELECT, "
"mas <literal>org.hibernate.eg.FOO não é org.hibernate.eg."
"Foo</literal> e foo.barSet não é foo.BARSET. You do "
"not usually need to qualify the class name, since <literal>auto-import é o padrão. Por exemplo:"

#. Tag: para
#, no-c-format
msgid ""
"In order to refer to the <literal>Cat in other parts of the query, "
"you will need to assign an <emphasis>alias. For example:"
msgstr ""
"Com o objetivo de referir-se ao <literal>Cat em outras partes da "
"consulta, você precisará determinar um <emphasis>alias. Por "
"exemplo:"

#. Tag: para
#, no-c-format
msgid ""
"This query assigns the alias <literal>cat to Cat keyword is optional. You could also write:"
msgstr ""
"Essa consulta atribui um alias a <literal>cat para as instâncias "
"de <literal>Cat, portanto poderemos usar esse alias mais tarde na "
"consulta. A palavra chave <literal>as é opcional. Você também pode "
"escrever assim:"

#. Tag: para
#, no-c-format
msgid ""
"Multiple classes can appear, resulting in a cartesian product or \"cross\" "
"join."
msgstr ""
"Classes múltiplas podem ser envolvidas, resultando em um produto cartesiano "
"ou união \"cruzada\". "

#. Tag: para
#, no-c-format
msgid ""
"It is good practice to name query aliases using an initial lowercase as this "
"is consistent with Java naming standards for local variables (e.g. "
"<literal>domesticCat)."
msgstr ""
"É considerada uma boa prática nomear alias de consulta, utilizando uma letra "
"minúscula inicial, consistente com os padrões de nomeação Java para "
"variáveis locais (ex.: <literal>domesticCat). "

#. Tag: title
#, no-c-format
msgid "Associations and joins"
msgstr "Associações e uniões"

#. Tag: para
#, no-c-format
msgid ""
"You can also assign aliases to associated entities or to elements of a "
"collection of values using a <literal>join. For example:"
msgstr ""
"Podemos também atribuir aliases em uma entidade associada, ou mesmo em "
"elementos de uma coleção de valores, usando uma <literal>join. Por "
"exemplo:"

#. Tag: para
#, no-c-format
msgid "The supported join types are borrowed from ANSI SQL:"
msgstr "Os tipos de uniões suportados foram inspirados no ANSI SQL:"

#. Tag: para
#, no-c-format
msgid "<literal>inner join"
msgstr "<literal>inner join"

#. Tag: para
#, no-c-format
msgid "<literal>left outer join"
msgstr "<literal>left outer join"

#. Tag: para
#, no-c-format
msgid "<literal>right outer join"
msgstr "<literal>right outer join"

#. Tag: para
#, no-c-format
msgid "<literal>full join (not usually useful)"
msgstr "<literal>união completa (geralmente não é útil)"

#. Tag: para
#, no-c-format
msgid ""
"The <literal>inner join, left outer join and "
"<literal>right outer join constructs may be abbreviated."
msgstr ""
"As construções <literal>inteiro, união esquerda externaunião direita externa podem ser abreviadas."

#. Tag: para
#, no-c-format
msgid ""
"You may supply extra join conditions using the HQL <literal>with "
"keyword."
msgstr ""
"Você pode fornecer condições extras de união usando a palavra chave do HQL "
"<literal>with."

#. Tag: para
#, no-c-format
msgid ""
"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 ""
"A união de \"busca\" permite que associações ou coleções de valores sejam "
"inicializadas junto com o objeto pai, usando apenas um select. Isso é muito "
"útil no caso das coleções. Isso efetivamente substitui as declarações união "
"externa e declarações lazy do arquivo de mapeamento para associações e coleções. Consulte <xref linkend=\"performance-fetching\" /> para mais informações."

#. Tag: para
#, no-c-format
msgid ""
"A fetch join does not usually need to assign an alias, because the "
"associated objects should not be used in the <literal>where clause "
"(or any other clause). The associated objects are also not returned directly "
"in the query results. Instead, they may be accessed via the parent object. "
"The only reason you might need an alias is if you are recursively join "
"fetching a further collection:"
msgstr ""
"Geralmente, uma união de busca não precisa atribuir um alias, pois o objeto "
"associado não deve ser usado na cláusula <literal>where (ou em "
"qualquer outra cláusula). Também, os objetos associados não são retornados "
"diretamente nos resultados da consulta. Ao invés disso, eles devem ser "
"acessados usando o objeto pai. A única razão pela qual precisariamos de um "
"alias é quando fazemos uma união de busca recursivamente em uma coleção "
"adicional: "

#. Tag: para
#, no-c-format
msgid ""
"The <literal>fetch construct cannot be used in queries called "
"using <literal>iterate() (though scroll() can "
"be used). <literal>Fetch should be used together with "
"<literal>setMaxResults() or setFirstResult(), "
"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 would expect. <literal>Fetch should also not be used "
"together with impromptu <literal>with 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 "
"can produce unexpected results for bag mappings, so user discretion is "
"advised when formulating queries in this case. Finally, note that "
"<literal>full join fetch and right join fetch "
"are not meaningful."
msgstr ""
"Observe que a construção <literal>busca não deve ser usada em "
"consultas invocadas usando <literal>iterate() (embora possa ser "
"usado com <literal>scroll()). O Fetch também "
"não deve ser usado junto com o <literal>setMaxResults() ou "
"<literal>setFirstResult() pois essas operações são baseadas nas "
"linhas retornadas, que normalmente contém duplicidade devido à busca das "
"coleções, então o número de linhas pode não ser o que você espera. A "
"<literal>Fetch não deve ser usada junto com uma condição "
"<literal>with. É possível que seja criado um produto cartesiano "
"pela busca de união em mais do que uma coleção em uma consulta, então tome "
"cuidado nesses casos. Uma busca de união em várias coleções pode trazer "
"resultados inesperados para mapeamentos do tipo bag, tome cuidado na hora de "
"formular consultas como essas. Finalmente, observe o seguinte, a "
"<literal>busca de união completa e busca de união "
"direita</literal> não são importantes."

#. Tag: para
#, no-c-format
msgid ""
"If you are using property-level lazy fetching (with bytecode "
"instrumentation), it is possible to force Hibernate to fetch the lazy "
"properties in the first query immediately using <literal>fetch all "
"properties</literal>."
msgstr ""
"Se estiver usando o nível de propriedade busca lazy (com instrumentação de "
"bytecode), é possível forçar o Hibernate a buscar as propriedades lazy "
"imediatamente na primeira consulta, usando <literal>buscar todas as "
"propriedades </literal>. "

#. Tag: title
#, no-c-format
msgid "Forms of join syntax"
msgstr "Formas de sintáxe de uniões"

#. Tag: para
#, no-c-format
msgid ""
"HQL supports two forms of association joining: <literal>implicit "
"and <literal>explicit."
msgstr ""
"O HQL suporta duas formas de associação para união: <literal>implícitaexplícita."

#. Tag: para
#, no-c-format
msgid ""
"The queries shown in the previous section all use the <literal>explicit form does not use the join keyword. Instead, "
"the associations are \"dereferenced\" using dot-notation. <literal>implicitimplicit não usa a palavra chave \"união\". "
"Entretanto, as associações são \"diferenciadas\" usando pontuação (\".\" - "
"dot-notation). Uniões<literal>implícitas podem aparecer em "
"qualquer uma das cláusulas HQL. A união <literal>implícita resulta "
"em declarações SQL que contém uniões inteiras."

#. Tag: title
#, no-c-format
msgid "Referring to identifier property"
msgstr "Referência à propriedade do identificador "

#. Tag: para
#, no-c-format
msgid "There are 2 ways to refer to an entity's identifier property:"
msgstr ""
"Geralmente, existem duas formas para se referir à propriedade do "
"indentificador de uma entidade: "

#. Tag: para
#, no-c-format
msgid ""
"The special property (lowercase) <literal>id may be used to "
"reference the identifier property of an entity <emphasis>provided that the "
"entity does not define a non-identifier property named id</emphasis>."
msgstr ""
"A propriedade especial (em letra minúscula) <literal>id pode ser "
"usada para se referir à propriedade do identificador de uma entidade "
"<emphasis>considerando que a entidade não define uma propriedade não "
"identificadora chamada id</emphasis>."

#. Tag: para
#, no-c-format
msgid ""
"If the entity defines a named identifier property, you can use that property "
"name."
msgstr ""
"Se a entidade definir a propriedade do identificador nomeada, você poderá "
"usar este nome de propriedade. "

#. Tag: para
#, no-c-format
msgid ""
"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 property can be used to reference the "
"identifier property."
msgstr ""
"As referências à composição das propriedades do identificador seguem as "
"mesmas regras de nomeação. Se a entidade tiver uma propriedade de não "
"identificador chamada id, a composição da propriedade do identificador pode "
"somente ser referenciada pelo seu nome definido. Do contrário, uma "
"propriedade especial <literal>id poderá ser usada para referenciar "
"a propriedade do identificador. "

#. Tag: para
#, no-c-format
msgid ""
"Please note that, starting in version 3.2.2, this has changed significantly. "
"In previous versions, <literal>id always "
"referred to the identifier property regardless of its actual name. A "
"ramification of that decision was that non-identifier properties named "
"<literal>id could never be referenced in Hibernate queries."
msgstr ""
"Observe: esta ação mudou completamente na versão 3.2.2. Nas versões "
"anteriores o <literal>id sempre referia-se à "
"propriedade do identificador não importando seu nome atual. Uma ramificação "
"desta decisão era que as propriedades do não identificador de chamadas "
"<literal>id nunca poderiam ser referenciadas nas consultas do "
"Hibernate. "

#. Tag: title
#, no-c-format
msgid "The select clause"
msgstr "A cláusula select"

#. Tag: para
#, no-c-format
msgid ""
"The <literal>select clause picks which objects and properties to "
"return in the query result set. Consider the following:"
msgstr ""
"A cláusula <literal>select seleciona quais objetos e propriedades "
"retornam no resultado da consulta. Considere: "

#. Tag: para
#, no-c-format
msgid ""
"The query will select <literal>mates of other Cats (parceiros), de outros "
"<literal>Cats. Atualmente, podemos expressar a consulta de forma "
"mais compacta como: "

#. Tag: para
#, no-c-format
msgid ""
"Queries can return properties of any value type including properties of "
"component type:"
msgstr ""
"As consultas podem retornar propriedades de qualquer tipo de valor, "
"incluindo propriedades de tipo de componente: "

#. Tag: para
#, no-c-format
msgid ""
"Queries can return multiple objects and/or properties as an array of type "
"<literal>Object[]:"
msgstr ""
"As consultas podem retornar múltiplos objetos e/ou propriedades como uma "
"matriz do tipo <literal>Object[]:"

#. Tag: para
#, no-c-format
msgid "Or as a <literal>List:"
msgstr "Ou como um <literal>List:"

#. Tag: para
#, no-c-format
msgid ""
"Or - assuming that the class <literal>Family has an appropriate "
"constructor - as an actual typesafe Java object:"
msgstr ""
"Ou - considerando que a classe <literal>Family tenha um construtor "
"apropriado - como um objeto Java typesafe atual:"

#. Tag: para
#, no-c-format
msgid "You can assign aliases to selected expressions using <literal>as:"
msgstr ""
"Pode-se designar alias à expressões selecionadas usando <literal>asselecione novo mapa:"

#. Tag: para
#, no-c-format
msgid "This query returns a <literal>Map from aliases to selected values."
msgstr ""
"Esta consulta retorna um <literal>Mapa de referências para valores "
"selecionados."

#. Tag: title
#, no-c-format
msgid "Aggregate functions"
msgstr "Funções de agregação"

#. Tag: para
#, no-c-format
msgid "HQL queries can even return the results of aggregate functions on properties:"
msgstr ""
"As consultas HQL podem retornar o resultado de funções agregadas nas "
"propriedades:"

#. Tag: para
#, no-c-format
msgid "The supported aggregate functions are:"
msgstr "As funções agregadas suportadas são: "

#. Tag: para
#, no-c-format
msgid "<literal>avg(...), sum(...), min(...), max(...)"
msgstr "<literal>avg(...), sum(...), min(...), max(...)"

#. Tag: para
#, no-c-format
msgid "<literal>count(*)"
msgstr "<literal>count(*)"

#. Tag: para
#, no-c-format
msgid "<literal>count(...), count(distinct ...), count(all...)"
msgstr "<literal>count(...), count(distinct ...), count(all...)"

#. Tag: para
#, no-c-format
msgid ""
"You can use arithmetic operators, concatenation, and recognized SQL "
"functions in the select clause:"
msgstr ""
"Pode-se usar operadores aritméticos, concatenação e funções SQL reconhecidas "
"na cláusula select: "

#. Tag: para
#, no-c-format
msgid ""
"The <literal>distinct and all keywords can be "
"used and have the same semantics as in SQL."
msgstr ""
"As palavras <literal>distinct e all podem ser "
"usadas e têm a mesma semântica que no SQL. "

#. Tag: title
#, no-c-format
msgid "Polymorphic queries"
msgstr "Pesquisas Polimórficas"

#. Tag: para
#, no-c-format
msgid "A query like:"
msgstr "A consulta:"

#. Tag: para
#, no-c-format
msgid ""
"returns instances not only of <literal>Cat, but also of subclasses "
"like <literal>DomesticCat. Hibernate queries can name "
"<emphasis>any Java class or interface in the from, mas também de "
"subclasses como <literal>DomesticCat. As consultas do Hibernate "
"podem nomear qualquer classe Java ou interface na cláusula <literal>from might be implemented by various "
"persistent classes:"
msgstr ""
"A interface <literal>Named pode ser implementada por várias "
"classes persistentes:"

#. Tag: para
#, no-c-format
msgid ""
"These last two queries will require more than one SQL <literal>SELECTorder by clause does not "
"correctly order the whole result set. It also means you cannot call these "
"queries using <literal>Query.scroll()."
msgstr ""
"Note que as duas últimas consultas requerem mais de um SQL <literal>SELECTorder by não "
"ordena corretamente todo o resultado. Isso também significa que você não "
"pode chamar essas consultas usando <literal>consulta.scroll()."

#. Tag: title
#, no-c-format
msgid "The where clause"
msgstr "A cláusula where"

#. Tag: para
#, no-c-format
msgid ""
"The <literal>where clause allows you to refine the list of "
"instances returned. If no alias exists, you can refer to properties by name:"
msgstr ""
"A cláusula <literal>where permite estreitar a lista de instâncias "
"retornadas. Se não houver referência alguma, pode-se referir à propriedades "
"pelo nome: "

#. Tag: para
#, no-c-format
msgid "If there is an alias, use a qualified property name:"
msgstr "Se houver uma referência, use o nome da propriedade qualificada:"

#. Tag: para
#, no-c-format
msgid "This returns instances of <literal>Cat named 'Fritz'."
msgstr "Isto retorna instâncias de <literal>Cat com nome ‘Fritz’."

#. Tag: para
#, no-c-format
msgid "The following query:"
msgstr "A seguinte consulta:"

#. Tag: para
#, no-c-format
msgid ""
"returns all instances of <literal>Foo with an instance of "
"<literal>bar with a date property equal to the "
"<literal>startDate property of the Foo. "
"Compound path expressions make the <literal>where clause extremely "
"powerful. Consider the following:"
msgstr ""
"retornará todas as instâncias de <literal>Foo, para cada um que "
"tiver uma instância de <literal>bar com a propriedade "
"<literal>date igual a propriedade startDate de "
"<literal>Foo. Expressões de caminho compostas fazem da cláusula "
"<literal>where, extremamente poderosa. Consideremos: "

#. Tag: para
#, no-c-format
msgid "This query translates to an SQL query with a table (inner) join. For example:"
msgstr ""
"Esta consulta traduz para uma consulta SQL com uma tabela (inner) união. Por "
"exemplo:"

#. Tag: para
#, no-c-format
msgid "would result in a query that would require four table joins in SQL."
msgstr "resultaria numa consulta que necessitasse de união de quatro tabelas, no SQL."

#. Tag: para
#, no-c-format
msgid ""
"The <literal>= operator can be used to compare not only "
"properties, but also instances:"
msgstr ""
"O operador <literal>= pode ser usado para comparar não apenas "
"propriedades, mas também instâncias: "

#. Tag: para
#, no-c-format
msgid ""
"The special property (lowercase) <literal>id can be used to "
"reference the unique identifier of an object. See <xref linkend=\"queryhql-"
"identifier-property\" /> for more information."
msgstr ""
"A propriedade especial (letra minúscula) <literal>id pode ser "
"usada para referenciar o identificador único de um objeto. Para maiores "
"informações consulte a <xref linkend=\"queryhql-"
"identifier-property\" />.  "

#. Tag: para
#, no-c-format
msgid "The second query is efficient and does not require a table join."
msgstr "A segunda consulta é eficiente e não requer nenhuma união de tabelas."

#. Tag: para
#, no-c-format
msgid ""
"Properties of composite identifiers can also be used. Consider the following "
"example where <literal>Person has composite identifiers consisting "
"of <literal>country and medicareNumber:"
msgstr ""
"As propriedades de identificadores compostas também podem ser usadas. "
"Considere o seguinte exemplo onde <literal>Person possui "
"identificadores compostos que consistem de <literal>country e "
"<literal>medicareNumber: "

#. Tag: para
#, no-c-format
msgid "Once again, the second query does not require a table join."
msgstr "Mais uma vez, a segunda consulta não precisa de nenhuma união de tabela."

#. Tag: para
#, no-c-format
msgid ""
"See <xref linkend=\"queryhql-identifier-property\" /> for more information "
"regarding referencing identifier properties)"
msgstr ""
"Veja <xref linkend=\"queryhql-identifier-property\" /> para maiores "
"informações a respeito das propriedades do identificador referenciado) "

#. Tag: para
#, no-c-format
msgid ""
"The special property <literal>class 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 ""
"Da mesma forma, a propriedade especial <literal>class acessa o "
"valor discriminador da instância, no caso de persistência polimórfica. O "
"nome de uma classe Java inclusa em uma cláusula where, será traduzida para "
"seu valor discriminante."

#. Tag: para
#, no-c-format
msgid ""
"You can also use components or composite user types, or properties of said "
"component types. See <xref linkend=\"queryhql-components\" /> for more "
"information."
msgstr ""
"Pode-se também utilizar componentes ou tipos de usuários de composição, ou "
"propriedades dos tipos de componentes mencionados. Veja <xref linkend=\"queryhql-components\" /> para maiores informações."

#. Tag: para
#, no-c-format
msgid ""
"An \"any\" type has the special properties <literal>id and "
"<literal>class that allows you to express a join in the following "
"way (where <literal>AuditLog.item is a property mapped with "
"<literal><any>):"
msgstr ""
"Um tipo \"any\" possui as propriedades <literal>id e "
"<literal>class especiais, nos permitindo expressar uma união da "
"seguinte forma (onde <literal>AuditLog.item é uma propriedade "
"mapeada <literal>com<any>):"

#. Tag: para
#, no-c-format
msgid ""
"The <literal>log.item.class and payment.class "
"would refer to the values of completely different database columns in the "
"above query."
msgstr ""
"Veja que <literal>log.item.class e payment.class clause include the "
"following:"
msgstr ""
"As expressões permitidas na cláusula <literal>where incluem o "
"seguinte:"

#. Tag: para
#, no-c-format
msgid "mathematical operators: <literal>+, -, *, /"
msgstr "operadores matemáticos: <literal>+, -, *, /"

#. Tag: para
#, no-c-format
msgid ""
"binary comparison operators: <literal>=, >=, <=, <>, !=, like"
msgstr "operadores lógicos <literal>and, or, not"

#. Tag: para
#, no-c-format
msgid "Parentheses <literal>( ) that indicates grouping"
msgstr "Parênteses <literal>( ) que indica o agrupamento"

#. Tag: para
#, no-c-format
msgid ""
"<literal>in, not in, betweenis null, is not null, "
"<literal>is empty, is not empty, "
"<literal>member of and not member of"
msgstr ""
"<literal>in, not in, betweenis null, is not null, "
"<literal>is empty, is not empty, "
"<literal>member of and not member of"

#. Tag: para
#, no-c-format
msgid ""
"\"Simple\" case, <literal>case ... when ... then ... else ... end, "
"and \"searched\" case, <literal>case when ... then ... else ... end"
msgstr ""
"case \"simples\" , <literal>case ... when ... then ... else ... endcase when ... then ... else ... "
"end</literal>"

#. Tag: para
#, no-c-format
msgid ""
"string concatenation <literal>...||... or concat(...,...)"
"</literal>"
msgstr ""
"concatenação de string <literal>...||... ou concat"
"(...,...)</literal>"

#. Tag: para
#, no-c-format
msgid ""
"<literal>current_date(), current_time(), and "
"<literal>current_timestamp()"
msgstr ""
"<literal>current_date(), current_time() e "
"<literal>current_timestamp() "

#. Tag: para
#, no-c-format
msgid ""
"<literal>second(...), minute(...), hour"
"(...)</literal>, day(...), month(...), "
"and <literal>year(...)"
msgstr ""
"<literal>second(...), minute(...), hour"
"(...)</literal>, day(...), month(...) "
"e <literal>year(...)"

#. Tag: para
#, no-c-format
msgid ""
"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 função ou operador definidos pela EJB-QL 3.0: <literal>substring(), "
"trim(), lower(), upper(), length(), locate(), abs(), sqrt(), bit_length(), "
"mod()</literal>"

#. Tag: para
#, no-c-format
msgid "<literal>coalesce() and nullif()"
msgstr "<literal>coalesce() and nullif()"

#. Tag: para
#, no-c-format
msgid ""
"<literal>str() for converting numeric or temporal values to a "
"readable string"
msgstr ""
"<literal>str() para converter valores numéricos ou temporais para "
"uma string de leitura"

#. Tag: para
#, no-c-format
msgid ""
"<literal>cast(... as ...), where the second argument is the name "
"of a Hibernate type, and <literal>extract(... from ...) if ANSI "
"<literal>cast() and extract() is supported by "
"the underlying database"
msgstr ""
"<literal>cast(... as ...), onde o segundo argumento é o nome do "
"tipo hibernate, e<literal>extract(... from ...) se ANSI "
"<literal>cast() e extract() é suportado pelo "
"banco de dados adjacente"

#. Tag: para
#, no-c-format
msgid ""
"the HQL <literal>index() function, that applies to aliases of a "
"joined indexed collection"
msgstr ""
"A função HQL <literal>index() , que se aplicam às referências de "
"coleçôes associadas e indexadas"

#. Tag: para
#, no-c-format
msgid ""
"HQL functions that take collection-valued path expressions: <literal>size(), "
"minelement(), maxelement(), minindex(), maxindex()</literal>, along with the "
"special <literal>elements() and indices "
"functions that can be quantified using <literal>some, all, exists, any, in e funções de "
"<literal>índices que podem ser quantificadas usando some, "
"all, exists, any, in</literal>."

#. Tag: para
#, no-c-format
msgid ""
"Any database-supported SQL scalar function like <literal>sign(), "
"<literal>trunc(), rtrim(), and sin()trunc(), rtrim() e "
"<literal>sin()"

#. Tag: para
#, no-c-format
msgid "JDBC-style positional parameters <literal>?"
msgstr "Parâmetros posicionais ao estilo JDBC <literal>?"

#. Tag: para
#, no-c-format
msgid ""
"named parameters <literal>:name, :start_date, "
"and <literal>:x1"
msgstr ""
"Parâmetros nomeados <literal>:name, :start_date "
"e <literal>:x1"

#. Tag: para
#, no-c-format
msgid ""
"SQL literals <literal>'foo', 69, 6.66E"
"+2</literal>, '1970-01-01 10:00:01.0'"
msgstr ""
"Literais SQL <literal>'foo', 69, 6.66E"
"+2</literal>, '1970-01-01 10:00:01.0'"

#. Tag: para
#, no-c-format
msgid ""
"Java <literal>public static final constants eg.Color."
"TABBY</literal>"
msgstr ""
"Constantes Java <literal>final estático públicoex: Color."
"TABBY</literal>"

#. Tag: para
#, no-c-format
msgid "<literal>in and between can be used as follows:"
msgstr ""
"<literal>in e between podem ser usadas da "
"seguinte maneira: "

#. Tag: para
#, no-c-format
msgid "The negated forms can be written as follows:"
msgstr "As formas negativas podem ser escritas conforme segue abaixo:"

#. Tag: para
#, no-c-format
msgid ""
"Similarly, <literal>is null and is not null can "
"be used to test for null values."
msgstr ""
"Da mesma forma, <literal>is null e is not null "
"podem ser usados para testar valores nulos."

#. Tag: para
#, no-c-format
msgid ""
"Booleans can be easily used in expressions by declaring HQL query "
"substitutions in Hibernate configuration:"
msgstr ""
"Booleanos podem ser facilmente usados em expressões, declarando as "
"substituições da consulta HQL, na configuração do Hibernate:"

#. Tag: para
#, no-c-format
msgid ""
"This will replace the keywords <literal>true and false1 and 0 in "
"the translated SQL from this HQL:"
msgstr ""
"Isso irá substituir as palavras chave <literal>true e "
"<literal>falsepelos literais 10 na tradução do HQL para SQL."

#. Tag: para
#, no-c-format
msgid ""
"You can test the size of a collection with the special property "
"<literal>size or the special size() function."
msgstr ""
"Pode-se testar o tamanho de uma coleção com a propriedade especial "
"<literal>size ou a função especial size()."

#. Tag: para
#, no-c-format
msgid ""
"For indexed collections, you can refer to the minimum and maximum indices "
"using <literal>minindex and maxindex functions. "
"Similarly, you can refer to the minimum and maximum elements of a collection "
"of basic type using the <literal>minelement and "
"<literal>maxelement functions. For example:"
msgstr ""
"Para coleções indexadas, você pode se referir aos índices máximo e mínimo, "
"usando as funções <literal>minindex e maxindex. "
"Igualmente, pode-se referir aos elementos máximo e mínimo de uma coleção de "
"tipos básicos usando as funções <literal>minelement e "
"<literal>maxelement. Por exemplo:"

#. Tag: para
#, no-c-format
msgid ""
"The SQL functions <literal>any, some, all, exists, in are "
"supported when passed the element or index set of a collection "
"(<literal>elements and indices functions) or "
"the result of a subquery (see below):"
msgstr ""
"As funções SQL <literal>any, some, all, exists, in são suportadas "
"quando passado o elemento ou o conjunto de índices de uma coleção "
"(<literal>elements e índices de funções) ou o "
"resultado de uma subconsulta (veja abaixo):"

#. Tag: para
#, no-c-format
msgid ""
"Note that these constructs - <literal>size, elementsindices, minindex, "
"<literal>maxindex, minelement, "
"<literal>maxelement - can only be used in the where clause in "
"Hibernate3."
msgstr ""
"Note que essas construções - <literal>tamanho, elementosíndices, minindex, "
"<literal>maxindex, minelement, "
"<literal>maxelement – só podem ser usados na cláusula where do "
"Hibernate3."

#. Tag: para
#, no-c-format
msgid ""
"Elements of indexed collections (arrays, lists, and maps) can be referred to "
"by index in a where clause only:"
msgstr ""
"Elementos de coleções com índice (matriz, listas, mapas) podem ser "
"referenciadas pelo índice (apenas na cláusula where):"

#. Tag: para
#, no-c-format
msgid ""
"The expression inside <literal>[] can even be an arithmetic "
"expression:"
msgstr ""
"A expressão entre colchetes <literal>[] pode ser até uma expressão "
"aritimética:"

#. Tag: para
#, no-c-format
msgid ""
"HQL also provides the built-in <literal>index() function for "
"elements of a one-to-many association or collection of values."
msgstr ""
"O HQL também provê a função interna <literal>index() para "
"elementos de associação um-para-muitos ou coleção de valores."

#. Tag: para
#, no-c-format
msgid "Scalar SQL functions supported by the underlying database can be used:"
msgstr ""
"Funções escalares SQL, suportadas pelo banco de dados subjacente podem ser "
"usadas:"

#. Tag: para
#, no-c-format
msgid ""
"Consider how much longer and less readable the following query would be in "
"SQL:"
msgstr ""
"Se ainda não estiver totalmente convencido, pense o quão maior e menos "
"legível poderia ser a consulta a seguir, em SQL: "

#. Tag: para
#, no-c-format
msgid "<emphasis>Hint: something like"
msgstr "<emphasis>Hint: algo como:"

#. Tag: title
#, no-c-format
msgid "The order by clause"
msgstr "A cláusula ordenar por"

#. Tag: para
#, no-c-format
msgid ""
"The list returned by a query can be ordered by any property of a returned "
"class or components:"
msgstr ""
"A lista retornada pela consulta pode ser ordenada por qualquer propriedade "
"da classe ou componentes retornados:"

#. Tag: para
#, no-c-format
msgid ""
"The optional <literal>asc or desc indicate "
"ascending or descending order respectively."
msgstr ""
"As opções <literal>asc ou desc indicam ordem "
"crescente ou decrescente, respectivamente."

#. Tag: title
#, no-c-format
msgid "The group by clause"
msgstr "A cláusula agrupar por"

#. Tag: para
#, no-c-format
msgid ""
"A query that returns aggregate values can be grouped by any property of a "
"returned class or components:"
msgstr ""
"Uma consulta que retorne valores agregados, podem ser agrupados por qualquer "
"propriedade de uma classe ou componentes retornados:"

#. Tag: para
#, no-c-format
msgid "A <literal>having clause is also allowed."
msgstr "Uma cláusula <literal>having também é permitida."

#. Tag: para
#, no-c-format
msgid ""
"SQL functions and aggregate functions are allowed in the <literal>havingorder by clauses if they are supported by "
"the underlying database (i.e., not in MySQL)."
msgstr ""
"Funções SQL e funções agregadas são permitidas nas cláusulas "
"<literal>having e order by, se suportadas pelo "
"banco de dados subjacentes (ex: não no MeuSQL). "

#. Tag: para
#, no-c-format
msgid ""
"Neither the <literal>group by clause nor the order bycat are non-"
"aggregated. You have to list all non-aggregated properties explicitly."
msgstr ""
"Note que, nem a cláusula <literal>group by ou order by caso todas as propriedades do cat for more "
"information."
msgstr ""
"Note que as subconsultas também podem utilizar a sintáxe <literal>row value "
"constructor</literal>. Veja  para maiores "
"detalhes. "

#. Tag: title
#, no-c-format
msgid "HQL examples"
msgstr "Exemplos de HQL"

#. Tag: para
#, no-c-format
msgid ""
"Hibernate queries can be quite powerful and complex. In fact, the power of "
"the query language is one of Hibernate's main strengths. The following "
"example queries are similar to queries that have been used on recent "
"projects. Please note that most queries you will write will be much simpler "
"than the following examples."
msgstr ""
"As consultas do Hibernate, podem ser muito poderosas e complexas. De fato, o "
"poder da linguagem de consulta é um dos pontos principais na distribuição do "
"Hibernate. Aqui temos algumas consultas de exemplo, muito similares a "
"consultas usadas em um projeto recente. Note que a maioria das consultas que "
"você irá escrever, são mais simples que estas."

#. Tag: para
#, no-c-format
msgid ""
"The following query returns the order id, number of items, the given minimum "
"total value and the total value of the order for all unpaid orders for a "
"particular customer. The results are ordered by total value. In determining "
"the prices, it uses the current catalog. The resulting SQL query, against "
"the <literal>ORDER, ORDER_LINE, "
"<literal>PRODUCT, CATALOG and PRICE, ORDER_LINEPRODUCT, CATALOG e "
"<literal>PRICE, têm quatro uniões inteiras e uma subseleção (não "
"correlacionada)."

#. Tag: para
#, no-c-format
msgid ""
"What a monster! Actually, in real life, I'm not very keen on subqueries, so "
"my query was really more like this:"
msgstr ""
"Que monstro! Na verdade, na vida real, eu não sou muito afeiçoado à "
"subconsultas, então minha consulta seria mais parecida com isto:"

#. Tag: para
#, no-c-format
msgid ""
"The next query counts the number of payments in each status, excluding all "
"payments in the <literal>AWAITING_APPROVAL status where the most "
"recent status change was made by the current user. It translates to an SQL "
"query with two inner joins and a correlated subselect against the "
"<literal>PAYMENT, PAYMENT_STATUS and "
"<literal>PAYMENT_STATUS_CHANGE tables."
msgstr ""
"A próxima consulta conta o número de pagamentos em cada status, excluindo "
"todos os pagamentos no status <literal>AWAITING_APPROVAL, onde a "
"mais recente mudança de status foi feita pelo usuário atual. Traduz-se para "
"uma consulta SQL <literal>com duas uniões inteiras e uma "
"subseleção correlacionada, nas tabelas <literal>PAYMENT, "
"<literal>PAYMENT_STATUS e PAYMENT_STATUS_CHANGE collection was mapped as a list, "
"instead of a set, the query would have been much simpler to write."
msgstr ""
"Se eu tivesse mapeado a coleção <literal>statusChanges como um "
"List, ao invés de um Set, a consulta teria sido muito mais simples de "
"escrever. "

#. Tag: para
#, no-c-format
msgid ""
"The next query uses the MS SQL Server <literal>isNull() function "
"to return all the accounts and unpaid payments for the organization to which "
"the current user belongs. It translates to an SQL query with three inner "
"joins, an outer join and a subselect against the <literal>ACCOUNT, "
"<literal>PAYMENT, PAYMENT_STATUS, "
"<literal>ACCOUNT_TYPE, ORGANIZATION and "
"<literal>ORG_USER tables."
msgstr ""
"A próxima consulta usa a função <literal>isNull() do Servidor MS "
"SQL, para retornar todas as contas e pagamentos não efetuados para a "
"organização, para aquele que o usuário atual pertencer. Traduz-se para uma "
"consulta SQL <literal>com três uniões inteiras, uma união externa "
"e uma subseleção nas tabelas <literal>ACCOUNT, PAYMENTPAYMENT_STATUS, ACCOUNT_TYPEORGANIZATION e ORG_USER ."

#. Tag: para
#, no-c-format
msgid "For some databases, we would need to do away with the (correlated) subselect."
msgstr ""
"Para alguns bancos de dados, precisaremos eliminar a subseleção "
"(correlacionada)."

#. Tag: title
#, no-c-format
msgid "Bulk update and delete"
msgstr "Atualização e correção em lote"

#. Tag: para
#, no-c-format
msgid ""
"HQL now supports <literal>update, delete and "
"<literal>insert ... select ... statements. See , deleteinsert ... select .... Veja  with zero messages "
"because of the inner join, the following form is also useful:"
msgstr ""
"Com essa solução não se pode retornar um <literal>User sem nenhuma "
"menssagem, por causa da união inteira, a forma a seguir também é útil:"

#. Tag: para
#, no-c-format
msgid "Properties of a JavaBean can be bound to named query parameters:"
msgstr ""
"As propriedades de um JavaBean podem ser limitadas à parâmetros nomeados da "
"consulta:"

#. Tag: para
#, no-c-format
msgid ""
"Collections are pageable by using the <literal>Query interface "
"with a filter:"
msgstr ""
"As coleções são pagináveis, usando a interface <literal>Query com "
"um filtro:"

#. Tag: para
#, no-c-format
msgid "Collection elements can be ordered or grouped using a query filter:"
msgstr ""
"Os elementos da coleção podem ser ordenados ou agrupados usando um filtro de "
"consulta: "

#. Tag: para
#, no-c-format
msgid "You can find the size of a collection without initializing it:"
msgstr "Pode-se achar o tamanho de uma coleção sem inicializá-la:"

#. Tag: title
#, no-c-format
msgid "Components"
msgstr "Componentes"

#. Tag: para
#, no-c-format
msgid ""
"Components can be used similarly to the simple value types that are used in "
"HQL queries. They can appear in the <literal>select clause as "
"follows:"
msgstr ""
"Os componentes podem ser usados de quase todas as formas que os tipos de "
"valores simples são usados nas consultas HQL. Eles podem aparecer na "
"cláusula <literal>select: "

#. Tag: para
#, no-c-format
msgid ""
"where the Person's name property is a component. Components can also be used "
"in the <literal>where clause:"
msgstr ""
"onde a propriedade do nome da Person é um componente. Os componentes também "
"podem ser utilizados na cláusula <literal>where:"

#. Tag: para
#, no-c-format
msgid "Components can also be used in the <literal>order by clause:"
msgstr ""
"Os componentes também podem ser usados na cláusula <literal>order by "
"syntax, sometimes referred to AS <literal>tuple syntax, even "
"though the underlying database may not support that notion. Here, we are "
"generally referring to multi-valued comparisons, typically associated with "
"components. Consider an entity Person which defines a name component:"
msgstr ""
"O HQL suporta o uso da sintáxe ANSI SQL <literal>row value constructortupla, embora "
"o banco de dados adjacente possa não suportar esta noção. Aqui nós "
"geralmente nos referimos às comparações de valores múltiplos, tipicamente "
"associada aos componentes. Considere uma entidade Person que define um "
"componente de nome:"

#. Tag: para
#, no-c-format
msgid ""
"That is valid syntax although it is a little verbose. You can make this more "
"concise by using <literal>row value constructor syntax:"
msgstr ""
"Esta é uma sintáxe válida, embora um pouco verbosa. Seria ótimo tornar essa "
"sintáxe um pouco mais concisa e utilizar a sintáxe <literal>row value "
"constructor</literal>:"

#. Tag: para
#, no-c-format
msgid ""
"It can also be useful to specify this in the <literal>select "
"clause:"
msgstr "Pode também ser útil especificar isto na cláusula <literal>select:"

#. Tag: para
#, no-c-format
msgid ""
"Using <literal>row value constructor syntax can also be beneficial "
"when using subqueries that need to compare against multiple values:"
msgstr ""
"Com o uso da sintáxe <literal>row value constructor, e que pode "
"ser de benéfico, seria quando utilizar as subconsultas que precisem comparar "
"com os valores múltiplos:"

#. Tag: para
#, no-c-format
msgid ""
"One thing to consider when deciding if you want to use this syntax, is that "
"the query will be dependent upon the ordering of the component sub-"
"properties in the metadata."
msgstr ""
"Ao decidir se você quer usar esta sintáxe ou não, deve-se considerar o fato "
"de que a consulta será dependente da ordenação das sub-propriedades do "
"componente no metadados. "

Other Hibernate examples (source code examples)

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