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
# Michael H. Smith <mhideo@redhat.com>, 2007.
# Angela Garcia <agarcia@redhat.com>, 2009.
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# 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-03 12:36+1000\n"
"Last-Translator: Angela Garcia <agarcia@redhat.com>\n"
"Language-Team:  <en@li.org>\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 "Ejemplo: mapeos varios"

#. Tag: para
#, no-c-format
msgid "This chapters explores some more complex association mappings."
msgstr ""
"Este capítulo explora algunos de los mapeos de asociaciones más complejos."

#. Tag: title
#, no-c-format
msgid "Employer/Employee"
msgstr "Empleador/Empleado"

#. Tag: para
#, no-c-format
msgid ""
"The following model of the relationship between <literal>Employer "
"and <literal>Employee uses an entity class (Employment y "
"<literal>Employee utiliza una clase de entidad "
"(<literal>Employment) para representar la asociación. Puede hacer "
"esto cuando podría haber más de un período de empleo para los dos mismos "
"participantes. Se utilizan componentes para modelar los valores monetarios y "
"los nombres de los empleados."

#. Tag: para
#, no-c-format
msgid "Here is a possible mapping document:"
msgstr "He aquí un posible documento de mapeo: "

#. Tag: para
#, no-c-format
msgid "Here is the table schema generated by <literal>SchemaExport."
msgstr ""
"Este es el esquema de tablas generado por <literal>SchemaExport."

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

#. 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 ""
"Considere el siguiente modelo de las relaciones entre <literal>WorkAuthor y Person. En el "
"ejemplo representamos la relación entre <literal>Work y "
"<literal>Author como una asociación muchos-a-muchos y la relación "
"entre <literal>Author y Person como una "
"asociación uno-a-uno. Otra posibilidad sería que <literal>Author "
"extendiera <literal>Person."

#. Tag: para
#, no-c-format
msgid ""
"The following mapping document correctly represents these relationships:"
msgstr ""
"El siguiente documento de mapeo representa estas relaciones de manera "
"correcta:"

#. 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 ""
"Hay cuatro tablas en este mapeo: <literal>works, authorspersons tienen los datos de obra, autor y "
"persona respectivamente. <literal>author_work es una tabla de "
"asociación enlazando los autores a las obras. Este es el esquema de tablas, "
"tal como fue generado por <literal>SchemaExport:"

#. Tag: title
#, no-c-format
msgid "Customer/Order/Product"
msgstr "Cliente/Orden/Producto"

#. 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 ""
"En esta sección consideramos un modelo de las relaciones entre "
"<literal>Customer, Order, Line ItemProduct. Hay una asociación uno-a-muchos entre "
"<literal>Customer y Order, pero, ¿cómo "
"deberíamos representar <literal>Order / LineItemProduct? En el ejemplo, LineItem y Product. "
"En Hibernate, esto se llama un elemento compuesto."

#. Tag: para
#, no-c-format
msgid "The mapping document will look like this:"
msgstr "El documento de mapeo se verá así:"

#. 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 y products tienen los datos "
"de cliente, orden, ítem de línea de orden y producto respectivamente. Además "
"<literal>line_items también actúa como una tabla de asociación "
"enlazando órdenes con productos."

#. Tag: title
#, no-c-format
msgid "Miscellaneous example mappings"
msgstr "Mapeos varios de ejemplo"

#. Tag: para
#, no-c-format
msgid ""
"These examples are available from the Hibernate test suite. You will find "
"many other useful example mappings there by searching in the <literal>test de la distribución de Hibernate."

#. Tag: title
#, no-c-format
msgid "\"Typed\" one-to-one association"
msgstr "Asociación uno-a-uno \"Tipificada\""

#. Tag: title
#, no-c-format
msgid "Composite key example"
msgstr "Ejemplo de clave compuesta"

#. Tag: title
#, no-c-format
msgid "Many-to-many with shared composite key attribute"
msgstr "Muchos-a-muchos con atributo compartido de clave compuesta"

#. Tag: title
#, no-c-format
msgid "Content based discrimination"
msgstr "Discriminación basada en contenido"

#. Tag: title
#, no-c-format
msgid "Associations on alternate keys"
msgstr "Asociaciones sobre claves alternativas"

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