alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Hibernate example source code file (inheritance_mapping.po)

This example Hibernate source code file (inheritance_mapping.po) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Hibernate tags/keywords

hibernate, hibernate, if, it, payment, polymorphic, table, table, tag, tag, the, the, there, you

The Hibernate inheritance_mapping.po source code

msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2010-02-04T04:51:22\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
#, fuzzy, no-c-format
msgid "Inheritance mapping"
msgstr "상속 매핑"

#. Tag: title
#, fuzzy, no-c-format
msgid "The three strategies"
msgstr "세 가지 방도들"

#. Tag: para
#, no-c-format
msgid "Hibernate supports the three basic inheritance mapping strategies:"
msgstr "Hibernate는 세 가지 기본적인 상속 매핑 방도들을 지원한다:"

#. Tag: para
#, no-c-format
msgid "table per class hierarchy"
msgstr "table per class hierarchy"

#. Tag: para
#, fuzzy, no-c-format
msgid "table per subclass"
msgstr "Table per subclass"

#. Tag: para
#, no-c-format
msgid "table per concrete class"
msgstr "table per concrete class"

#. Tag: para
#, no-c-format
msgid ""
"In addition, Hibernate supports a fourth, slightly different kind of "
"polymorphism:"
msgstr "게다가 Hibernate는 네 번째의 약간 다른 종류의 다형성을 지원한다:"

#. Tag: para
#, no-c-format
msgid "implicit polymorphism"
msgstr "implicit polymorphism(함축적인 다형성)"

#. Tag: para
#, fuzzy, no-c-format
msgid ""
"It is possible to use different mapping strategies for different branches of "
"the same inheritance hierarchy. You can then make use of implicit "
"polymorphism to achieve polymorphism across the whole hierarchy. However, "
"Hibernate does not support mixing <literal><subclass>, "
"<literal><joined-subclass> and <union-"
"subclass></literal> mappings under the same root <class><subclass> and "
"<literal><join> elements (see below for an example)."
msgstr ""
"동일한 상속 계층구조의 다른 가지들에 대해 다른 매핑 방도들을 사용하는 것이 가"
"능하고, 그런 다음 전체 계층 구조를 가로질러 다형성을 성취하는데 함축적인 다형"
"성을 사용하라. 하지만 Hibernate는 동일한 루트 <literal><class><subclass> 그리고 <"
"joined-subclass></literal> 그리고 <union-subclass><"
"class></literal> 요소 하에서 <subclass> 요소와 "
"<literal><join> 요소를 결합시킴으로써 table per hierarchy 방"
"도와 table per subclass 방도를 함께 혼합시키는 것이 가능하다(아래를 보라)."

#. Tag: para
#, fuzzy, no-c-format
msgid ""
"It is possible to define <literal>subclass, union-"
"subclass</literal>, and joined-subclass mappings in "
"separate mapping documents directly beneath <literal>hibernate-mapping attribute in "
"the subclass mapping, naming a previously mapped superclass. Previously this "
"feature made the ordering of the mapping documents important. Since "
"Hibernate3, the ordering of mapping files is irrelevant 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>subclass, union-subclass, 그리고 "
"<literal>joined-subclass 매핑들을 정의하는 것이 가능하다. 이것은 단"
"지 하나의 새로운 매핑 파일을 추가시켜서 하나의 class 계층구조를 확장하는 것"
"을 당신에게 허용해준다. 당신은 subclass 매핑 내에 앞서 매핑된 슈퍼클래스를 명"
"명하여 <literal>extends 속성을 지정해야 한다. 노트 : 명백하게 이 특"
"징은 매핑 문서들의 순서를 중요하게끔 만들었다. Hibernate3 이후로, 매핑 파일들"
"의 순서는 extends 키워드를 사용할 때 상관없다. 하나의 매핑 파일 내의 순서는 "
"여전히 서브클래스들에 앞서 슈퍼클래스들을 정의하는데 여전히 필요하다."

