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

📄 component_mapping.po

📁 hibernate 开源框架的代码 jar包希望大家能喜欢
💻 PO
📖 第 1 页 / 共 2 页
字号:
"        <key column=\"order_id\">\n""        <composite-element class=\"eg.Purchase\">\n""            <property name=\"purchaseDate\"/>\n""            <property name=\"price\"/>\n""            <property name=\"quantity\"/>\n""            <many-to-one name=\"item\" class=\"eg.Item\"/> <!-- class ""attribute is optional -->\n""        </composite-element>\n""    </set>\n""</class>]]>"msgstr ""#. Tag: para#: component_mapping.xml:125#, no-c-formatmsgid """Of course, there can't be a reference to the purchae on the other side, for ""bidirectional association navigation. Remember that components are value ""types and don't allow shared references. A single <literal>Purchase</""literal> can be in the set of an <literal>Order</literal>, but it can't be ""referenced by the <literal>Item</literal> at the same time."msgstr """물론, 양방향 연관 네비게이션의 경우, 다른 측 상에 있는 purchase에 대한 참조""가 존재할 수 없다. 컴포넌트들이 값(value) 타입들이고 공유된 참조들을 허용하""지 않음을 기억하라. 하나의 <literal>Purchase</literal>는<literal>Order</""literal>를 가진 set 내에 있을 수 있지만, 그것은 동시에 <literal>Item</""literal>에 의해 참조될 수 없다."#. Tag: para#: component_mapping.xml:133#, no-c-formatmsgid "Even ternary (or quaternary, etc) associations are possible:"msgstr "심지어 세겹의(또는 네 겹의, 기타) 연관들이 가능하다:"#. Tag: programlisting#: component_mapping.xml:135#, no-c-formatmsgid """<![CDATA[<class name=\"eg.Order\" .... >\n""    ....\n""    <set name=\"purchasedItems\" table=\"purchase_items\" lazy=\"true\">\n""        <key column=\"order_id\">\n""        <composite-element class=\"eg.OrderLine\">\n""            <many-to-one name=\"purchaseDetails class=\"eg.Purchase\"/>\n""            <many-to-one name=\"item\" class=\"eg.Item\"/>\n""        </composite-element>\n""    </set>\n""</class>]]>"msgstr ""#. Tag: para#: component_mapping.xml:137#, no-c-formatmsgid """Composite elements may appear in queries using the same syntax as ""associations to other entities."msgstr """composite 요소들은 다른 엔티티들에 대한 연관들과 동일한 구문을 사용하여 질의""들 내에 나타날 수도 있다."#. Tag: title#: component_mapping.xml:145#, no-c-formatmsgid "Components as Map indices"msgstr "Map 인덱스들로서 컴포넌트들"#. Tag: para#: component_mapping.xml:147#, no-c-formatmsgid """The <literal>&lt;composite-map-key&gt;</literal> element lets you map a ""component class as the key of a <literal>Map</literal>. Make sure you ""override <literal>hashCode()</literal> and <literal>equals()</literal> ""correctly on the component class."msgstr """<literal>&lt;composite-map-key&gt;</literal> 요소는 당신에게 하나의 컴포넌트 ""클래스를 하나의 <literal>Map</literal>의 키로서 매핑시키도록 한다. 당신은 컴""포넌트 클래스 상에서 <literal>hashCode()</literal>와 <literal>equals()</""literal>를 정확하게 오버라이드 시키도록 하라."#. Tag: title#: component_mapping.xml:156#, no-c-formatmsgid "Components as composite identifiers"msgstr "composite 식별자들로서 컴포넌트들"#. Tag: para#: component_mapping.xml:158#, no-c-formatmsgid """You may use a component as an identifier of an entity class. Your component ""class must satisfy certain requirements:"msgstr """당신은 하나의 컴포넌트를 하나의 엔티티 클래스에 대한 하나의 식별자로서 사용""할 수도 있다. 당신의 컴포넌트 클래스는 어떤 사양들을 충족시켜야 한다:"#. Tag: para#: component_mapping.xml:165#, no-c-formatmsgid "It must implement <literal>java.io.Serializable</literal>."msgstr "그것은 <literal>java.io.Serializable</literal>을 구현해야 한다."#. Tag: para#: component_mapping.xml:170#, no-c-formatmsgid """It must re-implement <literal>equals()</literal> and <literal>hashCode()</""literal>, consistently with the database's notion of composite key equality."msgstr """그것은 composite 키 등가(equality)에 대한 데이터베이스 개념과 일치되게, ""<literal>equals()</literal>와 <literal>hashCode()</literal>를 다시 구현해야 ""한다."#. Tag: emphasis#: component_mapping.xml:179#, no-c-formatmsgid """Note: in Hibernate3, the second requirement is not an absolutely hard ""requirement of Hibernate. But do it anyway."msgstr """노트: Hibernate3에서, 두 번째 사양은 Hibernate의 절대적으로 엄격한 사양이 아""니다. 그러나 아무튼 그것을 행하라."#. Tag: para#: component_mapping.xml:183#, no-c-formatmsgid """You can't use an <literal>IdentifierGenerator</literal> to generate ""composite keys. Instead the application must assign its own identifiers."msgstr """당신은 compsite 키들을 생성시키는데 <literal>IdentifierGenerator</literal>를 ""사용할 수 없다. 대신에 어플리케이션은 그것 자신의 식별자들을 할당해야 한다."#. Tag: para#: component_mapping.xml:188#, no-c-formatmsgid """Use the <literal>&lt;composite-id&gt;</literal> tag (with nested ""<literal>&lt;key-property&gt;</literal> elements) in place of the usual ""<literal>&lt;id&gt;</literal> declaration. For example, the ""<literal>OrderLine</literal> class has a primary key that depends upon the ""(composite) primary key of <literal>Order</literal>."msgstr """통상의 <literal>&lt;id&gt;</literal> 선언 위치에 (내포된 <literal>&lt;key-""property&gt;</literal> 요소들을 가진) <literal>&lt;composite-id&gt;</""literal> 태그를 사용하라. 예를 들어, <literal>OrderLine</literal> 클래스는 ""<literal>Order</literal>의 (composite) 프라이머리 키에 의존하는 프라이머리 키""를 갖는다."#. Tag: programlisting#: component_mapping.xml:196#, no-c-formatmsgid """<![CDATA[<class name=\"OrderLine\">\n""    \n""    <composite-id name=\"id\" class=\"OrderLineId\">\n""        <key-property name=\"lineId\"/>\n""        <key-property name=\"orderId\"/>\n""        <key-property name=\"customerId\"/>\n""    </composite-id>\n""    \n""    <property name=\"name\"/>\n""    \n""    <many-to-one name=\"order\" class=\"Order\"\n""            insert=\"false\" update=\"false\">\n""        <column name=\"orderId\"/>\n""        <column name=\"customerId\"/>\n""    </many-to-one>\n""    ....\n""    \n""</class>]]>"msgstr ""#. Tag: para#: component_mapping.xml:198#, no-c-formatmsgid """Now, any foreign keys referencing the <literal>OrderLine</literal> table are ""also composite. You must declare this in your mappings for other classes. An ""association to <literal>OrderLine</literal> would be mapped like this:"msgstr """이제 <literal>OrderLine</literal> 테이블을 참조하는 임의의 foreign 키들이 또""한 compsite이다. 당신은 다른 클래스들에 대한 당신의 매핑들 속에 이것을 선언해""야 한다. <literal>OrderLine</literal>에 대한 하나의 연관은 다음과 같이 매핑""될 것이다:"#. Tag: programlisting#: component_mapping.xml:204#, no-c-formatmsgid """<![CDATA[<many-to-one name=\"orderLine\" class=\"OrderLine\">\n""<!-- the \"class\" attribute is optional, as usual -->\n""    <column name=\"lineId\"/>\n""    <column name=\"orderId\"/>\n""    <column name=\"customerId\"/>\n""</many-to-one>]]>"msgstr ""#. Tag: para#: component_mapping.xml:206#, no-c-formatmsgid """(Note that the <literal>&lt;column&gt;</literal> tag is an alternative to ""the <literal>column</literal> attribute everywhere.)"msgstr """(<literal>&lt;column&gt;</literal> 태그가 모든 곳에서 <literal>column</""literal> 속성에 대한 대안임을 노트하라.)"#. Tag: para#: component_mapping.xml:211#, no-c-formatmsgid """A <literal>many-to-many</literal> association to <literal>OrderLine</""literal> also uses the composite foreign key:"msgstr """<literal>OrderLine</literal>에 대한 <literal>many-to-many</literal> 연관은 또""한 composite foreign 키를 사용한다:"#. Tag: programlisting#: component_mapping.xml:216#, no-c-formatmsgid """<![CDATA[<set name=\"undeliveredOrderLines\">\n""    <key column name=\"warehouseId\"/>\n""    <many-to-many class=\"OrderLine\">\n""        <column name=\"lineId\"/>\n""        <column name=\"orderId\"/>\n""        <column name=\"customerId\"/>\n""    </many-to-many>\n""</set>]]>"msgstr ""#. Tag: para#: component_mapping.xml:218#, no-c-formatmsgid """The collection of <literal>OrderLine</literal>s in <literal>Order</literal> ""would use:"msgstr """<literal>Order</literal>에서 <literal>OrderLine</literal>들의 콜렉션이 사용""될 것이다:"#. Tag: programlisting#: component_mapping.xml:223#, no-c-formatmsgid """<![CDATA[<set name=\"orderLines\" inverse=\"true\">\n""    <key>\n""        <column name=\"orderId\"/>\n""        <column name=\"customerId\"/>\n""    </key>\n""    <one-to-many class=\"OrderLine\"/>\n""</set>]]>"msgstr ""#. Tag: para#: component_mapping.xml:225#, no-c-formatmsgid """(The <literal>&lt;one-to-many&gt;</literal> element, as usual, declares no ""columns.)"msgstr """(통상적으로 <literal>&lt;one-to-many&gt;</literal> 요소는 컬럼들을 선언하지 ""않는다.)"#. Tag: para#: component_mapping.xml:229#, no-c-formatmsgid """If <literal>OrderLine</literal> itself owns a collection, it also has a ""composite foreign key."msgstr """만일 <literal>OrderLine</literal> 자체가 하나의 콜렉션을 소유할 경우, 그것은 ""또한 하나의 composite foreign 키를 갖는다."#. Tag: programlisting#: component_mapping.xml:234#, no-c-formatmsgid """<![CDATA[<class name=\"OrderLine\">\n""    ....\n""    ....\n""    <list name=\"deliveryAttempts\">\n""        <key>   <!-- a collection inherits the composite key type -->\n""            <column name=\"lineId\"/>\n""            <column name=\"orderId\"/>\n""            <column name=\"customerId\"/>\n""        </key>\n""        <list-index column=\"attemptId\" base=\"1\"/>\n""        <composite-element class=\"DeliveryAttempt\">\n""            ...\n""        </composite-element>\n""    </set>\n""</class>]]>"msgstr ""#. Tag: title#: component_mapping.xml:239#, no-c-formatmsgid "Dynamic components"msgstr "동적인 컴포넌트들"#. Tag: para#: component_mapping.xml:241#, no-c-formatmsgid "You may even map a property of type <literal>Map</literal>:"msgstr "당신은 <literal>Map</literal> 타입의 프로퍼티를 매핑시킬 수도 있다:"#. Tag: programlisting#: component_mapping.xml:245#, no-c-formatmsgid """<![CDATA[<dynamic-component name=\"userAttributes\">\n""    <property name=\"foo\" column=\"FOO\" type=\"string\"/>\n""    <property name=\"bar\" column=\"BAR\" type=\"integer\"/>\n""    <many-to-one name=\"baz\" class=\"Baz\" column=\"BAZ_ID\"/>\n""</dynamic-component>]]>"msgstr ""#. Tag: para#: component_mapping.xml:247#, no-c-formatmsgid """The semantics of a <literal>&lt;dynamic-component&gt;</literal> mapping are ""identical to <literal>&lt;component&gt;</literal>. The advantage of this ""kind of mapping is the ability to determine the actual properties of the ""bean at deployment time, just by editing the mapping document. Runtime ""manipulation of the mapping document is also possible, using a DOM parser. ""Even better, you can access (and change) Hibernate's configuration-time ""metamodel via the <literal>Configuration</literal> object."msgstr """<literal>&lt;dynamic-component&gt;</literal> 매핑의 의미는 <literal>&lt;""component&gt;</literal>와 동일하다. 이런 종류의 매핑의 장점은 배치 시에 단지 ""매핑 문서를 편집함으로써 그 bean의 실제 프로퍼티들을 결정하는 가용성이다. 매""핑 문서에 대한 런타임 처리는 또한 DOM 파서를 사용하여 가능하다. 더 좋게는 당""신이 <literal>Configuration</literal> 객체를 통해 Hibernate의 구성-시 메타모""형에 접근할 수 있다(그리고 변경시킬 수 있다)"

⌨️ 快捷键说明

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