📄 query_criteria.po
字号:
" .list();]]>"#: index.docbook:102msgid """(<literal>createAlias()</literal> does not create a new instance of ""<literal>Criteria</literal>.)"msgstr """(<literal>createAlias()</literal> no crea una nueva instancia de ""<literal>Criteria</literal>.)"#: index.docbook:107msgid """Note that the kittens collections held by the <literal>Cat</literal> ""instances returned by the previous two queries are <emphasis>not</emphasis> ""pre-filtered by the criteria! If you wish to retrieve just the kittens that ""match the criteria, you must use a <literal>ResultTransformer</literal>."msgstr """¡Observa que las colecciones de gatitos tenidas por las instancias de ""<literal>Cat</literal> devueltas por las dos consultas previas <emphasis>no</""emphasis> están prefiltradas por los criterios! Si deseas recuperar ""sólo los gatitos que emparejen los criterios, debes usar ""<literal>returnMaps()</literal>."#: index.docbook:114msgid """<![CDATA[List cats = sess.createCriteria(Cat.class)\n"" .createCriteria(\"kittens\", \"kt\")\n"" .add( Restrictions.eq(\"name\", \"F%\") )\n"" .setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP)\n"" .list();\n""Iterator iter = cats.iterator();\n""while ( iter.hasNext() ) {\n"" Map map = (Map) iter.next();\n"" Cat cat = (Cat) map.get(Criteria.ROOT_ALIAS);\n"" Cat kitten = (Cat) map.get(\"kt\");\n""}]]>"msgstr """<![CDATA[List cats = sess.createCriteria(Cat.class)\n"" .createCriteria(\"kittens\", \"kt\")\n"" .add( Restrictions.eq(\"name\", \"F%\") )\n"" .returnMaps()\n"" .list();\n""Iterator iter = cats.iterator();\n""while ( iter.hasNext() ) {\n"" Map map = (Map) iter.next();\n"" Cat cat = (Cat) map.get(Criteria.ROOT_ALIAS);\n"" Cat kitten = (Cat) map.get(\"kt\");\n""}]]>"#: index.docbook:119msgid "Dynamic association fetching"msgstr "Recuperación dinámica de asociaciones"#: index.docbook:121msgid """You may specify association fetching semantics at runtime using ""<literal>setFetchMode()</literal>."msgstr """Puedes especificar la semántica de recuperación de ""asociaciones en tiempo de ejecución usando <literal>setFetchMode()</""literal>."#: index.docbook:126msgid """<![CDATA[List cats = sess.createCriteria(Cat.class)\n"" .add( Restrictions.like(\"name\", \"Fritz%\") )\n"" .setFetchMode(\"mate\", FetchMode.EAGER)\n"" .setFetchMode(\"kittens\", FetchMode.EAGER)\n"" .list();]]>"msgstr """<![CDATA[List cats = sess.createCriteria(Cat.class)\n"" .add( Restrictions.like(\"name\", \"Fritz%\") )\n"" .setFetchMode(\"mate\", FetchMode.EAGER)\n"" .setFetchMode(\"kittens\", FetchMode.EAGER)\n"" .list();]]>"#: index.docbook:128msgid """This query will fetch both <literal>mate</literal> and <literal>kittens</""literal> by outer join. See <xref linkend=\"performance-fetching\"/> for ""more information."msgstr """Esta consulta recuperará tanto <literal>mate</literal> como ""<literal>kittens</literal> por unión exterior (outer join). Ver <xref ""linkend=\"performance-fetching\"/> para más información."#: index.docbook:136msgid "Example queries"msgstr "Consultas por ejemplos"#: index.docbook:138msgid """The class <literal>org.hibernate.criterion.Example</literal> allows you to ""construct a query criterion from a given instance."msgstr """La clase <literal>org.hibernate.criterion.Example</literal> te permite ""construir un criterio de consulta a partir de una instancia dada."#: index.docbook:143msgid """<![CDATA[Cat cat = new Cat();\n""cat.setSex('F');\n""cat.setColor(Color.BLACK);\n""List results = session.createCriteria(Cat.class)\n"" .add( Example.create(cat) )\n"" .list();]]>"msgstr """<![CDATA[Cat cat = new Cat();\n""cat.setSex('F');\n""cat.setColor(Color.BLACK);\n""List results = session.createCriteria(Cat.class)\n"" .add( Example.create(cat) )\n"" .list();]]>"#: index.docbook:145msgid """Version properties, identifiers and associations are ignored. By default, ""null valued properties are excluded."msgstr """Las propiedades de versión, los identificadores y las asociaciones ""son ignorados. Por defecto, las propiedades valuadas a nulo son excluí""das."#: index.docbook:150msgid "You can adjust how the <literal>Example</literal> is applied."msgstr "Puedes ajustar cómo se aplica el <literal>Example</literal>."#: index.docbook:154msgid """<![CDATA[Example example = Example.create(cat)\n"" .excludeZeroes() //exclude zero valued properties\n"" .excludeProperty(\"color\") //exclude the property named \"color\"\n"" .ignoreCase() //perform case insensitive string ""comparisons\n"" .enableLike(); //use like for string comparisons\n""List results = session.createCriteria(Cat.class)\n"" .add(example)\n"" .list();]]>"msgstr """<![CDATA[Example example = Example.create(cat)\n"" .excludeZeroes() //exclude zero valued properties\n"" .excludeProperty(\"color\") //exclude the property named \"color\"\n"" .ignoreCase() //perform case insensitive string ""comparisons\n"" .enableLike(); //use like for string comparisons\n""List results = session.createCriteria(Cat.class)\n"" .add(example)\n"" .list();]]>"#: index.docbook:156msgid "You can even use examples to place criteria upon associated objects."msgstr """Puedes incluso usar ejemplos para colocar criterios sobre objetos asociados."#: index.docbook:160msgid """<![CDATA[List results = session.createCriteria(Cat.class)\n"" .add( Example.create(cat) )\n"" .createCriteria(\"mate\")\n"" .add( Example.create( cat.getMate() ) )\n"" .list();]]>"msgstr """<![CDATA[List results = session.createCriteria(Cat.class)\n"" .add( Example.create(cat) )\n"" .createCriteria(\"mate\")\n"" .add( Example.create( cat.getMate() ) )\n"" .list();]]>"#: index.docbook:165msgid "Projections, aggregation and grouping"msgstr "Proyecciones, agregación y agrupamiento"#: index.docbook:166msgid """The class <literal>org.hibernate.criterion.Projections</literal> is a ""factory for <literal>Projection</literal> instances. We apply a projection ""to a query by calling <literal>setProjection()</literal>."msgstr """La clase <literal>org.hibernate.criterion.Projections</literal> es una ""fábrica de instancias de <literal>Projection</literal>. Aplicamos una ""proyección a una consulta llamando a <literal>setProjection()</""literal>."#: index.docbook:172msgid """<![CDATA[List results = session.createCriteria(Cat.class)\n"" .setProjection( Projections.rowCount() )\n"" .add( Restrictions.eq(\"color\", Color.BLACK) )\n"" .list();]]>"msgstr """<![CDATA[List results = session.createCriteria(Cat.class)\n"" .setProjection( Projections.rowCount() )\n"" .add( Restrictions.eq(\"color\", Color.BLACK) )\n"" .list();]]>"#: index.docbook:174msgid """<![CDATA[List results = session.createCriteria(Cat.class)\n"" .setProjection( Projections.projectionList()\n"" .add( Projections.rowCount() )\n"" .add( Projections.avg(\"weight\") )\n"" .add( Projections.max(\"weight\") )\n"" .add( Projections.groupProperty(\"color\") )\n"" )\n"" .list();]]>"msgstr """<![CDATA[List results = session.createCriteria(Cat.class)\n"" .setProjection( Projections.projectionList()\n"" .add( Projections.rowCount() )\n"" .add( Projections.avg(\"weight\") )\n"" .add( Projections.max(\"weight\") )\n"" .add( Projections.groupProperty(\"color\") )\n"" )\n"" .list();]]>"#: index.docbook:176msgid """There is no explicit \"group by\" necessary in a criteria query. Certain ""projection types are defined to be <emphasis>grouping projections</""emphasis>, which also appear in the SQL <literal>group by</literal> clause."msgstr """No es necesario ningún \"group by\" explícito en una consulta por ""criterios. Ciertos tipos de proyecciones son definidos para ser ""<emphasis>proyecciones agrupadas</emphasis>, que además aparecen en ""la cláusula SQL <literal>group by</literal>."#: index.docbook:182msgid """An alias may optionally be assigned to a projection, so that the projected ""value may be referred to in restrictions or orderings. Here are two ""different ways to do this:"msgstr """Puede opcionalmente asignarse un alias a una proyección, de modo que ""el valor proyectado pueda ser referido en restricciones u ordenamientos. ""Aquí hay dos formas diferentes de hacer esto:"#: index.docbook:188msgid """<![CDATA[List results = session.createCriteria(Cat.class)\n"" .setProjection( Projections.alias( Projections.groupProperty(\"color\"), ""\"colr\" ) )\n"" .addOrder( Order.asc(\"colr\") )\n"" .list();]]>"msgstr """<![CDATA[List results = session.createCriteria(Cat.class)\n"" .setProjection( Projections.alias( Projections.groupProperty(\"color\"), ""\"colr\" ) )\n"" .addOrder( Order.asc(\"colr\") )\n"" .list();]]>"#: index.docbook:190msgid """<![CDATA[List results = session.createCriteria(Cat.class)\n"" .setProjection( Projections.groupProperty(\"color\").as(\"colr\") )\n"" .addOrder( Order.asc(\"colr\") )\n"" .list();]]>"msgstr """<![CDATA[List results = session.createCriteria(Cat.class)\n"" .setProjection( Projections.groupProperty(\"color\").as(\"colr\") )\n"" .addOrder( Order.asc(\"colr\") )\n"" .list();]]>"#: index.docbook:192msgid """The <literal>alias()</literal> and <literal>as()</literal> methods simply ""wrap a projection instance in another, aliased, instance of ""<literal>Projection</literal>. As a shortcut, you can assign an alias when ""you add the projection to a projection list:"msgstr """Los métodos <literal>alias()</literal> y <literal>as()</literal> ""simplemente envuelven una instancia de proyección en otra instancia ""de <literal>Projection</literal> con alias. Como un atajo, puedes asignar un ""alias cuando agregas la proyección a una lista de proyecciones:"#: index.docbook:199msgid """<![CDATA[List results = session.createCriteria(Cat.class)\n"" .setProjection( Projections.projectionList()\n"" .add( Projections.rowCount(), \"catCountByColor\" )\n"" .add( Projections.avg(\"weight\"), \"avgWeight\" )\n"" .add( Projections.max(\"weight\"), \"maxWeight\" )\n"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -