📄 example_mappings.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#: example_mappings.xml:20#, no-c-formatmsgid "Example: Various Mappings"msgstr "예제: 여러 가지 매핑들"#. Tag: para#: example_mappings.xml:22#, no-c-formatmsgid "This chapters shows off some more complex association mappings."msgstr "이 장은 몇몇 보다 복잡한 연관 매핑들을 보여준다."#. Tag: title#: example_mappings.xml:27#, no-c-formatmsgid "Employer/Employee"msgstr "Employer/Employee"#. Tag: para#: example_mappings.xml:29#, no-c-formatmsgid """The following model of the relationship between <literal>Employer</literal> ""and <literal>Employee</literal> uses an actual entity class ""(<literal>Employment</literal>) to represent the association. This is done ""because there might be more than one period of employment for the same two ""parties. Components are used to model monetary values and employee names."msgstr """<literal>Employer</literal>와 <literal>Employee</literal> 사이의 관계에 대한 ""다음 모형은 그 연관를 표현하는 데 실제 엔티티 클래스(<literal>Employment</""literal>)를 사용한다. 동일한 두 부분들에 대해 하나 이상의 채용 주기가 존재할 ""수 있기 때문에 이것이 행해진다. 컴포넌트들이 화폐 값들과 종업원 이름들을 모형""화 시키는데 사용된다."#. Tag: para#: example_mappings.xml:46#, no-c-formatmsgid "Heres a possible mapping document:"msgstr "다음은 가능한 매핑 문서이다:"#. Tag: programlisting#: example_mappings.xml:50#, no-c-formatmsgid """<![CDATA[<hibernate-mapping>\n"" \n"" <class name=\"Employer\" table=\"employers\">\n"" <id name=\"id\">\n"" <generator class=\"sequence\">\n"" <param name=\"sequence\">employer_id_seq</param>\n"" </generator>\n"" </id>\n"" <property name=\"name\"/>\n"" </class>\n""\n"" <class name=\"Employment\" table=\"employment_periods\">\n""\n"" <id name=\"id\">\n"" <generator class=\"sequence\">\n"" <param name=\"sequence\">employment_id_seq</param>\n"" </generator>\n"" </id>\n"" <property name=\"startDate\" column=\"start_date\"/>\n"" <property name=\"endDate\" column=\"end_date\"/>\n""\n"" <component name=\"hourlyRate\" class=\"MonetaryAmount\">\n"" <property name=\"amount\">\n"" <column name=\"hourly_rate\" sql-type=\"NUMERIC(12, 2)\"/>\n"" </property>\n"" <property name=\"currency\" length=\"12\"/>\n"" </component>\n""\n"" <many-to-one name=\"employer\" column=\"employer_id\" not-null=\"true""\"/>\n"" <many-to-one name=\"employee\" column=\"employee_id\" not-null=\"true""\"/>\n""\n"" </class>\n""\n"" <class name=\"Employee\" table=\"employees\">\n"" <id name=\"id\">\n"" <generator class=\"sequence\">\n"" <param name=\"sequence\">employee_id_seq</param>\n"" </generator>\n"" </id>\n"" <property name=\"taxfileNumber\"/>\n"" <component name=\"name\" class=\"Name\">\n"" <property name=\"firstName\"/>\n"" <property name=\"initial\"/>\n"" <property name=\"lastName\"/>\n"" </component>\n"" </class>\n""\n""</hibernate-mapping>]]>"msgstr ""#. Tag: para#: example_mappings.xml:52#, no-c-formatmsgid """And heres the table schema generated by <literal>SchemaExport</literal>."msgstr """그리고 다음은 <literal>SchemaExport</literal>에 의해 생성된 테이블 스키마이""다."#. Tag: programlisting#: example_mappings.xml:56#, no-c-formatmsgid """<![CDATA[create table employers (\n"" id BIGINT not null, \n"" name VARCHAR(255), \n"" primary key (id)\n"")\n""\n""create table employment_periods (\n"" id BIGINT not null,\n"" hourly_rate NUMERIC(12, 2),\n"" currency VARCHAR(12), \n"" employee_id BIGINT not null, \n"" employer_id BIGINT not null, \n"" end_date TIMESTAMP, \n"" start_date TIMESTAMP, \n"" primary key (id)\n"")\n""\n""create table employees (\n"" id BIGINT not null, \n"" firstName VARCHAR(255), \n"" initial CHAR(1), \n"" lastName VARCHAR(255), \n"" taxfileNumber VARCHAR(255), \n"" primary key (id)\n"")\n""\n""alter table employment_periods \n"" add constraint employment_periodsFK0 foreign key (employer_id) ""references employers\n""alter table employment_periods \n"" add constraint employment_periodsFK1 foreign key (employee_id) ""references employees\n""create sequence employee_id_seq\n""create sequence employment_id_seq\n""create sequence employer_id_seq]]>"msgstr ""#. Tag: title#: example_mappings.xml:61#, no-c-formatmsgid "Author/Work"msgstr "Author/Work"#. Tag: para#: example_mappings.xml:63#, no-c-formatmsgid """Consider the following model of the relationships between <literal>Work</""literal>, <literal>Author</literal> and <literal>Person</literal>. We ""represent the relationship between <literal>Work</literal> and ""<literal>Author</literal> as a many-to-many association. We choose to ""represent the relationship between <literal>Author</literal> and ""<literal>Person</literal> as one-to-one association. Another possibility ""would be to have <literal>Author</literal> extend <literal>Person</literal>."msgstr """<literal>Work</literal>, <literal>Author</literal> 그리고 <literal>Person</""literal> 사이의 관계들에 대한 다음 모형을 검토하자. 우리는 <literal>Work</""literal>과 <literal>Author</literal> 사이의 관계를 many-to-many 연관으로 표현""한다. 우리는 <literal>Author</literal>와 <literal>Person</literal> 사이의 관""계를 one-to-one 연관으로 표현하고자 선택한다. 또 다른 가능성은 ""<literal>Author</literal>가 <literal>Person</literal>을 확장하도록 하는 것일 ""것이다."#. Tag: para#: example_mappings.xml:81#, no-c-formatmsgid """The following mapping document correctly represents these relationships:"msgstr "다음 매핑 문서는 이들 관계들을 정확하게 표현한다:"#. Tag: programlisting#: example_mappings.xml:85#, no-c-formatmsgid """<![CDATA[<hibernate-mapping>\n""\n"" <class name=\"Work\" table=\"works\" discriminator-value=\"W\">\n""\n"" <id name=\"id\" column=\"id\">\n"" <generator class=\"native\"/>\n"" </id>\n"" <discriminator column=\"type\" type=\"character\"/>\n""\n"" <property name=\"title\"/>\n"" <set name=\"authors\" table=\"author_work\">\n"" <key column name=\"work_id\"/>\n"" <many-to-many class=\"Author\" column name=\"author_id\"/>\n"" </set>\n""\n"" <subclass name=\"Book\" discriminator-value=\"B\">\n"" <property name=\"text\"/>\n"" </subclass>\n""\n"" <subclass name=\"Song\" discriminator-value=\"S\">\n"" <property name=\"tempo\"/>\n"" <property name=\"genre\"/>\n"" </subclass>\n""\n"" </class>\n""\n"" <class name=\"Author\" table=\"authors\">\n""\n"" <id name=\"id\" column=\"id\">\n"" <!-- The Author must have the same identifier as the Person -->\n"" <generator class=\"assigned\"/> \n"" </id>\n""\n"" <property name=\"alias\"/>\n"" <one-to-one name=\"person\" constrained=\"true\"/>\n""\n"" <set name=\"works\" table=\"author_work\" inverse=\"true\">\n"" <key column=\"author_id\"/>\n"" <many-to-many class=\"Work\" column=\"work_id\"/>\n"" </set>\n""\n"" </class>\n""\n"" <class name=\"Person\" table=\"persons\">\n"" <id name=\"id\" column=\"id\">\n"" <generator class=\"native\"/>\n"" </id>\n"" <property name=\"name\"/>\n"" </class>\n""\n""</hibernate-mapping>]]>"msgstr ""#. Tag: para#: example_mappings.xml:87#, no-c-formatmsgid """There are four tables in this mapping. <literal>works</literal>, ""<literal>authors</literal> and <literal>persons</literal> hold work, author ""and person data respectively. <literal>author_work</literal> is an ""association table linking authors to works. Heres the table schema, as ""generated by <literal>SchemaExport</literal>."msgstr """이 매핑에는 네 개의 테이블들이 존재한다. <literal>works</literal>, ""<literal>authors</literal>와 <literal>persons</literal>은 각각 작업 데이터, ""저자 데이터, 개인 데이터를 보관한다. <literal>author_work</literal>는 저자들""을 작업들에 연결시키는 연관 테이블이다. 다음은 <literal>SchemaExport</""literal>에 의해 생성된 테이블 스키마이다."#. Tag: programlisting#: example_mappings.xml:95#, no-c-formatmsgid """<![CDATA[create table works (\n"" id BIGINT not null generated by default as identity, \n"" tempo FLOAT, \n"" genre VARCHAR(255), \n"" text INTEGER, \n"" title VARCHAR(255), \n"" type CHAR(1) not null, \n"" primary key (id)\n"")\n""\n""create table author_work (\n"" author_id BIGINT not null, \n"" work_id BIGINT not null, \n"" primary key (work_id, author_id)\n"")\n""\n""create table authors (\n"" id BIGINT not null generated by default as identity, \n"" alias VARCHAR(255), \n"" primary key (id)\n"")\n""\n""create table persons (\n"" id BIGINT not null generated by default as identity, \n"" name VARCHAR(255), \n"" primary key (id)\n"")\n""\n""alter table authors \n"" add constraint authorsFK0 foreign key (id) references persons\n""alter table author_work \n"" add constraint author_workFK0 foreign key (author_id) references ""authors\n""alter table author_work\n"" add constraint author_workFK1 foreign key (work_id) references works]]>"msgstr ""#. Tag: title#: example_mappings.xml:100#, no-c-formatmsgid "Customer/Order/Product"msgstr "Customer/Order/Product"#. Tag: para#: example_mappings.xml:102#, no-c-formatmsgid """Now consider a model of the relationships between <literal>Customer</""literal>, <literal>Order</literal> and <literal>LineItem</literal> and ""<literal>Product</literal>. There is a one-to-many association between ""<literal>Customer</literal> and <literal>Order</literal>, but how should we ""represent <literal>Order</literal> / <literal>LineItem</literal> / ""<literal>Product</literal>? I've chosen to map <literal>LineItem</literal> ""as an association class representing the many-to-many association between ""<literal>Order</literal> and <literal>Product</literal>. In Hibernate, this ""is called a composite element."msgstr """이제 <literal>Customer</literal>, <literal>Order</literal>와 ""<literal>LineItem</literal> 그리고 <literal>Product</literal> 사이의 관계들""에 관한 모형을 검토하자. <literal>Customer</literal>와 <literal>Order</""literal> 사이의 one-to-many 연관이 존재하지만, 우리는 어떻게 <literal>Order</""literal> / <literal>LineItem</literal> / <literal>Product</literal>를 표현할 ""것인가? 나는 <literal>Order</literal>와 <literal>Product</literal> 사이의 ""many-to-many 연관를 나타내는 하나의 연관 클래스로서 <literal>LineItem</""literal>을 매핑하기로 선택했다. Hibernate에서 이것은 composite 요소로 명명된""다."#. Tag: para#: example_mappings.xml:122#, no-c-formatmsgid "The mapping document:"msgstr "매핑 문서:"#. Tag: programlisting#: example_mappings.xml:126#, no-c-formatmsgid """<![CDATA[<hibernate-mapping>\n""\n"" <class name=\"Customer\" table=\"customers\">\n"" <id name=\"id\">\n"" <generator class=\"native\"/>\n"" </id>\n"" <property name=\"name\"/>\n"" <set name=\"orders\" inverse=\"true\">\n"" <key column=\"customer_id\"/>\n"" <one-to-many class=\"Order\"/>\n"" </set>\n"" </class>\n""\n"" <class name=\"Order\" table=\"orders\">\n"" <id name=\"id\">\n"" <generator class=\"native\"/>\n"" </id>\n"" <property name=\"date\"/>\n"" <many-to-one name=\"customer\" column=\"customer_id\"/>\n"" <list name=\"lineItems\" table=\"line_items\">\n"" <key column=\"order_id\"/>\n"" <list-index column=\"line_number\"/>\n"" <composite-element class=\"LineItem\">\n"" <property name=\"quantity\"/>\n"" <many-to-one name=\"product\" column=\"product_id\"/>\n"" </composite-element>\n"" </list>\n"" </class>\n""\n"" <class name=\"Product\" table=\"products\">\n"" <id name=\"id\">\n"" <generator class=\"native\"/>\n"" </id>\n"" <property name=\"serialNumber\"/>\n"" </class>\n""\n""</hibernate-mapping>]]>"msgstr ""#. Tag: para#: example_mappings.xml:128#, no-c-formatmsgid """<literal>customers</literal>, <literal>orders</literal>, ""<literal>line_items</literal> and <literal>products</literal> hold customer, ""order, order line item and product data respectively. <literal>line_items</""literal> also acts as an association table linking orders with products."msgstr """<literal>customers</literal>, <literal>orders</literal>, ""<literal>line_items</literal> 그리고 <literal>products</literal>는 각각 고객 ""데이터, 주문 데이터, 주문 라인 아이템 데이터, 그리고 제품 데이터를 보관한다. ""<literal>line_items</literal>는 또한 주문들을 제품들과 연결시키는 연관 테이블""로서 동작한다."
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -