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

hibernate, hql, hql, java, la, las, sql, sql, tag, tag, the, the, this, you

The Hibernate query_hql.po source code

# translation of query_hql.po to
# Michael H. Smith <mhideo@redhat.com>, 2007.
# Angela Garcia <agarcia@redhat.com>, 2009, 2010.
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
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-15 14:46+1000\n"
"Last-Translator: Angela Garcia <agarcia@redhat.com>\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: El lenguaje de consulta de 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 ""
"Hibernate utiliza un lenguaje de consulta potente (HQL) que se parece a SQL. "
"Sin embargo, comparado con SQL, HQL es completamente orientado a objetos y "
"comprende nociones como herencia, polimorfismo y asociación."

#. Tag: title
#, no-c-format
msgid "Case Sensitivity"
msgstr "Sensibilidad a mayúsculas"

#. 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 ""
"Las consultas no son sensibles a mayúsculas, a excepción de los nombres de "
"las clases y propiedades Java. De modo que <literal>SeLeCT es lo "
"mismo que <literal>sELEct e igual a SELECT, "
"pero <literal>org.hibernate.eg.FOO no es lo mismo que org."
"hibernate.eg.Foo</literal> y foo.barSet no es igual a "
"<literal>foo.BARSET."

#. Tag: para
#, no-c-format
msgid ""
"This manual uses lowercase HQL keywords. Some users find queries with "
"uppercase keywords more readable, but this convention is unsuitable for "
"queries embedded in Java code."
msgstr ""
"Este manual utiliza palabras clave HQL en minúsculas. Algunos usuarios "
"encuentran que las consultas con palabras clave en mayúsculas son más "
"fáciles de leer, pero esta convención no es apropiada para las peticiones "
"incluidas en código Java."

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

#. Tag: para
#, no-c-format
msgid "The simplest possible Hibernate query is of the form:"
msgstr "La consulta posible más simple de Hibernate es de esta manera:"

#. Tag: para
#, no-c-format
msgid ""
"This returns all instances of the class <literal>eg.Cat. You do "
"not usually need to qualify the class name, since <literal>auto-import. "
"Usualmente no es necesario calificar el nombre de la clase ya que "
"<literal>auto-import es el valor predeterminado. Por ejemplo:"

#. 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 ""
"Con el fin de referirse al <literal>Cat en otras partes de la "
"petición, necesitará asignar un <emphasis>alias. Por ejemplo:"

#. Tag: para
#, no-c-format
msgid ""
"This query assigns the alias <literal>cat to Cat keyword is optional. You could also write:"
msgstr ""
"Esta consulta asigna el alias <literal>cat a las instancias "
"<literal>Cat, de modo que puede utilizar ese alias luego en la "
"consulta. La palabra clave <literal>as es opcional. También podría "
"escribir:"

#. Tag: para
#, no-c-format
msgid ""
"Multiple classes can appear, resulting in a cartesian product or \"cross\" "
"join."
msgstr ""
"Pueden aparecer múltiples clases, lo que causa un producto cartesiano o una "
"unión \"cruzada\" (cross join)."

#. 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 ""
"Se considera como una buena práctica el nombrar los alias de consulta "
"utilizando una inicial en minúsculas, consistente con los estándares de "
"nombrado de Java para las variables locales (por ejemplo, "
"<literal>domesticCat). "

#. Tag: title
#, no-c-format
msgid "Associations and joins"
msgstr "Asociaciones y uniones (joins)"

#. 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 ""
"También puede asignar alias a entidades asociadas o a elementos de una "
"colección de valores utilizando una <literal>join. Por ejemplo:"

#. Tag: para
#, no-c-format
msgid "The supported join types are borrowed from ANSI SQL:"
msgstr "Los tipos de uniones soportadas se tomaron prestados de 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>full join (no es útil usualmente)"

#. Tag: para
#, no-c-format
msgid ""
"The <literal>inner join, left outer join and "
"<literal>right outer join constructs may be abbreviated."
msgstr ""
"Las construcciones <literal>inner join, left outer joinright outer join se pueden abreviar."

#. Tag: para
#, no-c-format
msgid ""
"You may supply extra join conditions using the HQL <literal>with "
"keyword."
msgstr ""
"Puede proveer condiciones extras de unión utilizando la palabra clave "
"<literal>with de HQL."

#. 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 ""
"Una unión de \"recuperación\" le permite a las asociaciones o colecciones de "
"valores que se inicialicen junto a sus objetos padres, usando un sólo "
"select. Esto es útil particularmente en el caso de una colección. "
"Efectivamente sobrescribe la unión externa y las declaraciones perezosas del "
"archivo de mapeo para asociaciones y colecciones. Consulte <xref linkend=\"performance-fetching\" /> para obtener más información."

#. 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 ""
"Usualmente no se necesita asignársele un alias a una unión de recuperación "
"ya que los objetos asociados no se deben utilizar en la cláusula "
"<literal>where (ni en cualquier otra cláusula). Los objetos "
"asociados no se retornan directamente en los resultados de la consulta. En "
"cambio, se pueden acceder por medio del objeto padre. La única razón por la "
"que necesitaríamos un alias es si estamos uniendo recursivamente otra "
"colección:"

#. 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 ""
"La construcción <literal>fetch no puede utilizarse en consultas "
"llamadas que usen <literal>iterate() (aunque se puede utilizar "
"<literal>scroll()). Fetch se debe usar junto "
"con <literal>setMaxResults() o setFirstResult() "
"ya que estas operaciones se basan en las filas de resultados, las cuales "
"usualmente contienen duplicados para la recuperación de colección temprana, "
"por lo tanto, el número de filas no es lo que se esperaría. <literal>Fetchwith "
"improvisadas. Es posible crear un producto cartesiano por medio de una "
"recuperación por union más de una colección en una consulta, así que tenga "
"cuidado en este caso. La recuperación por unión de múltiples roles de "
"colección también da resultados a veces inesperados para mapeos de bag, así "
"que tenga cuidado de cómo formular sus consultas en este caso. Finalmente, "
"observe que <literal>full join fetch y right join fetch "
"and <literal>explicit."
msgstr ""
"HQL soporta dos formas de unión de asociación: <literal>implicit y "
"<literal>explicit."

#. Tag: para
#, no-c-format
msgid ""
"The queries shown in the previous section all use the <literal>explicit, en donde la palabra clave join se utiliza "
"explícitamente en la claúsula from. Esta es la forma recomendada."

#. Tag: para
#, no-c-format
msgid ""
"The <literal>implicit form does not use the join keyword. Instead, "
"the associations are \"dereferenced\" using dot-notation. <literal>implicitimplicit no utiliza la palabra clave join. Las "
"asociaciones se \"desreferencian\" utilizando la notación punto. Uniones "
"<literal>implicit pueden aparecer en cualquiera de las cláusulas "
"HQL. La unión <literal>implicit causa uniones internas (inner "
"joins) en la declaración SQL que resulta."

#. Tag: title
#, no-c-format
msgid "Referring to identifier property"
msgstr "Referencia a la propiedad identificadora "

#. Tag: para
#, no-c-format
msgid "There are 2 ways to refer to an entity's identifier property:"
msgstr "Hay dos maneras de referirse a la propiedad identificadora de una entidad:"

#. 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 ""
"La propiedad especial (en minúsculas) <literal>id se puede "
"utilizar para referenciar la propiedad identificadora de una entidad "
"<emphasis> dado que la entidad no defina un id del nombre de la propiedad no-"
"identificadora</emphasis>."

#. Tag: para
#, no-c-format
msgid ""
"If the entity defines a named identifier property, you can use that property "
"name."
msgstr ""
"Si la entidad define una propiedad identificadora nombrada, puede utilizar "
"ese nombre de propiedad."

#. 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 ""
"Las referencias a propiedades identificadoras compuestas siguen las mismas "
"reglas de nombramiento. Si la entidad no tiene un id del nombre de la "
"propiedad no-identificadora, la propiedad identificadora compuesta sólamente "
"puede ser referenciada por su nombre definido. De otra manera se puede "
"utilizar la propiedad <literal>id especial para referenciar la "
"propiedad identificadora."

#. 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 que esto ha cambiado bastante desde la version 3.2.2. En versiones "
"previas, <literal>idsiempre se refería a la "
"propiedad identificadora sin importar su nombre real. Una ramificación de "
"esa decisión fue que las propiedades no-identificadoras nombradas "
"<literal>id nunca podrían ser referenciadas en consultas de "
"Hibernate. "

#. Tag: title
#, no-c-format
msgid "The select clause"
msgstr "La 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 ""
"La cláusula <literal>select escoge qué objetos y propiedades "
"devolver en el conjunto de resultados de la consulta. Considere lo siguiente:"

#. Tag: para
#, no-c-format
msgid ""
"The query will select <literal>mates of other Cats de otros Cat:"
msgstr ""
"Las consultas pueden retornar múltiples objetos y/o propiedades como un "
"array de tipo <literal>Object[],"

#. Tag: para
#, no-c-format
msgid "Or as a <literal>List:"
msgstr "O como una <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 ""
"O asumiendo que la clase <literal>Family tiene un constructor "
"apropiado - como un objeto Java de tipo seguro:"

#. Tag: para
#, no-c-format
msgid "You can assign aliases to selected expressions using <literal>as:"
msgstr ""
"Puede asignar alias para expresiones seleccionadas utilizando <literal>as from aliases to selected values."
msgstr ""
"Esta consulta devuelve un <literal>Map de alias a valores "
"seleccionados."

#. Tag: title
#, no-c-format
msgid "Aggregate functions"
msgstr "Funciones de agregación"

#. Tag: para
#, no-c-format
msgid "HQL queries can even return the results of aggregate functions on properties:"
msgstr ""
"Las consultas HQL pueden incluso retornar resultados de funciones de "
"agregación sobre propiedades:"

#. Tag: para
#, no-c-format
msgid "The supported aggregate functions are:"
msgstr "Las funciones de agregación soportadas son:"

#. 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 ""
"Puede utilizar operadores aritméticos, concatenación y funciones SQL "
"reconocidas en la 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 ""
"Las palabras clave <literal>distinct y all se "
"pueden utilizar y tienen las misma semántica que en SQL."

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

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

#. 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, sino también de "
"subclases como <literal>DomesticCat. Las consultas de Hibernate "
"pueden nombrar <emphasis>cualquier clase o interfaz Java en la "
"cláusula <literal>from. La consulta retornará instancias de todas "
"las clases persistentes que extiendan esa clase o implementen la interfaz. "
"La siguiente consulta retornaría todos los objetos persistentes."

#. Tag: para
#, no-c-format
msgid ""
"The interface <literal>Named might be implemented by various "
"persistent classes:"
msgstr ""
"La interfaz <literal>Named se podría implementar por varias clases "
"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 ""
"Las dos últimas consultas requerirán más de un <literal>SELECT "
"SQL. Esto significa que la cláusula <literal>order by no ordenará "
"correctamente todo el conjunto que resulte. También significa que no puede "
"llamar estas consulta usando <literal>Query.scroll()."

#. Tag: title
#, no-c-format
msgid "The where clause"
msgstr "La 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 ""
"La cláusula <literal>where le permite refinar la lista de "
"instancias retornadas. Si no existe ningún alias, puede referirse a las "
"propiedades por nombre:"

#. Tag: para
#, no-c-format
msgid "If there is an alias, use a qualified property name:"
msgstr "Si existe un alias, use un nombre de propiedad calificado:"

#. Tag: para
#, no-c-format
msgid "This returns instances of <literal>Cat named 'Fritz'."
msgstr "Esto retorna instancias de <literal>Cat llamadas 'Fritz'."

#. Tag: para
#, no-c-format
msgid "The following query:"
msgstr "La siguiente petición:"

#. 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 las instancias de <literal>Foo con una instancia "
"de <literal>bar con una propiedad date igual a "
"la propiedad <literal>startDate del Foo. Las "
"expresiones de ruta compuestas hacen la cláusula <literal>where "
"extremadamente potente. Tome en consideración lo siguiente:"

#. Tag: para
#, no-c-format
msgid "This query translates to an SQL query with a table (inner) join. For example:"
msgstr ""
"Esta consulta se traduce a una consulta SQL con una unión de tabla "
"(interna). Por ejemplo:"

#. Tag: para
#, no-c-format
msgid "would result in a query that would require four table joins in SQL."
msgstr "terminaría con una consulta que requeriría cuatro uniones de tablas en SQL. "

#. Tag: para
#, no-c-format
msgid ""
"The <literal>= operator can be used to compare not only "
"properties, but also instances:"
msgstr ""
"El operador <literal>= se puede utilizar para comparar no "
"sólamente propiedades sino también instancias:"

#. 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 ""
"La propiedad especial <literal>id (en minúsculas) se puede "
"utilizar para referenciar el identificador único de un objeto. Consulte "
"<xref linkend=\"queryhql-"
"identifier-property\" /> para obtener más "
"información."

#. Tag: para
#, no-c-format
msgid "The second query is efficient and does not require a table join."
msgstr "La segunda consulta es eficiente y no se necesita una unión de tablas."

#. 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 ""
"También se pueden utilizar las propiedades de identificadores compuestos. "
"Considere el siguiente ejemplo en donde <literal>Person tiene "
"identificadores compuestos que consisten de <literal>country y "
"<literal>medicareNumber:"

#. Tag: para
#, no-c-format
msgid "Once again, the second query does not require a table join."
msgstr "Una vez más, la segunda consulta no requiere una unión de tablas."

#. Tag: para
#, no-c-format
msgid ""
"See <xref linkend=\"queryhql-identifier-property\" /> for more information "
"regarding referencing identifier properties)"
msgstr ""
"Consulte <xref linkend=\"queryhql-identifier-property\" /> para obtener "
"mayor información con relación a la referencia de propiedades del "
"identificador."

#. 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 ""
"La propiedad especial <literal>class acccede al valor "
"discriminador de una instancia en el caso de persistencia polimórfica. Un "
"nombre de clase Java incluído en la cláusula where será traducido a su valor "
"discriminador."

#. 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 ""
"También puede utilizar componentes o tipos de usuario compuestos o "
"propiedades de dichos tipos de componentes. Consulte <xref linkend="
"\"queryhql-components\" /> para obtener más detalles."

#. 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 ""
"Un tipo \"any\" tiene las propiedades especiales <literal>id y "
"<literal>class, permiténdole expresar una unión de la siguiente "
"forma (en donde <literal>AuditLog.item es una propiedad mapeada "
"con <literal><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 ""
"La <literal>log.item.class y payment.class "
"harían referencia a los valores de columnas de la base de datos "
"completamente diferentes en la consulta anterior."

#. Tag: title
#, no-c-format
msgid "Expressions"
msgstr "Expresiones"

#. Tag: para
#, no-c-format
msgid ""
"Expressions used in the <literal>where clause include the "
"following:"
msgstr ""
"Las expresiones utilizadas en la cláusula <literal>where incluyen "
"lo siguiente:"

#. 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éntesis <literal>( ) que indican agrupación"

#. 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 y 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 ""
"Caso \"simple\", <literal>case ... when ... then ... else ... end, "
"y caso \"buscado\", <literal>case when ... then ... else ... end"

#. Tag: para
#, no-c-format
msgid ""
"string concatenation <literal>...||... or concat(...,...)"
"</literal>"
msgstr ""
"concatenación de cadenas <literal>...||... o concat"
"(...,...)</literal>"

#. Tag: para
#, no-c-format
msgid ""
"<literal>current_date(), current_time(), and "
"<literal>current_timestamp()"
msgstr ""
"<literal>current_date(), current_time() y "
"<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(...), "
"and <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 ""
"Cualquier función u operador definido por 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() y nullif()"

#. Tag: para
#, no-c-format
msgid ""
"<literal>str() for converting numeric or temporal values to a "
"readable string"
msgstr ""
"<literal>str() para convertir valores numéricos o temporales a una "
"cadena legible."

#. 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 ...), donde el segundo argumento es el nombre "
"de un tipo de Hibernate , y <literal>extract(... from ...) si "
"<literal>cast() y extract() es soportado por la "
"base de datos subyacente."

#. Tag: para
#, no-c-format
msgid ""
"the HQL <literal>index() function, that applies to aliases of a "
"joined indexed collection"
msgstr ""
"la función <literal>index() de HQL, que se aplica a alias de una "
"colección indexada unida."

#. 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, inelements() e "
"<literal>indices, las cuales se pueden cuantificar utilizando "
"<literal>some, all, exists, any, in."

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

#. Tag: para
#, no-c-format
msgid "JDBC-style positional parameters <literal>?"
msgstr "parámetros posicionales JDBC <literal>?"

#. Tag: para
#, no-c-format
msgid ""
"named parameters <literal>:name, :start_date, "
"and <literal>:x1"
msgstr ""
"parámetros con nombre <literal>:name, :start_date:x1"

#. Tag: para
#, no-c-format
msgid ""
"SQL literals <literal>'foo', 69, 6.66E"
"+2</literal>, '1970-01-01 10:00:01.0'"
msgstr ""
"literales 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>public static finaleg.Color."
"TABBY</literal>"

#. Tag: para
#, no-c-format
msgid "<literal>in and between can be used as follows:"
msgstr "<literal>in y between pueden utilizarse así:"

#. Tag: para
#, no-c-format
msgid "The negated forms can be written as follows:"
msgstr "Las formas negadas se pueden escribir así:"

#. Tag: para
#, no-c-format
msgid ""
"Similarly, <literal>is null and is not null can "
"be used to test for null values."
msgstr ""
"De manera similar, <literal>is null y is not null and false1 and 0 in "
"the translated SQL from this HQL:"
msgstr ""
"Esto remplazará las palabras clave <literal>true y false1 y 0 en el "
"SQL traducido de este HQL:"

#. 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 ""
"Puede comprobar el tamaño de una colección con la propiedad especial "
"<literal>size o la función 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 las colecciones indexadas, puede referirse a los índices máximo y "
"mínimo utilizando las funciones <literal>minindex y "
"<literal>maxindex. De manera similar, se puede referir a los "
"elementos máximo y mínimo de una colección de tipo básico utilizando las "
"funciones <literal>minelement y maxelement. Por "
"ejemplo: "

#. 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 ""
"Las funciones SQL <literal>any, some, all, exists, in están "
"soportadas cuando se les pasa el conjunto de elementos o índices de una "
"colección (las funciones <literal>elements e indices, elementsindices, minindex, "
"<literal>maxindex, minelement, "
"<literal>maxelement - can only be used in the where clause in "
"Hibernate3."
msgstr ""
"Note que estas construcciones - <literal>size, elementsindices, minindex, "
"<literal>maxindex, minelement, "
"<literal>maxelement - solo se pueden utilizar en la cláusula where "
"en 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 ""
"Los elementos de colecciones indexadas (arrays, listas, mapas) se pueden "
"referir por índice sólamente en una cláusula where:"

#. Tag: para
#, no-c-format
msgid ""
"The expression inside <literal>[] can even be an arithmetic "
"expression:"
msgstr ""
"La expresión dentro de <literal>[] puede incluso ser una expresión "
"aritmé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 ""
"HQL también proporciona la función incorporada <literal>index(), "
"para los elementos de una asociación uno-a-muchos o una colección de valores."

#. Tag: para
#, no-c-format
msgid "Scalar SQL functions supported by the underlying database can be used:"
msgstr ""
"Se pueden utilizar las funciones SQL escalares soportadas por la base de "
"datos subyacente:"

#. Tag: para
#, no-c-format
msgid ""
"Consider how much longer and less readable the following query would be in "
"SQL:"
msgstr "Considere qué tan larga y menos leíble sería la siguiente consulta en SQL:"

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

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

#. 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 ""
"La lista retornada por una consulta se puede ordenar por cualquier propiedad "
"de una clase retornada o componentes:"

#. Tag: para
#, no-c-format
msgid ""
"The optional <literal>asc or desc indicate "
"ascending or descending order respectively."
msgstr ""
"Los <literal>asc o desc opcionales indican "
"ordenamiento ascendente o descendente respectivamente."

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

#. 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 ""
"Una consulta que retorna valores agregados  se puede agrupar por cualquier "
"propiedad de una clase retornada o componentes:"

#. Tag: para
#, no-c-format
msgid "A <literal>having clause is also allowed."
msgstr "Se permite también una cláusula <literal>having."

#. 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 ""
"Las funciones SQL y las funciones de agregación SQL están permitidas en las "
"cláusulas <literal>having y order by, si están "
"soportadas por la base de datos subyacente (por ejemplo, no lo están en "
"MySQL). "

#. 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 ""
"La cláusula <literal>group by ni la cláusula order bycat son no-"
"agregadas. Tiene que enumerar todas la propiedades no-agregadas "
"explícitamente."

#. Tag: title
#, no-c-format
msgid "Subqueries"
msgstr "Subconsultas"

#. Tag: para
#, no-c-format
msgid ""
"For databases that support subselects, Hibernate supports subqueries within "
"queries. A subquery must be surrounded by parentheses (often by an SQL "
"aggregate function call). Even correlated subqueries (subqueries that refer "
"to an alias in the outer query) are allowed."
msgstr ""
"Para bases de datos que soportan subconsultas, Hibernate soporta "
"subconsultas dentro de consultas. Una subconsulta se debe encerrar entre "
"paréntesis (frecuentemente por una llamada a una función de agregación SQL). "
"Incluso se permiten subconsultas correlacionadas (subconsultas que se "
"refieren a un alias en la consulta exterior)."

#. Tag: para
#, no-c-format
msgid "Note that HQL subqueries can occur only in the select or where clauses."
msgstr ""
"Note que las subconsultas HQL pueden ocurrir sólamente en las cláusulas "
"select o where."

#. Tag: para
#, no-c-format
msgid ""
"Note that subqueries can also utilize <literal>row value constructor for more "
"information."
msgstr ""
"Note que las subconsultas también pueden utilizar la sintaxis <literal>row "
"value constructor</literal>. Consulte la  para obtener más información."

#. Tag: title
#, no-c-format
msgid "HQL examples"
msgstr "Ejemplos 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 ""
"Las consultas de Hibernate pueden ser bastante potentes y complejas. De "
"hecho, el poder del lenguaje de consulta es uno de las fortalezas "
"principales de Hibernate. He aquí algunos ejemplos de consultas muy "
"similares a las consultas de proyectos recientes. Note que la mayoría de las "
"consultas que escribirá son mucho más simples que los siguientes ejemplos."

#. 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 y "
"<literal>PRICE tiene cuatro uniones interiores y una subselección "
"(no 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 ""
"¡Qué monstruo! Realmente, en la vida real, no me gustan mucho las "
"subconsultas, de modo que mi consulta fue realmente algo como esto:"

#. 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 ""
"La próxima consulta cuenta el número de pagos en cada estado, excluyendo "
"todos los pagos en el estado <literal>AWAITING_APPROVAL donde el "
"cambio más reciente al estado lo hizo el usuario actual. Se traduce en una "
"consulta SQL con dos uniones interiores y una subselección correlacionada "
"contra las tablas <literal>PAYMENT, PAYMENT_STATUSPAYMENT_STATUS_CHANGE."

#. Tag: para
#, no-c-format
msgid ""
"If the <literal>statusChanges collection was mapped as a list, "
"instead of a set, the query would have been much simpler to write."
msgstr ""
"Si la colección <literal>statusChanges se mapeara como una lista, "
"en vez de un conjunto, la consulta habría sido mucho más simple de escribir."

#. 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 ""
"La próxima consulta utiliza la función <literal>isNull() de MS SQL "
"Server para devolver todas las cuentas y pagos aún no cancelados de la "
"organización a la que pertenece el usuario actual. Se traduce como una "
"consulta SQL con tres uniones interiores, una unión exterior y una "
"subselección contra las tablas <literal>ACCOUNT, PAYMENTPAYMENT_STATUS, ACCOUNT_TYPEORGANIZATION y ORG_USER."

#. Tag: para
#, no-c-format
msgid "For some databases, we would need to do away with the (correlated) subselect."
msgstr ""
"Para algunas bases de datos, necesitaríamos eliminar la subselección "
"(correlacionada)."

#. Tag: title
#, no-c-format
msgid "Bulk update and delete"
msgstr "Declaraciones UPDATE y DELETE masivas"

#. Tag: para
#, no-c-format
msgid ""
"HQL now supports <literal>update, delete and "
"<literal>insert ... select ... statements. See , deleteinsert ... select .... Consulte la  with zero messages "
"because of the inner join, the following form is also useful:"
msgstr ""
"Como esta solución no puede retornar un <literal>User con cero "
"mensajes debido a la unión interior, la siguiente forma también es útil:"

#. Tag: para
#, no-c-format
msgid "Properties of a JavaBean can be bound to named query parameters:"
msgstr ""
"Las propiedades de un JavaBean pueden ser ligadas a los parámetros de "
"consulta con nombre:"

#. Tag: para
#, no-c-format
msgid ""
"Collections are pageable by using the <literal>Query interface "
"with a filter:"
msgstr ""
"Las colecciones son paginables usando la interfaz <literal>Query "
"con un filtro:"

#. Tag: para
#, no-c-format
msgid "Collection elements can be ordered or grouped using a query filter:"
msgstr ""
"Los elementos de colección se pueden ordenar o agrupar usando un filtro de "
"consulta:"

#. Tag: para
#, no-c-format
msgid "You can find the size of a collection without initializing it:"
msgstr "Puede hallar el tamaño de una colección sin inicializarla:"

#. 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 ""
"Los componentes se pueden utilizar de la misma manera en que se pueden "
"utilizar los tipos de valores simples en consultas HQL. Pueden aparecer en "
"la cláusula <literal>select así:"

#. 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 ""
"en donde el nombre de la Persona es un componente. Los componentes también "
"se pueden utilizar en la cláusula <literal>where:"

#. Tag: para
#, no-c-format
msgid "Components can also be used in the <literal>order by clause:"
msgstr ""
"Los componentes también se pueden utilizar en la cláusula <literal>where "
"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 ""
"HQL soporta la utilización de la sintaxis <literal>row value constructortuple syntax:"
msgstr ""
"Esa es una sintaxis válida aunque un poco verbosa. Puede hacerlo un poco más "
"conciso utilizando la sintaxis <literal>row value constructor:"

#. Tag: para
#, no-c-format
msgid ""
"It can also be useful to specify this in the <literal>select "
"clause:"
msgstr ""
"También puede ser útil especificar esto en la cláusula <literal>select syntax can also be beneficial "
"when using subqueries that need to compare against multiple values:"
msgstr ""
"También puede ser beneficioso el utilizar la sintaxis <literal>row value "
"constructor</literal> cuando se utilizan subconsultas que necesitan "
"compararse con valores múltiples:"

#. 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 ""
"Algo que se debe tomar en consideración al decidir si quiere usar esta "
"sintaxis es que la consulta dependerá del orden de las sub-propiedades "
"componentes en los metadatos."

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.