📄 inheritance_mapping.po
字号:
msgid ""msgstr """Project-Id-Version: PACKAGE VERSION\n""Report-Msgid-Bugs-To: http://bugs.kde.org\n""POT-Creation-Date: 2007-10-25 07:47+0000\n""PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Language-Team: LANGUAGE <LL@li.org>\n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=UTF-8\n""Content-Transfer-Encoding: 8bit\n"#. Tag: title#: inheritance_mapping.xml:5#, no-c-formatmsgid "Inheritance Mapping"msgstr "상속 매핑"#. Tag: title#: inheritance_mapping.xml:8#, no-c-formatmsgid "The Three Strategies"msgstr "세 가지 방도들"#. Tag: para#: inheritance_mapping.xml:10#, no-c-formatmsgid "Hibernate supports the three basic inheritance mapping strategies:"msgstr "Hibernate는 세 가지 기본적인 상속 매핑 방도들을 지원한다:"#. Tag: para#: inheritance_mapping.xml:16#, no-c-formatmsgid "table per class hierarchy"msgstr "table per class hierarchy"#. Tag: para#: inheritance_mapping.xml:21#, fuzzy, no-c-formatmsgid "<para>table per subclass</para>"msgstr "table per subclass"#. Tag: para#: inheritance_mapping.xml:26#, no-c-formatmsgid "table per concrete class"msgstr "table per concrete class"#. Tag: para#: inheritance_mapping.xml:32#, no-c-formatmsgid """In addition, Hibernate supports a fourth, slightly different kind of ""polymorphism:"msgstr "게다가 Hibernate는 네 번째의 약간 다른 종류의 다형성을 지원한다:"#. Tag: para#: inheritance_mapping.xml:39#, no-c-formatmsgid "implicit polymorphism"msgstr "implicit polymorphism(함축적인 다형성)"#. Tag: para#: inheritance_mapping.xml:45#, no-c-formatmsgid """It is possible to use different mapping strategies for different branches of ""the same inheritance hierarchy, and then make use of implicit polymorphism ""to achieve polymorphism across the whole hierarchy. However, Hibernate does ""not support mixing <literal><subclass></literal>, and <literal><""joined-subclass></literal> and <literal><union-subclass></literal> ""mappings under the same root <literal><class></literal> element. It is ""possible to mix together the table per hierarchy and table per subclass ""strategies, under the the same <literal><class></literal> element, by ""combining the <literal><subclass></literal> and <literal><join></""literal> elements (see below)."msgstr """동일한 상속 계층구조의 다른 가지들에 대해 다른 매핑 방도들을 사용하는 것이 가""능하고, 그런 다음 전체 계층 구조를 가로질러 다형성을 성취하는데 함축적인 다형""성을 사용하라. 하지만 Hibernate는 동일한 루트 <literal><class></""literal> 요소 하에서 <literal><subclass></literal> 그리고 <literal><""joined-subclass></literal> 그리고 <literal><union-subclass></""literal> 매핑들을 혼합하는 것을 지원하지 않는다. 동일한 <literal><""class></literal> 요소 하에서 <literal><subclass></literal> 요소와 ""<literal><join></literal> 요소를 결합시킴으로써 table per hierarchy 방""도와 table per subclass 방도를 함께 혼합시키는 것이 가능하다(아래를 보라)."#. Tag: para#: inheritance_mapping.xml:59#, no-c-formatmsgid """It is possible to define <literal>subclass</literal>, <literal>union-""subclass</literal>, and <literal>joined-subclass</literal> mappings in ""separate mapping documents, directly beneath <literal>hibernate-mapping</""literal>. This allows you to extend a class hierachy just by adding a new ""mapping file. You must specify an <literal>extends</literal> attribute in ""the subclass mapping, naming a previously mapped superclass. Note: ""Previously this feature made the ordering of the mapping documents ""important. Since Hibernate3, the ordering of mapping files does not matter ""when using the extends keyword. The ordering inside a single mapping file ""still needs to be defined as superclasses before subclasses."msgstr """별도의 매핑 문서 내에, <literal>hibernate-mapping</literal> 바로 밑에 ""<literal>subclass</literal>, <literal>union-subclass</literal>, 그리고 ""<literal>joined-subclass</literal> 매핑들을 정의하는 것이 가능하다. 이것은 단""지 하나의 새로운 매핑 파일을 추가시켜서 하나의 class 계층구조를 확장하는 것""을 당신에게 허용해준다. 당신은 subclass 매핑 내에 앞서 매핑된 슈퍼클래스를 명""명하여 <literal>extends</literal> 속성을 지정해야 한다. 노트 : 명백하게 이 특""징은 매핑 문서들의 순서를 중요하게끔 만들었다. Hibernate3 이후로, 매핑 파일들""의 순서는 extends 키워드를 사용할 때 상관없다. 하나의 매핑 파일 내의 순서는 ""여전히 서브클래스들에 앞서 슈퍼클래스들을 정의하는데 여전히 필요하다."#. Tag: programlisting#: inheritance_mapping.xml:70#, no-c-formatmsgid """<![CDATA[\n"" <hibernate-mapping>\n"" <subclass name=\"DomesticCat\" extends=\"Cat\" discriminator-value=\"D""\">\n"" <property name=\"name\" type=\"string\"/>\n"" </subclass>\n"" </hibernate-mapping>]]>"msgstr ""#. Tag: title#: inheritance_mapping.xml:74#, no-c-formatmsgid "Table per class hierarchy"msgstr "Table per class hierarchy"#. Tag: para#: inheritance_mapping.xml:76#, no-c-formatmsgid """Suppose we have an interface <literal>Payment</literal>, with implementors ""<literal>CreditCardPayment</literal>, <literal>CashPayment</literal>, ""<literal>ChequePayment</literal>. The table per hierarchy mapping would look ""like:"msgstr """우리가 <literal>CreditCardPayment</literal>, <literal>CashPayment</literal>, ""<literal>ChequePayment</literal> 구현자들을 가진 하나의 인터페이스 ""<literal>Payment</literal>를 갖고 있다고 가정하자. table per hierarchy 매핑""은 다음과 같을 것이다:"#. Tag: programlisting#: inheritance_mapping.xml:83#, no-c-formatmsgid """<![CDATA[<class name=\"Payment\" table=\"PAYMENT\">\n"" <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"" <generator class=\"native\"/>\n"" </id>\n"" <discriminator column=\"PAYMENT_TYPE\" type=\"string\"/>\n"" <property name=\"amount\" column=\"AMOUNT\"/>\n"" ...\n"" <subclass name=\"CreditCardPayment\" discriminator-value=\"CREDIT\">\n"" <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"" ...\n"" </subclass>\n"" <subclass name=\"CashPayment\" discriminator-value=\"CASH\">\n"" ...\n"" </subclass>\n"" <subclass name=\"ChequePayment\" discriminator-value=\"CHEQUE\">\n"" ...\n"" </subclass>\n""</class>]]>"msgstr ""#. Tag: para#: inheritance_mapping.xml:85#, no-c-formatmsgid """Exactly one table is required. There is one big limitation of this mapping ""strategy: columns declared by the subclasses, such as <literal>CCTYPE</""literal>, may not have <literal>NOT NULL</literal> constraints."msgstr """정확히 하나의 테이블이 필요하다. 이 매핑 방도에는 다음의 하나의 큰 제약이 존""재한다: <literal>CCTYPE</literal>과 같이, 서브 클래스들에 의해 선언된 컬럼들""은 <literal>NOT NULL</literal> 컨스트레인트들을 가질 수 없다."#. Tag: title#: inheritance_mapping.xml:94#, no-c-formatmsgid "Table per subclass"msgstr "Table per subclass"#. Tag: para#: inheritance_mapping.xml:96#, no-c-formatmsgid "A table per subclass mapping would look like:"msgstr "table per subclass 매핑은 다음과 같을 것이다:"#. Tag: programlisting#: inheritance_mapping.xml:100#, no-c-formatmsgid """<![CDATA[<class name=\"Payment\" table=\"PAYMENT\">\n"" <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"" <generator class=\"native\"/>\n"" </id>\n"" <property name=\"amount\" column=\"AMOUNT\"/>\n"" ...\n"" <joined-subclass name=\"CreditCardPayment\" table=\"CREDIT_PAYMENT\">\n"" <key column=\"PAYMENT_ID\"/>\n"" <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"" ...\n"" </joined-subclass>\n"" <joined-subclass name=\"CashPayment\" table=\"CASH_PAYMENT\">\n"" <key column=\"PAYMENT_ID\"/>\n"" ...\n"" </joined-subclass>\n"" <joined-subclass name=\"ChequePayment\" table=\"CHEQUE_PAYMENT\">\n"" <key column=\"PAYMENT_ID\"/>\n"" ...\n"" </joined-subclass>\n""</class>]]>"msgstr ""#. Tag: para#: inheritance_mapping.xml:102#, no-c-formatmsgid """Four tables are required. The three subclass tables have primary key ""associations to the superclass table (so the relational model is actually a ""one-to-one association)."msgstr """네 개의 테이블들이 필요하다. 세 개의 서브클래스 테이블들은 슈퍼클래스 테이블""에 대한 프라이머리 키 연관들을 갖는다 (따라서 그 관계형 모형은 실제로 one-to-""one 연관이다)."#. Tag: title#: inheritance_mapping.xml:111#, no-c-formatmsgid "Table per subclass, using a discriminator"msgstr "discriminator를 사용하는, table per subclass"#. Tag: para#: inheritance_mapping.xml:113#, no-c-formatmsgid """Note that Hibernate's implementation of table per subclass requires no ""discriminator column. Other object/relational mappers use a different ""implementation of table per subclass which requires a type discriminator ""column in the superclass table. The approach taken by Hibernate is much more ""difficult to implement but arguably more correct from a relational point of ""view. If you would like to use a discriminator column with the table per ""subclass strategy, you may combine the use of <literal><subclass></""literal> and <literal><join></literal>, as follow:"msgstr """table-per-subclass에 대한 Hibernate의 구현은 discriminator(판별자) 컬럼을 필""요로 하지 않음을 노트하라. 다른 객체/관계형 매핑기들은 슈퍼클래스 테이블 속""에 하나의 타입 판별자 컬럼을 필요로 하는 table-per-subclass에 대한 다른 구현""을 사용한다. Hibernate에 의해 채택된 접근법은 구현하기가 훨씬 더 어렵지만 관""계형 관점에서는 아마 틀림없이 보다 더 정확하다. 만일 당신이 table per ""subclass 방도에 대해 하나의 판별자 컬럼을 사용하고 싶다면, 당신은 다음과 같""이 <literal><subclass></literal>와 <literal><join></literal>의 사""용을 결합시킬 수도 있다:"#. Tag: programlisting#: inheritance_mapping.xml:125#, no-c-formatmsgid """<![CDATA[<class name=\"Payment\" table=\"PAYMENT\">\n"" <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"" <generator class=\"native\"/>\n"" </id>\n"" <discriminator column=\"PAYMENT_TYPE\" type=\"string\"/>\n"" <property name=\"amount\" column=\"AMOUNT\"/>\n"" ...\n"" <subclass name=\"CreditCardPayment\" discriminator-value=\"CREDIT\">\n"" <join table=\"CREDIT_PAYMENT\">\n"" <key column=\"PAYMENT_ID\"/>\n"" <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"" ...\n"" </join>\n"" </subclass>\n"" <subclass name=\"CashPayment\" discriminator-value=\"CASH\">\n"" <join table=\"CASH_PAYMENT\">\n"" <key column=\"PAYMENT_ID\"/>\n"" ...\n"" </join>\n"" </subclass>\n"" <subclass name=\"ChequePayment\" discriminator-value=\"CHEQUE\">\n"" <join table=\"CHEQUE_PAYMENT\" fetch=\"select\">\n"" <key column=\"PAYMENT_ID\"/>\n"" ...\n"" </join>\n"" </subclass>\n""</class>]]>"msgstr ""#. Tag: para#: inheritance_mapping.xml:127#, no-c-formatmsgid """The optional <literal>fetch=\"select\"</literal> declaration tells Hibernate ""not to fetch the <literal>ChequePayment</literal> subclass data using an ""outer join when querying the superclass."msgstr """선택적인 <literal>fetch=\"select\"</literal> 선언은 슈퍼클래스를 질의할 때 ""outer join을 사용하여 <literal>ChequePayment</literal> 서브클래스 데이터를 페""치시키지 않도록 Hibernate에게 알려준다."#. Tag: title#: inheritance_mapping.xml:136#, no-c-formatmsgid "Mixing table per class hierarchy with table per subclass"msgstr "table per class hierarchy와 table per subclass를 혼합하기"#. Tag: para#: inheritance_mapping.xml:138#, no-c-formatmsgid """You may even mix the table per hierarchy and table per subclass strategies ""using this approach:"msgstr """당신은 이 접근법을 사용하여 table per hierarchy 방도와 table per subclass 방""도를 혼합시킬 수 있다:"#. Tag: programlisting#: inheritance_mapping.xml:143#, no-c-formatmsgid """<![CDATA[<class name=\"Payment\" table=\"PAYMENT\">\n"" <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"" <generator class=\"native\"/>\n"" </id>\n"" <discriminator column=\"PAYMENT_TYPE\" type=\"string\"/>\n"" <property name=\"amount\" column=\"AMOUNT\"/>\n"" ...\n"" <subclass name=\"CreditCardPayment\" discriminator-value=\"CREDIT\">\n"" <join table=\"CREDIT_PAYMENT\">\n"" <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"" ...\n"" </join>\n"" </subclass>\n"" <subclass name=\"CashPayment\" discriminator-value=\"CASH\">\n"" ...\n"" </subclass>\n"" <subclass name=\"ChequePayment\" discriminator-value=\"CHEQUE\">\n"" ...\n"" </subclass>\n""</class>]]>"msgstr ""#. Tag: para#: inheritance_mapping.xml:145#, no-c-formatmsgid """For any of these mapping strategies, a polymorphic association to the root ""<literal>Payment</literal> class is mapped using <literal><many-to-one>""</literal>."msgstr """이들 매핑 방도들 중 어떤 것에 대해, 루트 <literal>Payment</literal> 클래스에 ""대한 하나의 다형성 연관은 <literal><many-to-one></literal>을 사용하여 ""매핑된다."#. Tag: programlisting#: inheritance_mapping.xml:151#, no-c-formatmsgid """<![CDATA[<many-to-one name=\"payment\" column=\"PAYMENT_ID\" class=\"Payment""\"/>]]>"msgstr ""#. Tag: title#: inheritance_mapping.xml:156#, no-c-formatmsgid "Table per concrete class"msgstr "Table per concrete class"#. Tag: para#: inheritance_mapping.xml:158#, no-c-formatmsgid """There are two ways we could go about mapping the table per concrete class ""strategy. The first is to use <literal><union-subclass></literal>."msgstr """우리가 table per concrete class 방도 매핑에 대해 취할 수 있는 두 가지 방법들""이 존재한다. 첫 번째는 <literal><union-subclass></literal>를 사용하는 ""것이다."#. Tag: programlisting#: inheritance_mapping.xml:163#, no-c-formatmsgid """<![CDATA[<class name=\"Payment\">\n"" <id name=\"id\" type=\"long\" column=\"PAYMENT_ID\">\n"" <generator class=\"sequence\"/>\n"" </id>\n"" <property name=\"amount\" column=\"AMOUNT\"/>\n"" ...\n"" <union-subclass name=\"CreditCardPayment\" table=\"CREDIT_PAYMENT\">\n"" <property name=\"creditCardType\" column=\"CCTYPE\"/>\n"" ...\n"" </union-subclass>\n"" <union-subclass name=\"CashPayment\" table=\"CASH_PAYMENT\">\n"" ...\n"" </union-subclass>\n"" <union-subclass name=\"ChequePayment\" table=\"CHEQUE_PAYMENT\">\n"" ...\n"" </union-subclass>\n""</class>]]>"msgstr ""#. Tag: para#: inheritance_mapping.xml:165#, no-c-formatmsgid """Three tables are involved for the subclasses. Each table defines columns for ""all properties of the class, including inherited properties."msgstr """세 개의 테이블들이 슈퍼클래스들에 대해 수반된다. 각각의 테이블은 상속된 프로""퍼티들을 포함하여, 그 클래스의 모든 프로퍼티들에 대한 컬럼들을 정의한다."
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -