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

Hibernate example source code file (example_mappings.po)

This example Hibernate source code file (example_mappings.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

author, bigint, bigint, cdata, cdata, lineitem, order, person, product, tag, tag, timestamp, varchar, varchar

The Hibernate example_mappings.po source code

# translation of example_mappings.po to French
# Myriam Malga <mmalga@redhat.com>, 2007.
# Xi HUANG <xhuang@redhat.com>, 2007.
# Corina Roe <croe@redhat.com>, 2009.
# translation of Collection_Mapping.po to
msgid ""
msgstr ""
"Project-Id-Version: example_mappings\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2010-02-10T07:25:35\n"
"PO-Revision-Date: 2009-11-11 09:19+1000\n"
"Last-Translator: Corina Roe <croe@redhat.com>\n"
"Language-Team: French <i18@redhat.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"

#. Tag: title
#, no-c-format
msgid "Example: Various Mappings"
msgstr "Exemple : quelques mappages"

#. Tag: para
#, no-c-format
msgid "This chapters explores some more complex association mappings."
msgstr "Ce chapitre montre quelques mappages plus complexes. "

#. Tag: title
#, no-c-format
msgid "Employer/Employee"
msgstr "Employeur/Employé (Employer/Employee)"

#. Tag: para
#, no-c-format
msgid ""
"The following model of the relationship between <literal>Employer "
"and <literal>Employee uses an entity class (Employment et "
"<literal>Employee utilise une vraie classe entité "
"(<literal>Employment) pour représenter l'association. La raison "
"étant qu'il peut y avoir plus d'une période d'emploi pour les deux mêmes "
"parties. Des composants sont utilisés pour modéliser les valeurs monétaires "
"et les noms des employés. "

#. Tag: para
#, no-c-format
msgid "Here is a possible mapping document:"
msgstr "Voici un document de mappage possible : "

#. Tag: para
#, no-c-format
msgid "Here is the table schema generated by <literal>SchemaExport."
msgstr ""
"Et voici le schéma des tables générées par <literal>SchemaExport. "

#. Tag: title
#, no-c-format
msgid "Author/Work"
msgstr "Auteur/Travail "

#. Tag: para
#, no-c-format
msgid ""
"Consider the following model of the relationships between <literal>WorkAuthor and Person. In the "
"example, the relationship between <literal>Work and "
"<literal>Author is represented as a many-to-many association and "
"the relationship between <literal>Author and Person extend Person."
msgstr ""
"Examinons le modèle suivant de la relation entre <literal>Work, "
"<literal>Author et Person. Nous représentons la "
"relation entre <literal>Work et Author comme "
"une association plusieurs-à-plusieurs. Nous avons choisi de représenter la "
"relation entre <literal>Author et Person comme "
"une association un-à-un. Une autre possibilité aurait été que "
"<literal>Author étende Person. "

#. Tag: para
#, no-c-format
msgid ""
"The following mapping document correctly represents these relationships:"
msgstr "Le mappage suivant représente exactement ces relations :"

#. Tag: para
#, no-c-format
msgid ""
"There are four tables in this mapping: <literal>works, "
"<literal>authors and persons hold work, author "
"and person data respectively. <literal>author_work is an "
"association table linking authors to works. Here is the table schema, as "
"generated by <literal>SchemaExport:"
msgstr ""
"Il y a quatre tables dans ce mappage. <literal>works, "
"<literal>authors et persons qui contiennent "
"respectivement les données de work, author et person. <literal>author_work :"

#. Tag: title
#, no-c-format
msgid "Customer/Order/Product"
msgstr "Client/Commande/Produit "

#. Tag: para
#, no-c-format
msgid ""
"In this section we consider a model of the relationships between "
"<literal>Customer, Order, Line ItemProduct. There is a one-to-many association "
"between <literal>Customer and Order, but how "
"can you represent <literal>Order / LineItem / "
"<literal>Product? In the example, LineItem is "
"mapped as an association class representing the many-to-many association "
"between <literal>Order and Product. In "
"Hibernate this is called a composite element."
msgstr ""
"Imaginons maintenant le modèle de relations entre <literal>CustomerOrder, LineItem et "
"<literal>Product. Il y a une association un-à-plusieurs entre "
"<literal>Customer et Order, mais comment devons "
"nous représenter <literal>Order / LineItem / "
"<literal>Product ? J'ai choisi de mapper LineItem et Product. "
"Dans Hibernate, on appelle cela un élément composite. "

#. Tag: para
#, no-c-format
msgid "The mapping document will look like this:"
msgstr "Le document de mappage : "

#. Tag: para
#, no-c-format
msgid ""
"<literal>customers, orders, "
"<literal>line_items and products hold customer, "
"order, order line item and product data respectively. <literal>line_items, orders, "
"<literal>line_items et products contiennent les "
"données de customer, order, order line item et product. <literal>line_items\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\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\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 ""
#~ "<![CDATA[\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\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\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>]]>"

#~ msgid ""
#~ "<![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 ""
#~ "<![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]]>"

#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["

#~ msgid ""
#~ "<![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 ""
#~ "<![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]]"
#~ ">"

#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["

#~ msgid ""
#~ "<![CDATA[create table customers (\n"
#~ "    id BIGINT not null generated by default as identity, \n"
#~ "    name VARCHAR(255), \n"
#~ "    primary key (id)\n"
#~ ")\n"
#~ "\n"
#~ "create table orders (\n"
#~ "    id BIGINT not null generated by default as identity, \n"
#~ "    customer_id BIGINT, \n"
#~ "    date TIMESTAMP, \n"
#~ "    primary key (id)\n"
#~ ")\n"
#~ "\n"
#~ "create table line_items (\n"
#~ "    line_number INTEGER not null, \n"
#~ "    order_id BIGINT not null, \n"
#~ "    product_id BIGINT, \n"
#~ "    quantity INTEGER, \n"
#~ "    primary key (order_id, line_number)\n"
#~ ")\n"
#~ "\n"
#~ "create table products (\n"
#~ "    id BIGINT not null generated by default as identity, \n"
#~ "    serialNumber VARCHAR(255), \n"
#~ "    primary key (id)\n"
#~ ")\n"
#~ "\n"
#~ "alter table orders \n"
#~ "    add constraint ordersFK0 foreign key (customer_id) references "
#~ "customers\n"
#~ "alter table line_items\n"
#~ "    add constraint line_itemsFK0 foreign key (product_id) references "
#~ "products\n"
#~ "alter table line_items\n"
#~ "    add constraint line_itemsFK1 foreign key (order_id) references "
#~ "orders]]>"
#~ msgstr ""
#~ "<![CDATA[create table customers (\n"
#~ "    id BIGINT not null generated by default as identity, \n"
#~ "    name VARCHAR(255), \n"
#~ "    primary key (id)\n"
#~ ")\n"
#~ "\n"
#~ "create table orders (\n"
#~ "    id BIGINT not null generated by default as identity, \n"
#~ "    customer_id BIGINT, \n"
#~ "    date TIMESTAMP, \n"
#~ "    primary key (id)\n"
#~ ")\n"
#~ "\n"
#~ "create table line_items (\n"
#~ "    line_number INTEGER not null, \n"
#~ "    order_id BIGINT not null, \n"
#~ "    product_id BIGINT, \n"
#~ "    quantity INTEGER, \n"
#~ "    primary key (order_id, line_number)\n"
#~ ")\n"
#~ "\n"
#~ "create table products (\n"
#~ "    id BIGINT not null generated by default as identity, \n"
#~ "    serialNumber VARCHAR(255), \n"
#~ "    primary key (id)\n"
#~ ")\n"
#~ "\n"
#~ "alter table orders \n"
#~ "    add constraint ordersFK0 foreign key (customer_id) references "
#~ "customers\n"
#~ "alter table line_items\n"
#~ "    add constraint line_itemsFK0 foreign key (product_id) references "
#~ "products\n"
#~ "alter table line_items\n"
#~ "    add constraint line_itemsFK1 foreign key (order_id) references "
#~ "orders]]>"

#~ msgid ""
#~ "<![CDATA[\n"
#~ "        <formula>'HOME'\n"
#~ "    </one-to-one>\n"
#~ "    <one-to-one name=\"mailingAddress\" \n"
#~ "            cascade=\"all\">\n"
#~ "        <formula>name\n"
#~ "        <formula>'MAILING'\n"
#~ "    </one-to-one>\n"
#~ "</class>\n"
#~ "\n"
#~ "<class name=\"Address\" batch-size=\"2\" \n"
#~ "        check=\"addressType in ('MAILING', 'HOME', 'BUSINESS')\">\n"
#~ "    <composite-id>\n"
#~ "        <key-many-to-one name=\"person\" \n"
#~ "                column=\"personName\"/>\n"
#~ "        <key-property name=\"type\" \n"
#~ "                column=\"addressType\"/>\n"
#~ "    </composite-id>\n"
#~ "    <property name=\"street\" type=\"text\"/>\n"
#~ "    <property name=\"state\"/>\n"
#~ "    <property name=\"zip\"/>\n"
#~ "</class>]]>"
#~ msgstr ""
#~ "<![CDATA[\n"
#~ "        <formula>'HOME'\n"
#~ "    </one-to-one>\n"
#~ "    <one-to-one name=\"mailingAddress\" \n"
#~ "            cascade=\"all\">\n"
#~ "        <formula>name\n"
#~ "        <formula>'MAILING'\n"
#~ "    </one-to-one>\n"
#~ "</class>\n"
#~ "\n"
#~ "<class name=\"Address\" batch-size=\"2\" \n"
#~ "        check=\"addressType in ('MAILING', 'HOME', 'BUSINESS')\">\n"
#~ "    <composite-id>\n"
#~ "        <key-many-to-one name=\"person\" \n"
#~ "                column=\"personName\"/>\n"
#~ "        <key-property name=\"type\" \n"
#~ "                column=\"addressType\"/>\n"
#~ "    </composite-id>\n"
#~ "    <property name=\"street\" type=\"text\"/>\n"
#~ "    <property name=\"state\"/>\n"
#~ "    <property name=\"zip\"/>\n"
#~ "</class>]]>"

#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["

#~ msgid ""
#~ "<![CDATA[\n"
#~ "        </many-to-many>\n"
#~ "    </set>\n"
#~ "</class>\n"
#~ "    \n"
#~ "<class name=\"Group\" table=\"`Group`\">\n"
#~ "    <composite-id>\n"
#~ "        <key-property name=\"name\"/>\n"
#~ "        <key-property name=\"org\"/>\n"
#~ "    </composite-id>\n"
#~ "    <property name=\"description\"/>\n"
#~ "    <set name=\"users\" table=\"UserGroup\" inverse=\"true\">\n"
#~ "        <key>\n"
#~ "            <column name=\"groupName\"/>\n"
#~ "            <column name=\"org\"/>\n"
#~ "        </key>\n"
#~ "        <many-to-many class=\"User\">\n"
#~ "            <column name=\"userName\"/>\n"
#~ "            <formula>org\n"
#~ "        </many-to-many>\n"
#~ "    </set>\n"
#~ "</class>\n"
#~ "]]>"
#~ msgstr ""
#~ "<![CDATA[\n"
#~ "        </many-to-many>\n"
#~ "    </set>\n"
#~ "</class>\n"
#~ "    \n"
#~ "<class name=\"Group\" table=\"`Group`\">\n"
#~ "    <composite-id>\n"
#~ "        <key-property name=\"name\"/>\n"
#~ "        <key-property name=\"org\"/>\n"
#~ "    </composite-id>\n"
#~ "    <property name=\"description\"/>\n"
#~ "    <set name=\"users\" table=\"UserGroup\" inverse=\"true\">\n"
#~ "        <key>\n"
#~ "            <column name=\"groupName\"/>\n"
#~ "            <column name=\"org\"/>\n"
#~ "        </key>\n"
#~ "        <many-to-many class=\"User\">\n"
#~ "            <column name=\"userName\"/>\n"
#~ "            <formula>org\n"
#~ "        </many-to-many>\n"
#~ "    </set>\n"
#~ "</class>\n"
#~ "]]>"

#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["

#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<![CDATA["

Other Hibernate examples (source code examples)

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

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

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 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.