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

📄 query_criteria.po

📁 hibernate 开源框架的代码 jar包希望大家能喜欢
💻 PO
📖 第 1 页 / 共 2 页
字号:
msgstr """버전 프로퍼티들, 식별자들, 연관관계들이 무시된다. 디폴트로 null 값 프로퍼티들""이 제외된다."#. Tag: para#: query_criteria.xml:150#, no-c-formatmsgid "You can adjust how the <literal>Example</literal> is applied."msgstr "당신은 <literal>Example</literal>이 적용되는 방법을 조정할 수 있다."#. Tag: programlisting#: query_criteria.xml:154#, no-c-formatmsgid """<![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 ""#. Tag: para#: query_criteria.xml:156#, no-c-formatmsgid "You can even use examples to place criteria upon associated objects."msgstr """당신은 연관된 객체들에 대한 criteria(기준)을 위치지우는데 examples를 사용할 ""수 있다."#. Tag: programlisting#: query_criteria.xml:160#, no-c-formatmsgid """<![CDATA[List results = session.createCriteria(Cat.class)\n""    .add( Example.create(cat) )\n""    .createCriteria(\"mate\")\n""        .add( Example.create( cat.getMate() ) )\n""    .list();]]>"msgstr ""#. Tag: title#: query_criteria.xml:165#, no-c-formatmsgid "Projections, aggregation and grouping"msgstr "Projections, aggregation 그리고 grouping"#. Tag: para#: query_criteria.xml:166#, no-c-formatmsgid """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 """<literal>org.hibernate.criterion.Projections</literal> 클래스는 ""<literal>Projection</literal> 인스턴스들에 대한 팩토리이다. 우리는 ""<literal>setProjection()</literal>을 호출하여 하나의 질의에 projection(투사,""투영)을 적용시킨다."#. Tag: programlisting#: query_criteria.xml:172#, no-c-formatmsgid """<![CDATA[List results = session.createCriteria(Cat.class)\n""    .setProjection( Projections.rowCount() )\n""    .add( Restrictions.eq(\"color\", Color.BLACK) )\n""    .list();]]>"msgstr ""#. Tag: programlisting#: query_criteria.xml:174#, no-c-formatmsgid """<![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 ""#. Tag: para#: query_criteria.xml:176#, no-c-formatmsgid """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 """criteria 질의 내에서는 명시적인 \"group by\"가 필수적이지 않다. 어떤 ""projection 타입들은 <emphasis>grouping projections</emphasis>들이게끔 정의되""고, 그것은 또한 SQL <literal>group by</literal> 절 속에 나타난다."#. Tag: para#: query_criteria.xml:182#, no-c-formatmsgid """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 """alias는 선택적으로 projection에 할당될 수 있어서, 투사된(projected) 값은 제한""(restriction)들 또는 ordering들 내에서 참조될 수 있다. 다음은 이것을 행하는 ""두 개의 다른 방법들이다:"#. Tag: programlisting#: query_criteria.xml:188#, no-c-formatmsgid """<![CDATA[List results = session.createCriteria(Cat.class)\n""    .setProjection( Projections.alias( Projections.groupProperty(\"color\"), ""\"colr\" ) )\n""    .addOrder( Order.asc(\"colr\") )\n""    .list();]]>"msgstr ""#. Tag: programlisting#: query_criteria.xml:190#, no-c-formatmsgid """<![CDATA[List results = session.createCriteria(Cat.class)\n""    .setProjection( Projections.groupProperty(\"color\").as(\"colr\") )\n""    .addOrder( Order.asc(\"colr\") )\n""    .list();]]>"msgstr ""#. Tag: para#: query_criteria.xml:192#, no-c-formatmsgid """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 """<literal>alias()</literal> 메소드와 <literal>as()</literal> 메소드는 또 다른 ""alias 된 <literal>Projection</literal>의 인스턴스 내에 하나의 projection 인스""턴스를 간단하게 포장한다. 지름길로서, 당신이 projection을 projection 리스트""에 추가할 때 당신은 alias를 할당할 수 있다:"#. Tag: programlisting#: query_criteria.xml:199#, no-c-formatmsgid """<![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""        .add( Projections.groupProperty(\"color\"), \"color\" )\n""    )\n""    .addOrder( Order.desc(\"catCountByColor\") )\n""    .addOrder( Order.desc(\"avgWeight\") )\n""    .list();]]>"msgstr ""#. Tag: programlisting#: query_criteria.xml:201#, no-c-formatmsgid """<![CDATA[List results = session.createCriteria(Domestic.class, \"cat\")\n""    .createAlias(\"kittens\", \"kit\")\n""    .setProjection( Projections.projectionList()\n""        .add( Projections.property(\"cat.name\"), \"catName\" )\n""        .add( Projections.property(\"kit.name\"), \"kitName\" )\n""    )\n""    .addOrder( Order.asc(\"catName\") )\n""    .addOrder( Order.asc(\"kitName\") )\n""    .list();]]>"msgstr ""#. Tag: para#: query_criteria.xml:203#, no-c-formatmsgid """You can also use <literal>Property.forName()</literal> to express ""projections:"msgstr """당신은 또한 projection들을 표현하는데 <literal>Property.forName()</literal>""을 사용할 수 있다:"#. Tag: programlisting#: query_criteria.xml:207#, no-c-formatmsgid """<![CDATA[List results = session.createCriteria(Cat.class)\n""    .setProjection( Property.forName(\"name\") )\n""    .add( Property.forName(\"color\").eq(Color.BLACK) )\n""    .list();]]>"msgstr ""#. Tag: programlisting#: query_criteria.xml:209#, no-c-formatmsgid """<![CDATA[List results = session.createCriteria(Cat.class)\n""    .setProjection( Projections.projectionList()\n""        .add( Projections.rowCount().as(\"catCountByColor\") )\n""        .add( Property.forName(\"weight\").avg().as(\"avgWeight\") )\n""        .add( Property.forName(\"weight\").max().as(\"maxWeight\") )\n""        .add( Property.forName(\"color\").group().as(\"color\" )\n""    )\n""    .addOrder( Order.desc(\"catCountByColor\") )\n""    .addOrder( Order.desc(\"avgWeight\") )\n""    .list();]]>"msgstr ""#. Tag: title#: query_criteria.xml:214#, no-c-formatmsgid "Detached queries and subqueries"msgstr "Detached 질의들과 서브질의들"#. Tag: para#: query_criteria.xml:215#, no-c-formatmsgid """The <literal>DetachedCriteria</literal> class lets you create a query ""outside the scope of a session, and then later execute it using some ""arbitrary <literal>Session</literal>."msgstr """<literal>DetachedCriteria</literal> 클래스는 당신에게 세션 영역의 외부에서 질""의를 생성시키도록 하고, 그런 다음 나중에 어떤 임의의 <literal>Session</""literal>을 사용하여 그것을 실행하도록 한다."#. Tag: programlisting#: query_criteria.xml:220#, no-c-formatmsgid """<![CDATA[DetachedCriteria query = DetachedCriteria.forClass(Cat.class)\n""    .add( Property.forName(\"sex\").eq('F') );\n""    \n""Session session = ....;\n""Transaction txn = session.beginTransaction();\n""List results = query.getExecutableCriteria(session).setMaxResults(100).list""();\n""txn.commit();\n""session.close();]]>"msgstr ""#. Tag: para#: query_criteria.xml:222#, no-c-formatmsgid """A <literal>DetachedCriteria</literal> may also be used to express a ""subquery. Criterion instances involving subqueries may be obtained via ""<literal>Subqueries</literal> or <literal>Property</literal>."msgstr """<literal>DetachedCriteria</literal>는 또한 서브질의를 표현하는데 사용된다. 서""브질의들을 포함하는 Criterion 인스턴스들은 <literal>Subqueries</literal> 또""는 <literal>Property</literal>를 통해 얻어질 수 있다."#. Tag: programlisting#: query_criteria.xml:228#, no-c-formatmsgid """<![CDATA[DetachedCriteria avgWeight = DetachedCriteria.forClass(Cat.class)\n""    .setProjection( Property.forName(\"weight\").avg() );\n""session.createCriteria(Cat.class)\n""    .add( Property.forName(\"weight\").gt(avgWeight) )\n""    .list();]]>"msgstr ""#. Tag: programlisting#: query_criteria.xml:230#, no-c-formatmsgid """<![CDATA[DetachedCriteria weights = DetachedCriteria.forClass(Cat.class)\n""    .setProjection( Property.forName(\"weight\") );\n""session.createCriteria(Cat.class)\n""    .add( Subqueries.geAll(\"weight\", weights) )\n""    .list();]]>"msgstr ""#. Tag: para#: query_criteria.xml:232#, no-c-formatmsgid "Even correlated subqueries are possible:"msgstr "심지어 상관관계 지워진 서브질의들이 가능하다:"#. Tag: programlisting#: query_criteria.xml:236#, no-c-formatmsgid """<![CDATA[DetachedCriteria avgWeightForSex = DetachedCriteria.forClass(Cat.""class, \"cat2\")\n""    .setProjection( Property.forName(\"weight\").avg() )\n""    .add( Property.forName(\"cat2.sex\").eqProperty(\"cat.sex\") );\n""session.createCriteria(Cat.class, \"cat\")\n""    .add( Property.forName(\"weight\").gt(avgWeightForSex) )\n""    .list();]]>"msgstr ""#. Tag: title#: query_criteria.xml:245#, no-c-formatmsgid "Queries by natural identifier"msgstr "natural 식별자에 의한 질의들"#. Tag: para#: query_criteria.xml:247#, no-c-formatmsgid """For most queries, including criteria queries, the query cache is not very ""efficient, because query cache invalidation occurs too frequently. However, ""there is one special kind of query where we can optimize the cache ""invalidation algorithm: lookups by a constant natural key. In some ""applications, this kind of query occurs frequently. The criteria API ""provides special provision for this use case."msgstr """대부분의 질의들에서, criteria 질의들을 포함하여, 질의 캐시는 매우 효율적이지 ""않다. 왜냐하면 질의 캐시 비유효성이 너무 자주 발생하기 때문이다. 하지만, 우리""가 캐시 비유효성 알고리즘을 최적화 시킬 수 있는 한 가지 특별한 종류의 질의가 ""존재한다: 상수 natural 키에 의한 룩업. 몇몇 어플리케이션들에서, 이런 종류의 ""질의가 자주 발생한다. criteria API는 이 쓰임새를 위한 특별한 설비를 제공한다."#. Tag: para#: query_criteria.xml:255#, no-c-formatmsgid """First, you should map the natural key of your entity using <literal>&lt;""natural-id&gt;</literal>, and enable use of the second-level cache."msgstr """첫번째로 당신은 <literal>&lt;natural-id&gt;</literal>를 사용하여 당신의 엔티""티에 대한 natural 키를 매핑 시켜야 하고, second-level 캐시 사용을 가능하게 해""야 한다."#. Tag: programlisting#: query_criteria.xml:260#, no-c-formatmsgid """<![CDATA[<class name=\"User\">\n""    <cache usage=\"read-write\"/>\n""    <id name=\"id\">\n""        <generator class=\"increment\"/>\n""    </id>\n""    <natural-id>\n""        <property name=\"name\"/>\n""        <property name=\"org\"/>\n""    </natural-id>\n""    <property name=\"password\"/>\n""</class>]]>"msgstr ""#. Tag: para#: query_criteria.xml:262#, no-c-formatmsgid """Note that this functionality is not intended for use with entities with ""<emphasis>mutable</emphasis> natural keys."msgstr """이 기능은 <emphasis>가변성 있는</emphasis> natural 키들을 가진 엔티티들의 용""도로 고안되어 있지 않음을 노트하라."#. Tag: para#: query_criteria.xml:267#, no-c-formatmsgid "Next, enable the Hibernate query cache."msgstr "다음으로 , Hibernate 질의 캐시를 사용 가능하도록 하라."#. Tag: para#: query_criteria.xml:271#, no-c-formatmsgid """Now, <literal>Restrictions.naturalId()</literal> allows us to make use of ""the more efficient cache algorithm."msgstr """이제 <literal>Restrictions.naturalId()</literal>는 캐시 알고리즘을 보다 효율""적으로 사용할 수 있도록 우리에게 허용해준다."#. Tag: programlisting#: query_criteria.xml:276#, no-c-formatmsgid """<![CDATA[session.createCriteria(User.class)\n""    .add( Restrictions.naturalId()\n""        .set(\"name\", \"gavin\")\n""        .set(\"org\", \"hb\") \n""    ).setCacheable(true)\n""    .uniqueResult();]]>"msgstr ""

⌨️ 快捷键说明

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