#. Tag: title
#, no-c-format
msgid "Table per class hierarchy"
msgstr "Table per class hierarchy"

#. Tag: para
#, fuzzy, no-c-format
msgid ""
"Suppose we have an interface <literal>Payment with the "
"implementors <literal>CreditCardPayment, CashPaymentChequePayment. The table per hierarchy "
"mapping would display in the following way:"
msgstr ""
"우리가 <literal>CreditCardPayment, CashPayment, "
"<literal>ChequePayment 구현자들을 가진 하나의 인터페이스 "
"<literal>Payment를 갖고 있다고 가정하자. table per hierarchy 매핑"
"은 다음과 같을 것이다:"

#. Tag: para
#, fuzzy, no-c-format
msgid ""
"Exactly one table is required. There is a limitation of this mapping "
"strategy: columns declared by the subclasses, such as <literal>CCTYPENOT NULL constraints."
msgstr ""
"정확히 하나의 테이블이 필요하다. 이 매핑 방도에는 다음의 하나의 큰 제약이 존"
"재한다: <literal>CCTYPE과 같이, 서브 클래스들에 의해 선언된 컬럼들"
"은 <literal>NOT NULL 컨스트레인트들을 가질 수 없다."

#. Tag: title
#, no-c-format
msgid "Table per subclass"
msgstr "Table per subclass"

#. Tag: para
#, fuzzy, no-c-format
msgid "A table per subclass mapping looks like this:"
msgstr "table per subclass 매핑은 다음과 같을 것이다:"

#. Tag: para
#, fuzzy, no-c-format
msgid ""
"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
#, fuzzy, no-c-format
msgid "Table per subclass: using a discriminator"
msgstr "discriminator를 사용하는, table per subclass"

#. Tag: para
#, fuzzy, no-c-format
msgid ""
"Hibernate's implementation of table per subclass does not require a "
"discriminator column. Other object/relational mappers use a different "
"implementation of table per subclass that 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 want to use a discriminator column with the table per subclass "
"strategy, you can combine the use of <literal><subclass> and "
"<literal><join>, as follows:"
msgstr ""
"table-per-subclass에 대한 Hibernate의 구현은 discriminator(판별자) 컬럼을 필"
"요로 하지 않음을 노트하라. 다른 객체/관계형 매핑기들은 슈퍼클래스 테이블 속"
"에 하나의 타입 판별자 컬럼을 필요로 하는 table-per-subclass에 대한 다른 구현"
"을 사용한다. Hibernate에 의해 채택된 접근법은 구현하기가 훨씬 더 어렵지만 관"
"계형 관점에서는 아마 틀림없이 보다 더 정확하다. 만일 당신이 table per "
"subclass 방도에 대해 하나의 판별자 컬럼을 사용하고 싶다면, 당신은 다음과 같"
"이 <literal><subclass>와 <join>의 사"
"용을 결합시킬 수도 있다:"

#. Tag: para
#, no-c-format
msgid ""
"The optional <literal>fetch=\"select\" declaration tells Hibernate "
"not to fetch the <literal>ChequePayment subclass data using an "
"outer join when querying the superclass."
msgstr ""
"선택적인 <literal>fetch=\"select\" 선언은 슈퍼클래스를 질의할 때 "
"outer join을 사용하여 <literal>ChequePayment 서브클래스 데이터를 페"
"치시키지 않도록 Hibernate에게 알려준다."

#. Tag: title
#, no-c-format
msgid "Mixing table per class hierarchy with table per subclass"
msgstr "table per class hierarchy와 table per subclass를 혼합하기"

#. Tag: para
#, fuzzy, no-c-format
msgid ""
"You can even mix the table per hierarchy and table per subclass strategies "
"using the following approach:"
msgstr ""
"당신은 이 접근법을 사용하여 table per hierarchy 방도와 table per subclass 방"
"도를 혼합시킬 수 있다:"

#. Tag: para
#, no-c-format
msgid ""
"For any of these mapping strategies, a polymorphic association to the root "
"<literal>Payment class is mapped using <many-to-one>"
"</literal>."
msgstr ""
"이들 매핑 방도들 중 어떤 것에 대해, 루트 <literal>Payment 클래스에 "
"대한 하나의 다형성 연관은 <literal><many-to-one>을 사용하여 "
"매핑된다."

#. Tag: title
#, no-c-format
msgid "Table per concrete class"
msgstr "Table per concrete class"

#. Tag: para
#, fuzzy, no-c-format
msgid ""
"There are two ways we can map the table per concrete class strategy. First, "
"you can use <literal><union-subclass>."
msgstr ""
"우리가 table per concrete class 방도 매핑에 대해 취할 수 있는 두 가지 방법들"
"이 존재한다. 첫 번째는 <literal><union-subclass>를 사용하는 "
"것이다."

#. Tag: para
#, no-c-format
msgid ""
"Three tables are involved for the subclasses. Each table defines columns for "
"all properties of the class, including inherited properties."
msgstr ""
"세 개의 테이블들이 슈퍼클래스들에 대해 수반된다. 각각의 테이블은 상속된 프로"
"퍼티들을 포함하여, 그 클래스의 모든 프로퍼티들에 대한 컬럼들을 정의한다."

#. Tag: para
#, fuzzy, no-c-format
msgid ""
"The limitation of this approach is that if a property is mapped on the "
"superclass, the column name must be the same on all subclass tables. The "
"identity generator strategy is not allowed in union subclass inheritance. "
"The primary key seed has to be shared across all unioned subclasses of a "
"hierarchy."
msgstr ""
"이 접근법의 제약은 만일 하나의 프로퍼티가 슈퍼클래스 상으로 매핑될 경우, 그 "
"컬럼 이름이 모든 서브클래스 테이블들 상에서 같아야 한다는 점이다.(장래의 "
"Hibernate 배포본에서 우리는 이 제약을 풀 수도 있다.) identity 생성기 방도는 "
"union 서브클래스 상속에서 허용되지 않으며, 진정 프라이머리 키 시드는 하나의 "
"계층구조의 모든 unioned 서브클래스들을 가로질러 공유되어야 한다."

#. Tag: para
#, fuzzy, no-c-format
msgid ""
"If your superclass is abstract, map it with <literal>abstract=\"true\" in the example above), is needed to hold "
"instances of the superclass."
msgstr ""
"만일 당신의 슈퍼클래스가 abstract일 경우에, 그것을 <literal>abstract=\"true"
"\"</literal>로 매핑하라. 물론 만일 그것이 abstract가 아닐 경우, 추가적인 테이"
"블(위의 예제에서는 디폴트로 <literal>PAYMENT)이 슈퍼클래스의 인스턴"
"스들을 소유하는데 필요하다."

#. Tag: title
#, fuzzy, no-c-format
msgid "Table per concrete class using implicit polymorphism"
msgstr "함축적인 다형성을 사용하는, table per concrete class"

#. Tag: para
#, no-c-format
msgid "An alternative approach is to make use of implicit polymorphism:"
msgstr "대안적인 접근법은 함축적인 다형성을 사용하는 것이다:"

#. Tag: para
#, fuzzy, no-c-format
msgid ""
"Notice that the <literal>Payment interface is not mentioned "
"explicitly. Also notice that properties of <literal>Payment are "
"mapped in each of the subclasses. If you want to avoid duplication, consider "
"using XML entities (for example, <literal>[ <!ENTITY allproperties SYSTEM "
"\"allproperties.xml\"> ]</literal> in the DOCTYPE "
"declaration and <literal>&allproperties; in the mapping)."
msgstr ""
"어느 곳에서도 우리가 명시적으로 <literal>Payment 인터페이스를 언급"
"하지 않음을 주목하라. 또한 <literal>Payment의 프로퍼티들이 서브클래"
"스들 각각에서 매핑된다는 점을 주목하라. 만일 당신이 중복을 피하고자 원한다"
"면, XML 엔티티들을 사용하는 것을 고려하라(예를 들어 매핑에서 "
"<literal>DOCTYPE 선언과 &allproperties;에서 "
"<literal>[ <!ENTITY allproperties SYSTEM \"allproperties.xml\"> ]s when performing polymorphic queries."
msgstr ""
"이 접근법의 단점은 다형성 질의들을 수행할 때 Hibernate가 생성된 SQl "
"<literal>UNION들을 생성시키는 않는다는 점이다."

#. Tag: para
#, no-c-format
msgid ""
"For this mapping strategy, a polymorphic association to <literal>Payment<any>."
msgstr ""
"이 매핑 방도의 경우, <literal>Payment에 대한 하나의 다형성 연관은 "
"대개 <literal><any>를 사용하여 매핑된다."

#. Tag: title
#, no-c-format
msgid "Mixing implicit polymorphism with other inheritance mappings"
msgstr "함축적인 다형성을 다른 상속 매핑들과 혼합하기"

#. Tag: para
#, fuzzy, no-c-format
msgid ""
"Since the subclasses are each mapped in their own <literal><class>Payment is just an "
"interface), each of the subclasses could easily be part of another "
"inheritance hierarchy. You can still use polymorphic queries against the "
"<literal>Payment interface."
msgstr ""
"이 매핑에 대해 주목할 하나 이상의 것이 존재한다. 서브클래스들이 그것들 자신의"
"<literal><class> 요소 내에 각각 매핑되므로(그리고 "
"<literal>Payment가 단지 인터페이스이므로), 서브클래스들 각각은 쉽"
"게 또 다른 상속 계층구조의 부분일 수 있다! (그리고 당신은 <literal>Payment is not mentioned explicitly. If we "
"execute a query against the <literal>Payment interface, for "
"example <literal>from Payment, Hibernate automatically returns "
"instances of <literal>CreditCardPayment (and its subclasses, since "
"they also implement <literal>Payment), CashPaymentChequePayment, but not instances of "
"<literal>NonelectronicTransaction."
msgstr ""
"다시 한번, 우리는 <literal>Payment를 명시적으로 언급하지 않는다. 만"
"일 우리가 <literal>Payment 인터페이스에 대해 하나의 질의를 실행할 "
"경우-예를 들어, from Payment-, Hibernate는 <literal>CreditCardPaymentPaymentCashPayment 그리고 "
"<literal>ChequePayment 인스턴스들을 자동적으로 반환할 것이지만 "
"<literal>NonelectronicTransaction의 인스턴스들을 반환하지 않는다."

#. Tag: title
#, no-c-format
msgid "Limitations"
msgstr "제약들"

#. Tag: para
#, fuzzy, no-c-format
msgid ""
"There are limitations to the \"implicit polymorphism\" approach to the table "
"per concrete-class mapping strategy. There are somewhat less restrictive "
"limitations to <literal><union-subclass> mappings."
msgstr ""
"table per concrete-class 매핑 방도에 대한 \"함축적인 다형성\" 접근법에는 어"
"떤 제약들이 존재한다. <literal><union-subclass> 매핑들에 대해"
"서는 다소 덜 제한적인 제약들이 존재한다:"

#. Tag: para
#, no-c-format
msgid ""
"The following table shows the limitations of table per concrete-class "
"mappings, and of implicit polymorphism, in Hibernate."
msgstr ""
"다음 표는 Hibernate에서 table per concrete-class 매핑들에 대한 제약들, 그리"
"고 함축적인 다형성에 대한 제약들을 보여준다."

#. Tag: title
#, no-c-format
msgid "Features of inheritance mappings"
msgstr "상속 매핑들의 특징들"

