📄 component_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#: component_mapping.xml:5#, no-c-formatmsgid "Component Mapping"msgstr "Component 매핑"#. Tag: para#: component_mapping.xml:7#, no-c-formatmsgid """The notion of a <emphasis>component</emphasis> is re-used in several ""different contexts, for different purposes, throughout Hibernate."msgstr """<emphasis>component</emphasis>의 개념은 Hibernate에서 다른 용도로 몇몇 다른 ""컨텍스트들 내에서 재사용된다."#. Tag: title#: component_mapping.xml:13#, no-c-formatmsgid "Dependent objects"msgstr "종속 객체들"#. Tag: para#: component_mapping.xml:15#, no-c-formatmsgid """A component is a contained object that is persisted as a value type, not an ""entity reference. The term \"component\" refers to the object-oriented ""notion of composition (not to architecture-level components). For example, ""you might model a person like this:"msgstr """하나의 컴포넌트는 엔티티 참조가 아닌, value 타입으로서 영속화 되는 하나의 포""함된 객체이다. \"컴포넌트\" 용어는 (아키텍처 수준의 컴포넌트들이 아닌) ""composition(구성,합성)에 대한 객체-지향적인 개념을 언급한다. 예를 들어 당신""은 다음과 같이 개인을 모형화 시킬 수도 있다:"#. Tag: programlisting#: component_mapping.xml:21#, no-c-formatmsgid """<![CDATA[public class Person {\n"" private java.util.Date birthday;\n"" private Name name;\n"" private String key;\n"" public String getKey() {\n"" return key;\n"" }\n"" private void setKey(String key) {\n"" this.key=key;\n"" }\n"" public java.util.Date getBirthday() {\n"" return birthday;\n"" }\n"" public void setBirthday(java.util.Date birthday) {\n"" this.birthday = birthday;\n"" }\n"" public Name getName() {\n"" return name;\n"" }\n"" public void setName(Name name) {\n"" this.name = name;\n"" }\n"" ......\n"" ......\n""}]]>"msgstr ""#. Tag: programlisting#: component_mapping.xml:23#, no-c-formatmsgid """<![CDATA[public class Name {\n"" char initial;\n"" String first;\n"" String last;\n"" public String getFirst() {\n"" return first;\n"" }\n"" void setFirst(String first) {\n"" this.first = first;\n"" }\n"" public String getLast() {\n"" return last;\n"" }\n"" void setLast(String last) {\n"" this.last = last;\n"" }\n"" public char getInitial() {\n"" return initial;\n"" }\n"" void setInitial(char initial) {\n"" this.initial = initial;\n"" }\n""}]]>"msgstr ""#. Tag: para#: component_mapping.xml:25#, no-c-formatmsgid """Now <literal>Name</literal> may be persisted as a component of ""<literal>Person</literal>. Notice that <literal>Name</literal> defines ""getter and setter methods for its persistent properties, but doesn't need to ""declare any interfaces or identifier properties."msgstr """이제 <literal>Name</literal>은 <literal>Person</literal>의 컴포넌트로서 영속""화 될 수도 있다. <literal>Name</literal>이 그것의 영속 프로퍼티들에 대한 ""getter 메소드와 setter 메소드를 정의하지만, 어떤 인터페이스들이나 식별자 프로""퍼티들을 선언하는 것을 필요로 하지 않음을 주목하라."#. Tag: para#: component_mapping.xml:32#, no-c-formatmsgid "Our Hibernate mapping would look like:"msgstr "우리의 Hibernate 매핑은 다음과 같을 것이다:"#. Tag: programlisting#: component_mapping.xml:36#, no-c-formatmsgid """<![CDATA[<class name=\"eg.Person\" table=\"person\">\n"" <id name=\"Key\" column=\"pid\" type=\"string\">\n"" <generator class=\"uuid\"/>\n"" </id>\n"" <property name=\"birthday\" type=\"date\"/>\n"" <component name=\"Name\" class=\"eg.Name\"> <!-- class attribute ""optional -->\n"" <property name=\"initial\"/>\n"" <property name=\"first\"/>\n"" <property name=\"last\"/>\n"" </component>\n""</class>]]>"msgstr ""#. Tag: para#: component_mapping.xml:38#, no-c-formatmsgid """The person table would have the columns <literal>pid</literal>, ""<literal>birthday</literal>, <literal>initial</literal>, <literal>first</""literal> and <literal>last</literal>."msgstr """person 테이블은 <literal>pid</literal>, <literal>birthday</literal>, ""<literal>initial</literal>, <literal>first</literal>, <literal>last</""literal> 컬럼들을 가질 것이다."#. Tag: para#: component_mapping.xml:46#, no-c-formatmsgid """Like all value types, components do not support shared references. In other ""words, two persons could have the same name, but the two person objects ""would contain two independent name ojects, only \"the same\" by value. The ""null value semantics of a component are <emphasis>ad hoc</emphasis>. When ""reloading the containing object, Hibernate will assume that if all component ""columns are null, then the entire component is null. This should be okay for ""most purposes."msgstr """모든 값(value) 타입들처럼, 컴포넌트들은 공유된 참조들을 지원하지 않는다. 달""리 말해, 두 명의 개인들은 동일한 이름을 가질 수 있지만, 두 개의 person 객체들""은 오직 값 만이 \"동일한\" 두 개의 독립적인 name 객체들을 포함할 것이다. 컴포""넌트의 null 값 의미는 <emphasis>특별한 용도를 위한 것이다</emphasis>. 포함된 ""객체를 다시 로드시킬 때, Hibernate는 모든 컴포넌트 컬럼들이 null일 경우에 전""체 컴포넌트가 null이라고 가정할 것이다. 이것은 대부분의 용도에 맞을 것이다."#. Tag: para#: component_mapping.xml:55#, no-c-formatmsgid """The properties of a component may be of any Hibernate type (collections, ""many-to-one associations, other components, etc). Nested components should ""<emphasis>not</emphasis> be considered an exotic usage. Hibernate is ""intended to support a very fine-grained object model."msgstr """컴포넌트의 프로퍼티들은 임의의 Hibernate 타입일 수 있다(콜렉션들, many-to-""one 연관들, 다른 컴포넌트들, 기타). 내포된 컴포넌트들은 신종의 사용례로 간주""되지 <emphasis>않을</emphasis> 것이다. Hibernate는 매우 잘 정제된 객체 모형""을 지원하도록 고안되어있다."#. Tag: para#: component_mapping.xml:62#, no-c-formatmsgid """The <literal><component></literal> element allows a <literal><""parent></literal> subelement that maps a property of the component class ""as a reference back to the containing entity."msgstr """<literal><component></literal> 요소는 컴포넌트 클래스의 프로퍼티를 포함""되는 엔티티에 대한 역 참조로서 매핑시키는 <literal><parent></literal> ""서브요소를 허용한다."#. Tag: programlisting#: component_mapping.xml:68#, no-c-formatmsgid """<![CDATA[<class name=\"eg.Person\" table=\"person\">\n"" <id name=\"Key\" column=\"pid\" type=\"string\">\n"" <generator class=\"uuid\"/>\n"" </id>\n"" <property name=\"birthday\" type=\"date\"/>\n"" <component name=\"Name\" class=\"eg.Name\" unique=\"true\">\n"" <parent name=\"namedPerson\"/> <!-- reference back to the Person --"">\n"" <property name=\"initial\"/>\n"" <property name=\"first\"/>\n"" <property name=\"last\"/>\n"" </component>\n""</class>]]>"msgstr ""#. Tag: title#: component_mapping.xml:73#, no-c-formatmsgid "Collections of dependent objects"msgstr "종속 객체들을 가진 콜렉션들"#. Tag: para#: component_mapping.xml:75#, no-c-formatmsgid """Collections of components are supported (eg. an array of type <literal>Name</""literal>). Declare your component collection by replacing the <literal><""element></literal> tag with a <literal><composite-element></""literal> tag."msgstr """컴포넌트들을 가진 콜렉션들이 지원된다(예를 들면 <literal>Name</literal> 타입""을 가진 배열). <literal><element></literal> 태그를 <literal><""composite-element></literal> 태그로 대체시켜서 당신의 컴포넌트 콜렉션을 선""언하라."#. Tag: programlisting#: component_mapping.xml:82#, no-c-formatmsgid """<![CDATA[<set name=\"someNames\" table=\"some_names\" lazy=\"true\">\n"" <key column=\"id\"/>\n"" <composite-element class=\"eg.Name\"> <!-- class attribute required -->\n"" <property name=\"initial\"/>\n"" <property name=\"first\"/>\n"" <property name=\"last\"/>\n"" </composite-element>\n""</set>]]>"msgstr ""#. Tag: para#: component_mapping.xml:84#, no-c-formatmsgid """Note: if you define a <literal>Set</literal> of composite elements, it is ""very important to implement <literal>equals()</literal> and <literal>hashCode""()</literal> correctly."msgstr """노트: 만일 당신이 composite 요소를 가진 하나의 <literal>Set</literal>를 정의""할 경우, <literal>equals()</literal>와 <literal>hashCode()</literal>를 정확하""게 구현하는 것이 매우 중요하다."#. Tag: para#: component_mapping.xml:90#, no-c-formatmsgid """Composite elements may contain components but not collections. If your ""composite element itself contains components, use the <literal><nested-""composite-element></literal> tag. This is a pretty exotic case - a ""collection of components which themselves have components. By this stage you ""should be asking yourself if a one-to-many association is more appropriate. ""Try remodelling the composite element as an entity - but note that even ""though the Java model is the same, the relational model and persistence ""semantics are still slightly different."msgstr """Composite 요소들은 컴포넌트들을 포함하지만 콜렉션들을 포함하지 않는다. 만일 ""당신의 composite 요소 자체가 컴포넌트들을 포함할 경우, <literal><nested-""composite-element></literal> 태그를 사용하라. 이것은 꽤 신종의 경우-그것""들 자체가 컴포넌트들을 갖고 있는 컴포넌트들의 콜렉션-이다. 이 단계에서 당신""은 one-to-many 연관이 더 적절한지를 당신 스스로에게 질문하게 될 것이다. 하나""의 엔티티로서 composite 요소를 다시 모델링하려고 시도하라 - 그러나 자바 모형""들이 동일할지라도, 관계형 모형과 영속화 의미들은 여전히 약간 다르다."#. Tag: para#: component_mapping.xml:102#, no-c-formatmsgid """Please note that a composite element mapping doesn't support null-able ""properties if you're using a <literal><set></literal>. Hibernate has ""to use each columns value to identify a record when deleting objects (there ""is no separate primary key column in the composite element table), which is ""not possible with null values. You have to either use only not-null ""properties in a composite-element or choose a <literal><list></""literal>, <literal><map></literal>, <literal><bag></literal> or ""<literal><idbag></literal>."msgstr """당신이 하나의 <literal><set></literal>을 사용 중이라면, 하나의 ""composite 요소 매핑은 null 가능한 프로퍼티들을 지원하지 않음을 노트하길 바란""다. Hibernate는 객체들을 삭제할 때 하나의 레코드를 식별하는데 각각의 컬럼들 ""값을 사용해야 하며 (composite 요소 테이블 내에 별도의 프라이머리 키 컬럼이 존""재하지 않는다), 그것은 null 값들에 대해서는 불가능하다. 당신은 하나의 ""composite-요소 내에 not-null 프로퍼티들 만을 사용해야 하거나 하나의 ""<literal><list></literal>, <literal><map></literal>, ""<literal><bag></literal> 또는 <literal><idbag></literal>을 선택해""야 한다."#. Tag: para#: component_mapping.xml:113#, no-c-formatmsgid """A special case of a composite element is a composite element with a nested ""<literal><many-to-one></literal> element. A mapping like this allows ""you to map extra columns of a many-to-many association table to the ""composite element class. The following is a many-to-many association from ""<literal>Order</literal> to <literal>Item</literal> where ""<literal>purchaseDate</literal>, <literal>price</literal> and ""<literal>quantity</literal> are properties of the association:"msgstr """composite 요소에 대한 하나의 특별한 경우는 내포된 <literal><many-to-""one></literal> 요소를 가진 composite 요소이다. 이같은 매핑은 many-to-many ""연관 테이블의 특별한 컬럼들을 composite 요소 클래스로 매핑시키는 것을 당신에""게 허용해준다. 다음은 <literal>Order</literal>로부터 <literal>Item</literal>""으로의 many-to-many 연관이다. 여기서 <literal>purchaseDate</literal>, ""<literal>price</literal>, 그리고 <literal>quantity</literal>는 연관의 프로퍼""티들이다:"#. Tag: programlisting#: component_mapping.xml:123#, no-c-formatmsgid """<![CDATA[<class name=\"eg.Order\" .... >\n"" ....\n"" <set name=\"purchasedItems\" table=\"purchase_items\" lazy=\"true\">\n"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -