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

📄 query_hql.po

📁 hibernate 开源框架的代码 jar包希望大家能喜欢
💻 PO
📖 第 1 页 / 共 5 页
字号:
#. Tag: para#: query_hql.xml:186#, no-c-formatmsgid """HQL supports two forms of association joining: <literal>implicit</literal> ""and <literal>explicit</literal>."msgstr """HQL은 두 가지 형식의 연관 조인을 지원한다: <literal>암묵적</literal> 그리고 ""<literal>명시적</literal>."#. Tag: para#: query_hql.xml:190#, no-c-formatmsgid """The queries shown in the previous section all use the <literal>explicit</""literal> form where the join keyword is explicitly used in the from clause. ""This is the recommended form."msgstr """앞의 절에서 보여진 질의들은 모두 join 키워드가 from 절 내에 명시적으로 사용되""는 <literal>명시적인</literal> 형식을 사용한다. 이것은 권장되는 형식이다."#. Tag: para#: query_hql.xml:195#, no-c-formatmsgid """The <literal>implicit</literal> form does not use the join keyword. Instead, ""the associations are \"dereferenced\" using dot-notation. <literal>implicit</""literal> joins can appear in any of the HQL clauses. <literal>implicit</""literal> join result in inner joins in the resulting SQL statement."msgstr """<literal>함축적인</literal> 형식은 join 키워드를 사용하지 않는다. 대신에, 연""관들은 dot(.) 표기를 사용하여 \"dot-참조된다(dereferenced)\". <literal>함축적""인</literal> 조인들은 임의의 HQL 절들내에 나타날 수 있다. <literal>함축적인</""literal> join은 결과되는 SQL 문장에서 inner join으로 귀결된다."#. Tag: programlisting#: query_hql.xml:202#, no-c-formatmsgid "<![CDATA[from Cat as cat where cat.mate.name like '%s%']]>"msgstr ""#. Tag: title#: query_hql.xml:206#, no-c-formatmsgid "Refering to identifier property"msgstr "식별자 속성 참조하기"#. Tag: para#: query_hql.xml:208#, no-c-formatmsgid """There are, generally speaking, 2 ways to refer to an entity's identifier ""property:"msgstr """개략적으로 말하자면, 엔티티의 식별자 속성을 참조하는 2가지 방법들이 존재한다:"#. Tag: para#: query_hql.xml:213#, no-c-formatmsgid """The special property (lowercase) <literal>id</literal> may be used to ""reference the identifier property of an entity <emphasis>provided that ""entity does not define a non-identifier property named id</emphasis>."msgstr """<emphasis>엔티티가 id로 명명된 비식별자 속성을 정의하지 않는다고 가정하면</""emphasis> 특별한 속성(소문자) <literal>id</literal>가 엔티티의 식별자 속성을 ""참조하는데 사용될 수 있다."#. Tag: para#: query_hql.xml:220#, no-c-formatmsgid """If the entity defines a named identifier property, you may use that property ""name."msgstr """만일 그 엔티티가 명명된 식별자 속성을 정의하는 경우, 당신은 그 속성 이름을 사""용할 수도 있다."#. Tag: para#: query_hql.xml:226#, no-c-formatmsgid """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</literal> property can be used to rerference the ""identifier property."msgstr """composite 식별자 속성들에 대한 참조들은 동일한 네이밍 규칙들을 따른다. 만일 ""그 엔티티가 id로 명명된 비식별자를 갖고 있을 경우, composite 속성은 오직 그것""의 정의된 명명에 의해 참조될 수 있다; 그밖의 경우 특별한 <literal>id</""literal> 속성이 식별자 속성을 참조하는데 사용될 수 있다."#. Tag: para#: query_hql.xml:233#, fuzzy, no-c-formatmsgid """Note: this has changed significantly starting in version 3.2.2. In previous ""versions, <literal>id</literal> <emphasis>always</emphasis> referred to the ""identifier property no matter what its actual name. A ramification of that ""decision was that non-identifier properties named <literal>id</literal> ""could never be referenced in Hibernate queries."msgstr """노트: 이것은 버전 3.2.2에서 시작될 때 현격하게 변경되었다. 이전 버전들에서, ""<literal>id</literal>는 <emphasis>항상</emphasis> 그것의 실제 이름에 관계없""이 식별자 속성을 참조했다. 그 결정의 분기점은 <literal>id</literal>로 명명된 ""비식별자 속성들이 Hibernate 질의들 내에서 결코 참조될 수 없었다는 점이었다."#. Tag: title#: query_hql.xml:242#, no-c-formatmsgid "The select clause"msgstr "select 절"#. Tag: para#: query_hql.xml:244#, no-c-formatmsgid """The <literal>select</literal> clause picks which objects and properties to ""return in the query result set. Consider:"msgstr """<literal>select</literal> 절은 질의 결과 셋 속에 반환할 객체들과 프로퍼티들""이 어느 것인지를 골라 내도록 강제한다. 다음을 검토하자:"#. Tag: programlisting#: query_hql.xml:249#, no-c-formatmsgid """<![CDATA[select mate\n""from Cat as cat\n""    inner join cat.mate as mate]]>"msgstr ""#. Tag: para#: query_hql.xml:251#, no-c-formatmsgid """The query will select <literal>mate</literal>s of other <literal>Cat</""literal>s. Actually, you may express this query more compactly as:"msgstr """질의는 다른 <literal>Cat</literal>들의 <literal>mate</literal>들을 select 할 ""것이다. 실제로 당신은 이 질의들을 다음과 같이 보다 축약형으로 표현할수도 있""다:"#. Tag: programlisting#: query_hql.xml:256#, no-c-formatmsgid "<![CDATA[select cat.mate from Cat cat]]>"msgstr ""#. Tag: para#: query_hql.xml:258#, no-c-formatmsgid """Queries may return properties of any value type including properties of ""component type:"msgstr """질의들은 컴포넌트 타입의 프로퍼티들을 포함하는 임의의 값 타입의 프로퍼티들을 ""반환할 수도 있다:"#. Tag: programlisting#: query_hql.xml:262#, no-c-formatmsgid """<![CDATA[select cat.name from DomesticCat cat\n""where cat.name like 'fri%']]>"msgstr ""#. Tag: programlisting#: query_hql.xml:264#, no-c-formatmsgid "<![CDATA[select cust.name.firstName from Customer as cust]]>"msgstr ""#. Tag: para#: query_hql.xml:266#, no-c-formatmsgid """Queries may return multiple objects and/or properties as an array of type ""<literal>Object[]</literal>,"msgstr """<literal>Family</literal> 클래스가 적당한 생성자를 갖고 있음을 가정하면, 질의""들은 여러 객체들 그리고/또는 프로퍼티들을 <literal>Object[]</literal> 타입의 ""배열로서,"#. Tag: programlisting#: query_hql.xml:271#, no-c-formatmsgid """<![CDATA[select mother, offspr, mate.name\n""from DomesticCat as mother\n""    inner join mother.mate as mate\n""    left outer join mother.kittens as offspr]]>"msgstr ""#. Tag: para#: query_hql.xml:273#, no-c-formatmsgid "or as a <literal>List</literal>,"msgstr "또는 <literal>List</literal>로서,"#. Tag: programlisting#: query_hql.xml:277#, no-c-formatmsgid """<![CDATA[select new list(mother, offspr, mate.name)\n""from DomesticCat as mother\n""    inner join mother.mate as mate\n""    left outer join mother.kittens as offspr]]>"msgstr ""#. Tag: para#: query_hql.xml:279#, no-c-formatmsgid "or as an actual typesafe Java object,"msgstr "또는 실제 typesafe 자바 객체로서,"#. Tag: programlisting#: query_hql.xml:283#, no-c-formatmsgid """<![CDATA[select new Family(mother, mate, offspr)\n""from DomesticCat as mother\n""    join mother.mate as mate\n""    left join mother.kittens as offspr]]>"msgstr ""#. Tag: para#: query_hql.xml:285#, no-c-formatmsgid """assuming that the class <literal>Family</literal> has an appropriate ""constructor."msgstr "반환할 수도 있다."#. Tag: para#: query_hql.xml:289#, no-c-formatmsgid """You may assign aliases to selected expressions using <literal>as</literal>:"msgstr """당신은 <literal>as</literal>를 사용하여 select되는 표현식들에 alias들을 할당""할 수 있다:"#. Tag: programlisting#: query_hql.xml:293#, no-c-formatmsgid """<![CDATA[select max(bodyWeight) as max, min(bodyWeight) as min, count(*) as ""n\n""from Cat cat]]>"msgstr ""#. Tag: para#: query_hql.xml:295#, no-c-formatmsgid """This is most useful when used together with <literal>select new map</""literal>:"msgstr """다음은 <literal>select new map</literal>과 함께 사용될 때 가장 유용하다:"#. Tag: programlisting#: query_hql.xml:299#, no-c-formatmsgid """<![CDATA[select new map( max(bodyWeight) as max, min(bodyWeight) as min, ""count(*) as n )\n""from Cat cat]]>"msgstr ""#. Tag: para#: query_hql.xml:301#, no-c-formatmsgid """This query returns a <literal>Map</literal> from aliases to selected values."msgstr """이 질의는 select된 값들에 대한 alias로부터 한 개의 <literal>Map</literal>을 ""반환한다."#. Tag: title#: query_hql.xml:308#, no-c-formatmsgid "Aggregate functions"msgstr "집계 함수들"#. Tag: para#: query_hql.xml:310#, no-c-formatmsgid """HQL queries may even return the results of aggregate functions on properties:"msgstr """HQL 질의들은 프로퍼티들에 대한 집계(aggregate) 함수들의 결과들을 반환할수도 ""있다:"#. Tag: programlisting#: query_hql.xml:314#, no-c-formatmsgid """<![CDATA[select avg(cat.weight), sum(cat.weight), max(cat.weight), count""(cat)\n""from Cat cat]]>"msgstr ""#. Tag: para#: query_hql.xml:325#, no-c-formatmsgid "The supported aggregate functions are"msgstr "지원되는 집계 함수들은 다음과 같다"#. Tag: literal#: query_hql.xml:332#, no-c-formatmsgid "avg(...), sum(...), min(...), max(...)"msgstr "avg(...), sum(...), min(...), max(...)"#. Tag: literal#: query_hql.xml:337#, no-c-formatmsgid "count(*)"msgstr "count(*)"#. Tag: literal#: query_hql.xml:342#, no-c-formatmsgid "count(...), count(distinct ...), count(all...)"msgstr "count(...), count(distinct ...), count(all...)"#. Tag: para#: query_hql.xml:347#, no-c-formatmsgid """You may use arithmetic operators, concatenation, and recognized SQL ""functions in the select clause:"msgstr """당신은 select 절 속에 산술 연산자들, 연결 연산자, 그리고 인지된 SQL 함수들을 ""사용할 수 있다:"#. Tag: programlisting#: query_hql.xml:352#, no-c-formatmsgid """<![CDATA[select cat.weight + sum(kitten.weight)\n""from Cat cat\n""    join cat.kittens kitten\n""group by cat.id, cat.weight]]>"msgstr ""#. Tag: programlisting#: query_hql.xml:354#, no-c-formatmsgid """<![CDATA[select firstName||' '||initial||' '||upper(lastName) from Person]]>"msgstr ""#. Tag: para#: query_hql.xml:356#, no-c-formatmsgid """The <literal>distinct</literal> and <literal>all</literal> keywords may be ""used and have the same semantics as in SQL."msgstr """<literal>distinct</literal> 키워드와 all <literal>all</literal>가 사용될 수 ""있고 SQL의 경우와 동일한 의미를 갖는다."#. Tag: programlisting#: query_hql.xml:361#, no-c-formatmsgid """<![CDATA[select distinct cat.name from Cat cat\n""\n""select count(distinct cat.name), count(cat) from Cat cat]]>"msgstr ""#. Tag: title#: query_hql.xml:366#, no-c-formatmsgid "Polymorphic queries"msgstr "Polymorphic(다형성) 질의들"#. Tag: para#: query_hql.xml:368#, no-c-formatmsgid "A query like:"msgstr "다음과 같은 질의:"#. Tag: para#: query_hql.xml:374#, no-c-formatmsgid """returns instances not only of <literal>Cat</literal>, but also of subclasses ""like <literal>DomesticCat</literal>. Hibernate queries may name ""<emphasis>any</emphasis> Java class or interface in the <literal>from</""literal> clause. The query will return instances of all persistent classes ""that extend that class or implement the interface. The following query would ""return all persistent objects:"msgstr ""

⌨️ 快捷键说明

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