#. Tag: entry
#, no-c-format
msgid "Inheritance strategy"
msgstr "상속 방도"

#. Tag: entry
#, no-c-format
msgid "Polymorphic many-to-one"
msgstr "다형성 다대일"

#. Tag: entry
#, no-c-format
msgid "Polymorphic one-to-one"
msgstr "다형성 일대일"

#. Tag: entry
#, no-c-format
msgid "Polymorphic one-to-many"
msgstr "다형성 일대다"

#. Tag: entry
#, no-c-format
msgid "Polymorphic many-to-many"
msgstr "다형성 다대다"

#. Tag: entry
#, no-c-format
msgid "Polymorphic <literal>load()/get()"
msgstr ""

#. Tag: entry
#, no-c-format
msgid "Polymorphic queries"
msgstr "다형성 질의들"

#. Tag: entry
#, no-c-format
msgid "Polymorphic joins"
msgstr "다형성 조인들"

#. Tag: entry
#, no-c-format
msgid "Outer join fetching"
msgstr "Outer 조인 페칭"

#. Tag: entry
#, no-c-format
msgid "table per class-hierarchy"
msgstr "table per class-hierarchy"

#. Tag: entry
#, fuzzy, no-c-format
msgid "<literal><many-to-one>"
msgstr "<many-to-one>"

#. Tag: entry
#, fuzzy, no-c-format
msgid "<literal><one-to-one>"
msgstr "<one-to-one>"

#. Tag: entry
#, fuzzy, no-c-format
msgid "<literal><one-to-many>"
msgstr "<one-to-many>"

#. Tag: entry
#, fuzzy, no-c-format
msgid "<literal><many-to-many>"
msgstr "<many-to-many>"

#. Tag: entry
#, fuzzy, no-c-format
msgid "<literal>s.get(Payment.class, id)"
msgstr "s.get(Payment.class, id)"

#. Tag: entry
#, no-c-format
msgid "<literal>from Payment p"
msgstr ""

#. Tag: entry
#, fuzzy, no-c-format
msgid "<literal>from Order o join o.payment p"
msgstr "from Order o join o.payment p"

#. Tag: entry
#, no-c-format
msgid "<emphasis>supported"
msgstr ""

#. Tag: entry
#, no-c-format
msgid "table per concrete-class (union-subclass)"
msgstr "table per concrete-class (union-subclass)"

#. Tag: entry
#, no-c-format
msgid ""
"<literal><one-to-many> (for inverse=\"true\""
msgstr ""

#. Tag: entry
#, no-c-format
msgid "<emphasis>not supported"
msgstr ""

#. Tag: entry
#, fuzzy, no-c-format
msgid "<literal><many-to-any>"
msgstr "<many-to-any>"

#. Tag: entry
#, fuzzy, no-c-format
msgid ""
"<literal>s.createCriteria(Payment.class).add( Restrictions.idEq(id) )."
"uniqueResult()</literal>"
msgstr ""
"s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()"

#, fuzzy
#~ msgid "<para>table per subclass"
#~ msgstr "table per subclass"

#~ msgid "from Payment p"
#~ msgstr "from Payment p"

#~ msgid "supported"
#~ msgstr "지원됨"

#, fuzzy
#~ msgid "<entry>table per subclass"
#~ msgstr "table per subclass"

#~ msgid "<any>"
#~ msgstr "<any>"

#~ msgid "not supported"
#~ msgstr "지원되지 않음"

#~ msgid "load()/get()"
#~ msgstr "load()/get()"

#~ msgid "Polymorphic <placeholder-1/>"
#~ msgstr "다형성 <placeholder-1/>"

#~ msgid "inverse=\"true\""
#~ msgstr "inverse=\"true\""

#~ msgid "<placeholder-1/> (for  only)"
#~ msgstr "<placeholder-1/> (for  only)"

Other Hibernate examples (source code examples)

Here is a short list of links related to this Hibernate inheritance_mapping.po source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.